diff --git a/google-cloud-talent-bom/pom.xml b/google-cloud-talent-bom/pom.xml index 2ddbaebf..a86eaa30 100644 --- a/google-cloud-talent-bom/pom.xml +++ b/google-cloud-talent-bom/pom.xml @@ -60,7 +60,11 @@ - + + com.google.api.grpc + proto-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-talent-v4beta1 @@ -71,6 +75,11 @@ google-cloud-talent 0.37.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + com.google.api.grpc grpc-google-cloud-talent-v4beta1 diff --git a/google-cloud-talent/pom.xml b/google-cloud-talent/pom.xml index 78411b7c..b48cba12 100644 --- a/google-cloud-talent/pom.xml +++ b/google-cloud-talent/pom.xml @@ -42,6 +42,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-talent-v4 + com.google.api.grpc proto-google-cloud-talent-v4beta1 @@ -74,6 +78,11 @@ google-cloud-core test + + com.google.api.grpc + grpc-google-cloud-talent-v4 + test + com.google.api.grpc grpc-google-cloud-talent-v4beta1 diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceClient.java new file mode 100644 index 00000000..885ceb63 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceClient.java @@ -0,0 +1,765 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.stub.CompanyServiceStub; +import com.google.cloud.talent.v4.stub.CompanyServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: A service that handles company management, including CRUD and enumeration. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   Company company = Company.newBuilder().build();
+ *   Company response = companyServiceClient.createCompany(parent, company);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the companyServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CompanyServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * CompanyServiceSettings companyServiceSettings =
+ *     CompanyServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CompanyServiceClient companyServiceClient =
+ *     CompanyServiceClient.create(companyServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * CompanyServiceSettings companyServiceSettings =
+ *     CompanyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CompanyServiceClient companyServiceClient =
+ *     CompanyServiceClient.create(companyServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompanyServiceClient implements BackgroundResource { + private final CompanyServiceSettings settings; + private final CompanyServiceStub stub; + + /** Constructs an instance of CompanyServiceClient with default settings. */ + public static final CompanyServiceClient create() throws IOException { + return create(CompanyServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CompanyServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CompanyServiceClient create(CompanyServiceSettings settings) + throws IOException { + return new CompanyServiceClient(settings); + } + + /** + * Constructs an instance of CompanyServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer to use CompanyServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final CompanyServiceClient create(CompanyServiceStub stub) { + return new CompanyServiceClient(stub); + } + + /** + * Constructs an instance of CompanyServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected CompanyServiceClient(CompanyServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CompanyServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected CompanyServiceClient(CompanyServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CompanyServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CompanyServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new company entity. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Company company = Company.newBuilder().build();
+   *   Company response = companyServiceClient.createCompany(parent, company);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @param company Required. The company to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company createCompany(TenantName parent, Company company) { + CreateCompanyRequest request = + CreateCompanyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCompany(company) + .build(); + return createCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new company entity. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Company company = Company.newBuilder().build();
+   *   Company response = companyServiceClient.createCompany(parent.toString(), company);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @param company Required. The company to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company createCompany(String parent, Company company) { + CreateCompanyRequest request = + CreateCompanyRequest.newBuilder().setParent(parent).setCompany(company).build(); + return createCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new company entity. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Company company = Company.newBuilder().build();
+   *   CreateCompanyRequest request = CreateCompanyRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCompany(company)
+   *     .build();
+   *   Company response = companyServiceClient.createCompany(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company createCompany(CreateCompanyRequest request) { + return createCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new company entity. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Company company = Company.newBuilder().build();
+   *   CreateCompanyRequest request = CreateCompanyRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setCompany(company)
+   *     .build();
+   *   ApiFuture<Company> future = companyServiceClient.createCompanyCallable().futureCall(request);
+   *   // Do something
+   *   Company response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createCompanyCallable() { + return stub.createCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   Company response = companyServiceClient.getCompany(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be retrieved. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company getCompany(CompanyName name) { + GetCompanyRequest request = + GetCompanyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   Company response = companyServiceClient.getCompany(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be retrieved. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company getCompany(String name) { + GetCompanyRequest request = GetCompanyRequest.newBuilder().setName(name).build(); + return getCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   GetCompanyRequest request = GetCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Company response = companyServiceClient.getCompany(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company getCompany(GetCompanyRequest request) { + return getCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   GetCompanyRequest request = GetCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Company> future = companyServiceClient.getCompanyCallable().futureCall(request);
+   *   // Do something
+   *   Company response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getCompanyCallable() { + return stub.getCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   Company company = Company.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Company response = companyServiceClient.updateCompany(company, updateMask);
+   * }
+   * 
+ * + * @param company Required. The company resource to replace the current resource in the system. + * @param updateMask Strongly recommended for the best service experience. + *

If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] is provided, + * only the specified fields in [company][google.cloud.talent.v4.UpdateCompanyRequest.company] + * are updated. Otherwise all the fields are updated. + *

A field mask to specify the company fields to be updated. Only top level fields of + * [Company][google.cloud.talent.v4.Company] are supported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company updateCompany(Company company, FieldMask updateMask) { + UpdateCompanyRequest request = + UpdateCompanyRequest.newBuilder().setCompany(company).setUpdateMask(updateMask).build(); + return updateCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   Company company = Company.newBuilder().build();
+   *   UpdateCompanyRequest request = UpdateCompanyRequest.newBuilder()
+   *     .setCompany(company)
+   *     .build();
+   *   Company response = companyServiceClient.updateCompany(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Company updateCompany(UpdateCompanyRequest request) { + return updateCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified company. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   Company company = Company.newBuilder().build();
+   *   UpdateCompanyRequest request = UpdateCompanyRequest.newBuilder()
+   *     .setCompany(company)
+   *     .build();
+   *   ApiFuture<Company> future = companyServiceClient.updateCompanyCallable().futureCall(request);
+   *   // Do something
+   *   Company response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateCompanyCallable() { + return stub.updateCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   companyServiceClient.deleteCompany(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCompany(CompanyName name) { + DeleteCompanyRequest request = + DeleteCompanyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   companyServiceClient.deleteCompany(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the company to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCompany(String name) { + DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder().setName(name).build(); + deleteCompany(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   companyServiceClient.deleteCompany(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCompany(DeleteCompanyRequest request) { + deleteCompanyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified company. Prerequisite: The company has no jobs associated with it. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]");
+   *   DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteCompanyCallable() { + return stub.deleteCompanyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all companies associated with the project. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCompaniesPagedResponse listCompanies(TenantName parent) { + ListCompaniesRequest request = + ListCompaniesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCompanies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all companies associated with the project. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   for (Company element : companyServiceClient.listCompanies(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the company is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCompaniesPagedResponse listCompanies(String parent) { + ListCompaniesRequest request = ListCompaniesRequest.newBuilder().setParent(parent).build(); + return listCompanies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all companies associated with the project. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Company element : companyServiceClient.listCompanies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCompaniesPagedResponse listCompanies(ListCompaniesRequest request) { + return listCompaniesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all companies associated with the project. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListCompaniesPagedResponse> future = companyServiceClient.listCompaniesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Company element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listCompaniesPagedCallable() { + return stub.listCompaniesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all companies associated with the project. + * + *

Sample code: + * + *


+   * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ListCompaniesRequest request = ListCompaniesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListCompaniesResponse response = companyServiceClient.listCompaniesCallable().call(request);
+   *     for (Company element : response.getCompaniesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listCompaniesCallable() { + return stub.listCompaniesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListCompaniesPagedResponse + extends AbstractPagedListResponse< + ListCompaniesRequest, + ListCompaniesResponse, + Company, + ListCompaniesPage, + ListCompaniesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCompaniesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListCompaniesPagedResponse apply(ListCompaniesPage input) { + return new ListCompaniesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCompaniesPagedResponse(ListCompaniesPage page) { + super(page, ListCompaniesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCompaniesPage + extends AbstractPage< + ListCompaniesRequest, ListCompaniesResponse, Company, ListCompaniesPage> { + + private ListCompaniesPage( + PageContext context, + ListCompaniesResponse response) { + super(context, response); + } + + private static ListCompaniesPage createEmptyPage() { + return new ListCompaniesPage(null, null); + } + + @Override + protected ListCompaniesPage createPage( + PageContext context, + ListCompaniesResponse response) { + return new ListCompaniesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCompaniesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCompaniesRequest, + ListCompaniesResponse, + Company, + ListCompaniesPage, + ListCompaniesFixedSizeCollection> { + + private ListCompaniesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCompaniesFixedSizeCollection createEmptyCollection() { + return new ListCompaniesFixedSizeCollection(null, 0); + } + + @Override + protected ListCompaniesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCompaniesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceSettings.java new file mode 100644 index 00000000..03beb04c --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceSettings.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.CompanyServiceClient.ListCompaniesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.stub.CompanyServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link CompanyServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createCompany to 30 seconds: + * + *

+ * 
+ * CompanyServiceSettings.Builder companyServiceSettingsBuilder =
+ *     CompanyServiceSettings.newBuilder();
+ * companyServiceSettingsBuilder
+ *     .createCompanySettings()
+ *     .setRetrySettings(
+ *         companyServiceSettingsBuilder.createCompanySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompanyServiceSettings companyServiceSettings = companyServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompanyServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createCompany. */ + public UnaryCallSettings createCompanySettings() { + return ((CompanyServiceStubSettings) getStubSettings()).createCompanySettings(); + } + + /** Returns the object with the settings used for calls to getCompany. */ + public UnaryCallSettings getCompanySettings() { + return ((CompanyServiceStubSettings) getStubSettings()).getCompanySettings(); + } + + /** Returns the object with the settings used for calls to updateCompany. */ + public UnaryCallSettings updateCompanySettings() { + return ((CompanyServiceStubSettings) getStubSettings()).updateCompanySettings(); + } + + /** Returns the object with the settings used for calls to deleteCompany. */ + public UnaryCallSettings deleteCompanySettings() { + return ((CompanyServiceStubSettings) getStubSettings()).deleteCompanySettings(); + } + + /** Returns the object with the settings used for calls to listCompanies. */ + public PagedCallSettings + listCompaniesSettings() { + return ((CompanyServiceStubSettings) getStubSettings()).listCompaniesSettings(); + } + + public static final CompanyServiceSettings create(CompanyServiceStubSettings stub) + throws IOException { + return new CompanyServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CompanyServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CompanyServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CompanyServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CompanyServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CompanyServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CompanyServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CompanyServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompanyServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CompanyServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(CompanyServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(CompanyServiceStubSettings.newBuilder()); + } + + protected Builder(CompanyServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CompanyServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public CompanyServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CompanyServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createCompany. */ + public UnaryCallSettings.Builder createCompanySettings() { + return getStubSettingsBuilder().createCompanySettings(); + } + + /** Returns the builder for the settings used for calls to getCompany. */ + public UnaryCallSettings.Builder getCompanySettings() { + return getStubSettingsBuilder().getCompanySettings(); + } + + /** Returns the builder for the settings used for calls to updateCompany. */ + public UnaryCallSettings.Builder updateCompanySettings() { + return getStubSettingsBuilder().updateCompanySettings(); + } + + /** Returns the builder for the settings used for calls to deleteCompany. */ + public UnaryCallSettings.Builder deleteCompanySettings() { + return getStubSettingsBuilder().deleteCompanySettings(); + } + + /** Returns the builder for the settings used for calls to listCompanies. */ + public PagedCallSettings.Builder< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> + listCompaniesSettings() { + return getStubSettingsBuilder().listCompaniesSettings(); + } + + @Override + public CompanyServiceSettings build() throws IOException { + return new CompanyServiceSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionClient.java new file mode 100644 index 00000000..f8111921 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionClient.java @@ -0,0 +1,236 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.stub.CompletionStub; +import com.google.cloud.talent.v4.stub.CompletionStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: A service handles auto completion. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (CompletionClient completionClient = CompletionClient.create()) {
+ *   TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]");
+ *   String query = "";
+ *   int pageSize = 0;
+ *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
+ *     .setTenant(tenant.toString())
+ *     .setQuery(query)
+ *     .setPageSize(pageSize)
+ *     .build();
+ *   CompleteQueryResponse response = completionClient.completeQuery(request);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the completionClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CompletionSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * CompletionSettings completionSettings =
+ *     CompletionSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CompletionClient completionClient =
+ *     CompletionClient.create(completionSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * CompletionSettings completionSettings =
+ *     CompletionSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CompletionClient completionClient =
+ *     CompletionClient.create(completionSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompletionClient implements BackgroundResource { + private final CompletionSettings settings; + private final CompletionStub stub; + + /** Constructs an instance of CompletionClient with default settings. */ + public static final CompletionClient create() throws IOException { + return create(CompletionSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CompletionClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CompletionClient create(CompletionSettings settings) throws IOException { + return new CompletionClient(settings); + } + + /** + * Constructs an instance of CompletionClient, using the given stub for making calls. This is for + * advanced usage - prefer to use CompletionSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final CompletionClient create(CompletionStub stub) { + return new CompletionClient(stub); + } + + /** + * Constructs an instance of CompletionClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected CompletionClient(CompletionSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CompletionStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected CompletionClient(CompletionStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CompletionSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CompletionStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Completes the specified prefix with keyword suggestions. Intended for use by a job search + * auto-complete search box. + * + *

Sample code: + * + *


+   * try (CompletionClient completionClient = CompletionClient.create()) {
+   *   TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String query = "";
+   *   int pageSize = 0;
+   *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
+   *     .setTenant(tenant.toString())
+   *     .setQuery(query)
+   *     .setPageSize(pageSize)
+   *     .build();
+   *   CompleteQueryResponse response = completionClient.completeQuery(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) { + return completeQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Completes the specified prefix with keyword suggestions. Intended for use by a job search + * auto-complete search box. + * + *

Sample code: + * + *


+   * try (CompletionClient completionClient = CompletionClient.create()) {
+   *   TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String query = "";
+   *   int pageSize = 0;
+   *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
+   *     .setTenant(tenant.toString())
+   *     .setQuery(query)
+   *     .setPageSize(pageSize)
+   *     .build();
+   *   ApiFuture<CompleteQueryResponse> future = completionClient.completeQueryCallable().futureCall(request);
+   *   // Do something
+   *   CompleteQueryResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable completeQueryCallable() { + return stub.completeQueryCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionSettings.java new file mode 100644 index 00000000..034fac8a --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionSettings.java @@ -0,0 +1,179 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.stub.CompletionStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link CompletionClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of completeQuery to 30 seconds: + * + *

+ * 
+ * CompletionSettings.Builder completionSettingsBuilder =
+ *     CompletionSettings.newBuilder();
+ * completionSettingsBuilder
+ *     .completeQuerySettings()
+ *     .setRetrySettings(
+ *         completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompletionSettings completionSettings = completionSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompletionSettings extends ClientSettings { + /** Returns the object with the settings used for calls to completeQuery. */ + public UnaryCallSettings completeQuerySettings() { + return ((CompletionStubSettings) getStubSettings()).completeQuerySettings(); + } + + public static final CompletionSettings create(CompletionStubSettings stub) throws IOException { + return new CompletionSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CompletionStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CompletionStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CompletionStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CompletionStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CompletionStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CompletionStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CompletionStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompletionSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CompletionSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(CompletionStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(CompletionStubSettings.newBuilder()); + } + + protected Builder(CompletionSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CompletionStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public CompletionStubSettings.Builder getStubSettingsBuilder() { + return ((CompletionStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to completeQuery. */ + public UnaryCallSettings.Builder + completeQuerySettings() { + return getStubSettingsBuilder().completeQuerySettings(); + } + + @Override + public CompletionSettings build() throws IOException { + return new CompletionSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceClient.java new file mode 100644 index 00000000..b71c4710 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceClient.java @@ -0,0 +1,294 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.stub.EventServiceStub; +import com.google.cloud.talent.v4.stub.EventServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: A service handles client event report. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+ *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the eventServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of EventServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * EventServiceSettings eventServiceSettings =
+ *     EventServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EventServiceClient eventServiceClient =
+ *     EventServiceClient.create(eventServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * EventServiceSettings eventServiceSettings =
+ *     EventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EventServiceClient eventServiceClient =
+ *     EventServiceClient.create(eventServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EventServiceClient implements BackgroundResource { + private final EventServiceSettings settings; + private final EventServiceStub stub; + + /** Constructs an instance of EventServiceClient with default settings. */ + public static final EventServiceClient create() throws IOException { + return create(EventServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EventServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final EventServiceClient create(EventServiceSettings settings) throws IOException { + return new EventServiceClient(settings); + } + + /** + * Constructs an instance of EventServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer to use EventServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final EventServiceClient create(EventServiceStub stub) { + return new EventServiceClient(stub); + } + + /** + * Constructs an instance of EventServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected EventServiceClient(EventServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EventServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected EventServiceClient(EventServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final EventServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EventServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Report events issued when end user interacts with customer's application that uses Cloud Talent + * Solution. You may inspect the created events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) about self service tools. + * + *

Sample code: + * + *


+   * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+   *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the event is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @param clientEvent Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientEvent createClientEvent(TenantName parent, ClientEvent clientEvent) { + CreateClientEventRequest request = + CreateClientEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setClientEvent(clientEvent) + .build(); + return createClientEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Report events issued when end user interacts with customer's application that uses Cloud Talent + * Solution. You may inspect the created events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) about self service tools. + * + *

Sample code: + * + *


+   * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+   *   ClientEvent response = eventServiceClient.createClientEvent(parent.toString(), clientEvent);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the tenant under which the event is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @param clientEvent Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientEvent createClientEvent(String parent, ClientEvent clientEvent) { + CreateClientEventRequest request = + CreateClientEventRequest.newBuilder().setParent(parent).setClientEvent(clientEvent).build(); + return createClientEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Report events issued when end user interacts with customer's application that uses Cloud Talent + * Solution. You may inspect the created events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) about self service tools. + * + *

Sample code: + * + *


+   * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+   *   CreateClientEventRequest request = CreateClientEventRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setClientEvent(clientEvent)
+   *     .build();
+   *   ClientEvent response = eventServiceClient.createClientEvent(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientEvent createClientEvent(CreateClientEventRequest request) { + return createClientEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Report events issued when end user interacts with customer's application that uses Cloud Talent + * Solution. You may inspect the created events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) about self service tools. + * + *

Sample code: + * + *


+   * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+   *   CreateClientEventRequest request = CreateClientEventRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setClientEvent(clientEvent)
+   *     .build();
+   *   ApiFuture<ClientEvent> future = eventServiceClient.createClientEventCallable().futureCall(request);
+   *   // Do something
+   *   ClientEvent response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createClientEventCallable() { + return stub.createClientEventCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceSettings.java new file mode 100644 index 00000000..6675f688 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceSettings.java @@ -0,0 +1,180 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.stub.EventServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link EventServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createClientEvent to 30 seconds: + * + *

+ * 
+ * EventServiceSettings.Builder eventServiceSettingsBuilder =
+ *     EventServiceSettings.newBuilder();
+ * eventServiceSettingsBuilder
+ *     .createClientEventSettings()
+ *     .setRetrySettings(
+ *         eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EventServiceSettings eventServiceSettings = eventServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EventServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createClientEvent. */ + public UnaryCallSettings createClientEventSettings() { + return ((EventServiceStubSettings) getStubSettings()).createClientEventSettings(); + } + + public static final EventServiceSettings create(EventServiceStubSettings stub) + throws IOException { + return new EventServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EventServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EventServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EventServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EventServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EventServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EventServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EventServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EventServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EventServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(EventServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(EventServiceStubSettings.newBuilder()); + } + + protected Builder(EventServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EventServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public EventServiceStubSettings.Builder getStubSettingsBuilder() { + return ((EventServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createClientEvent. */ + public UnaryCallSettings.Builder + createClientEventSettings() { + return getStubSettingsBuilder().createClientEventSettings(); + } + + @Override + public EventServiceSettings build() throws IOException { + return new EventServiceSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceClient.java new file mode 100644 index 00000000..30ddaa58 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceClient.java @@ -0,0 +1,1367 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.stub.JobServiceStub; +import com.google.cloud.talent.v4.stub.JobServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: A service handles job management, including job CRUD, enumeration and + * search. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   Job job = Job.newBuilder().build();
+ *   Job response = jobServiceClient.createJob(parent, job);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the jobServiceClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of JobServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * JobServiceSettings jobServiceSettings =
+ *     JobServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * JobServiceClient jobServiceClient =
+ *     JobServiceClient.create(jobServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * JobServiceSettings jobServiceSettings =
+ *     JobServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * JobServiceClient jobServiceClient =
+ *     JobServiceClient.create(jobServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class JobServiceClient implements BackgroundResource { + private final JobServiceSettings settings; + private final JobServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of JobServiceClient with default settings. */ + public static final JobServiceClient create() throws IOException { + return create(JobServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of JobServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final JobServiceClient create(JobServiceSettings settings) throws IOException { + return new JobServiceClient(settings); + } + + /** + * Constructs an instance of JobServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer to use JobServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final JobServiceClient create(JobServiceStub stub) { + return new JobServiceClient(stub); + } + + /** + * Constructs an instance of JobServiceClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected JobServiceClient(JobServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((JobServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected JobServiceClient(JobServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final JobServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public JobServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new job. + * + *

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Job job = Job.newBuilder().build();
+   *   Job response = jobServiceClient.createJob(parent, job);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param job Required. The Job to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job createJob(TenantName parent, Job job) { + CreateJobRequest request = + CreateJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setJob(job) + .build(); + return createJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new job. + * + *

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Job job = Job.newBuilder().build();
+   *   Job response = jobServiceClient.createJob(parent.toString(), job);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param job Required. The Job to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job createJob(String parent, Job job) { + CreateJobRequest request = CreateJobRequest.newBuilder().setParent(parent).setJob(job).build(); + return createJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new job. + * + *

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Job job = Job.newBuilder().build();
+   *   CreateJobRequest request = CreateJobRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setJob(job)
+   *     .build();
+   *   Job response = jobServiceClient.createJob(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job createJob(CreateJobRequest request) { + return createJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new job. + * + *

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Job job = Job.newBuilder().build();
+   *   CreateJobRequest request = CreateJobRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setJob(job)
+   *     .build();
+   *   ApiFuture<Job> future = jobServiceClient.createJobCallable().futureCall(request);
+   *   // Do something
+   *   Job response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createJobCallable() { + return stub.createJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsResponse response = jobServiceClient.batchCreateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param jobs Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchCreateJobsAsync(TenantName parent, List jobs) { + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchCreateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsResponse response = jobServiceClient.batchCreateJobsAsync(parent.toString(), jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param jobs Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchCreateJobsAsync(String parent, List jobs) { + BatchCreateJobsRequest request = + BatchCreateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); + return batchCreateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   BatchCreateJobsResponse response = jobServiceClient.batchCreateJobsAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchCreateJobsAsync(BatchCreateJobsRequest request) { + return batchCreateJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   OperationFuture<BatchCreateJobsResponse, BatchOperationMetadata> future = jobServiceClient.batchCreateJobsOperationCallable().futureCall(request);
+   *   // Do something
+   *   BatchCreateJobsResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationCallable() { + return stub.batchCreateJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch create jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchCreateJobsRequest request = BatchCreateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   ApiFuture<Operation> future = jobServiceClient.batchCreateJobsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchCreateJobsCallable() { + return stub.batchCreateJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   Job response = jobServiceClient.getJob(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to retrieve. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job getJob(JobName name) { + GetJobRequest request = + GetJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   Job response = jobServiceClient.getJob(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to retrieve. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job getJob(String name) { + GetJobRequest request = GetJobRequest.newBuilder().setName(name).build(); + return getJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   GetJobRequest request = GetJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Job response = jobServiceClient.getJob(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job getJob(GetJobRequest request) { + return getJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   GetJobRequest request = GetJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Job> future = jobServiceClient.getJobCallable().futureCall(request);
+   *   // Do something
+   *   Job response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getJobCallable() { + return stub.getJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified job. + * + *

Typically, updated contents become visible in search results within 10 seconds, but it may + * take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   Job job = Job.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Job response = jobServiceClient.updateJob(job, updateMask);
+   * }
+   * 
+ * + * @param job Required. The Job to be updated. + * @param updateMask Strongly recommended for the best service experience. + *

If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only + * the specified fields in [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. + * Otherwise all the fields are updated. + *

A field mask to restrict the fields that are updated. Only top level fields of + * [Job][google.cloud.talent.v4.Job] are supported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job updateJob(Job job, FieldMask updateMask) { + UpdateJobRequest request = + UpdateJobRequest.newBuilder().setJob(job).setUpdateMask(updateMask).build(); + return updateJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified job. + * + *

Typically, updated contents become visible in search results within 10 seconds, but it may + * take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   Job job = Job.newBuilder().build();
+   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
+   *     .setJob(job)
+   *     .build();
+   *   Job response = jobServiceClient.updateJob(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Job updateJob(UpdateJobRequest request) { + return updateJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified job. + * + *

Typically, updated contents become visible in search results within 10 seconds, but it may + * take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   Job job = Job.newBuilder().build();
+   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
+   *     .setJob(job)
+   *     .build();
+   *   ApiFuture<Job> future = jobServiceClient.updateJobCallable().futureCall(request);
+   *   // Do something
+   *   Job response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateJobCallable() { + return stub.updateJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsResponse response = jobServiceClient.batchUpdateJobsAsync(parent, jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param jobs Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchUpdateJobsAsync(TenantName parent, List jobs) { + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllJobs(jobs) + .build(); + return batchUpdateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsResponse response = jobServiceClient.batchUpdateJobsAsync(parent.toString(), jobs).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param jobs Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchUpdateJobsAsync(String parent, List jobs) { + BatchUpdateJobsRequest request = + BatchUpdateJobsRequest.newBuilder().setParent(parent).addAllJobs(jobs).build(); + return batchUpdateJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   BatchUpdateJobsResponse response = jobServiceClient.batchUpdateJobsAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchUpdateJobsAsync(BatchUpdateJobsRequest request) { + return batchUpdateJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   OperationFuture<BatchUpdateJobsResponse, BatchOperationMetadata> future = jobServiceClient.batchUpdateJobsOperationCallable().futureCall(request);
+   *   // Do something
+   *   BatchUpdateJobsResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationCallable() { + return stub.batchUpdateJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch update jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<Job> jobs = new ArrayList<>();
+   *   BatchUpdateJobsRequest request = BatchUpdateJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllJobs(jobs)
+   *     .build();
+   *   ApiFuture<Operation> future = jobServiceClient.batchUpdateJobsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchUpdateJobsCallable() { + return stub.batchUpdateJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   jobServiceClient.deleteJob(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJob(JobName name) { + DeleteJobRequest request = + DeleteJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   jobServiceClient.deleteJob(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the job to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJob(String name) { + DeleteJobRequest request = DeleteJobRequest.newBuilder().setName(name).build(); + deleteJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   jobServiceClient.deleteJob(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJob(DeleteJobRequest request) { + deleteJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified job. + * + *

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]");
+   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = jobServiceClient.deleteJobCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteJobCallable() { + return stub.deleteJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch delete jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<String> formattedNames = new ArrayList<>();
+   *   BatchDeleteJobsResponse response = jobServiceClient.batchDeleteJobsAsync(parent, formattedNames).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + *

The parent of all of the jobs specified in `names` must match this field. + * @param names The names of the jobs to delete. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + *

A maximum of 200 jobs can be deleted in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchDeleteJobsAsync(TenantName parent, List names) { + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllNames(names) + .build(); + return batchDeleteJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch delete jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   List<String> formattedNames = new ArrayList<>();
+   *   BatchDeleteJobsResponse response = jobServiceClient.batchDeleteJobsAsync(parent.toString(), formattedNames).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + *

The parent of all of the jobs specified in `names` must match this field. + * @param names The names of the jobs to delete. + *

The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, + * "projects/foo/tenants/bar/jobs/baz". + *

A maximum of 200 jobs can be deleted in a batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchDeleteJobsAsync(String parent, List names) { + BatchDeleteJobsRequest request = + BatchDeleteJobsRequest.newBuilder().setParent(parent).addAllNames(names).build(); + return batchDeleteJobsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch delete jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   BatchDeleteJobsResponse response = jobServiceClient.batchDeleteJobsAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + batchDeleteJobsAsync(BatchDeleteJobsRequest request) { + return batchDeleteJobsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch delete jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   OperationFuture<BatchDeleteJobsResponse, BatchOperationMetadata> future = jobServiceClient.batchDeleteJobsOperationCallable().futureCall(request);
+   *   // Do something
+   *   BatchDeleteJobsResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationCallable() { + return stub.batchDeleteJobsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Begins executing a batch delete jobs operation. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   BatchDeleteJobsRequest request = BatchDeleteJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<Operation> future = jobServiceClient.batchDeleteJobsCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchDeleteJobsCallable() { + return stub.batchDeleteJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists jobs by filter. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   for (Job element : jobServiceClient.listJobs(parent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param filter Required. The filter string specifies the jobs to be enumerated. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` * `status` Available values: + * OPEN, EXPIRED, ALL. Defaults to OPEN if no value is specified. + *

Sample Query: + *

* companyName = "projects/foo/tenants/bar/companies/baz" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND requisitionId = "req-1" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND status = "EXPIRED" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobsPagedResponse listJobs(TenantName parent, String filter) { + ListJobsRequest request = + ListJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFilter(filter) + .build(); + return listJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists jobs by filter. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   for (Job element : jobServiceClient.listJobs(parent.toString(), filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the tenant under which the job is created. + *

The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @param filter Required. The filter string specifies the jobs to be enumerated. + *

Supported operator: =, AND + *

The fields eligible for filtering are: + *

* `companyName` (Required) * `requisitionId` * `status` Available values: + * OPEN, EXPIRED, ALL. Defaults to OPEN if no value is specified. + *

Sample Query: + *

* companyName = "projects/foo/tenants/bar/companies/baz" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND requisitionId = "req-1" * companyName = + * "projects/foo/tenants/bar/companies/baz" AND status = "EXPIRED" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobsPagedResponse listJobs(String parent, String filter) { + ListJobsRequest request = + ListJobsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists jobs by filter. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   ListJobsRequest request = ListJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   for (Job element : jobServiceClient.listJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobsPagedResponse listJobs(ListJobsRequest request) { + return listJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists jobs by filter. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   ListJobsRequest request = ListJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   ApiFuture<ListJobsPagedResponse> future = jobServiceClient.listJobsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Job element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listJobsPagedCallable() { + return stub.listJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists jobs by filter. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   String filter = "";
+   *   ListJobsRequest request = ListJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setFilter(filter)
+   *     .build();
+   *   while (true) {
+   *     ListJobsResponse response = jobServiceClient.listJobsCallable().call(request);
+   *     for (Job element : response.getJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listJobsCallable() { + return stub.listJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + *

This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs present + * in the database, and only returns jobs that the caller has permission to search against. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   SearchJobsResponse response = jobServiceClient.searchJobs(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchJobsResponse searchJobs(SearchJobsRequest request) { + return searchJobsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + *

This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs present + * in the database, and only returns jobs that the caller has permission to search against. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   ApiFuture<SearchJobsResponse> future = jobServiceClient.searchJobsCallable().futureCall(request);
+   *   // Do something
+   *   SearchJobsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable searchJobsCallable() { + return stub.searchJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + *

This API call is intended for the use case of targeting passive job seekers (for example, + * job seekers who have signed up to receive email alerts about potential job opportunities), it + * has different algorithmic adjustments that are designed to specifically target passive job + * seekers. + * + *

This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs present + * in the database, and only returns jobs the caller has permission to search against. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   SearchJobsResponse response = jobServiceClient.searchJobsForAlert(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchJobsResponse searchJobsForAlert(SearchJobsRequest request) { + return searchJobsForAlertCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + *

This API call is intended for the use case of targeting passive job seekers (for example, + * job seekers who have signed up to receive email alerts about potential job opportunities), it + * has different algorithmic adjustments that are designed to specifically target passive job + * seekers. + * + *

This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs present + * in the database, and only returns jobs the caller has permission to search against. + * + *

Sample code: + * + *


+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+   *   RequestMetadata requestMetadata = RequestMetadata.newBuilder().build();
+   *   SearchJobsRequest request = SearchJobsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setRequestMetadata(requestMetadata)
+   *     .build();
+   *   ApiFuture<SearchJobsResponse> future = jobServiceClient.searchJobsForAlertCallable().futureCall(request);
+   *   // Do something
+   *   SearchJobsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable searchJobsForAlertCallable() { + return stub.searchJobsForAlertCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListJobsPagedResponse + extends AbstractPagedListResponse< + ListJobsRequest, ListJobsResponse, Job, ListJobsPage, ListJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListJobsPagedResponse apply(ListJobsPage input) { + return new ListJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListJobsPagedResponse(ListJobsPage page) { + super(page, ListJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListJobsPage + extends AbstractPage { + + private ListJobsPage( + PageContext context, ListJobsResponse response) { + super(context, response); + } + + private static ListJobsPage createEmptyPage() { + return new ListJobsPage(null, null); + } + + @Override + protected ListJobsPage createPage( + PageContext context, ListJobsResponse response) { + return new ListJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListJobsRequest, ListJobsResponse, Job, ListJobsPage, ListJobsFixedSizeCollection> { + + private ListJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListJobsFixedSizeCollection createEmptyCollection() { + return new ListJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListJobsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceSettings.java new file mode 100644 index 00000000..66093c9b --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceSettings.java @@ -0,0 +1,331 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.JobServiceClient.ListJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.stub.JobServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link JobServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createJob to 30 seconds: + * + *

+ * 
+ * JobServiceSettings.Builder jobServiceSettingsBuilder =
+ *     JobServiceSettings.newBuilder();
+ * jobServiceSettingsBuilder
+ *     .createJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * JobServiceSettings jobServiceSettings = jobServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class JobServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createJob. */ + public UnaryCallSettings createJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createJobSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings batchCreateJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsSettings(); + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchCreateJobsOperationSettings(); + } + + /** Returns the object with the settings used for calls to getJob. */ + public UnaryCallSettings getJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getJobSettings(); + } + + /** Returns the object with the settings used for calls to updateJob. */ + public UnaryCallSettings updateJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).updateJobSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings batchUpdateJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchUpdateJobsOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteJob. */ + public UnaryCallSettings deleteJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteJobSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteJobs. */ + public UnaryCallSettings batchDeleteJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchDeleteJobsSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).batchDeleteJobsOperationSettings(); + } + + /** Returns the object with the settings used for calls to listJobs. */ + public PagedCallSettings + listJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listJobsSettings(); + } + + /** Returns the object with the settings used for calls to searchJobs. */ + public UnaryCallSettings searchJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).searchJobsSettings(); + } + + /** Returns the object with the settings used for calls to searchJobsForAlert. */ + public UnaryCallSettings searchJobsForAlertSettings() { + return ((JobServiceStubSettings) getStubSettings()).searchJobsForAlertSettings(); + } + + public static final JobServiceSettings create(JobServiceStubSettings stub) throws IOException { + return new JobServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return JobServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return JobServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return JobServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return JobServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return JobServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return JobServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return JobServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected JobServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for JobServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(JobServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(JobServiceStubSettings.newBuilder()); + } + + protected Builder(JobServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(JobServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public JobServiceStubSettings.Builder getStubSettingsBuilder() { + return ((JobServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createJob. */ + public UnaryCallSettings.Builder createJobSettings() { + return getStubSettingsBuilder().createJobSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings.Builder batchCreateJobsSettings() { + return getStubSettingsBuilder().batchCreateJobsSettings(); + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return getStubSettingsBuilder().batchCreateJobsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getJob. */ + public UnaryCallSettings.Builder getJobSettings() { + return getStubSettingsBuilder().getJobSettings(); + } + + /** Returns the builder for the settings used for calls to updateJob. */ + public UnaryCallSettings.Builder updateJobSettings() { + return getStubSettingsBuilder().updateJobSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings.Builder batchUpdateJobsSettings() { + return getStubSettingsBuilder().batchUpdateJobsSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return getStubSettingsBuilder().batchUpdateJobsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteJob. */ + public UnaryCallSettings.Builder deleteJobSettings() { + return getStubSettingsBuilder().deleteJobSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteJobs. */ + public UnaryCallSettings.Builder batchDeleteJobsSettings() { + return getStubSettingsBuilder().batchDeleteJobsSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteJobs. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings() { + return getStubSettingsBuilder().batchDeleteJobsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listJobs. */ + public PagedCallSettings.Builder + listJobsSettings() { + return getStubSettingsBuilder().listJobsSettings(); + } + + /** Returns the builder for the settings used for calls to searchJobs. */ + public UnaryCallSettings.Builder searchJobsSettings() { + return getStubSettingsBuilder().searchJobsSettings(); + } + + /** Returns the builder for the settings used for calls to searchJobsForAlert. */ + public UnaryCallSettings.Builder + searchJobsForAlertSettings() { + return getStubSettingsBuilder().searchJobsForAlertSettings(); + } + + @Override + public JobServiceSettings build() throws IOException { + return new JobServiceSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceClient.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceClient.java new file mode 100644 index 00000000..e8fd4844 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceClient.java @@ -0,0 +1,760 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.stub.TenantServiceStub; +import com.google.cloud.talent.v4.stub.TenantServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: A service that handles tenant management, including CRUD and enumeration. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+ *   ProjectName parent = ProjectName.of("[PROJECT]");
+ *   Tenant tenant = Tenant.newBuilder().build();
+ *   Tenant response = tenantServiceClient.createTenant(parent, tenant);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the tenantServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of TenantServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * TenantServiceSettings tenantServiceSettings =
+ *     TenantServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TenantServiceClient tenantServiceClient =
+ *     TenantServiceClient.create(tenantServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * TenantServiceSettings tenantServiceSettings =
+ *     TenantServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TenantServiceClient tenantServiceClient =
+ *     TenantServiceClient.create(tenantServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class TenantServiceClient implements BackgroundResource { + private final TenantServiceSettings settings; + private final TenantServiceStub stub; + + /** Constructs an instance of TenantServiceClient with default settings. */ + public static final TenantServiceClient create() throws IOException { + return create(TenantServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TenantServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TenantServiceClient create(TenantServiceSettings settings) + throws IOException { + return new TenantServiceClient(settings); + } + + /** + * Constructs an instance of TenantServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer to use TenantServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final TenantServiceClient create(TenantServiceStub stub) { + return new TenantServiceClient(stub); + } + + /** + * Constructs an instance of TenantServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected TenantServiceClient(TenantServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TenantServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected TenantServiceClient(TenantServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final TenantServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TenantServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new tenant entity. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   Tenant response = tenantServiceClient.createTenant(parent, tenant);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the project under which the tenant is created. + *

The format is "projects/{project_id}", for example, "projects/foo". + * @param tenant Required. The tenant to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant createTenant(ProjectName parent, Tenant tenant) { + CreateTenantRequest request = + CreateTenantRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTenant(tenant) + .build(); + return createTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new tenant entity. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   Tenant response = tenantServiceClient.createTenant(parent.toString(), tenant);
+   * }
+   * 
+ * + * @param parent Required. Resource name of the project under which the tenant is created. + *

The format is "projects/{project_id}", for example, "projects/foo". + * @param tenant Required. The tenant to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant createTenant(String parent, Tenant tenant) { + CreateTenantRequest request = + CreateTenantRequest.newBuilder().setParent(parent).setTenant(tenant).build(); + return createTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new tenant entity. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   CreateTenantRequest request = CreateTenantRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTenant(tenant)
+   *     .build();
+   *   Tenant response = tenantServiceClient.createTenant(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant createTenant(CreateTenantRequest request) { + return createTenantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new tenant entity. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   CreateTenantRequest request = CreateTenantRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTenant(tenant)
+   *     .build();
+   *   ApiFuture<Tenant> future = tenantServiceClient.createTenantCallable().futureCall(request);
+   *   // Do something
+   *   Tenant response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createTenantCallable() { + return stub.createTenantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Tenant response = tenantServiceClient.getTenant(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be retrieved. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant getTenant(TenantName name) { + GetTenantRequest request = + GetTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   Tenant response = tenantServiceClient.getTenant(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be retrieved. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant getTenant(String name) { + GetTenantRequest request = GetTenantRequest.newBuilder().setName(name).build(); + return getTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   GetTenantRequest request = GetTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Tenant response = tenantServiceClient.getTenant(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant getTenant(GetTenantRequest request) { + return getTenantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   GetTenantRequest request = GetTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Tenant> future = tenantServiceClient.getTenantCallable().futureCall(request);
+   *   // Do something
+   *   Tenant response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getTenantCallable() { + return stub.getTenantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Tenant response = tenantServiceClient.updateTenant(tenant, updateMask);
+   * }
+   * 
+ * + * @param tenant Required. The tenant resource to replace the current resource in the system. + * @param updateMask Strongly recommended for the best service experience. + *

If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is provided, + * only the specified fields in [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] + * are updated. Otherwise all the fields are updated. + *

A field mask to specify the tenant fields to be updated. Only top level fields of + * [Tenant][google.cloud.talent.v4.Tenant] are supported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant updateTenant(Tenant tenant, FieldMask updateMask) { + UpdateTenantRequest request = + UpdateTenantRequest.newBuilder().setTenant(tenant).setUpdateMask(updateMask).build(); + return updateTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   UpdateTenantRequest request = UpdateTenantRequest.newBuilder()
+   *     .setTenant(tenant)
+   *     .build();
+   *   Tenant response = tenantServiceClient.updateTenant(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant updateTenant(UpdateTenantRequest request) { + return updateTenantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   Tenant tenant = Tenant.newBuilder().build();
+   *   UpdateTenantRequest request = UpdateTenantRequest.newBuilder()
+   *     .setTenant(tenant)
+   *     .build();
+   *   ApiFuture<Tenant> future = tenantServiceClient.updateTenantCallable().futureCall(request);
+   *   // Do something
+   *   Tenant response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateTenantCallable() { + return stub.updateTenantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   tenantServiceClient.deleteTenant(name);
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTenant(TenantName name) { + DeleteTenantRequest request = + DeleteTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   tenantServiceClient.deleteTenant(name.toString());
+   * }
+   * 
+ * + * @param name Required. The resource name of the tenant to be deleted. + *

The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTenant(String name) { + DeleteTenantRequest request = DeleteTenantRequest.newBuilder().setName(name).build(); + deleteTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   tenantServiceClient.deleteTenant(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTenant(DeleteTenantRequest request) { + deleteTenantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes specified tenant. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   TenantName name = TenantName.of("[PROJECT]", "[TENANT]");
+   *   DeleteTenantRequest request = DeleteTenantRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = tenantServiceClient.deleteTenantCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTenantCallable() { + return stub.deleteTenantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all tenants associated with the project. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (Tenant element : tenantServiceClient.listTenants(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Resource name of the project under which the tenant is created. + *

The format is "projects/{project_id}", for example, "projects/foo". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTenantsPagedResponse listTenants(ProjectName parent) { + ListTenantsRequest request = + ListTenantsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTenants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all tenants associated with the project. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (Tenant element : tenantServiceClient.listTenants(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Resource name of the project under which the tenant is created. + *

The format is "projects/{project_id}", for example, "projects/foo". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTenantsPagedResponse listTenants(String parent) { + ListTenantsRequest request = ListTenantsRequest.newBuilder().setParent(parent).build(); + return listTenants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all tenants associated with the project. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListTenantsRequest request = ListTenantsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Tenant element : tenantServiceClient.listTenants(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTenantsPagedResponse listTenants(ListTenantsRequest request) { + return listTenantsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all tenants associated with the project. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListTenantsRequest request = ListTenantsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTenantsPagedResponse> future = tenantServiceClient.listTenantsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Tenant element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTenantsPagedCallable() { + return stub.listTenantsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all tenants associated with the project. + * + *

Sample code: + * + *


+   * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   ListTenantsRequest request = ListTenantsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTenantsResponse response = tenantServiceClient.listTenantsCallable().call(request);
+   *     for (Tenant element : response.getTenantsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listTenantsCallable() { + return stub.listTenantsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTenantsPagedResponse + extends AbstractPagedListResponse< + ListTenantsRequest, + ListTenantsResponse, + Tenant, + ListTenantsPage, + ListTenantsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTenantsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTenantsPagedResponse apply(ListTenantsPage input) { + return new ListTenantsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTenantsPagedResponse(ListTenantsPage page) { + super(page, ListTenantsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTenantsPage + extends AbstractPage { + + private ListTenantsPage( + PageContext context, + ListTenantsResponse response) { + super(context, response); + } + + private static ListTenantsPage createEmptyPage() { + return new ListTenantsPage(null, null); + } + + @Override + protected ListTenantsPage createPage( + PageContext context, + ListTenantsResponse response) { + return new ListTenantsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTenantsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTenantsRequest, + ListTenantsResponse, + Tenant, + ListTenantsPage, + ListTenantsFixedSizeCollection> { + + private ListTenantsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTenantsFixedSizeCollection createEmptyCollection() { + return new ListTenantsFixedSizeCollection(null, 0); + } + + @Override + protected ListTenantsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTenantsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceSettings.java new file mode 100644 index 00000000..76d78e4c --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceSettings.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.TenantServiceClient.ListTenantsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.stub.TenantServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link TenantServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTenant to 30 seconds: + * + *

+ * 
+ * TenantServiceSettings.Builder tenantServiceSettingsBuilder =
+ *     TenantServiceSettings.newBuilder();
+ * tenantServiceSettingsBuilder
+ *     .createTenantSettings()
+ *     .setRetrySettings(
+ *         tenantServiceSettingsBuilder.createTenantSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TenantServiceSettings tenantServiceSettings = tenantServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class TenantServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createTenant. */ + public UnaryCallSettings createTenantSettings() { + return ((TenantServiceStubSettings) getStubSettings()).createTenantSettings(); + } + + /** Returns the object with the settings used for calls to getTenant. */ + public UnaryCallSettings getTenantSettings() { + return ((TenantServiceStubSettings) getStubSettings()).getTenantSettings(); + } + + /** Returns the object with the settings used for calls to updateTenant. */ + public UnaryCallSettings updateTenantSettings() { + return ((TenantServiceStubSettings) getStubSettings()).updateTenantSettings(); + } + + /** Returns the object with the settings used for calls to deleteTenant. */ + public UnaryCallSettings deleteTenantSettings() { + return ((TenantServiceStubSettings) getStubSettings()).deleteTenantSettings(); + } + + /** Returns the object with the settings used for calls to listTenants. */ + public PagedCallSettings + listTenantsSettings() { + return ((TenantServiceStubSettings) getStubSettings()).listTenantsSettings(); + } + + public static final TenantServiceSettings create(TenantServiceStubSettings stub) + throws IOException { + return new TenantServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TenantServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TenantServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TenantServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TenantServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TenantServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TenantServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TenantServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TenantServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TenantServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(TenantServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(TenantServiceStubSettings.newBuilder()); + } + + protected Builder(TenantServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TenantServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public TenantServiceStubSettings.Builder getStubSettingsBuilder() { + return ((TenantServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTenant. */ + public UnaryCallSettings.Builder createTenantSettings() { + return getStubSettingsBuilder().createTenantSettings(); + } + + /** Returns the builder for the settings used for calls to getTenant. */ + public UnaryCallSettings.Builder getTenantSettings() { + return getStubSettingsBuilder().getTenantSettings(); + } + + /** Returns the builder for the settings used for calls to updateTenant. */ + public UnaryCallSettings.Builder updateTenantSettings() { + return getStubSettingsBuilder().updateTenantSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTenant. */ + public UnaryCallSettings.Builder deleteTenantSettings() { + return getStubSettingsBuilder().deleteTenantSettings(); + } + + /** Returns the builder for the settings used for calls to listTenants. */ + public PagedCallSettings.Builder< + ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> + listTenantsSettings() { + return getStubSettingsBuilder().listTenantsSettings(); + } + + @Override + public TenantServiceSettings build() throws IOException { + return new TenantServiceSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/package-info.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/package-info.java new file mode 100644 index 00000000..40c763d8 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/package-info.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 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. + */ + +/** + * A client to Cloud Talent Solution API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

==================== CompanyServiceClient ==================== + * + *

Service Description: A service that handles company management, including CRUD and + * enumeration. + * + *

Sample for CompanyServiceClient: + * + *

+ * 
+ * try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   Company company = Company.newBuilder().build();
+ *   Company response = companyServiceClient.createCompany(parent, company);
+ * }
+ * 
+ * 
+ * + * ================ CompletionClient ================ + * + *

Service Description: A service handles auto completion. + * + *

Sample for CompletionClient: + * + *

+ * 
+ * try (CompletionClient completionClient = CompletionClient.create()) {
+ *   TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]");
+ *   String query = "";
+ *   int pageSize = 0;
+ *   CompleteQueryRequest request = CompleteQueryRequest.newBuilder()
+ *     .setTenant(tenant.toString())
+ *     .setQuery(query)
+ *     .setPageSize(pageSize)
+ *     .build();
+ *   CompleteQueryResponse response = completionClient.completeQuery(request);
+ * }
+ * 
+ * 
+ * + * ================== EventServiceClient ================== + * + *

Service Description: A service handles client event report. + * + *

Sample for EventServiceClient: + * + *

+ * 
+ * try (EventServiceClient eventServiceClient = EventServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   ClientEvent clientEvent = ClientEvent.newBuilder().build();
+ *   ClientEvent response = eventServiceClient.createClientEvent(parent, clientEvent);
+ * }
+ * 
+ * 
+ * + * ================ JobServiceClient ================ + * + *

Service Description: A service handles job management, including job CRUD, enumeration and + * search. + * + *

Sample for JobServiceClient: + * + *

+ * 
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ *   TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
+ *   Job job = Job.newBuilder().build();
+ *   Job response = jobServiceClient.createJob(parent, job);
+ * }
+ * 
+ * 
+ * + * =================== TenantServiceClient =================== + * + *

Service Description: A service that handles tenant management, including CRUD and enumeration. + * + *

Sample for TenantServiceClient: + * + *

+ * 
+ * try (TenantServiceClient tenantServiceClient = TenantServiceClient.create()) {
+ *   ProjectName parent = ProjectName.of("[PROJECT]");
+ *   Tenant tenant = Tenant.newBuilder().build();
+ *   Tenant response = tenantServiceClient.createTenant(parent, tenant);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.talent.v4; + +import javax.annotation.Generated; diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStub.java new file mode 100644 index 00000000..9194b458 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStub.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.CompanyServiceClient.ListCompaniesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.Company; +import com.google.cloud.talent.v4.CreateCompanyRequest; +import com.google.cloud.talent.v4.DeleteCompanyRequest; +import com.google.cloud.talent.v4.GetCompanyRequest; +import com.google.cloud.talent.v4.ListCompaniesRequest; +import com.google.cloud.talent.v4.ListCompaniesResponse; +import com.google.cloud.talent.v4.UpdateCompanyRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class CompanyServiceStub implements BackgroundResource { + + public UnaryCallable createCompanyCallable() { + throw new UnsupportedOperationException("Not implemented: createCompanyCallable()"); + } + + public UnaryCallable getCompanyCallable() { + throw new UnsupportedOperationException("Not implemented: getCompanyCallable()"); + } + + public UnaryCallable updateCompanyCallable() { + throw new UnsupportedOperationException("Not implemented: updateCompanyCallable()"); + } + + public UnaryCallable deleteCompanyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCompanyCallable()"); + } + + public UnaryCallable + listCompaniesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCompaniesPagedCallable()"); + } + + public UnaryCallable listCompaniesCallable() { + throw new UnsupportedOperationException("Not implemented: listCompaniesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStubSettings.java new file mode 100644 index 00000000..fd5e6122 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStubSettings.java @@ -0,0 +1,532 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.CompanyServiceClient.ListCompaniesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.Company; +import com.google.cloud.talent.v4.CreateCompanyRequest; +import com.google.cloud.talent.v4.DeleteCompanyRequest; +import com.google.cloud.talent.v4.GetCompanyRequest; +import com.google.cloud.talent.v4.ListCompaniesRequest; +import com.google.cloud.talent.v4.ListCompaniesResponse; +import com.google.cloud.talent.v4.UpdateCompanyRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link CompanyServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createCompany to 30 seconds: + * + *

+ * 
+ * CompanyServiceStubSettings.Builder companyServiceSettingsBuilder =
+ *     CompanyServiceStubSettings.newBuilder();
+ * companyServiceSettingsBuilder
+ *     .createCompanySettings()
+ *     .setRetrySettings(
+ *         companyServiceSettingsBuilder.createCompanySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompanyServiceStubSettings companyServiceSettings = companyServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompanyServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/jobs") + .build(); + + private final UnaryCallSettings createCompanySettings; + private final UnaryCallSettings getCompanySettings; + private final UnaryCallSettings updateCompanySettings; + private final UnaryCallSettings deleteCompanySettings; + private final PagedCallSettings< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> + listCompaniesSettings; + + /** Returns the object with the settings used for calls to createCompany. */ + public UnaryCallSettings createCompanySettings() { + return createCompanySettings; + } + + /** Returns the object with the settings used for calls to getCompany. */ + public UnaryCallSettings getCompanySettings() { + return getCompanySettings; + } + + /** Returns the object with the settings used for calls to updateCompany. */ + public UnaryCallSettings updateCompanySettings() { + return updateCompanySettings; + } + + /** Returns the object with the settings used for calls to deleteCompany. */ + public UnaryCallSettings deleteCompanySettings() { + return deleteCompanySettings; + } + + /** Returns the object with the settings used for calls to listCompanies. */ + public PagedCallSettings + listCompaniesSettings() { + return listCompaniesSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CompanyServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCompanyServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "jobs.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CompanyServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompanyServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createCompanySettings = settingsBuilder.createCompanySettings().build(); + getCompanySettings = settingsBuilder.getCompanySettings().build(); + updateCompanySettings = settingsBuilder.updateCompanySettings().build(); + deleteCompanySettings = settingsBuilder.deleteCompanySettings().build(); + listCompaniesSettings = settingsBuilder.listCompaniesSettings().build(); + } + + private static final PagedListDescriptor + LIST_COMPANIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCompaniesRequest injectToken(ListCompaniesRequest payload, String token) { + return ListCompaniesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCompaniesRequest injectPageSize(ListCompaniesRequest payload, int pageSize) { + return ListCompaniesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCompaniesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCompaniesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCompaniesResponse payload) { + return payload.getCompaniesList() != null + ? payload.getCompaniesList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> + LIST_COMPANIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCompaniesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_COMPANIES_PAGE_STR_DESC, request, context); + return ListCompaniesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for CompanyServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createCompanySettings; + private final UnaryCallSettings.Builder getCompanySettings; + private final UnaryCallSettings.Builder updateCompanySettings; + private final UnaryCallSettings.Builder deleteCompanySettings; + private final PagedCallSettings.Builder< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> + listCompaniesSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteCompanySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listCompaniesSettings = PagedCallSettings.newBuilder(LIST_COMPANIES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCompanySettings, + getCompanySettings, + updateCompanySettings, + deleteCompanySettings, + listCompaniesSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createCompanySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + + builder + .getCompanySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .updateCompanySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + + builder + .deleteCompanySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .listCompaniesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + return builder; + } + + protected Builder(CompanyServiceStubSettings settings) { + super(settings); + + createCompanySettings = settings.createCompanySettings.toBuilder(); + getCompanySettings = settings.getCompanySettings.toBuilder(); + updateCompanySettings = settings.updateCompanySettings.toBuilder(); + deleteCompanySettings = settings.deleteCompanySettings.toBuilder(); + listCompaniesSettings = settings.listCompaniesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createCompanySettings, + getCompanySettings, + updateCompanySettings, + deleteCompanySettings, + listCompaniesSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createCompany. */ + public UnaryCallSettings.Builder createCompanySettings() { + return createCompanySettings; + } + + /** Returns the builder for the settings used for calls to getCompany. */ + public UnaryCallSettings.Builder getCompanySettings() { + return getCompanySettings; + } + + /** Returns the builder for the settings used for calls to updateCompany. */ + public UnaryCallSettings.Builder updateCompanySettings() { + return updateCompanySettings; + } + + /** Returns the builder for the settings used for calls to deleteCompany. */ + public UnaryCallSettings.Builder deleteCompanySettings() { + return deleteCompanySettings; + } + + /** Returns the builder for the settings used for calls to listCompanies. */ + public PagedCallSettings.Builder< + ListCompaniesRequest, ListCompaniesResponse, ListCompaniesPagedResponse> + listCompaniesSettings() { + return listCompaniesSettings; + } + + @Override + public CompanyServiceStubSettings build() throws IOException { + return new CompanyServiceStubSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStub.java new file mode 100644 index 00000000..41975305 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStub.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.CompleteQueryRequest; +import com.google.cloud.talent.v4.CompleteQueryResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class CompletionStub implements BackgroundResource { + + public UnaryCallable completeQueryCallable() { + throw new UnsupportedOperationException("Not implemented: completeQueryCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStubSettings.java new file mode 100644 index 00000000..4cb2ae01 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStubSettings.java @@ -0,0 +1,366 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.CompleteQueryRequest; +import com.google.cloud.talent.v4.CompleteQueryResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link CompletionStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of completeQuery to 30 seconds: + * + *

+ * 
+ * CompletionStubSettings.Builder completionSettingsBuilder =
+ *     CompletionStubSettings.newBuilder();
+ * completionSettingsBuilder
+ *     .completeQuerySettings()
+ *     .setRetrySettings(
+ *         completionSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompletionStubSettings completionSettings = completionSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CompletionStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/jobs") + .build(); + + private final UnaryCallSettings + completeQuerySettings; + + /** Returns the object with the settings used for calls to completeQuery. */ + public UnaryCallSettings completeQuerySettings() { + return completeQuerySettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CompletionStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCompletionStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "jobs.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CompletionStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompletionStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + completeQuerySettings = settingsBuilder.completeQuerySettings().build(); + } + + /** Builder for CompletionStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + completeQuerySettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + completeQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(completeQuerySettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .completeQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); + + return builder; + } + + protected Builder(CompletionStubSettings settings) { + super(settings); + + completeQuerySettings = settings.completeQuerySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(completeQuerySettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to completeQuery. */ + public UnaryCallSettings.Builder + completeQuerySettings() { + return completeQuerySettings; + } + + @Override + public CompletionStubSettings build() throws IOException { + return new CompletionStubSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStub.java new file mode 100644 index 00000000..5f8092bc --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStub.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.ClientEvent; +import com.google.cloud.talent.v4.CreateClientEventRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class EventServiceStub implements BackgroundResource { + + public UnaryCallable createClientEventCallable() { + throw new UnsupportedOperationException("Not implemented: createClientEventCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStubSettings.java new file mode 100644 index 00000000..ebcf7542 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStubSettings.java @@ -0,0 +1,365 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.talent.v4.ClientEvent; +import com.google.cloud.talent.v4.CreateClientEventRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link EventServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createClientEvent to 30 seconds: + * + *

+ * 
+ * EventServiceStubSettings.Builder eventServiceSettingsBuilder =
+ *     EventServiceStubSettings.newBuilder();
+ * eventServiceSettingsBuilder
+ *     .createClientEventSettings()
+ *     .setRetrySettings(
+ *         eventServiceSettingsBuilder.createClientEventSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EventServiceStubSettings eventServiceSettings = eventServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EventServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/jobs") + .build(); + + private final UnaryCallSettings createClientEventSettings; + + /** Returns the object with the settings used for calls to createClientEvent. */ + public UnaryCallSettings createClientEventSettings() { + return createClientEventSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EventServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEventServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "jobs.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EventServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EventServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createClientEventSettings = settingsBuilder.createClientEventSettings().build(); + } + + /** Builder for EventServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + createClientEventSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createClientEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(createClientEventSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createClientEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + return builder; + } + + protected Builder(EventServiceStubSettings settings) { + super(settings); + + createClientEventSettings = settings.createClientEventSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(createClientEventSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createClientEvent. */ + public UnaryCallSettings.Builder + createClientEventSettings() { + return createClientEventSettings; + } + + @Override + public EventServiceStubSettings build() throws IOException { + return new EventServiceStubSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceCallableFactory.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceCallableFactory.java new file mode 100644 index 00000000..6dc38da8 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcCompanyServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceStub.java new file mode 100644 index 00000000..948993cc --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceStub.java @@ -0,0 +1,290 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.CompanyServiceClient.ListCompaniesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.Company; +import com.google.cloud.talent.v4.CreateCompanyRequest; +import com.google.cloud.talent.v4.DeleteCompanyRequest; +import com.google.cloud.talent.v4.GetCompanyRequest; +import com.google.cloud.talent.v4.ListCompaniesRequest; +import com.google.cloud.talent.v4.ListCompaniesResponse; +import com.google.cloud.talent.v4.UpdateCompanyRequest; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcCompanyServiceStub extends CompanyServiceStub { + + private static final MethodDescriptor + createCompanyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.CompanyService/CreateCompany") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCompanyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Company.getDefaultInstance())) + .build(); + private static final MethodDescriptor getCompanyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.CompanyService/GetCompany") + .setRequestMarshaller(ProtoUtils.marshaller(GetCompanyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Company.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateCompanyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.CompanyService/UpdateCompany") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCompanyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Company.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteCompanyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.CompanyService/DeleteCompany") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteCompanyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listCompaniesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.CompanyService/ListCompanies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCompaniesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCompaniesResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable createCompanyCallable; + private final UnaryCallable getCompanyCallable; + private final UnaryCallable updateCompanyCallable; + private final UnaryCallable deleteCompanyCallable; + private final UnaryCallable listCompaniesCallable; + private final UnaryCallable + listCompaniesPagedCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCompanyServiceStub create(CompanyServiceStubSettings settings) + throws IOException { + return new GrpcCompanyServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCompanyServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCompanyServiceStub( + CompanyServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCompanyServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCompanyServiceStub( + CompanyServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCompanyServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcCompanyServiceStub(CompanyServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCompanyServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCompanyServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcCompanyServiceStub( + CompanyServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings createCompanyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCompanyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateCompanyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getCompanyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCompanyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetCompanyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateCompanyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCompanyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateCompanyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("company.name", String.valueOf(request.getCompany().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteCompanyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCompanyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteCompanyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listCompaniesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCompaniesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListCompaniesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createCompanyCallable = + callableFactory.createUnaryCallable( + createCompanyTransportSettings, settings.createCompanySettings(), clientContext); + this.getCompanyCallable = + callableFactory.createUnaryCallable( + getCompanyTransportSettings, settings.getCompanySettings(), clientContext); + this.updateCompanyCallable = + callableFactory.createUnaryCallable( + updateCompanyTransportSettings, settings.updateCompanySettings(), clientContext); + this.deleteCompanyCallable = + callableFactory.createUnaryCallable( + deleteCompanyTransportSettings, settings.deleteCompanySettings(), clientContext); + this.listCompaniesCallable = + callableFactory.createUnaryCallable( + listCompaniesTransportSettings, settings.listCompaniesSettings(), clientContext); + this.listCompaniesPagedCallable = + callableFactory.createPagedCallable( + listCompaniesTransportSettings, settings.listCompaniesSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable createCompanyCallable() { + return createCompanyCallable; + } + + public UnaryCallable getCompanyCallable() { + return getCompanyCallable; + } + + public UnaryCallable updateCompanyCallable() { + return updateCompanyCallable; + } + + public UnaryCallable deleteCompanyCallable() { + return deleteCompanyCallable; + } + + public UnaryCallable + listCompaniesPagedCallable() { + return listCompaniesPagedCallable; + } + + public UnaryCallable listCompaniesCallable() { + return listCompaniesCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionCallableFactory.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionCallableFactory.java new file mode 100644 index 00000000..14fb3f32 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcCompletionCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionStub.java new file mode 100644 index 00000000..541a3f1c --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionStub.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.CompleteQueryRequest; +import com.google.cloud.talent.v4.CompleteQueryResponse; +import com.google.common.collect.ImmutableMap; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcCompletionStub extends CompletionStub { + + private static final MethodDescriptor + completeQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.Completion/CompleteQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(CompleteQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CompleteQueryResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable completeQueryCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCompletionStub create(CompletionStubSettings settings) + throws IOException { + return new GrpcCompletionStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCompletionStub create(ClientContext clientContext) throws IOException { + return new GrpcCompletionStub(CompletionStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCompletionStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCompletionStub( + CompletionStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCompletionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcCompletionStub(CompletionStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCompletionCallableFactory()); + } + + /** + * Constructs an instance of GrpcCompletionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcCompletionStub( + CompletionStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings completeQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(completeQueryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CompleteQueryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("tenant", String.valueOf(request.getTenant())); + return params.build(); + } + }) + .build(); + + this.completeQueryCallable = + callableFactory.createUnaryCallable( + completeQueryTransportSettings, settings.completeQuerySettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable completeQueryCallable() { + return completeQueryCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceCallableFactory.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceCallableFactory.java new file mode 100644 index 00000000..0f658623 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcEventServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceStub.java new file mode 100644 index 00000000..d142ddf9 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceStub.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.ClientEvent; +import com.google.cloud.talent.v4.CreateClientEventRequest; +import com.google.common.collect.ImmutableMap; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcEventServiceStub extends EventServiceStub { + + private static final MethodDescriptor + createClientEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.EventService/CreateClientEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateClientEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ClientEvent.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable createClientEventCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEventServiceStub create(EventServiceStubSettings settings) + throws IOException { + return new GrpcEventServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEventServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcEventServiceStub(EventServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEventServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEventServiceStub( + EventServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEventServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEventServiceStub(EventServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEventServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcEventServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEventServiceStub( + EventServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings createClientEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createClientEventMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateClientEventRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createClientEventCallable = + callableFactory.createUnaryCallable( + createClientEventTransportSettings, + settings.createClientEventSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable createClientEventCallable() { + return createClientEventCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceCallableFactory.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceCallableFactory.java new file mode 100644 index 00000000..63b1aa3b --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcJobServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceStub.java new file mode 100644 index 00000000..d9fa1c5b --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceStub.java @@ -0,0 +1,494 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.JobServiceClient.ListJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.BatchCreateJobsRequest; +import com.google.cloud.talent.v4.BatchCreateJobsResponse; +import com.google.cloud.talent.v4.BatchDeleteJobsRequest; +import com.google.cloud.talent.v4.BatchDeleteJobsResponse; +import com.google.cloud.talent.v4.BatchOperationMetadata; +import com.google.cloud.talent.v4.BatchUpdateJobsRequest; +import com.google.cloud.talent.v4.BatchUpdateJobsResponse; +import com.google.cloud.talent.v4.CreateJobRequest; +import com.google.cloud.talent.v4.DeleteJobRequest; +import com.google.cloud.talent.v4.GetJobRequest; +import com.google.cloud.talent.v4.Job; +import com.google.cloud.talent.v4.ListJobsRequest; +import com.google.cloud.talent.v4.ListJobsResponse; +import com.google.cloud.talent.v4.SearchJobsRequest; +import com.google.cloud.talent.v4.SearchJobsResponse; +import com.google.cloud.talent.v4.UpdateJobRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcJobServiceStub extends JobServiceStub { + + private static final MethodDescriptor createJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/CreateJob") + .setRequestMarshaller(ProtoUtils.marshaller(CreateJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchCreateJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/BatchCreateJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/GetJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/UpdateJob") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchUpdateJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/BatchUpdateJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchUpdateJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/DeleteJob") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchDeleteJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/BatchDeleteJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/ListJobs") + .setRequestMarshaller(ProtoUtils.marshaller(ListJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListJobsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + searchJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/SearchJobs") + .setRequestMarshaller(ProtoUtils.marshaller(SearchJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchJobsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + searchJobsForAlertMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.JobService/SearchJobsForAlert") + .setRequestMarshaller(ProtoUtils.marshaller(SearchJobsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchJobsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable createJobCallable; + private final UnaryCallable batchCreateJobsCallable; + private final OperationCallable< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationCallable; + private final UnaryCallable getJobCallable; + private final UnaryCallable updateJobCallable; + private final UnaryCallable batchUpdateJobsCallable; + private final OperationCallable< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationCallable; + private final UnaryCallable deleteJobCallable; + private final UnaryCallable batchDeleteJobsCallable; + private final OperationCallable< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationCallable; + private final UnaryCallable listJobsCallable; + private final UnaryCallable listJobsPagedCallable; + private final UnaryCallable searchJobsCallable; + private final UnaryCallable searchJobsForAlertCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcJobServiceStub create(JobServiceStubSettings settings) + throws IOException { + return new GrpcJobServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcJobServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcJobServiceStub(JobServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcJobServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcJobServiceStub( + JobServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcJobServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcJobServiceStub(JobServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcJobServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcJobServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcJobServiceStub( + JobServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchCreateJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchCreateJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job.name", String.valueOf(request.getJob().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchUpdateJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchDeleteJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings searchJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings searchJobsForAlertTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchJobsForAlertMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createJobCallable = + callableFactory.createUnaryCallable( + createJobTransportSettings, settings.createJobSettings(), clientContext); + this.batchCreateJobsCallable = + callableFactory.createUnaryCallable( + batchCreateJobsTransportSettings, settings.batchCreateJobsSettings(), clientContext); + this.batchCreateJobsOperationCallable = + callableFactory.createOperationCallable( + batchCreateJobsTransportSettings, + settings.batchCreateJobsOperationSettings(), + clientContext, + this.operationsStub); + this.getJobCallable = + callableFactory.createUnaryCallable( + getJobTransportSettings, settings.getJobSettings(), clientContext); + this.updateJobCallable = + callableFactory.createUnaryCallable( + updateJobTransportSettings, settings.updateJobSettings(), clientContext); + this.batchUpdateJobsCallable = + callableFactory.createUnaryCallable( + batchUpdateJobsTransportSettings, settings.batchUpdateJobsSettings(), clientContext); + this.batchUpdateJobsOperationCallable = + callableFactory.createOperationCallable( + batchUpdateJobsTransportSettings, + settings.batchUpdateJobsOperationSettings(), + clientContext, + this.operationsStub); + this.deleteJobCallable = + callableFactory.createUnaryCallable( + deleteJobTransportSettings, settings.deleteJobSettings(), clientContext); + this.batchDeleteJobsCallable = + callableFactory.createUnaryCallable( + batchDeleteJobsTransportSettings, settings.batchDeleteJobsSettings(), clientContext); + this.batchDeleteJobsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteJobsTransportSettings, + settings.batchDeleteJobsOperationSettings(), + clientContext, + this.operationsStub); + this.listJobsCallable = + callableFactory.createUnaryCallable( + listJobsTransportSettings, settings.listJobsSettings(), clientContext); + this.listJobsPagedCallable = + callableFactory.createPagedCallable( + listJobsTransportSettings, settings.listJobsSettings(), clientContext); + this.searchJobsCallable = + callableFactory.createUnaryCallable( + searchJobsTransportSettings, settings.searchJobsSettings(), clientContext); + this.searchJobsForAlertCallable = + callableFactory.createUnaryCallable( + searchJobsForAlertTransportSettings, + settings.searchJobsForAlertSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable createJobCallable() { + return createJobCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchCreateJobsOperationCallable() { + return batchCreateJobsOperationCallable; + } + + public UnaryCallable batchCreateJobsCallable() { + return batchCreateJobsCallable; + } + + public UnaryCallable getJobCallable() { + return getJobCallable; + } + + public UnaryCallable updateJobCallable() { + return updateJobCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchUpdateJobsOperationCallable() { + return batchUpdateJobsOperationCallable; + } + + public UnaryCallable batchUpdateJobsCallable() { + return batchUpdateJobsCallable; + } + + public UnaryCallable deleteJobCallable() { + return deleteJobCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteJobsOperationCallable() { + return batchDeleteJobsOperationCallable; + } + + public UnaryCallable batchDeleteJobsCallable() { + return batchDeleteJobsCallable; + } + + public UnaryCallable listJobsPagedCallable() { + return listJobsPagedCallable; + } + + public UnaryCallable listJobsCallable() { + return listJobsCallable; + } + + public UnaryCallable searchJobsCallable() { + return searchJobsCallable; + } + + public UnaryCallable searchJobsForAlertCallable() { + return searchJobsForAlertCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceCallableFactory.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceCallableFactory.java new file mode 100644 index 00000000..941e4435 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcTenantServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceStub.java new file mode 100644 index 00000000..8d26691a --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceStub.java @@ -0,0 +1,282 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.TenantServiceClient.ListTenantsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.CreateTenantRequest; +import com.google.cloud.talent.v4.DeleteTenantRequest; +import com.google.cloud.talent.v4.GetTenantRequest; +import com.google.cloud.talent.v4.ListTenantsRequest; +import com.google.cloud.talent.v4.ListTenantsResponse; +import com.google.cloud.talent.v4.Tenant; +import com.google.cloud.talent.v4.UpdateTenantRequest; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcTenantServiceStub extends TenantServiceStub { + + private static final MethodDescriptor createTenantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.TenantService/CreateTenant") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTenantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tenant.getDefaultInstance())) + .build(); + private static final MethodDescriptor getTenantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.TenantService/GetTenant") + .setRequestMarshaller(ProtoUtils.marshaller(GetTenantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tenant.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateTenantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.TenantService/UpdateTenant") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateTenantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tenant.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteTenantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.TenantService/DeleteTenant") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteTenantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTenantsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.talent.v4.TenantService/ListTenants") + .setRequestMarshaller(ProtoUtils.marshaller(ListTenantsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTenantsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable createTenantCallable; + private final UnaryCallable getTenantCallable; + private final UnaryCallable updateTenantCallable; + private final UnaryCallable deleteTenantCallable; + private final UnaryCallable listTenantsCallable; + private final UnaryCallable + listTenantsPagedCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcTenantServiceStub create(TenantServiceStubSettings settings) + throws IOException { + return new GrpcTenantServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTenantServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcTenantServiceStub(TenantServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTenantServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTenantServiceStub( + TenantServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTenantServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTenantServiceStub(TenantServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcTenantServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcTenantServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcTenantServiceStub( + TenantServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings createTenantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTenantMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTenantRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTenantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTenantMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTenantRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTenantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTenantMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTenantRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("tenant.name", String.valueOf(request.getTenant().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTenantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTenantMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTenantRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listTenantsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTenantsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTenantsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createTenantCallable = + callableFactory.createUnaryCallable( + createTenantTransportSettings, settings.createTenantSettings(), clientContext); + this.getTenantCallable = + callableFactory.createUnaryCallable( + getTenantTransportSettings, settings.getTenantSettings(), clientContext); + this.updateTenantCallable = + callableFactory.createUnaryCallable( + updateTenantTransportSettings, settings.updateTenantSettings(), clientContext); + this.deleteTenantCallable = + callableFactory.createUnaryCallable( + deleteTenantTransportSettings, settings.deleteTenantSettings(), clientContext); + this.listTenantsCallable = + callableFactory.createUnaryCallable( + listTenantsTransportSettings, settings.listTenantsSettings(), clientContext); + this.listTenantsPagedCallable = + callableFactory.createPagedCallable( + listTenantsTransportSettings, settings.listTenantsSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable createTenantCallable() { + return createTenantCallable; + } + + public UnaryCallable getTenantCallable() { + return getTenantCallable; + } + + public UnaryCallable updateTenantCallable() { + return updateTenantCallable; + } + + public UnaryCallable deleteTenantCallable() { + return deleteTenantCallable; + } + + public UnaryCallable listTenantsPagedCallable() { + return listTenantsPagedCallable; + } + + public UnaryCallable listTenantsCallable() { + return listTenantsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStub.java new file mode 100644 index 00000000..a4047f80 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStub.java @@ -0,0 +1,124 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.JobServiceClient.ListJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.BatchCreateJobsRequest; +import com.google.cloud.talent.v4.BatchCreateJobsResponse; +import com.google.cloud.talent.v4.BatchDeleteJobsRequest; +import com.google.cloud.talent.v4.BatchDeleteJobsResponse; +import com.google.cloud.talent.v4.BatchOperationMetadata; +import com.google.cloud.talent.v4.BatchUpdateJobsRequest; +import com.google.cloud.talent.v4.BatchUpdateJobsResponse; +import com.google.cloud.talent.v4.CreateJobRequest; +import com.google.cloud.talent.v4.DeleteJobRequest; +import com.google.cloud.talent.v4.GetJobRequest; +import com.google.cloud.talent.v4.Job; +import com.google.cloud.talent.v4.ListJobsRequest; +import com.google.cloud.talent.v4.ListJobsResponse; +import com.google.cloud.talent.v4.SearchJobsRequest; +import com.google.cloud.talent.v4.SearchJobsResponse; +import com.google.cloud.talent.v4.UpdateJobRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class JobServiceStub implements BackgroundResource { + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable createJobCallable() { + throw new UnsupportedOperationException("Not implemented: createJobCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchCreateJobsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateJobsOperationCallable()"); + } + + public UnaryCallable batchCreateJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateJobsCallable()"); + } + + public UnaryCallable getJobCallable() { + throw new UnsupportedOperationException("Not implemented: getJobCallable()"); + } + + public UnaryCallable updateJobCallable() { + throw new UnsupportedOperationException("Not implemented: updateJobCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchUpdateJobsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateJobsOperationCallable()"); + } + + public UnaryCallable batchUpdateJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateJobsCallable()"); + } + + public UnaryCallable deleteJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteJobCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteJobsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteJobsOperationCallable()"); + } + + public UnaryCallable batchDeleteJobsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteJobsCallable()"); + } + + public UnaryCallable listJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listJobsPagedCallable()"); + } + + public UnaryCallable listJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listJobsCallable()"); + } + + public UnaryCallable searchJobsCallable() { + throw new UnsupportedOperationException("Not implemented: searchJobsCallable()"); + } + + public UnaryCallable searchJobsForAlertCallable() { + throw new UnsupportedOperationException("Not implemented: searchJobsForAlertCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStubSettings.java new file mode 100644 index 00000000..8b298a87 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStubSettings.java @@ -0,0 +1,814 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.JobServiceClient.ListJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.BatchCreateJobsRequest; +import com.google.cloud.talent.v4.BatchCreateJobsResponse; +import com.google.cloud.talent.v4.BatchDeleteJobsRequest; +import com.google.cloud.talent.v4.BatchDeleteJobsResponse; +import com.google.cloud.talent.v4.BatchOperationMetadata; +import com.google.cloud.talent.v4.BatchUpdateJobsRequest; +import com.google.cloud.talent.v4.BatchUpdateJobsResponse; +import com.google.cloud.talent.v4.CreateJobRequest; +import com.google.cloud.talent.v4.DeleteJobRequest; +import com.google.cloud.talent.v4.GetJobRequest; +import com.google.cloud.talent.v4.Job; +import com.google.cloud.talent.v4.ListJobsRequest; +import com.google.cloud.talent.v4.ListJobsResponse; +import com.google.cloud.talent.v4.SearchJobsRequest; +import com.google.cloud.talent.v4.SearchJobsResponse; +import com.google.cloud.talent.v4.UpdateJobRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link JobServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createJob to 30 seconds: + * + *

+ * 
+ * JobServiceStubSettings.Builder jobServiceSettingsBuilder =
+ *     JobServiceStubSettings.newBuilder();
+ * jobServiceSettingsBuilder
+ *     .createJobSettings()
+ *     .setRetrySettings(
+ *         jobServiceSettingsBuilder.createJobSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * JobServiceStubSettings jobServiceSettings = jobServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class JobServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/jobs") + .build(); + + private final UnaryCallSettings createJobSettings; + private final UnaryCallSettings batchCreateJobsSettings; + private final OperationCallSettings< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings; + private final UnaryCallSettings getJobSettings; + private final UnaryCallSettings updateJobSettings; + private final UnaryCallSettings batchUpdateJobsSettings; + private final OperationCallSettings< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings; + private final UnaryCallSettings deleteJobSettings; + private final UnaryCallSettings batchDeleteJobsSettings; + private final OperationCallSettings< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings; + private final PagedCallSettings + listJobsSettings; + private final UnaryCallSettings searchJobsSettings; + private final UnaryCallSettings searchJobsForAlertSettings; + + /** Returns the object with the settings used for calls to createJob. */ + public UnaryCallSettings createJobSettings() { + return createJobSettings; + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings batchCreateJobsSettings() { + return batchCreateJobsSettings; + } + + /** Returns the object with the settings used for calls to batchCreateJobs. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return batchCreateJobsOperationSettings; + } + + /** Returns the object with the settings used for calls to getJob. */ + public UnaryCallSettings getJobSettings() { + return getJobSettings; + } + + /** Returns the object with the settings used for calls to updateJob. */ + public UnaryCallSettings updateJobSettings() { + return updateJobSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings batchUpdateJobsSettings() { + return batchUpdateJobsSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateJobs. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return batchUpdateJobsOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteJob. */ + public UnaryCallSettings deleteJobSettings() { + return deleteJobSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteJobs. */ + public UnaryCallSettings batchDeleteJobsSettings() { + return batchDeleteJobsSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteJobs. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings() { + return batchDeleteJobsOperationSettings; + } + + /** Returns the object with the settings used for calls to listJobs. */ + public PagedCallSettings + listJobsSettings() { + return listJobsSettings; + } + + /** Returns the object with the settings used for calls to searchJobs. */ + public UnaryCallSettings searchJobsSettings() { + return searchJobsSettings; + } + + /** Returns the object with the settings used for calls to searchJobsForAlert. */ + public UnaryCallSettings searchJobsForAlertSettings() { + return searchJobsForAlertSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public JobServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcJobServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "jobs.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(JobServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected JobServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createJobSettings = settingsBuilder.createJobSettings().build(); + batchCreateJobsSettings = settingsBuilder.batchCreateJobsSettings().build(); + batchCreateJobsOperationSettings = settingsBuilder.batchCreateJobsOperationSettings().build(); + getJobSettings = settingsBuilder.getJobSettings().build(); + updateJobSettings = settingsBuilder.updateJobSettings().build(); + batchUpdateJobsSettings = settingsBuilder.batchUpdateJobsSettings().build(); + batchUpdateJobsOperationSettings = settingsBuilder.batchUpdateJobsOperationSettings().build(); + deleteJobSettings = settingsBuilder.deleteJobSettings().build(); + batchDeleteJobsSettings = settingsBuilder.batchDeleteJobsSettings().build(); + batchDeleteJobsOperationSettings = settingsBuilder.batchDeleteJobsOperationSettings().build(); + listJobsSettings = settingsBuilder.listJobsSettings().build(); + searchJobsSettings = settingsBuilder.searchJobsSettings().build(); + searchJobsForAlertSettings = settingsBuilder.searchJobsForAlertSettings().build(); + } + + private static final PagedListDescriptor + LIST_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListJobsRequest injectToken(ListJobsRequest payload, String token) { + return ListJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListJobsRequest injectPageSize(ListJobsRequest payload, int pageSize) { + return ListJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListJobsResponse payload) { + return payload.getJobsList() != null + ? payload.getJobsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> + LIST_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_JOBS_PAGE_STR_DESC, request, context); + return ListJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for JobServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createJobSettings; + private final UnaryCallSettings.Builder + batchCreateJobsSettings; + private final OperationCallSettings.Builder< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings; + private final UnaryCallSettings.Builder getJobSettings; + private final UnaryCallSettings.Builder updateJobSettings; + private final UnaryCallSettings.Builder + batchUpdateJobsSettings; + private final OperationCallSettings.Builder< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings; + private final UnaryCallSettings.Builder deleteJobSettings; + private final UnaryCallSettings.Builder + batchDeleteJobsSettings; + private final OperationCallSettings.Builder< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings; + private final PagedCallSettings.Builder< + ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> + listJobsSettings; + private final UnaryCallSettings.Builder + searchJobsSettings; + private final UnaryCallSettings.Builder + searchJobsForAlertSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchCreateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchCreateJobsOperationSettings = OperationCallSettings.newBuilder(); + + getJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchUpdateJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchUpdateJobsOperationSettings = OperationCallSettings.newBuilder(); + + deleteJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchDeleteJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + batchDeleteJobsOperationSettings = OperationCallSettings.newBuilder(); + + listJobsSettings = PagedCallSettings.newBuilder(LIST_JOBS_PAGE_STR_FACT); + + searchJobsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + searchJobsForAlertSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createJobSettings, + batchCreateJobsSettings, + getJobSettings, + updateJobSettings, + batchUpdateJobsSettings, + deleteJobSettings, + batchDeleteJobsSettings, + listJobsSettings, + searchJobsSettings, + searchJobsForAlertSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .batchCreateJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .getJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .batchUpdateJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .deleteJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .batchDeleteJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .listJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .searchJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .searchJobsForAlertSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder + .batchCreateJobsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BatchCreateJobsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .batchUpdateJobsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BatchUpdateJobsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder + .batchDeleteJobsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BatchDeleteJobsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + protected Builder(JobServiceStubSettings settings) { + super(settings); + + createJobSettings = settings.createJobSettings.toBuilder(); + batchCreateJobsSettings = settings.batchCreateJobsSettings.toBuilder(); + batchCreateJobsOperationSettings = settings.batchCreateJobsOperationSettings.toBuilder(); + getJobSettings = settings.getJobSettings.toBuilder(); + updateJobSettings = settings.updateJobSettings.toBuilder(); + batchUpdateJobsSettings = settings.batchUpdateJobsSettings.toBuilder(); + batchUpdateJobsOperationSettings = settings.batchUpdateJobsOperationSettings.toBuilder(); + deleteJobSettings = settings.deleteJobSettings.toBuilder(); + batchDeleteJobsSettings = settings.batchDeleteJobsSettings.toBuilder(); + batchDeleteJobsOperationSettings = settings.batchDeleteJobsOperationSettings.toBuilder(); + listJobsSettings = settings.listJobsSettings.toBuilder(); + searchJobsSettings = settings.searchJobsSettings.toBuilder(); + searchJobsForAlertSettings = settings.searchJobsForAlertSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createJobSettings, + batchCreateJobsSettings, + getJobSettings, + updateJobSettings, + batchUpdateJobsSettings, + deleteJobSettings, + batchDeleteJobsSettings, + listJobsSettings, + searchJobsSettings, + searchJobsForAlertSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createJob. */ + public UnaryCallSettings.Builder createJobSettings() { + return createJobSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + public UnaryCallSettings.Builder batchCreateJobsSettings() { + return batchCreateJobsSettings; + } + + /** Returns the builder for the settings used for calls to batchCreateJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchCreateJobsRequest, BatchCreateJobsResponse, BatchOperationMetadata> + batchCreateJobsOperationSettings() { + return batchCreateJobsOperationSettings; + } + + /** Returns the builder for the settings used for calls to getJob. */ + public UnaryCallSettings.Builder getJobSettings() { + return getJobSettings; + } + + /** Returns the builder for the settings used for calls to updateJob. */ + public UnaryCallSettings.Builder updateJobSettings() { + return updateJobSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + public UnaryCallSettings.Builder batchUpdateJobsSettings() { + return batchUpdateJobsSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchUpdateJobsRequest, BatchUpdateJobsResponse, BatchOperationMetadata> + batchUpdateJobsOperationSettings() { + return batchUpdateJobsOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteJob. */ + public UnaryCallSettings.Builder deleteJobSettings() { + return deleteJobSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteJobs. */ + public UnaryCallSettings.Builder batchDeleteJobsSettings() { + return batchDeleteJobsSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteJobs. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + BatchDeleteJobsRequest, BatchDeleteJobsResponse, BatchOperationMetadata> + batchDeleteJobsOperationSettings() { + return batchDeleteJobsOperationSettings; + } + + /** Returns the builder for the settings used for calls to listJobs. */ + public PagedCallSettings.Builder + listJobsSettings() { + return listJobsSettings; + } + + /** Returns the builder for the settings used for calls to searchJobs. */ + public UnaryCallSettings.Builder searchJobsSettings() { + return searchJobsSettings; + } + + /** Returns the builder for the settings used for calls to searchJobsForAlert. */ + public UnaryCallSettings.Builder + searchJobsForAlertSettings() { + return searchJobsForAlertSettings; + } + + @Override + public JobServiceStubSettings build() throws IOException { + return new JobServiceStubSettings(this); + } + } +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStub.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStub.java new file mode 100644 index 00000000..38e4f61f --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStub.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.TenantServiceClient.ListTenantsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.CreateTenantRequest; +import com.google.cloud.talent.v4.DeleteTenantRequest; +import com.google.cloud.talent.v4.GetTenantRequest; +import com.google.cloud.talent.v4.ListTenantsRequest; +import com.google.cloud.talent.v4.ListTenantsResponse; +import com.google.cloud.talent.v4.Tenant; +import com.google.cloud.talent.v4.UpdateTenantRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Talent Solution API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class TenantServiceStub implements BackgroundResource { + + public UnaryCallable createTenantCallable() { + throw new UnsupportedOperationException("Not implemented: createTenantCallable()"); + } + + public UnaryCallable getTenantCallable() { + throw new UnsupportedOperationException("Not implemented: getTenantCallable()"); + } + + public UnaryCallable updateTenantCallable() { + throw new UnsupportedOperationException("Not implemented: updateTenantCallable()"); + } + + public UnaryCallable deleteTenantCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTenantCallable()"); + } + + public UnaryCallable listTenantsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTenantsPagedCallable()"); + } + + public UnaryCallable listTenantsCallable() { + throw new UnsupportedOperationException("Not implemented: listTenantsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStubSettings.java b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStubSettings.java new file mode 100644 index 00000000..d937b157 --- /dev/null +++ b/google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStubSettings.java @@ -0,0 +1,531 @@ +/* + * Copyright 2020 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.stub; + +import static com.google.cloud.talent.v4.TenantServiceClient.ListTenantsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.talent.v4.CreateTenantRequest; +import com.google.cloud.talent.v4.DeleteTenantRequest; +import com.google.cloud.talent.v4.GetTenantRequest; +import com.google.cloud.talent.v4.ListTenantsRequest; +import com.google.cloud.talent.v4.ListTenantsResponse; +import com.google.cloud.talent.v4.Tenant; +import com.google.cloud.talent.v4.UpdateTenantRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link TenantServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (jobs.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTenant to 30 seconds: + * + *

+ * 
+ * TenantServiceStubSettings.Builder tenantServiceSettingsBuilder =
+ *     TenantServiceStubSettings.newBuilder();
+ * tenantServiceSettingsBuilder
+ *     .createTenantSettings()
+ *     .setRetrySettings(
+ *         tenantServiceSettingsBuilder.createTenantSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TenantServiceStubSettings tenantServiceSettings = tenantServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class TenantServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/jobs") + .build(); + + private final UnaryCallSettings createTenantSettings; + private final UnaryCallSettings getTenantSettings; + private final UnaryCallSettings updateTenantSettings; + private final UnaryCallSettings deleteTenantSettings; + private final PagedCallSettings + listTenantsSettings; + + /** Returns the object with the settings used for calls to createTenant. */ + public UnaryCallSettings createTenantSettings() { + return createTenantSettings; + } + + /** Returns the object with the settings used for calls to getTenant. */ + public UnaryCallSettings getTenantSettings() { + return getTenantSettings; + } + + /** Returns the object with the settings used for calls to updateTenant. */ + public UnaryCallSettings updateTenantSettings() { + return updateTenantSettings; + } + + /** Returns the object with the settings used for calls to deleteTenant. */ + public UnaryCallSettings deleteTenantSettings() { + return deleteTenantSettings; + } + + /** Returns the object with the settings used for calls to listTenants. */ + public PagedCallSettings + listTenantsSettings() { + return listTenantsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public TenantServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTenantServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "jobs.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(TenantServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TenantServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTenantSettings = settingsBuilder.createTenantSettings().build(); + getTenantSettings = settingsBuilder.getTenantSettings().build(); + updateTenantSettings = settingsBuilder.updateTenantSettings().build(); + deleteTenantSettings = settingsBuilder.deleteTenantSettings().build(); + listTenantsSettings = settingsBuilder.listTenantsSettings().build(); + } + + private static final PagedListDescriptor + LIST_TENANTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTenantsRequest injectToken(ListTenantsRequest payload, String token) { + return ListTenantsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTenantsRequest injectPageSize(ListTenantsRequest payload, int pageSize) { + return ListTenantsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTenantsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTenantsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTenantsResponse payload) { + return payload.getTenantsList() != null + ? payload.getTenantsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> + LIST_TENANTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTenantsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TENANTS_PAGE_STR_DESC, request, context); + return ListTenantsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for TenantServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createTenantSettings; + private final UnaryCallSettings.Builder getTenantSettings; + private final UnaryCallSettings.Builder updateTenantSettings; + private final UnaryCallSettings.Builder deleteTenantSettings; + private final PagedCallSettings.Builder< + ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> + listTenantsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTenantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listTenantsSettings = PagedCallSettings.newBuilder(LIST_TENANTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTenantSettings, + getTenantSettings, + updateTenantSettings, + deleteTenantSettings, + listTenantsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createTenantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + + builder + .getTenantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateTenantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + + builder + .deleteTenantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listTenantsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + return builder; + } + + protected Builder(TenantServiceStubSettings settings) { + super(settings); + + createTenantSettings = settings.createTenantSettings.toBuilder(); + getTenantSettings = settings.getTenantSettings.toBuilder(); + updateTenantSettings = settings.updateTenantSettings.toBuilder(); + deleteTenantSettings = settings.deleteTenantSettings.toBuilder(); + listTenantsSettings = settings.listTenantsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTenantSettings, + getTenantSettings, + updateTenantSettings, + deleteTenantSettings, + listTenantsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTenant. */ + public UnaryCallSettings.Builder createTenantSettings() { + return createTenantSettings; + } + + /** Returns the builder for the settings used for calls to getTenant. */ + public UnaryCallSettings.Builder getTenantSettings() { + return getTenantSettings; + } + + /** Returns the builder for the settings used for calls to updateTenant. */ + public UnaryCallSettings.Builder updateTenantSettings() { + return updateTenantSettings; + } + + /** Returns the builder for the settings used for calls to deleteTenant. */ + public UnaryCallSettings.Builder deleteTenantSettings() { + return deleteTenantSettings; + } + + /** Returns the builder for the settings used for calls to listTenants. */ + public PagedCallSettings.Builder< + ListTenantsRequest, ListTenantsResponse, ListTenantsPagedResponse> + listTenantsSettings() { + return listTenantsSettings; + } + + @Override + public TenantServiceStubSettings build() throws IOException { + return new TenantServiceStubSettings(this); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompanyServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompanyServiceClientTest.java new file mode 100644 index 00000000..5c9d20e9 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompanyServiceClientTest.java @@ -0,0 +1,366 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.CompanyServiceClient.ListCompaniesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class CompanyServiceClientTest { + private static MockCompanyService mockCompanyService; + private static MockCompletion mockCompletion; + private static MockEventService mockEventService; + private static MockJobService mockJobService; + private static MockTenantService mockTenantService; + private static MockServiceHelper serviceHelper; + private CompanyServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCompanyService = new MockCompanyService(); + mockCompletion = new MockCompletion(); + mockEventService = new MockEventService(); + mockJobService = new MockJobService(); + mockTenantService = new MockTenantService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockCompanyService, + mockCompletion, + mockEventService, + mockJobService, + mockTenantService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + CompanyServiceSettings settings = + CompanyServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CompanyServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createCompanyTest() { + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String displayName = "displayName1615086568"; + String externalId = "externalId-1153075697"; + String headquartersAddress = "headquartersAddress-1879520036"; + boolean hiringAgency = false; + String eeoText = "eeoText-1652097123"; + String websiteUri = "websiteUri-2118185016"; + String careerSiteUri = "careerSiteUri1223331861"; + String imageUri = "imageUri-877823864"; + boolean suspended = false; + Company expectedResponse = + Company.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setExternalId(externalId) + .setHeadquartersAddress(headquartersAddress) + .setHiringAgency(hiringAgency) + .setEeoText(eeoText) + .setWebsiteUri(websiteUri) + .setCareerSiteUri(careerSiteUri) + .setImageUri(imageUri) + .setSuspended(suspended) + .build(); + mockCompanyService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + Company company = Company.newBuilder().build(); + + Company actualResponse = client.createCompany(parent, company); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCompanyRequest actualRequest = (CreateCompanyRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(company, actualRequest.getCompany()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createCompanyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + Company company = Company.newBuilder().build(); + + client.createCompany(parent, company); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getCompanyTest() { + CompanyName name2 = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String displayName = "displayName1615086568"; + String externalId = "externalId-1153075697"; + String headquartersAddress = "headquartersAddress-1879520036"; + boolean hiringAgency = false; + String eeoText = "eeoText-1652097123"; + String websiteUri = "websiteUri-2118185016"; + String careerSiteUri = "careerSiteUri1223331861"; + String imageUri = "imageUri-877823864"; + boolean suspended = false; + Company expectedResponse = + Company.newBuilder() + .setName(name2.toString()) + .setDisplayName(displayName) + .setExternalId(externalId) + .setHeadquartersAddress(headquartersAddress) + .setHiringAgency(hiringAgency) + .setEeoText(eeoText) + .setWebsiteUri(websiteUri) + .setCareerSiteUri(careerSiteUri) + .setImageUri(imageUri) + .setSuspended(suspended) + .build(); + mockCompanyService.addResponse(expectedResponse); + + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + + Company actualResponse = client.getCompany(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCompanyRequest actualRequest = (GetCompanyRequest) actualRequests.get(0); + + Assert.assertEquals(name, CompanyName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getCompanyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + + client.getCompany(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateCompanyTest() { + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String displayName = "displayName1615086568"; + String externalId = "externalId-1153075697"; + String headquartersAddress = "headquartersAddress-1879520036"; + boolean hiringAgency = false; + String eeoText = "eeoText-1652097123"; + String websiteUri = "websiteUri-2118185016"; + String careerSiteUri = "careerSiteUri1223331861"; + String imageUri = "imageUri-877823864"; + boolean suspended = false; + Company expectedResponse = + Company.newBuilder() + .setName(name.toString()) + .setDisplayName(displayName) + .setExternalId(externalId) + .setHeadquartersAddress(headquartersAddress) + .setHiringAgency(hiringAgency) + .setEeoText(eeoText) + .setWebsiteUri(websiteUri) + .setCareerSiteUri(careerSiteUri) + .setImageUri(imageUri) + .setSuspended(suspended) + .build(); + mockCompanyService.addResponse(expectedResponse); + + Company company = Company.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Company actualResponse = client.updateCompany(company, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCompanyRequest actualRequest = (UpdateCompanyRequest) actualRequests.get(0); + + Assert.assertEquals(company, actualRequest.getCompany()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateCompanyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + Company company = Company.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateCompany(company, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteCompanyTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockCompanyService.addResponse(expectedResponse); + + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + + client.deleteCompany(name); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCompanyRequest actualRequest = (DeleteCompanyRequest) actualRequests.get(0); + + Assert.assertEquals(name, CompanyName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteCompanyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + CompanyName name = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + + client.deleteCompany(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listCompaniesTest() { + String nextPageToken = ""; + Company companiesElement = Company.newBuilder().build(); + List companies = Arrays.asList(companiesElement); + ListCompaniesResponse expectedResponse = + ListCompaniesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllCompanies(companies) + .build(); + mockCompanyService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + + ListCompaniesPagedResponse pagedListResponse = client.listCompanies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCompaniesList().get(0), resources.get(0)); + + List actualRequests = mockCompanyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCompaniesRequest actualRequest = (ListCompaniesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listCompaniesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompanyService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + + client.listCompanies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompletionClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompletionClientTest.java new file mode 100644 index 00000000..fd7fbf2c --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompletionClientTest.java @@ -0,0 +1,146 @@ +/* + * Copyright 2020 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; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class CompletionClientTest { + private static MockCompanyService mockCompanyService; + private static MockCompletion mockCompletion; + private static MockEventService mockEventService; + private static MockJobService mockJobService; + private static MockTenantService mockTenantService; + private static MockServiceHelper serviceHelper; + private CompletionClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCompanyService = new MockCompanyService(); + mockCompletion = new MockCompletion(); + mockEventService = new MockEventService(); + mockJobService = new MockJobService(); + mockTenantService = new MockTenantService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockCompanyService, + mockCompletion, + mockEventService, + mockJobService, + mockTenantService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + CompletionSettings settings = + CompletionSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CompletionClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void completeQueryTest() { + CompleteQueryResponse expectedResponse = CompleteQueryResponse.newBuilder().build(); + mockCompletion.addResponse(expectedResponse); + + TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]"); + String query = "query107944136"; + int pageSize = 883849137; + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setTenant(tenant.toString()) + .setQuery(query) + .setPageSize(pageSize) + .build(); + + CompleteQueryResponse actualResponse = client.completeQuery(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompletion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CompleteQueryRequest actualRequest = (CompleteQueryRequest) actualRequests.get(0); + + Assert.assertEquals(tenant, TenantName.parse(actualRequest.getTenant())); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertEquals(pageSize, actualRequest.getPageSize()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void completeQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCompletion.addException(exception); + + try { + TenantName tenant = TenantName.of("[PROJECT]", "[TENANT]"); + String query = "query107944136"; + int pageSize = 883849137; + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setTenant(tenant.toString()) + .setQuery(query) + .setPageSize(pageSize) + .build(); + + client.completeQuery(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/EventServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/EventServiceClientTest.java new file mode 100644 index 00000000..01393256 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/EventServiceClientTest.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 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; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class EventServiceClientTest { + private static MockCompanyService mockCompanyService; + private static MockCompletion mockCompletion; + private static MockEventService mockEventService; + private static MockJobService mockJobService; + private static MockTenantService mockTenantService; + private static MockServiceHelper serviceHelper; + private EventServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCompanyService = new MockCompanyService(); + mockCompletion = new MockCompletion(); + mockEventService = new MockEventService(); + mockJobService = new MockJobService(); + mockTenantService = new MockTenantService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockCompanyService, + mockCompletion, + mockEventService, + mockJobService, + mockTenantService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + EventServiceSettings settings = + EventServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EventServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createClientEventTest() { + String requestId = "requestId37109963"; + String eventId = "eventId278118624"; + String eventNotes = "eventNotes445073628"; + ClientEvent expectedResponse = + ClientEvent.newBuilder() + .setRequestId(requestId) + .setEventId(eventId) + .setEventNotes(eventNotes) + .build(); + mockEventService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + ClientEvent clientEvent = ClientEvent.newBuilder().build(); + + ClientEvent actualResponse = client.createClientEvent(parent, clientEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEventService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClientEventRequest actualRequest = (CreateClientEventRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(clientEvent, actualRequest.getClientEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createClientEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEventService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + ClientEvent clientEvent = ClientEvent.newBuilder().build(); + + client.createClientEvent(parent, clientEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/JobServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/JobServiceClientTest.java new file mode 100644 index 00000000..aa836376 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/JobServiceClientTest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.JobServiceClient.ListJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class JobServiceClientTest { + private static MockCompanyService mockCompanyService; + private static MockCompletion mockCompletion; + private static MockEventService mockEventService; + private static MockJobService mockJobService; + private static MockTenantService mockTenantService; + private static MockServiceHelper serviceHelper; + private JobServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCompanyService = new MockCompanyService(); + mockCompletion = new MockCompletion(); + mockEventService = new MockEventService(); + mockJobService = new MockJobService(); + mockTenantService = new MockTenantService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockCompanyService, + mockCompletion, + mockEventService, + mockJobService, + mockTenantService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + JobServiceSettings settings = + JobServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = JobServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createJobTest() { + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + CompanyName company = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String requisitionId = "requisitionId980224926"; + String title = "title110371416"; + String description = "description-1724546052"; + String department = "department848184146"; + String incentives = "incentives-1262874520"; + String languageCode = "languageCode-412800396"; + int promotionValue = 353413845; + String qualifications = "qualifications1903501412"; + String responsibilities = "responsibilities-926952660"; + String companyDisplayName = "companyDisplayName1982424170"; + Job expectedResponse = + Job.newBuilder() + .setName(name.toString()) + .setCompany(company.toString()) + .setRequisitionId(requisitionId) + .setTitle(title) + .setDescription(description) + .setDepartment(department) + .setIncentives(incentives) + .setLanguageCode(languageCode) + .setPromotionValue(promotionValue) + .setQualifications(qualifications) + .setResponsibilities(responsibilities) + .setCompanyDisplayName(companyDisplayName) + .build(); + mockJobService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + Job job = Job.newBuilder().build(); + + Job actualResponse = client.createJob(parent, job); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateJobRequest actualRequest = (CreateJobRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(job, actualRequest.getJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + Job job = Job.newBuilder().build(); + + client.createJob(parent, job); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void batchCreateJobsTest() throws Exception { + BatchCreateJobsResponse expectedResponse = BatchCreateJobsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchCreateJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + BatchCreateJobsResponse actualResponse = client.batchCreateJobsAsync(parent, jobs).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateJobsRequest actualRequest = (BatchCreateJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(jobs, actualRequest.getJobsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchCreateJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + client.batchCreateJobsAsync(parent, jobs).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void getJobTest() { + JobName name2 = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + CompanyName company = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String requisitionId = "requisitionId980224926"; + String title = "title110371416"; + String description = "description-1724546052"; + String department = "department848184146"; + String incentives = "incentives-1262874520"; + String languageCode = "languageCode-412800396"; + int promotionValue = 353413845; + String qualifications = "qualifications1903501412"; + String responsibilities = "responsibilities-926952660"; + String companyDisplayName = "companyDisplayName1982424170"; + Job expectedResponse = + Job.newBuilder() + .setName(name2.toString()) + .setCompany(company.toString()) + .setRequisitionId(requisitionId) + .setTitle(title) + .setDescription(description) + .setDepartment(department) + .setIncentives(incentives) + .setLanguageCode(languageCode) + .setPromotionValue(promotionValue) + .setQualifications(qualifications) + .setResponsibilities(responsibilities) + .setCompanyDisplayName(companyDisplayName) + .build(); + mockJobService.addResponse(expectedResponse); + + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + + Job actualResponse = client.getJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetJobRequest actualRequest = (GetJobRequest) actualRequests.get(0); + + Assert.assertEquals(name, JobName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + + client.getJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateJobTest() { + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + CompanyName company = CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]"); + String requisitionId = "requisitionId980224926"; + String title = "title110371416"; + String description = "description-1724546052"; + String department = "department848184146"; + String incentives = "incentives-1262874520"; + String languageCode = "languageCode-412800396"; + int promotionValue = 353413845; + String qualifications = "qualifications1903501412"; + String responsibilities = "responsibilities-926952660"; + String companyDisplayName = "companyDisplayName1982424170"; + Job expectedResponse = + Job.newBuilder() + .setName(name.toString()) + .setCompany(company.toString()) + .setRequisitionId(requisitionId) + .setTitle(title) + .setDescription(description) + .setDepartment(department) + .setIncentives(incentives) + .setLanguageCode(languageCode) + .setPromotionValue(promotionValue) + .setQualifications(qualifications) + .setResponsibilities(responsibilities) + .setCompanyDisplayName(companyDisplayName) + .build(); + mockJobService.addResponse(expectedResponse); + + Job job = Job.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Job actualResponse = client.updateJob(job, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateJobRequest actualRequest = (UpdateJobRequest) actualRequests.get(0); + + Assert.assertEquals(job, actualRequest.getJob()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + Job job = Job.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateJob(job, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void batchUpdateJobsTest() throws Exception { + BatchUpdateJobsResponse expectedResponse = BatchUpdateJobsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchUpdateJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + BatchUpdateJobsResponse actualResponse = client.batchUpdateJobsAsync(parent, jobs).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateJobsRequest actualRequest = (BatchUpdateJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(jobs, actualRequest.getJobsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchUpdateJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List jobs = new ArrayList<>(); + + client.batchUpdateJobsAsync(parent, jobs).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void deleteJobTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + + client.deleteJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteJobRequest actualRequest = (DeleteJobRequest) actualRequests.get(0); + + Assert.assertEquals(name, JobName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + JobName name = JobName.of("[PROJECT]", "[TENANT]", "[JOB]"); + + client.deleteJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void batchDeleteJobsTest() throws Exception { + BatchDeleteJobsResponse expectedResponse = BatchDeleteJobsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteJobsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List formattedNames = new ArrayList<>(); + + BatchDeleteJobsResponse actualResponse = + client.batchDeleteJobsAsync(parent, formattedNames).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteJobsRequest actualRequest = (BatchDeleteJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(formattedNames, actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchDeleteJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + List formattedNames = new ArrayList<>(); + + client.batchDeleteJobsAsync(parent, formattedNames).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + @SuppressWarnings("all") + public void listJobsTest() { + String nextPageToken = ""; + Job jobsElement = Job.newBuilder().build(); + List jobs = Arrays.asList(jobsElement); + ListJobsResponse expectedResponse = + ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); + mockJobService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + String filter = "filter-1274492040"; + + ListJobsPagedResponse pagedListResponse = client.listJobs(parent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobsRequest actualRequest = (ListJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + String filter = "filter-1274492040"; + + client.listJobs(parent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void searchJobsTest() { + String nextPageToken = "nextPageToken-1530815211"; + int totalSize = 705419236; + int broadenedQueryJobsCount = 1432104658; + SearchJobsResponse expectedResponse = + SearchJobsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .setTotalSize(totalSize) + .setBroadenedQueryJobsCount(broadenedQueryJobsCount) + .build(); + mockJobService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + SearchJobsResponse actualResponse = client.searchJobs(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchJobsRequest actualRequest = (SearchJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(requestMetadata, actualRequest.getRequestMetadata()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void searchJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + client.searchJobs(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void searchJobsForAlertTest() { + String nextPageToken = "nextPageToken-1530815211"; + int totalSize = 705419236; + int broadenedQueryJobsCount = 1432104658; + SearchJobsResponse expectedResponse = + SearchJobsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .setTotalSize(totalSize) + .setBroadenedQueryJobsCount(broadenedQueryJobsCount) + .build(); + mockJobService.addResponse(expectedResponse); + + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + SearchJobsResponse actualResponse = client.searchJobsForAlert(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchJobsRequest actualRequest = (SearchJobsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TenantName.parse(actualRequest.getParent())); + Assert.assertEquals(requestMetadata, actualRequest.getRequestMetadata()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void searchJobsForAlertExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + TenantName parent = TenantName.of("[PROJECT]", "[TENANT]"); + RequestMetadata requestMetadata = RequestMetadata.newBuilder().build(); + SearchJobsRequest request = + SearchJobsRequest.newBuilder() + .setParent(parent.toString()) + .setRequestMetadata(requestMetadata) + .build(); + + client.searchJobsForAlert(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyService.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyService.java new file mode 100644 index 00000000..02474d72 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCompanyService implements MockGrpcService { + private final MockCompanyServiceImpl serviceImpl; + + public MockCompanyService() { + serviceImpl = new MockCompanyServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyServiceImpl.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyServiceImpl.java new file mode 100644 index 00000000..352bdd22 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyServiceImpl.java @@ -0,0 +1,132 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.talent.v4.CompanyServiceGrpc.CompanyServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCompanyServiceImpl extends CompanyServiceImplBase { + private List requests; + private Queue responses; + + public MockCompanyServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createCompany( + CreateCompanyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Company) { + requests.add(request); + responseObserver.onNext((Company) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getCompany(GetCompanyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Company) { + requests.add(request); + responseObserver.onNext((Company) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateCompany( + UpdateCompanyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Company) { + requests.add(request); + responseObserver.onNext((Company) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteCompany(DeleteCompanyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listCompanies( + ListCompaniesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCompaniesResponse) { + requests.add(request); + responseObserver.onNext((ListCompaniesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletion.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletion.java new file mode 100644 index 00000000..8532a92d --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletion.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCompletion implements MockGrpcService { + private final MockCompletionImpl serviceImpl; + + public MockCompletion() { + serviceImpl = new MockCompletionImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletionImpl.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletionImpl.java new file mode 100644 index 00000000..1c672d0a --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletionImpl.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.talent.v4.CompletionGrpc.CompletionImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCompletionImpl extends CompletionImplBase { + private List requests; + private Queue responses; + + public MockCompletionImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void completeQuery( + CompleteQueryRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CompleteQueryResponse) { + requests.add(request); + responseObserver.onNext((CompleteQueryResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventService.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventService.java new file mode 100644 index 00000000..43ab0c19 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEventService implements MockGrpcService { + private final MockEventServiceImpl serviceImpl; + + public MockEventService() { + serviceImpl = new MockEventServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventServiceImpl.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventServiceImpl.java new file mode 100644 index 00000000..13ee558f --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventServiceImpl.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.talent.v4.EventServiceGrpc.EventServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEventServiceImpl extends EventServiceImplBase { + private List requests; + private Queue responses; + + public MockEventServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createClientEvent( + CreateClientEventRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ClientEvent) { + requests.add(request); + responseObserver.onNext((ClientEvent) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobService.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobService.java new file mode 100644 index 00000000..22684756 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockJobService implements MockGrpcService { + private final MockJobServiceImpl serviceImpl; + + public MockJobService() { + serviceImpl = new MockJobServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobServiceImpl.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobServiceImpl.java new file mode 100644 index 00000000..2a441997 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobServiceImpl.java @@ -0,0 +1,205 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.talent.v4.JobServiceGrpc.JobServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockJobServiceImpl extends JobServiceImplBase { + private List requests; + private Queue responses; + + public MockJobServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createJob(CreateJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Job) { + requests.add(request); + responseObserver.onNext((Job) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchCreateJobs( + BatchCreateJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getJob(GetJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Job) { + requests.add(request); + responseObserver.onNext((Job) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateJob(UpdateJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Job) { + requests.add(request); + responseObserver.onNext((Job) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchUpdateJobs( + BatchUpdateJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteJob(DeleteJobRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void batchDeleteJobs( + BatchDeleteJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listJobs(ListJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListJobsResponse) { + requests.add(request); + responseObserver.onNext((ListJobsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void searchJobs( + SearchJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SearchJobsResponse) { + requests.add(request); + responseObserver.onNext((SearchJobsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void searchJobsForAlert( + SearchJobsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof SearchJobsResponse) { + requests.add(request); + responseObserver.onNext((SearchJobsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantService.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantService.java new file mode 100644 index 00000000..5ac5c3aa --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockTenantService implements MockGrpcService { + private final MockTenantServiceImpl serviceImpl; + + public MockTenantService() { + serviceImpl = new MockTenantServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantServiceImpl.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantServiceImpl.java new file mode 100644 index 00000000..dedc14e0 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantServiceImpl.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.talent.v4.TenantServiceGrpc.TenantServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockTenantServiceImpl extends TenantServiceImplBase { + private List requests; + private Queue responses; + + public MockTenantServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTenant(CreateTenantRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Tenant) { + requests.add(request); + responseObserver.onNext((Tenant) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getTenant(GetTenantRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Tenant) { + requests.add(request); + responseObserver.onNext((Tenant) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateTenant(UpdateTenantRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Tenant) { + requests.add(request); + responseObserver.onNext((Tenant) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTenant(DeleteTenantRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTenants( + ListTenantsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTenantsResponse) { + requests.add(request); + responseObserver.onNext((ListTenantsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/TenantServiceClientTest.java b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/TenantServiceClientTest.java new file mode 100644 index 00000000..e58fa7f9 --- /dev/null +++ b/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/TenantServiceClientTest.java @@ -0,0 +1,309 @@ +/* + * Copyright 2020 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; + +import static com.google.cloud.talent.v4.TenantServiceClient.ListTenantsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class TenantServiceClientTest { + private static MockCompanyService mockCompanyService; + private static MockCompletion mockCompletion; + private static MockEventService mockEventService; + private static MockJobService mockJobService; + private static MockTenantService mockTenantService; + private static MockServiceHelper serviceHelper; + private TenantServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCompanyService = new MockCompanyService(); + mockCompletion = new MockCompletion(); + mockEventService = new MockEventService(); + mockJobService = new MockJobService(); + mockTenantService = new MockTenantService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockCompanyService, + mockCompletion, + mockEventService, + mockJobService, + mockTenantService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + TenantServiceSettings settings = + TenantServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TenantServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createTenantTest() { + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + String externalId = "externalId-1153075697"; + Tenant expectedResponse = + Tenant.newBuilder().setName(name.toString()).setExternalId(externalId).build(); + mockTenantService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + Tenant tenant = Tenant.newBuilder().build(); + + Tenant actualResponse = client.createTenant(parent, tenant); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTenantRequest actualRequest = (CreateTenantRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(tenant, actualRequest.getTenant()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTenantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + Tenant tenant = Tenant.newBuilder().build(); + + client.createTenant(parent, tenant); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getTenantTest() { + TenantName name2 = TenantName.of("[PROJECT]", "[TENANT]"); + String externalId = "externalId-1153075697"; + Tenant expectedResponse = + Tenant.newBuilder().setName(name2.toString()).setExternalId(externalId).build(); + mockTenantService.addResponse(expectedResponse); + + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + Tenant actualResponse = client.getTenant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTenantRequest actualRequest = (GetTenantRequest) actualRequests.get(0); + + Assert.assertEquals(name, TenantName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getTenantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + client.getTenant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTenantTest() { + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + String externalId = "externalId-1153075697"; + Tenant expectedResponse = + Tenant.newBuilder().setName(name.toString()).setExternalId(externalId).build(); + mockTenantService.addResponse(expectedResponse); + + Tenant tenant = Tenant.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Tenant actualResponse = client.updateTenant(tenant, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTenantRequest actualRequest = (UpdateTenantRequest) actualRequests.get(0); + + Assert.assertEquals(tenant, actualRequest.getTenant()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTenantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + Tenant tenant = Tenant.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateTenant(tenant, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTenantTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockTenantService.addResponse(expectedResponse); + + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + client.deleteTenant(name); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTenantRequest actualRequest = (DeleteTenantRequest) actualRequests.get(0); + + Assert.assertEquals(name, TenantName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTenantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + TenantName name = TenantName.of("[PROJECT]", "[TENANT]"); + + client.deleteTenant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTenantsTest() { + String nextPageToken = ""; + Tenant tenantsElement = Tenant.newBuilder().build(); + List tenants = Arrays.asList(tenantsElement); + ListTenantsResponse expectedResponse = + ListTenantsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllTenants(tenants) + .build(); + mockTenantService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListTenantsPagedResponse pagedListResponse = client.listTenants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTenantsList().get(0), resources.get(0)); + + List actualRequests = mockTenantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTenantsRequest actualRequest = (ListTenantsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTenantsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockTenantService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + + client.listTenants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/grpc-google-cloud-talent-v4/pom.xml b/grpc-google-cloud-talent-v4/pom.xml new file mode 100644 index 00000000..d8dfbcd2 --- /dev/null +++ b/grpc-google-cloud-talent-v4/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + grpc-google-cloud-talent-v4 + GRPC library for grpc-google-cloud-talent-v4 + + com.google.cloud + google-cloud-talent-parent + 0.37.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-talent-v4 + + + com.google.guava + guava + + + com.google.api.grpc + proto-google-common-protos + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyServiceGrpc.java b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyServiceGrpc.java new file mode 100644 index 00000000..13bda64b --- /dev/null +++ b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyServiceGrpc.java @@ -0,0 +1,800 @@ +/* + * Copyright 2020 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service that handles company management, including CRUD and enumeration.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/talent/v4/company_service.proto") +public final class CompanyServiceGrpc { + + private CompanyServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.talent.v4.CompanyService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company> + getCreateCompanyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCompany", + requestType = com.google.cloud.talent.v4.CreateCompanyRequest.class, + responseType = com.google.cloud.talent.v4.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company> + getCreateCompanyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company> + getCreateCompanyMethod; + if ((getCreateCompanyMethod = CompanyServiceGrpc.getCreateCompanyMethod) == null) { + synchronized (CompanyServiceGrpc.class) { + if ((getCreateCompanyMethod = CompanyServiceGrpc.getCreateCompanyMethod) == null) { + CompanyServiceGrpc.getCreateCompanyMethod = + getCreateCompanyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCompany")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CreateCompanyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Company.getDefaultInstance())) + .setSchemaDescriptor( + new CompanyServiceMethodDescriptorSupplier("CreateCompany")) + .build(); + } + } + } + return getCreateCompanyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company> + getGetCompanyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCompany", + requestType = com.google.cloud.talent.v4.GetCompanyRequest.class, + responseType = com.google.cloud.talent.v4.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company> + getGetCompanyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company> + getGetCompanyMethod; + if ((getGetCompanyMethod = CompanyServiceGrpc.getGetCompanyMethod) == null) { + synchronized (CompanyServiceGrpc.class) { + if ((getGetCompanyMethod = CompanyServiceGrpc.getGetCompanyMethod) == null) { + CompanyServiceGrpc.getGetCompanyMethod = + getGetCompanyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCompany")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.GetCompanyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Company.getDefaultInstance())) + .setSchemaDescriptor(new CompanyServiceMethodDescriptorSupplier("GetCompany")) + .build(); + } + } + } + return getGetCompanyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company> + getUpdateCompanyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCompany", + requestType = com.google.cloud.talent.v4.UpdateCompanyRequest.class, + responseType = com.google.cloud.talent.v4.Company.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company> + getUpdateCompanyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company> + getUpdateCompanyMethod; + if ((getUpdateCompanyMethod = CompanyServiceGrpc.getUpdateCompanyMethod) == null) { + synchronized (CompanyServiceGrpc.class) { + if ((getUpdateCompanyMethod = CompanyServiceGrpc.getUpdateCompanyMethod) == null) { + CompanyServiceGrpc.getUpdateCompanyMethod = + getUpdateCompanyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCompany")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.UpdateCompanyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Company.getDefaultInstance())) + .setSchemaDescriptor( + new CompanyServiceMethodDescriptorSupplier("UpdateCompany")) + .build(); + } + } + } + return getUpdateCompanyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty> + getDeleteCompanyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCompany", + requestType = com.google.cloud.talent.v4.DeleteCompanyRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty> + getDeleteCompanyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty> + getDeleteCompanyMethod; + if ((getDeleteCompanyMethod = CompanyServiceGrpc.getDeleteCompanyMethod) == null) { + synchronized (CompanyServiceGrpc.class) { + if ((getDeleteCompanyMethod = CompanyServiceGrpc.getDeleteCompanyMethod) == null) { + CompanyServiceGrpc.getDeleteCompanyMethod = + getDeleteCompanyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCompany")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.DeleteCompanyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new CompanyServiceMethodDescriptorSupplier("DeleteCompany")) + .build(); + } + } + } + return getDeleteCompanyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListCompaniesRequest, + com.google.cloud.talent.v4.ListCompaniesResponse> + getListCompaniesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCompanies", + requestType = com.google.cloud.talent.v4.ListCompaniesRequest.class, + responseType = com.google.cloud.talent.v4.ListCompaniesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListCompaniesRequest, + com.google.cloud.talent.v4.ListCompaniesResponse> + getListCompaniesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListCompaniesRequest, + com.google.cloud.talent.v4.ListCompaniesResponse> + getListCompaniesMethod; + if ((getListCompaniesMethod = CompanyServiceGrpc.getListCompaniesMethod) == null) { + synchronized (CompanyServiceGrpc.class) { + if ((getListCompaniesMethod = CompanyServiceGrpc.getListCompaniesMethod) == null) { + CompanyServiceGrpc.getListCompaniesMethod = + getListCompaniesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCompanies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListCompaniesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListCompaniesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CompanyServiceMethodDescriptorSupplier("ListCompanies")) + .build(); + } + } + } + return getListCompaniesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CompanyServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceStub(channel, callOptions); + } + }; + return CompanyServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CompanyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceBlockingStub(channel, callOptions); + } + }; + return CompanyServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CompanyServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompanyServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceFutureStub(channel, callOptions); + } + }; + return CompanyServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service that handles company management, including CRUD and enumeration.
+   * 
+ */ + public abstract static class CompanyServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new company entity.
+     * 
+ */ + public void createCompany( + com.google.cloud.talent.v4.CreateCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateCompanyMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves specified company.
+     * 
+ */ + public void getCompany( + com.google.cloud.talent.v4.GetCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetCompanyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates specified company.
+     * 
+ */ + public void updateCompany( + com.google.cloud.talent.v4.UpdateCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateCompanyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes specified company.
+     * Prerequisite: The company has no jobs associated with it.
+     * 
+ */ + public void deleteCompany( + com.google.cloud.talent.v4.DeleteCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteCompanyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all companies associated with the project.
+     * 
+ */ + public void listCompanies( + com.google.cloud.talent.v4.ListCompaniesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListCompaniesMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateCompanyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.CreateCompanyRequest, + com.google.cloud.talent.v4.Company>(this, METHODID_CREATE_COMPANY))) + .addMethod( + getGetCompanyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.GetCompanyRequest, + com.google.cloud.talent.v4.Company>(this, METHODID_GET_COMPANY))) + .addMethod( + getUpdateCompanyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.UpdateCompanyRequest, + com.google.cloud.talent.v4.Company>(this, METHODID_UPDATE_COMPANY))) + .addMethod( + getDeleteCompanyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_COMPANY))) + .addMethod( + getListCompaniesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.ListCompaniesRequest, + com.google.cloud.talent.v4.ListCompaniesResponse>( + this, METHODID_LIST_COMPANIES))) + .build(); + } + } + + /** + * + * + *
+   * A service that handles company management, including CRUD and enumeration.
+   * 
+ */ + public static final class CompanyServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CompanyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompanyServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new company entity.
+     * 
+ */ + public void createCompany( + com.google.cloud.talent.v4.CreateCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCompanyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves specified company.
+     * 
+ */ + public void getCompany( + com.google.cloud.talent.v4.GetCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates specified company.
+     * 
+ */ + public void updateCompany( + com.google.cloud.talent.v4.UpdateCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes specified company.
+     * Prerequisite: The company has no jobs associated with it.
+     * 
+ */ + public void deleteCompany( + com.google.cloud.talent.v4.DeleteCompanyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all companies associated with the project.
+     * 
+ */ + public void listCompanies( + com.google.cloud.talent.v4.ListCompaniesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCompaniesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service that handles company management, including CRUD and enumeration.
+   * 
+ */ + public static final class CompanyServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CompanyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompanyServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new company entity.
+     * 
+ */ + public com.google.cloud.talent.v4.Company createCompany( + com.google.cloud.talent.v4.CreateCompanyRequest request) { + return blockingUnaryCall(getChannel(), getCreateCompanyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves specified company.
+     * 
+ */ + public com.google.cloud.talent.v4.Company getCompany( + com.google.cloud.talent.v4.GetCompanyRequest request) { + return blockingUnaryCall(getChannel(), getGetCompanyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates specified company.
+     * 
+ */ + public com.google.cloud.talent.v4.Company updateCompany( + com.google.cloud.talent.v4.UpdateCompanyRequest request) { + return blockingUnaryCall(getChannel(), getUpdateCompanyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes specified company.
+     * Prerequisite: The company has no jobs associated with it.
+     * 
+ */ + public com.google.protobuf.Empty deleteCompany( + com.google.cloud.talent.v4.DeleteCompanyRequest request) { + return blockingUnaryCall(getChannel(), getDeleteCompanyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all companies associated with the project.
+     * 
+ */ + public com.google.cloud.talent.v4.ListCompaniesResponse listCompanies( + com.google.cloud.talent.v4.ListCompaniesRequest request) { + return blockingUnaryCall(getChannel(), getListCompaniesMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service that handles company management, including CRUD and enumeration.
+   * 
+ */ + public static final class CompanyServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CompanyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompanyServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompanyServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new company entity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCompany(com.google.cloud.talent.v4.CreateCompanyRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateCompanyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves specified company.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getCompany(com.google.cloud.talent.v4.GetCompanyRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates specified company.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCompany(com.google.cloud.talent.v4.UpdateCompanyRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes specified company.
+     * Prerequisite: The company has no jobs associated with it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCompany(com.google.cloud.talent.v4.DeleteCompanyRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all companies associated with the project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.ListCompaniesResponse> + listCompanies(com.google.cloud.talent.v4.ListCompaniesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCompaniesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_COMPANY = 0; + private static final int METHODID_GET_COMPANY = 1; + private static final int METHODID_UPDATE_COMPANY = 2; + private static final int METHODID_DELETE_COMPANY = 3; + private static final int METHODID_LIST_COMPANIES = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final CompanyServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CompanyServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_COMPANY: + serviceImpl.createCompany( + (com.google.cloud.talent.v4.CreateCompanyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_COMPANY: + serviceImpl.getCompany( + (com.google.cloud.talent.v4.GetCompanyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_COMPANY: + serviceImpl.updateCompany( + (com.google.cloud.talent.v4.UpdateCompanyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_COMPANY: + serviceImpl.deleteCompany( + (com.google.cloud.talent.v4.DeleteCompanyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_COMPANIES: + serviceImpl.listCompanies( + (com.google.cloud.talent.v4.ListCompaniesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class CompanyServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CompanyServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CompanyService"); + } + } + + private static final class CompanyServiceFileDescriptorSupplier + extends CompanyServiceBaseDescriptorSupplier { + CompanyServiceFileDescriptorSupplier() {} + } + + private static final class CompanyServiceMethodDescriptorSupplier + extends CompanyServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CompanyServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CompanyServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CompanyServiceFileDescriptorSupplier()) + .addMethod(getCreateCompanyMethod()) + .addMethod(getGetCompanyMethod()) + .addMethod(getUpdateCompanyMethod()) + .addMethod(getDeleteCompanyMethod()) + .addMethod(getListCompaniesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionGrpc.java b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionGrpc.java new file mode 100644 index 00000000..4192a1e2 --- /dev/null +++ b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionGrpc.java @@ -0,0 +1,364 @@ +/* + * Copyright 2020 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service handles auto completion.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/talent/v4/completion_service.proto") +public final class CompletionGrpc { + + private CompletionGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.talent.v4.Completion"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CompleteQueryRequest, + com.google.cloud.talent.v4.CompleteQueryResponse> + getCompleteQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CompleteQuery", + requestType = com.google.cloud.talent.v4.CompleteQueryRequest.class, + responseType = com.google.cloud.talent.v4.CompleteQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CompleteQueryRequest, + com.google.cloud.talent.v4.CompleteQueryResponse> + getCompleteQueryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CompleteQueryRequest, + com.google.cloud.talent.v4.CompleteQueryResponse> + getCompleteQueryMethod; + if ((getCompleteQueryMethod = CompletionGrpc.getCompleteQueryMethod) == null) { + synchronized (CompletionGrpc.class) { + if ((getCompleteQueryMethod = CompletionGrpc.getCompleteQueryMethod) == null) { + CompletionGrpc.getCompleteQueryMethod = + getCompleteQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CompleteQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CompleteQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CompleteQueryResponse + .getDefaultInstance())) + .setSchemaDescriptor(new CompletionMethodDescriptorSupplier("CompleteQuery")) + .build(); + } + } + } + return getCompleteQueryMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CompletionStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionStub(channel, callOptions); + } + }; + return CompletionStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CompletionBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionBlockingStub(channel, callOptions); + } + }; + return CompletionBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CompletionFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionFutureStub(channel, callOptions); + } + }; + return CompletionFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service handles auto completion.
+   * 
+ */ + public abstract static class CompletionImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Completes the specified prefix with keyword suggestions.
+     * Intended for use by a job search auto-complete search box.
+     * 
+ */ + public void completeQuery( + com.google.cloud.talent.v4.CompleteQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCompleteQueryMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCompleteQueryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.CompleteQueryRequest, + com.google.cloud.talent.v4.CompleteQueryResponse>( + this, METHODID_COMPLETE_QUERY))) + .build(); + } + } + + /** + * + * + *
+   * A service handles auto completion.
+   * 
+ */ + public static final class CompletionStub extends io.grpc.stub.AbstractAsyncStub { + private CompletionStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified prefix with keyword suggestions.
+     * Intended for use by a job search auto-complete search box.
+     * 
+ */ + public void completeQuery( + com.google.cloud.talent.v4.CompleteQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service handles auto completion.
+   * 
+ */ + public static final class CompletionBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CompletionBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified prefix with keyword suggestions.
+     * Intended for use by a job search auto-complete search box.
+     * 
+ */ + public com.google.cloud.talent.v4.CompleteQueryResponse completeQuery( + com.google.cloud.talent.v4.CompleteQueryRequest request) { + return blockingUnaryCall(getChannel(), getCompleteQueryMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service handles auto completion.
+   * 
+ */ + public static final class CompletionFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CompletionFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified prefix with keyword suggestions.
+     * Intended for use by a job search auto-complete search box.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.CompleteQueryResponse> + completeQuery(com.google.cloud.talent.v4.CompleteQueryRequest request) { + return futureUnaryCall( + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_COMPLETE_QUERY = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final CompletionImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CompletionImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_COMPLETE_QUERY: + serviceImpl.completeQuery( + (com.google.cloud.talent.v4.CompleteQueryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class CompletionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CompletionBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Completion"); + } + } + + private static final class CompletionFileDescriptorSupplier + extends CompletionBaseDescriptorSupplier { + CompletionFileDescriptorSupplier() {} + } + + private static final class CompletionMethodDescriptorSupplier + extends CompletionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CompletionMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CompletionGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CompletionFileDescriptorSupplier()) + .addMethod(getCompleteQueryMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventServiceGrpc.java b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventServiceGrpc.java new file mode 100644 index 00000000..b34e6f57 --- /dev/null +++ b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventServiceGrpc.java @@ -0,0 +1,386 @@ +/* + * Copyright 2020 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service handles client event report.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/talent/v4/event_service.proto") +public final class EventServiceGrpc { + + private EventServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.talent.v4.EventService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateClientEventRequest, + com.google.cloud.talent.v4.ClientEvent> + getCreateClientEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateClientEvent", + requestType = com.google.cloud.talent.v4.CreateClientEventRequest.class, + responseType = com.google.cloud.talent.v4.ClientEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateClientEventRequest, + com.google.cloud.talent.v4.ClientEvent> + getCreateClientEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateClientEventRequest, + com.google.cloud.talent.v4.ClientEvent> + getCreateClientEventMethod; + if ((getCreateClientEventMethod = EventServiceGrpc.getCreateClientEventMethod) == null) { + synchronized (EventServiceGrpc.class) { + if ((getCreateClientEventMethod = EventServiceGrpc.getCreateClientEventMethod) == null) { + EventServiceGrpc.getCreateClientEventMethod = + getCreateClientEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateClientEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CreateClientEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ClientEvent.getDefaultInstance())) + .setSchemaDescriptor( + new EventServiceMethodDescriptorSupplier("CreateClientEvent")) + .build(); + } + } + } + return getCreateClientEventMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EventServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceStub(channel, callOptions); + } + }; + return EventServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EventServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceBlockingStub(channel, callOptions); + } + }; + return EventServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EventServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceFutureStub(channel, callOptions); + } + }; + return EventServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service handles client event report.
+   * 
+ */ + public abstract static class EventServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Report events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution. You may inspect the created events in
+     * [self service
+     * tools](https://console.cloud.google.com/talent-solution/overview).
+     * [Learn
+     * more](https://cloud.google.com/talent-solution/docs/management-tools)
+     * about self service tools.
+     * 
+ */ + public void createClientEvent( + com.google.cloud.talent.v4.CreateClientEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateClientEventMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateClientEventMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.CreateClientEventRequest, + com.google.cloud.talent.v4.ClientEvent>(this, METHODID_CREATE_CLIENT_EVENT))) + .build(); + } + } + + /** + * + * + *
+   * A service handles client event report.
+   * 
+ */ + public static final class EventServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private EventServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Report events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution. You may inspect the created events in
+     * [self service
+     * tools](https://console.cloud.google.com/talent-solution/overview).
+     * [Learn
+     * more](https://cloud.google.com/talent-solution/docs/management-tools)
+     * about self service tools.
+     * 
+ */ + public void createClientEvent( + com.google.cloud.talent.v4.CreateClientEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateClientEventMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service handles client event report.
+   * 
+ */ + public static final class EventServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EventServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Report events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution. You may inspect the created events in
+     * [self service
+     * tools](https://console.cloud.google.com/talent-solution/overview).
+     * [Learn
+     * more](https://cloud.google.com/talent-solution/docs/management-tools)
+     * about self service tools.
+     * 
+ */ + public com.google.cloud.talent.v4.ClientEvent createClientEvent( + com.google.cloud.talent.v4.CreateClientEventRequest request) { + return blockingUnaryCall( + getChannel(), getCreateClientEventMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service handles client event report.
+   * 
+ */ + public static final class EventServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EventServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Report events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution. You may inspect the created events in
+     * [self service
+     * tools](https://console.cloud.google.com/talent-solution/overview).
+     * [Learn
+     * more](https://cloud.google.com/talent-solution/docs/management-tools)
+     * about self service tools.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.ClientEvent> + createClientEvent(com.google.cloud.talent.v4.CreateClientEventRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateClientEventMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_CLIENT_EVENT = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final EventServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EventServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_CLIENT_EVENT: + serviceImpl.createClientEvent( + (com.google.cloud.talent.v4.CreateClientEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class EventServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EventServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.talent.v4.EventServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EventService"); + } + } + + private static final class EventServiceFileDescriptorSupplier + extends EventServiceBaseDescriptorSupplier { + EventServiceFileDescriptorSupplier() {} + } + + private static final class EventServiceMethodDescriptorSupplier + extends EventServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EventServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EventServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EventServiceFileDescriptorSupplier()) + .addMethod(getCreateClientEventMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceGrpc.java b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceGrpc.java new file mode 100644 index 00000000..d09aee37 --- /dev/null +++ b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceGrpc.java @@ -0,0 +1,1393 @@ +/* + * Copyright 2020 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service handles job management, including job CRUD, enumeration and search.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/talent/v4/job_service.proto") +public final class JobServiceGrpc { + + private JobServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.talent.v4.JobService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateJobRequest, com.google.cloud.talent.v4.Job> + getCreateJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateJob", + requestType = com.google.cloud.talent.v4.CreateJobRequest.class, + responseType = com.google.cloud.talent.v4.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateJobRequest, com.google.cloud.talent.v4.Job> + getCreateJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateJobRequest, com.google.cloud.talent.v4.Job> + getCreateJobMethod; + if ((getCreateJobMethod = JobServiceGrpc.getCreateJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateJobMethod = JobServiceGrpc.getCreateJobMethod) == null) { + JobServiceGrpc.getCreateJobMethod = + getCreateJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CreateJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Job.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("CreateJob")) + .build(); + } + } + } + return getCreateJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchCreateJobsRequest, com.google.longrunning.Operation> + getBatchCreateJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchCreateJobs", + requestType = com.google.cloud.talent.v4.BatchCreateJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchCreateJobsRequest, com.google.longrunning.Operation> + getBatchCreateJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchCreateJobsRequest, com.google.longrunning.Operation> + getBatchCreateJobsMethod; + if ((getBatchCreateJobsMethod = JobServiceGrpc.getBatchCreateJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getBatchCreateJobsMethod = JobServiceGrpc.getBatchCreateJobsMethod) == null) { + JobServiceGrpc.getBatchCreateJobsMethod = + getBatchCreateJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchCreateJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.BatchCreateJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("BatchCreateJobs")) + .build(); + } + } + } + return getBatchCreateJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetJobRequest, com.google.cloud.talent.v4.Job> + getGetJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetJob", + requestType = com.google.cloud.talent.v4.GetJobRequest.class, + responseType = com.google.cloud.talent.v4.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetJobRequest, com.google.cloud.talent.v4.Job> + getGetJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetJobRequest, com.google.cloud.talent.v4.Job> + getGetJobMethod; + if ((getGetJobMethod = JobServiceGrpc.getGetJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetJobMethod = JobServiceGrpc.getGetJobMethod) == null) { + JobServiceGrpc.getGetJobMethod = + getGetJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.GetJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Job.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("GetJob")) + .build(); + } + } + } + return getGetJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateJobRequest, com.google.cloud.talent.v4.Job> + getUpdateJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateJob", + requestType = com.google.cloud.talent.v4.UpdateJobRequest.class, + responseType = com.google.cloud.talent.v4.Job.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateJobRequest, com.google.cloud.talent.v4.Job> + getUpdateJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateJobRequest, com.google.cloud.talent.v4.Job> + getUpdateJobMethod; + if ((getUpdateJobMethod = JobServiceGrpc.getUpdateJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getUpdateJobMethod = JobServiceGrpc.getUpdateJobMethod) == null) { + JobServiceGrpc.getUpdateJobMethod = + getUpdateJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.UpdateJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Job.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("UpdateJob")) + .build(); + } + } + } + return getUpdateJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchUpdateJobsRequest, com.google.longrunning.Operation> + getBatchUpdateJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchUpdateJobs", + requestType = com.google.cloud.talent.v4.BatchUpdateJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchUpdateJobsRequest, com.google.longrunning.Operation> + getBatchUpdateJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchUpdateJobsRequest, com.google.longrunning.Operation> + getBatchUpdateJobsMethod; + if ((getBatchUpdateJobsMethod = JobServiceGrpc.getBatchUpdateJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getBatchUpdateJobsMethod = JobServiceGrpc.getBatchUpdateJobsMethod) == null) { + JobServiceGrpc.getBatchUpdateJobsMethod = + getBatchUpdateJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchUpdateJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.BatchUpdateJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("BatchUpdateJobs")) + .build(); + } + } + } + return getBatchUpdateJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteJobRequest, com.google.protobuf.Empty> + getDeleteJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteJob", + requestType = com.google.cloud.talent.v4.DeleteJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteJobRequest, com.google.protobuf.Empty> + getDeleteJobMethod() { + io.grpc.MethodDescriptor + getDeleteJobMethod; + if ((getDeleteJobMethod = JobServiceGrpc.getDeleteJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteJobMethod = JobServiceGrpc.getDeleteJobMethod) == null) { + JobServiceGrpc.getDeleteJobMethod = + getDeleteJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.DeleteJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("DeleteJob")) + .build(); + } + } + } + return getDeleteJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchDeleteJobsRequest, com.google.longrunning.Operation> + getBatchDeleteJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteJobs", + requestType = com.google.cloud.talent.v4.BatchDeleteJobsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchDeleteJobsRequest, com.google.longrunning.Operation> + getBatchDeleteJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.BatchDeleteJobsRequest, com.google.longrunning.Operation> + getBatchDeleteJobsMethod; + if ((getBatchDeleteJobsMethod = JobServiceGrpc.getBatchDeleteJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getBatchDeleteJobsMethod = JobServiceGrpc.getBatchDeleteJobsMethod) == null) { + JobServiceGrpc.getBatchDeleteJobsMethod = + getBatchDeleteJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchDeleteJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.BatchDeleteJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("BatchDeleteJobs")) + .build(); + } + } + } + return getBatchDeleteJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListJobsRequest, com.google.cloud.talent.v4.ListJobsResponse> + getListJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListJobs", + requestType = com.google.cloud.talent.v4.ListJobsRequest.class, + responseType = com.google.cloud.talent.v4.ListJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListJobsRequest, com.google.cloud.talent.v4.ListJobsResponse> + getListJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListJobsRequest, com.google.cloud.talent.v4.ListJobsResponse> + getListJobsMethod; + if ((getListJobsMethod = JobServiceGrpc.getListJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListJobsMethod = JobServiceGrpc.getListJobsMethod) == null) { + JobServiceGrpc.getListJobsMethod = + getListJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListJobsResponse.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("ListJobs")) + .build(); + } + } + } + return getListJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchJobs", + requestType = com.google.cloud.talent.v4.SearchJobsRequest.class, + responseType = com.google.cloud.talent.v4.SearchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsMethod; + if ((getSearchJobsMethod = JobServiceGrpc.getSearchJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getSearchJobsMethod = JobServiceGrpc.getSearchJobsMethod) == null) { + JobServiceGrpc.getSearchJobsMethod = + getSearchJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.SearchJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.SearchJobsResponse.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("SearchJobs")) + .build(); + } + } + } + return getSearchJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsForAlertMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchJobsForAlert", + requestType = com.google.cloud.talent.v4.SearchJobsRequest.class, + responseType = com.google.cloud.talent.v4.SearchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsForAlertMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse> + getSearchJobsForAlertMethod; + if ((getSearchJobsForAlertMethod = JobServiceGrpc.getSearchJobsForAlertMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getSearchJobsForAlertMethod = JobServiceGrpc.getSearchJobsForAlertMethod) == null) { + JobServiceGrpc.getSearchJobsForAlertMethod = + getSearchJobsForAlertMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchJobsForAlert")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.SearchJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.SearchJobsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("SearchJobsForAlert")) + .build(); + } + } + } + return getSearchJobsForAlertMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static JobServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceStub(channel, callOptions); + } + }; + return JobServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static JobServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceBlockingStub(channel, callOptions); + } + }; + return JobServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static JobServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public JobServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceFutureStub(channel, callOptions); + } + }; + return JobServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service handles job management, including job CRUD, enumeration and search.
+   * 
+ */ + public abstract static class JobServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new job.
+     * Typically, the job becomes searchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public void createJob( + com.google.cloud.talent.v4.CreateJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch create jobs operation.
+     * 
+ */ + public void batchCreateJobs( + com.google.cloud.talent.v4.BatchCreateJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchCreateJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified job, whose status is OPEN or recently EXPIRED
+     * within the last 90 days.
+     * 
+ */ + public void getJob( + com.google.cloud.talent.v4.GetJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates specified job.
+     * Typically, updated contents become visible in search results within 10
+     * seconds, but it may take up to 5 minutes.
+     * 
+ */ + public void updateJob( + com.google.cloud.talent.v4.UpdateJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch update jobs operation.
+     * 
+ */ + public void batchUpdateJobs( + com.google.cloud.talent.v4.BatchUpdateJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchUpdateJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified job.
+     * Typically, the job becomes unsearchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public void deleteJob( + com.google.cloud.talent.v4.DeleteJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch delete jobs operation.
+     * 
+ */ + public void batchDeleteJobs( + com.google.cloud.talent.v4.BatchDeleteJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchDeleteJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists jobs by filter.
+     * 
+ */ + public void listJobs( + com.google.cloud.talent.v4.ListJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs that the caller has
+     * permission to search against.
+     * 
+ */ + public void searchJobs( + com.google.cloud.talent.v4.SearchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getSearchJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This API call is intended for the use case of targeting passive job
+     * seekers (for example, job seekers who have signed up to receive email
+     * alerts about potential job opportunities), it has different algorithmic
+     * adjustments that are designed to specifically target passive job seekers.
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs the caller has
+     * permission to search against.
+     * 
+ */ + public void searchJobsForAlert( + com.google.cloud.talent.v4.SearchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getSearchJobsForAlertMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.CreateJobRequest, com.google.cloud.talent.v4.Job>( + this, METHODID_CREATE_JOB))) + .addMethod( + getBatchCreateJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.BatchCreateJobsRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_CREATE_JOBS))) + .addMethod( + getGetJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.GetJobRequest, com.google.cloud.talent.v4.Job>( + this, METHODID_GET_JOB))) + .addMethod( + getUpdateJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.UpdateJobRequest, com.google.cloud.talent.v4.Job>( + this, METHODID_UPDATE_JOB))) + .addMethod( + getBatchUpdateJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.BatchUpdateJobsRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_UPDATE_JOBS))) + .addMethod( + getDeleteJobMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.DeleteJobRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_JOB))) + .addMethod( + getBatchDeleteJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.BatchDeleteJobsRequest, + com.google.longrunning.Operation>(this, METHODID_BATCH_DELETE_JOBS))) + .addMethod( + getListJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.ListJobsRequest, + com.google.cloud.talent.v4.ListJobsResponse>(this, METHODID_LIST_JOBS))) + .addMethod( + getSearchJobsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse>(this, METHODID_SEARCH_JOBS))) + .addMethod( + getSearchJobsForAlertMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.SearchJobsRequest, + com.google.cloud.talent.v4.SearchJobsResponse>( + this, METHODID_SEARCH_JOBS_FOR_ALERT))) + .build(); + } + } + + /** + * + * + *
+   * A service handles job management, including job CRUD, enumeration and search.
+   * 
+ */ + public static final class JobServiceStub extends io.grpc.stub.AbstractAsyncStub { + private JobServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new job.
+     * Typically, the job becomes searchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public void createJob( + com.google.cloud.talent.v4.CreateJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch create jobs operation.
+     * 
+ */ + public void batchCreateJobs( + com.google.cloud.talent.v4.BatchCreateJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchCreateJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified job, whose status is OPEN or recently EXPIRED
+     * within the last 90 days.
+     * 
+ */ + public void getJob( + com.google.cloud.talent.v4.GetJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates specified job.
+     * Typically, updated contents become visible in search results within 10
+     * seconds, but it may take up to 5 minutes.
+     * 
+ */ + public void updateJob( + com.google.cloud.talent.v4.UpdateJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch update jobs operation.
+     * 
+ */ + public void batchUpdateJobs( + com.google.cloud.talent.v4.BatchUpdateJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchUpdateJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified job.
+     * Typically, the job becomes unsearchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public void deleteJob( + com.google.cloud.talent.v4.DeleteJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Begins executing a batch delete jobs operation.
+     * 
+ */ + public void batchDeleteJobs( + com.google.cloud.talent.v4.BatchDeleteJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchDeleteJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists jobs by filter.
+     * 
+ */ + public void listJobs( + com.google.cloud.talent.v4.ListJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs that the caller has
+     * permission to search against.
+     * 
+ */ + public void searchJobs( + com.google.cloud.talent.v4.SearchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSearchJobsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This API call is intended for the use case of targeting passive job
+     * seekers (for example, job seekers who have signed up to receive email
+     * alerts about potential job opportunities), it has different algorithmic
+     * adjustments that are designed to specifically target passive job seekers.
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs the caller has
+     * permission to search against.
+     * 
+ */ + public void searchJobsForAlert( + com.google.cloud.talent.v4.SearchJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSearchJobsForAlertMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service handles job management, including job CRUD, enumeration and search.
+   * 
+ */ + public static final class JobServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private JobServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new job.
+     * Typically, the job becomes searchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public com.google.cloud.talent.v4.Job createJob( + com.google.cloud.talent.v4.CreateJobRequest request) { + return blockingUnaryCall(getChannel(), getCreateJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Begins executing a batch create jobs operation.
+     * 
+ */ + public com.google.longrunning.Operation batchCreateJobs( + com.google.cloud.talent.v4.BatchCreateJobsRequest request) { + return blockingUnaryCall(getChannel(), getBatchCreateJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified job, whose status is OPEN or recently EXPIRED
+     * within the last 90 days.
+     * 
+ */ + public com.google.cloud.talent.v4.Job getJob(com.google.cloud.talent.v4.GetJobRequest request) { + return blockingUnaryCall(getChannel(), getGetJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates specified job.
+     * Typically, updated contents become visible in search results within 10
+     * seconds, but it may take up to 5 minutes.
+     * 
+ */ + public com.google.cloud.talent.v4.Job updateJob( + com.google.cloud.talent.v4.UpdateJobRequest request) { + return blockingUnaryCall(getChannel(), getUpdateJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Begins executing a batch update jobs operation.
+     * 
+ */ + public com.google.longrunning.Operation batchUpdateJobs( + com.google.cloud.talent.v4.BatchUpdateJobsRequest request) { + return blockingUnaryCall(getChannel(), getBatchUpdateJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified job.
+     * Typically, the job becomes unsearchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public com.google.protobuf.Empty deleteJob( + com.google.cloud.talent.v4.DeleteJobRequest request) { + return blockingUnaryCall(getChannel(), getDeleteJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Begins executing a batch delete jobs operation.
+     * 
+ */ + public com.google.longrunning.Operation batchDeleteJobs( + com.google.cloud.talent.v4.BatchDeleteJobsRequest request) { + return blockingUnaryCall(getChannel(), getBatchDeleteJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists jobs by filter.
+     * 
+ */ + public com.google.cloud.talent.v4.ListJobsResponse listJobs( + com.google.cloud.talent.v4.ListJobsRequest request) { + return blockingUnaryCall(getChannel(), getListJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs that the caller has
+     * permission to search against.
+     * 
+ */ + public com.google.cloud.talent.v4.SearchJobsResponse searchJobs( + com.google.cloud.talent.v4.SearchJobsRequest request) { + return blockingUnaryCall(getChannel(), getSearchJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This API call is intended for the use case of targeting passive job
+     * seekers (for example, job seekers who have signed up to receive email
+     * alerts about potential job opportunities), it has different algorithmic
+     * adjustments that are designed to specifically target passive job seekers.
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs the caller has
+     * permission to search against.
+     * 
+ */ + public com.google.cloud.talent.v4.SearchJobsResponse searchJobsForAlert( + com.google.cloud.talent.v4.SearchJobsRequest request) { + return blockingUnaryCall( + getChannel(), getSearchJobsForAlertMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service handles job management, including job CRUD, enumeration and search.
+   * 
+ */ + public static final class JobServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private JobServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new JobServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new job.
+     * Typically, the job becomes searchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createJob(com.google.cloud.talent.v4.CreateJobRequest request) { + return futureUnaryCall(getChannel().newCall(getCreateJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Begins executing a batch create jobs operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchCreateJobs(com.google.cloud.talent.v4.BatchCreateJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchCreateJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified job, whose status is OPEN or recently EXPIRED
+     * within the last 90 days.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getJob(com.google.cloud.talent.v4.GetJobRequest request) { + return futureUnaryCall(getChannel().newCall(getGetJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates specified job.
+     * Typically, updated contents become visible in search results within 10
+     * seconds, but it may take up to 5 minutes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateJob(com.google.cloud.talent.v4.UpdateJobRequest request) { + return futureUnaryCall(getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Begins executing a batch update jobs operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchUpdateJobs(com.google.cloud.talent.v4.BatchUpdateJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchUpdateJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified job.
+     * Typically, the job becomes unsearchable within 10 seconds, but it may take
+     * up to 5 minutes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteJob( + com.google.cloud.talent.v4.DeleteJobRequest request) { + return futureUnaryCall(getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Begins executing a batch delete jobs operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteJobs(com.google.cloud.talent.v4.BatchDeleteJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchDeleteJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists jobs by filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.ListJobsResponse> + listJobs(com.google.cloud.talent.v4.ListJobsRequest request) { + return futureUnaryCall(getChannel().newCall(getListJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs that the caller has
+     * permission to search against.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.SearchJobsResponse> + searchJobs(com.google.cloud.talent.v4.SearchJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * This API call is intended for the use case of targeting passive job
+     * seekers (for example, job seekers who have signed up to receive email
+     * alerts about potential job opportunities), it has different algorithmic
+     * adjustments that are designed to specifically target passive job seekers.
+     * This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs
+     * present in the database, and only returns jobs the caller has
+     * permission to search against.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.SearchJobsResponse> + searchJobsForAlert(com.google.cloud.talent.v4.SearchJobsRequest request) { + return futureUnaryCall( + getChannel().newCall(getSearchJobsForAlertMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_JOB = 0; + private static final int METHODID_BATCH_CREATE_JOBS = 1; + private static final int METHODID_GET_JOB = 2; + private static final int METHODID_UPDATE_JOB = 3; + private static final int METHODID_BATCH_UPDATE_JOBS = 4; + private static final int METHODID_DELETE_JOB = 5; + private static final int METHODID_BATCH_DELETE_JOBS = 6; + private static final int METHODID_LIST_JOBS = 7; + private static final int METHODID_SEARCH_JOBS = 8; + private static final int METHODID_SEARCH_JOBS_FOR_ALERT = 9; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final JobServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(JobServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_JOB: + serviceImpl.createJob( + (com.google.cloud.talent.v4.CreateJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_CREATE_JOBS: + serviceImpl.batchCreateJobs( + (com.google.cloud.talent.v4.BatchCreateJobsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_JOB: + serviceImpl.getJob( + (com.google.cloud.talent.v4.GetJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_JOB: + serviceImpl.updateJob( + (com.google.cloud.talent.v4.UpdateJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_UPDATE_JOBS: + serviceImpl.batchUpdateJobs( + (com.google.cloud.talent.v4.BatchUpdateJobsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_JOB: + serviceImpl.deleteJob( + (com.google.cloud.talent.v4.DeleteJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_DELETE_JOBS: + serviceImpl.batchDeleteJobs( + (com.google.cloud.talent.v4.BatchDeleteJobsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_JOBS: + serviceImpl.listJobs( + (com.google.cloud.talent.v4.ListJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_JOBS: + serviceImpl.searchJobs( + (com.google.cloud.talent.v4.SearchJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_JOBS_FOR_ALERT: + serviceImpl.searchJobsForAlert( + (com.google.cloud.talent.v4.SearchJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class JobServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + JobServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("JobService"); + } + } + + private static final class JobServiceFileDescriptorSupplier + extends JobServiceBaseDescriptorSupplier { + JobServiceFileDescriptorSupplier() {} + } + + private static final class JobServiceMethodDescriptorSupplier + extends JobServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + JobServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (JobServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new JobServiceFileDescriptorSupplier()) + .addMethod(getCreateJobMethod()) + .addMethod(getBatchCreateJobsMethod()) + .addMethod(getGetJobMethod()) + .addMethod(getUpdateJobMethod()) + .addMethod(getBatchUpdateJobsMethod()) + .addMethod(getDeleteJobMethod()) + .addMethod(getBatchDeleteJobsMethod()) + .addMethod(getListJobsMethod()) + .addMethod(getSearchJobsMethod()) + .addMethod(getSearchJobsForAlertMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantServiceGrpc.java b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantServiceGrpc.java new file mode 100644 index 00000000..bff3eda5 --- /dev/null +++ b/grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantServiceGrpc.java @@ -0,0 +1,792 @@ +/* + * Copyright 2020 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * A service that handles tenant management, including CRUD and enumeration.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/talent/v4/tenant_service.proto") +public final class TenantServiceGrpc { + + private TenantServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.talent.v4.TenantService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateTenantRequest, com.google.cloud.talent.v4.Tenant> + getCreateTenantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTenant", + requestType = com.google.cloud.talent.v4.CreateTenantRequest.class, + responseType = com.google.cloud.talent.v4.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateTenantRequest, com.google.cloud.talent.v4.Tenant> + getCreateTenantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.CreateTenantRequest, com.google.cloud.talent.v4.Tenant> + getCreateTenantMethod; + if ((getCreateTenantMethod = TenantServiceGrpc.getCreateTenantMethod) == null) { + synchronized (TenantServiceGrpc.class) { + if ((getCreateTenantMethod = TenantServiceGrpc.getCreateTenantMethod) == null) { + TenantServiceGrpc.getCreateTenantMethod = + getCreateTenantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTenant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.CreateTenantRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Tenant.getDefaultInstance())) + .setSchemaDescriptor( + new TenantServiceMethodDescriptorSupplier("CreateTenant")) + .build(); + } + } + } + return getCreateTenantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetTenantRequest, com.google.cloud.talent.v4.Tenant> + getGetTenantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTenant", + requestType = com.google.cloud.talent.v4.GetTenantRequest.class, + responseType = com.google.cloud.talent.v4.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetTenantRequest, com.google.cloud.talent.v4.Tenant> + getGetTenantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.GetTenantRequest, com.google.cloud.talent.v4.Tenant> + getGetTenantMethod; + if ((getGetTenantMethod = TenantServiceGrpc.getGetTenantMethod) == null) { + synchronized (TenantServiceGrpc.class) { + if ((getGetTenantMethod = TenantServiceGrpc.getGetTenantMethod) == null) { + TenantServiceGrpc.getGetTenantMethod = + getGetTenantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTenant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.GetTenantRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Tenant.getDefaultInstance())) + .setSchemaDescriptor(new TenantServiceMethodDescriptorSupplier("GetTenant")) + .build(); + } + } + } + return getGetTenantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateTenantRequest, com.google.cloud.talent.v4.Tenant> + getUpdateTenantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTenant", + requestType = com.google.cloud.talent.v4.UpdateTenantRequest.class, + responseType = com.google.cloud.talent.v4.Tenant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateTenantRequest, com.google.cloud.talent.v4.Tenant> + getUpdateTenantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.UpdateTenantRequest, com.google.cloud.talent.v4.Tenant> + getUpdateTenantMethod; + if ((getUpdateTenantMethod = TenantServiceGrpc.getUpdateTenantMethod) == null) { + synchronized (TenantServiceGrpc.class) { + if ((getUpdateTenantMethod = TenantServiceGrpc.getUpdateTenantMethod) == null) { + TenantServiceGrpc.getUpdateTenantMethod = + getUpdateTenantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTenant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.UpdateTenantRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.Tenant.getDefaultInstance())) + .setSchemaDescriptor( + new TenantServiceMethodDescriptorSupplier("UpdateTenant")) + .build(); + } + } + } + return getUpdateTenantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteTenantRequest, com.google.protobuf.Empty> + getDeleteTenantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTenant", + requestType = com.google.cloud.talent.v4.DeleteTenantRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteTenantRequest, com.google.protobuf.Empty> + getDeleteTenantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.DeleteTenantRequest, com.google.protobuf.Empty> + getDeleteTenantMethod; + if ((getDeleteTenantMethod = TenantServiceGrpc.getDeleteTenantMethod) == null) { + synchronized (TenantServiceGrpc.class) { + if ((getDeleteTenantMethod = TenantServiceGrpc.getDeleteTenantMethod) == null) { + TenantServiceGrpc.getDeleteTenantMethod = + getDeleteTenantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTenant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.DeleteTenantRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new TenantServiceMethodDescriptorSupplier("DeleteTenant")) + .build(); + } + } + } + return getDeleteTenantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListTenantsRequest, + com.google.cloud.talent.v4.ListTenantsResponse> + getListTenantsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTenants", + requestType = com.google.cloud.talent.v4.ListTenantsRequest.class, + responseType = com.google.cloud.talent.v4.ListTenantsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListTenantsRequest, + com.google.cloud.talent.v4.ListTenantsResponse> + getListTenantsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.talent.v4.ListTenantsRequest, + com.google.cloud.talent.v4.ListTenantsResponse> + getListTenantsMethod; + if ((getListTenantsMethod = TenantServiceGrpc.getListTenantsMethod) == null) { + synchronized (TenantServiceGrpc.class) { + if ((getListTenantsMethod = TenantServiceGrpc.getListTenantsMethod) == null) { + TenantServiceGrpc.getListTenantsMethod = + getListTenantsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTenants")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListTenantsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.talent.v4.ListTenantsResponse.getDefaultInstance())) + .setSchemaDescriptor(new TenantServiceMethodDescriptorSupplier("ListTenants")) + .build(); + } + } + } + return getListTenantsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TenantServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceStub(channel, callOptions); + } + }; + return TenantServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TenantServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceBlockingStub(channel, callOptions); + } + }; + return TenantServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TenantServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TenantServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceFutureStub(channel, callOptions); + } + }; + return TenantServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service that handles tenant management, including CRUD and enumeration.
+   * 
+ */ + public abstract static class TenantServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new tenant entity.
+     * 
+ */ + public void createTenant( + com.google.cloud.talent.v4.CreateTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateTenantMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves specified tenant.
+     * 
+ */ + public void getTenant( + com.google.cloud.talent.v4.GetTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTenantMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates specified tenant.
+     * 
+ */ + public void updateTenant( + com.google.cloud.talent.v4.UpdateTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateTenantMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes specified tenant.
+     * 
+ */ + public void deleteTenant( + com.google.cloud.talent.v4.DeleteTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTenantMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all tenants associated with the project.
+     * 
+ */ + public void listTenants( + com.google.cloud.talent.v4.ListTenantsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTenantsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTenantMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.CreateTenantRequest, + com.google.cloud.talent.v4.Tenant>(this, METHODID_CREATE_TENANT))) + .addMethod( + getGetTenantMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.GetTenantRequest, + com.google.cloud.talent.v4.Tenant>(this, METHODID_GET_TENANT))) + .addMethod( + getUpdateTenantMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.UpdateTenantRequest, + com.google.cloud.talent.v4.Tenant>(this, METHODID_UPDATE_TENANT))) + .addMethod( + getDeleteTenantMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.DeleteTenantRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_TENANT))) + .addMethod( + getListTenantsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.talent.v4.ListTenantsRequest, + com.google.cloud.talent.v4.ListTenantsResponse>(this, METHODID_LIST_TENANTS))) + .build(); + } + } + + /** + * + * + *
+   * A service that handles tenant management, including CRUD and enumeration.
+   * 
+ */ + public static final class TenantServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private TenantServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TenantServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new tenant entity.
+     * 
+ */ + public void createTenant( + com.google.cloud.talent.v4.CreateTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTenantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves specified tenant.
+     * 
+ */ + public void getTenant( + com.google.cloud.talent.v4.GetTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTenantMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates specified tenant.
+     * 
+ */ + public void updateTenant( + com.google.cloud.talent.v4.UpdateTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateTenantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes specified tenant.
+     * 
+ */ + public void deleteTenant( + com.google.cloud.talent.v4.DeleteTenantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTenantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all tenants associated with the project.
+     * 
+ */ + public void listTenants( + com.google.cloud.talent.v4.ListTenantsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTenantsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service that handles tenant management, including CRUD and enumeration.
+   * 
+ */ + public static final class TenantServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TenantServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TenantServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new tenant entity.
+     * 
+ */ + public com.google.cloud.talent.v4.Tenant createTenant( + com.google.cloud.talent.v4.CreateTenantRequest request) { + return blockingUnaryCall(getChannel(), getCreateTenantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves specified tenant.
+     * 
+ */ + public com.google.cloud.talent.v4.Tenant getTenant( + com.google.cloud.talent.v4.GetTenantRequest request) { + return blockingUnaryCall(getChannel(), getGetTenantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates specified tenant.
+     * 
+ */ + public com.google.cloud.talent.v4.Tenant updateTenant( + com.google.cloud.talent.v4.UpdateTenantRequest request) { + return blockingUnaryCall(getChannel(), getUpdateTenantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes specified tenant.
+     * 
+ */ + public com.google.protobuf.Empty deleteTenant( + com.google.cloud.talent.v4.DeleteTenantRequest request) { + return blockingUnaryCall(getChannel(), getDeleteTenantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all tenants associated with the project.
+     * 
+ */ + public com.google.cloud.talent.v4.ListTenantsResponse listTenants( + com.google.cloud.talent.v4.ListTenantsRequest request) { + return blockingUnaryCall(getChannel(), getListTenantsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service that handles tenant management, including CRUD and enumeration.
+   * 
+ */ + public static final class TenantServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TenantServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TenantServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TenantServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new tenant entity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTenant(com.google.cloud.talent.v4.CreateTenantRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTenantMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves specified tenant.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getTenant(com.google.cloud.talent.v4.GetTenantRequest request) { + return futureUnaryCall(getChannel().newCall(getGetTenantMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates specified tenant.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateTenant(com.google.cloud.talent.v4.UpdateTenantRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateTenantMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes specified tenant.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTenant(com.google.cloud.talent.v4.DeleteTenantRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteTenantMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all tenants associated with the project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.talent.v4.ListTenantsResponse> + listTenants(com.google.cloud.talent.v4.ListTenantsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTenantsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TENANT = 0; + private static final int METHODID_GET_TENANT = 1; + private static final int METHODID_UPDATE_TENANT = 2; + private static final int METHODID_DELETE_TENANT = 3; + private static final int METHODID_LIST_TENANTS = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TenantServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TenantServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TENANT: + serviceImpl.createTenant( + (com.google.cloud.talent.v4.CreateTenantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TENANT: + serviceImpl.getTenant( + (com.google.cloud.talent.v4.GetTenantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_TENANT: + serviceImpl.updateTenant( + (com.google.cloud.talent.v4.UpdateTenantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TENANT: + serviceImpl.deleteTenant( + (com.google.cloud.talent.v4.DeleteTenantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TENANTS: + serviceImpl.listTenants( + (com.google.cloud.talent.v4.ListTenantsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class TenantServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TenantServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TenantService"); + } + } + + private static final class TenantServiceFileDescriptorSupplier + extends TenantServiceBaseDescriptorSupplier { + TenantServiceFileDescriptorSupplier() {} + } + + private static final class TenantServiceMethodDescriptorSupplier + extends TenantServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TenantServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TenantServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TenantServiceFileDescriptorSupplier()) + .addMethod(getCreateTenantMethod()) + .addMethod(getGetTenantMethod()) + .addMethod(getUpdateTenantMethod()) + .addMethod(getDeleteTenantMethod()) + .addMethod(getListTenantsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index 1cc51cb7..f9fc60d7 100644 --- a/pom.xml +++ b/pom.xml @@ -72,11 +72,21 @@ proto-google-cloud-talent-v4beta1 0.37.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + com.google.api.grpc grpc-google-cloud-talent-v4beta1 0.37.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + com.google.cloud google-cloud-talent @@ -124,7 +134,9 @@ proto-google-cloud-talent-v4beta1 + proto-google-cloud-talent-v4 grpc-google-cloud-talent-v4beta1 + grpc-google-cloud-talent-v4 google-cloud-talent google-cloud-talent-bom diff --git a/proto-google-cloud-talent-v4/pom.xml b/proto-google-cloud-talent-v4/pom.xml new file mode 100644 index 00000000..0cb155f1 --- /dev/null +++ b/proto-google-cloud-talent-v4/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-talent-v4 + 0.37.1-SNAPSHOT + proto-google-cloud-talent-v4 + PROTO library for proto-google-cloud-talent-v4 + + com.google.cloud + google-cloud-talent-parent + 0.37.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequest.java new file mode 100644 index 00000000..253a0d24 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequest.java @@ -0,0 +1,1213 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request to create a batch of jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchCreateJobsRequest} + */ +public final class BatchCreateJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchCreateJobsRequest) + BatchCreateJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateJobsRequest.newBuilder() to construct. + private BatchCreateJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateJobsRequest() { + parent_ = ""; + jobs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchCreateJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add( + input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchCreateJobsRequest.class, + com.google.cloud.talent.v4.BatchCreateJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOBS_FIELD_NUMBER = 2; + private java.util.List jobs_; + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getJobsList() { + return jobs_; + } + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getJobsOrBuilderList() { + return jobs_; + } + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + return jobs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < jobs_.size(); i++) { + output.writeMessage(2, jobs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < jobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, jobs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchCreateJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchCreateJobsRequest other = + (com.google.cloud.talent.v4.BatchCreateJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getJobsList().equals(other.getJobsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchCreateJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to create a batch of jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchCreateJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchCreateJobsRequest) + com.google.cloud.talent.v4.BatchCreateJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchCreateJobsRequest.class, + com.google.cloud.talent.v4.BatchCreateJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchCreateJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchCreateJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsRequest build() { + com.google.cloud.talent.v4.BatchCreateJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsRequest buildPartial() { + com.google.cloud.talent.v4.BatchCreateJobsRequest result = + new com.google.cloud.talent.v4.BatchCreateJobsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (jobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + } else { + result.jobs_ = jobsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchCreateJobsRequest) { + return mergeFrom((com.google.cloud.talent.v4.BatchCreateJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchCreateJobsRequest other) { + if (other == com.google.cloud.talent.v4.BatchCreateJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (jobsBuilder_ == null) { + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + } else { + if (!other.jobs_.isEmpty()) { + if (jobsBuilder_.isEmpty()) { + jobsBuilder_.dispose(); + jobsBuilder_ = null; + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + jobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobsFieldBuilder() + : null; + } else { + jobsBuilder_.addAllMessages(other.jobs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchCreateJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchCreateJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.util.List jobs_ = + java.util.Collections.emptyList(); + + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobsBuilder_; + + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getJobsList() { + if (jobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobs_); + } else { + return jobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getJobsCount() { + if (jobsBuilder_ == null) { + return jobs_.size(); + } else { + return jobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job getJobs(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + } else { + jobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.set(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + } else { + jobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(index, value); + onChanged(); + } else { + jobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllJobs(java.lang.Iterable values) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); + onChanged(); + } else { + jobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearJobs() { + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeJobs(int index) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.remove(index); + onChanged(); + } else { + jobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder getJobsBuilder(int index) { + return getJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getJobsOrBuilderList() { + if (jobsBuilder_ != null) { + return jobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobs_); + } + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder() { + return getJobsFieldBuilder().addBuilder(com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder(int index) { + return getJobsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The jobs to be created.
+     * A maximum of 200 jobs can be created in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getJobsBuilderList() { + return getJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobsFieldBuilder() { + if (jobsBuilder_ == null) { + jobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + jobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobs_ = null; + } + return jobsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchCreateJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchCreateJobsRequest) + private static final com.google.cloud.talent.v4.BatchCreateJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchCreateJobsRequest(); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequestOrBuilder.java new file mode 100644 index 00000000..cf3116ba --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchCreateJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchCreateJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getJobsList(); + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.Job getJobs(int index); + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getJobsCount(); + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getJobsOrBuilderList(); + /** + * + * + *
+   * Required. The jobs to be created.
+   * A maximum of 200 jobs can be created in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponse.java new file mode 100644 index 00000000..85edc093 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponse.java @@ -0,0 +1,973 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The result of [JobService.BatchCreateJobs][google.cloud.talent.v4.JobService.BatchCreateJobs]. It's used to
+ * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchCreateJobsResponse} + */ +public final class BatchCreateJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchCreateJobsResponse) + BatchCreateJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateJobsResponse.newBuilder() to construct. + private BatchCreateJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateJobsResponse() { + jobResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchCreateJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchCreateJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobResults_.add( + input.readMessage( + com.google.cloud.talent.v4.JobResult.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchCreateJobsResponse.class, + com.google.cloud.talent.v4.BatchCreateJobsResponse.Builder.class); + } + + public static final int JOB_RESULTS_FIELD_NUMBER = 1; + private java.util.List jobResults_; + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List getJobResultsList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List + getJobResultsOrBuilderList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public int getJobResultsCount() { + return jobResults_.size(); + } + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + return jobResults_.get(index); + } + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + return jobResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < jobResults_.size(); i++) { + output.writeMessage(1, jobResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchCreateJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchCreateJobsResponse other = + (com.google.cloud.talent.v4.BatchCreateJobsResponse) obj; + + if (!getJobResultsList().equals(other.getJobResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobResultsCount() > 0) { + hash = (37 * hash) + JOB_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getJobResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchCreateJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The result of [JobService.BatchCreateJobs][google.cloud.talent.v4.JobService.BatchCreateJobs]. It's used to
+   * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchCreateJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchCreateJobsResponse) + com.google.cloud.talent.v4.BatchCreateJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchCreateJobsResponse.class, + com.google.cloud.talent.v4.BatchCreateJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchCreateJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchCreateJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsResponse build() { + com.google.cloud.talent.v4.BatchCreateJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsResponse buildPartial() { + com.google.cloud.talent.v4.BatchCreateJobsResponse result = + new com.google.cloud.talent.v4.BatchCreateJobsResponse(this); + int from_bitField0_ = bitField0_; + if (jobResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobResults_ = jobResults_; + } else { + result.jobResults_ = jobResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchCreateJobsResponse) { + return mergeFrom((com.google.cloud.talent.v4.BatchCreateJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchCreateJobsResponse other) { + if (other == com.google.cloud.talent.v4.BatchCreateJobsResponse.getDefaultInstance()) + return this; + if (jobResultsBuilder_ == null) { + if (!other.jobResults_.isEmpty()) { + if (jobResults_.isEmpty()) { + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobResultsIsMutable(); + jobResults_.addAll(other.jobResults_); + } + onChanged(); + } + } else { + if (!other.jobResults_.isEmpty()) { + if (jobResultsBuilder_.isEmpty()) { + jobResultsBuilder_.dispose(); + jobResultsBuilder_ = null; + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + jobResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobResultsFieldBuilder() + : null; + } else { + jobResultsBuilder_.addAllMessages(other.jobResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchCreateJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchCreateJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List jobResults_ = + java.util.Collections.emptyList(); + + private void ensureJobResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(jobResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + jobResultsBuilder_; + + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsList() { + if (jobResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobResults_); + } else { + return jobResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public int getJobResultsCount() { + if (jobResultsBuilder_ == null) { + return jobResults_.size(); + } else { + return jobResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.set(index, value); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.set(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(index, value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addAllJobResults( + java.lang.Iterable values) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobResults_); + onChanged(); + } else { + jobResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder clearJobResults() { + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder removeJobResults(int index) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.remove(index); + onChanged(); + } else { + jobResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder getJobResultsBuilder(int index) { + return getJobResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List + getJobResultsOrBuilderList() { + if (jobResultsBuilder_ != null) { + return jobResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobResults_); + } + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder() { + return getJobResultsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder(int index) { + return getJobResultsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch create operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsBuilderList() { + return getJobResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + getJobResultsFieldBuilder() { + if (jobResultsBuilder_ == null) { + jobResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder>( + jobResults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobResults_ = null; + } + return jobResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchCreateJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchCreateJobsResponse) + private static final com.google.cloud.talent.v4.BatchCreateJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchCreateJobsResponse(); + } + + public static com.google.cloud.talent.v4.BatchCreateJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchCreateJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponseOrBuilder.java new file mode 100644 index 00000000..1df0f93f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchCreateJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchCreateJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List getJobResultsList(); + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResult getJobResults(int index); + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + int getJobResultsCount(); + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List + getJobResultsOrBuilderList(); + /** + * + * + *
+   * List of job mutation results from a batch create operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequest.java new file mode 100644 index 00000000..7259259d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequest.java @@ -0,0 +1,990 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request to delete a batch of jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchDeleteJobsRequest} + */ +public final class BatchDeleteJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchDeleteJobsRequest) + BatchDeleteJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteJobsRequest.newBuilder() to construct. + private BatchDeleteJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteJobsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDeleteJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchDeleteJobsRequest.class, + com.google.cloud.talent.v4.BatchDeleteJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * The parent of all of the jobs specified in `names` must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * The parent of all of the jobs specified in `names` must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList names_; + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchDeleteJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchDeleteJobsRequest other = + (com.google.cloud.talent.v4.BatchDeleteJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchDeleteJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to delete a batch of jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchDeleteJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchDeleteJobsRequest) + com.google.cloud.talent.v4.BatchDeleteJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchDeleteJobsRequest.class, + com.google.cloud.talent.v4.BatchDeleteJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchDeleteJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchDeleteJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsRequest build() { + com.google.cloud.talent.v4.BatchDeleteJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsRequest buildPartial() { + com.google.cloud.talent.v4.BatchDeleteJobsRequest result = + new com.google.cloud.talent.v4.BatchDeleteJobsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchDeleteJobsRequest) { + return mergeFrom((com.google.cloud.talent.v4.BatchDeleteJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchDeleteJobsRequest other) { + if (other == com.google.cloud.talent.v4.BatchDeleteJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchDeleteJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchDeleteJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * The parent of all of the jobs specified in `names` must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * The parent of all of the jobs specified in `names` must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * The parent of all of the jobs specified in `names` must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * The parent of all of the jobs specified in `names` must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * The parent of all of the jobs specified in `names` must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_.getUnmodifiableView(); + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The names of the jobs to delete.
+     * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+     * For example, "projects/foo/tenants/bar/jobs/baz".
+     * A maximum of 200 jobs can be deleted in a batch.
+     * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchDeleteJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchDeleteJobsRequest) + private static final com.google.cloud.talent.v4.BatchDeleteJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchDeleteJobsRequest(); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchDeleteJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequestOrBuilder.java new file mode 100644 index 00000000..6fb76ebc --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchDeleteJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchDeleteJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * The parent of all of the jobs specified in `names` must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * The parent of all of the jobs specified in `names` must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of names. + */ + int getNamesCount(); + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + * + * + *
+   * The names of the jobs to delete.
+   * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}".
+   * For example, "projects/foo/tenants/bar/jobs/baz".
+   * A maximum of 200 jobs can be deleted in a batch.
+   * 
+ * + * repeated string names = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponse.java new file mode 100644 index 00000000..eecd9677 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponse.java @@ -0,0 +1,973 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The result of [JobService.BatchDeleteJobs][google.cloud.talent.v4.JobService.BatchDeleteJobs]. It's used to
+ * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchDeleteJobsResponse} + */ +public final class BatchDeleteJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchDeleteJobsResponse) + BatchDeleteJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteJobsResponse.newBuilder() to construct. + private BatchDeleteJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDeleteJobsResponse() { + jobResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDeleteJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobResults_.add( + input.readMessage( + com.google.cloud.talent.v4.JobResult.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchDeleteJobsResponse.class, + com.google.cloud.talent.v4.BatchDeleteJobsResponse.Builder.class); + } + + public static final int JOB_RESULTS_FIELD_NUMBER = 1; + private java.util.List jobResults_; + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List getJobResultsList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List + getJobResultsOrBuilderList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public int getJobResultsCount() { + return jobResults_.size(); + } + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + return jobResults_.get(index); + } + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + return jobResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < jobResults_.size(); i++) { + output.writeMessage(1, jobResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchDeleteJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchDeleteJobsResponse other = + (com.google.cloud.talent.v4.BatchDeleteJobsResponse) obj; + + if (!getJobResultsList().equals(other.getJobResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobResultsCount() > 0) { + hash = (37 * hash) + JOB_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getJobResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchDeleteJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The result of [JobService.BatchDeleteJobs][google.cloud.talent.v4.JobService.BatchDeleteJobs]. It's used to
+   * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchDeleteJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchDeleteJobsResponse) + com.google.cloud.talent.v4.BatchDeleteJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchDeleteJobsResponse.class, + com.google.cloud.talent.v4.BatchDeleteJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchDeleteJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchDeleteJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsResponse build() { + com.google.cloud.talent.v4.BatchDeleteJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsResponse buildPartial() { + com.google.cloud.talent.v4.BatchDeleteJobsResponse result = + new com.google.cloud.talent.v4.BatchDeleteJobsResponse(this); + int from_bitField0_ = bitField0_; + if (jobResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobResults_ = jobResults_; + } else { + result.jobResults_ = jobResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchDeleteJobsResponse) { + return mergeFrom((com.google.cloud.talent.v4.BatchDeleteJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchDeleteJobsResponse other) { + if (other == com.google.cloud.talent.v4.BatchDeleteJobsResponse.getDefaultInstance()) + return this; + if (jobResultsBuilder_ == null) { + if (!other.jobResults_.isEmpty()) { + if (jobResults_.isEmpty()) { + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobResultsIsMutable(); + jobResults_.addAll(other.jobResults_); + } + onChanged(); + } + } else { + if (!other.jobResults_.isEmpty()) { + if (jobResultsBuilder_.isEmpty()) { + jobResultsBuilder_.dispose(); + jobResultsBuilder_ = null; + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + jobResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobResultsFieldBuilder() + : null; + } else { + jobResultsBuilder_.addAllMessages(other.jobResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchDeleteJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchDeleteJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List jobResults_ = + java.util.Collections.emptyList(); + + private void ensureJobResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(jobResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + jobResultsBuilder_; + + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsList() { + if (jobResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobResults_); + } else { + return jobResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public int getJobResultsCount() { + if (jobResultsBuilder_ == null) { + return jobResults_.size(); + } else { + return jobResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.set(index, value); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.set(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(index, value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addAllJobResults( + java.lang.Iterable values) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobResults_); + onChanged(); + } else { + jobResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder clearJobResults() { + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder removeJobResults(int index) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.remove(index); + onChanged(); + } else { + jobResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder getJobResultsBuilder(int index) { + return getJobResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List + getJobResultsOrBuilderList() { + if (jobResultsBuilder_ != null) { + return jobResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobResults_); + } + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder() { + return getJobResultsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder(int index) { + return getJobResultsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch delete operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsBuilderList() { + return getJobResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + getJobResultsFieldBuilder() { + if (jobResultsBuilder_ == null) { + jobResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder>( + jobResults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobResults_ = null; + } + return jobResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchDeleteJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchDeleteJobsResponse) + private static final com.google.cloud.talent.v4.BatchDeleteJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchDeleteJobsResponse(); + } + + public static com.google.cloud.talent.v4.BatchDeleteJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchDeleteJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchDeleteJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponseOrBuilder.java new file mode 100644 index 00000000..3261e9ce --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchDeleteJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchDeleteJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List getJobResultsList(); + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResult getJobResults(int index); + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + int getJobResultsCount(); + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List + getJobResultsOrBuilderList(); + /** + * + * + *
+   * List of job mutation results from a batch delete operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadata.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadata.java new file mode 100644 index 00000000..41124f4c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadata.java @@ -0,0 +1,2177 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Metadata used for long running operations returned by CTS batch APIs.
+ * It's used to replace
+ * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata].
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchOperationMetadata} + */ +public final class BatchOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchOperationMetadata) + BatchOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchOperationMetadata.newBuilder() to construct. + private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchOperationMetadata() { + state_ = 0; + stateDescription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + stateDescription_ = s; + break; + } + case 24: + { + successCount_ = input.readInt32(); + break; + } + case 32: + { + failureCount_ = input.readInt32(); + break; + } + case 40: + { + totalCount_ = input.readInt32(); + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchOperationMetadata.class, + com.google.cloud.talent.v4.BatchOperationMetadata.Builder.class); + } + + /** Protobuf enum {@code google.cloud.talent.v4.BatchOperationMetadata.State} */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The batch operation is being prepared for processing.
+     * 
+ * + * INITIALIZING = 1; + */ + INITIALIZING(1), + /** + * + * + *
+     * The batch operation is actively being processed.
+     * 
+ * + * PROCESSING = 2; + */ + PROCESSING(2), + /** + * + * + *
+     * The batch operation is processed, and at least one item has been
+     * successfully processed.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
+     * The batch operation is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * The batch operation is in the process of cancelling after
+     * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * is called.
+     * 
+ * + * CANCELLING = 5; + */ + CANCELLING(5), + /** + * + * + *
+     * The batch operation is done after
+     * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * is called. Any items processed before cancelling are returned in the
+     * response.
+     * 
+ * + * CANCELLED = 6; + */ + CANCELLED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The batch operation is being prepared for processing.
+     * 
+ * + * INITIALIZING = 1; + */ + public static final int INITIALIZING_VALUE = 1; + /** + * + * + *
+     * The batch operation is actively being processed.
+     * 
+ * + * PROCESSING = 2; + */ + public static final int PROCESSING_VALUE = 2; + /** + * + * + *
+     * The batch operation is processed, and at least one item has been
+     * successfully processed.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + /** + * + * + *
+     * The batch operation is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * The batch operation is in the process of cancelling after
+     * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * is called.
+     * 
+ * + * CANCELLING = 5; + */ + public static final int CANCELLING_VALUE = 5; + /** + * + * + *
+     * The batch operation is done after
+     * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
+     * is called. Any items processed before cancelling are returned in the
+     * response.
+     * 
+ * + * CANCELLED = 6; + */ + public static final int CANCELLED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return INITIALIZING; + case 2: + return PROCESSING; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + case 5: + return CANCELLING; + case 6: + return CANCELLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.BatchOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.BatchOperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + * + * + *
+   * The state of a long running operation.
+   * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of a long running operation.
+   * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.BatchOperationMetadata.State result = + com.google.cloud.talent.v4.BatchOperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.talent.v4.BatchOperationMetadata.State.UNRECOGNIZED + : result; + } + + public static final int STATE_DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object stateDescription_; + /** + * + * + *
+   * More detailed information about operation state.
+   * 
+ * + * string state_description = 2; + * + * @return The stateDescription. + */ + @java.lang.Override + public java.lang.String getStateDescription() { + java.lang.Object ref = stateDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDescription_ = s; + return s; + } + } + /** + * + * + *
+   * More detailed information about operation state.
+   * 
+ * + * string state_description = 2; + * + * @return The bytes for stateDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDescriptionBytes() { + java.lang.Object ref = stateDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private int successCount_; + /** + * + * + *
+   * Count of successful item(s) inside an operation.
+   * 
+ * + * int32 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public int getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private int failureCount_; + /** + * + * + *
+   * Count of failed item(s) inside an operation.
+   * 
+ * + * int32 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public int getFailureCount() { + return failureCount_; + } + + public static final int TOTAL_COUNT_FIELD_NUMBER = 5; + private int totalCount_; + /** + * + * + *
+   * Count of total item(s) inside an operation.
+   * 
+ * + * int32 total_count = 5; + * + * @return The totalCount. + */ + @java.lang.Override + public int getTotalCount() { + return totalCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (state_ + != com.google.cloud.talent.v4.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (!getStateDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stateDescription_); + } + if (successCount_ != 0) { + output.writeInt32(3, successCount_); + } + if (failureCount_ != 0) { + output.writeInt32(4, failureCount_); + } + if (totalCount_ != 0) { + output.writeInt32(5, totalCount_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + if (endTime_ != null) { + output.writeMessage(8, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.talent.v4.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!getStateDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, stateDescription_); + } + if (successCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, successCount_); + } + if (failureCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, failureCount_); + } + if (totalCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, totalCount_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchOperationMetadata other = + (com.google.cloud.talent.v4.BatchOperationMetadata) obj; + + if (state_ != other.state_) return false; + if (!getStateDescription().equals(other.getStateDescription())) return false; + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (getTotalCount() != other.getTotalCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getStateDescription().hashCode(); + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSuccessCount(); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFailureCount(); + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalCount(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata used for long running operations returned by CTS batch APIs.
+   * It's used to replace
+   * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata].
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchOperationMetadata) + com.google.cloud.talent.v4.BatchOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchOperationMetadata.class, + com.google.cloud.talent.v4.BatchOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + stateDescription_ = ""; + + successCount_ = 0; + + failureCount_ = 0; + + totalCount_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata build() { + com.google.cloud.talent.v4.BatchOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata buildPartial() { + com.google.cloud.talent.v4.BatchOperationMetadata result = + new com.google.cloud.talent.v4.BatchOperationMetadata(this); + result.state_ = state_; + result.stateDescription_ = stateDescription_; + result.successCount_ = successCount_; + result.failureCount_ = failureCount_; + result.totalCount_ = totalCount_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchOperationMetadata) { + return mergeFrom((com.google.cloud.talent.v4.BatchOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchOperationMetadata other) { + if (other == com.google.cloud.talent.v4.BatchOperationMetadata.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateDescription().isEmpty()) { + stateDescription_ = other.stateDescription_; + onChanged(); + } + if (other.getSuccessCount() != 0) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0) { + setFailureCount(other.getFailureCount()); + } + if (other.getTotalCount() != 0) { + setTotalCount(other.getTotalCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of a long running operation.
+     * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of a long running operation.
+     * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of a long running operation.
+     * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.BatchOperationMetadata.State result = + com.google.cloud.talent.v4.BatchOperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.talent.v4.BatchOperationMetadata.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of a long running operation.
+     * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.talent.v4.BatchOperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of a long running operation.
+     * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateDescription_ = ""; + /** + * + * + *
+     * More detailed information about operation state.
+     * 
+ * + * string state_description = 2; + * + * @return The stateDescription. + */ + public java.lang.String getStateDescription() { + java.lang.Object ref = stateDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * More detailed information about operation state.
+     * 
+ * + * string state_description = 2; + * + * @return The bytes for stateDescription. + */ + public com.google.protobuf.ByteString getStateDescriptionBytes() { + java.lang.Object ref = stateDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * More detailed information about operation state.
+     * 
+ * + * string state_description = 2; + * + * @param value The stateDescription to set. + * @return This builder for chaining. + */ + public Builder setStateDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stateDescription_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * More detailed information about operation state.
+     * 
+ * + * string state_description = 2; + * + * @return This builder for chaining. + */ + public Builder clearStateDescription() { + + stateDescription_ = getDefaultInstance().getStateDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * More detailed information about operation state.
+     * 
+ * + * string state_description = 2; + * + * @param value The bytes for stateDescription to set. + * @return This builder for chaining. + */ + public Builder setStateDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stateDescription_ = value; + onChanged(); + return this; + } + + private int successCount_; + /** + * + * + *
+     * Count of successful item(s) inside an operation.
+     * 
+ * + * int32 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public int getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of successful item(s) inside an operation.
+     * 
+ * + * int32 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(int value) { + + successCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of successful item(s) inside an operation.
+     * 
+ * + * int32 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + + successCount_ = 0; + onChanged(); + return this; + } + + private int failureCount_; + /** + * + * + *
+     * Count of failed item(s) inside an operation.
+     * 
+ * + * int32 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public int getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of failed item(s) inside an operation.
+     * 
+ * + * int32 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(int value) { + + failureCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of failed item(s) inside an operation.
+     * 
+ * + * int32 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + + failureCount_ = 0; + onChanged(); + return this; + } + + private int totalCount_; + /** + * + * + *
+     * Count of total item(s) inside an operation.
+     * 
+ * + * int32 total_count = 5; + * + * @return The totalCount. + */ + @java.lang.Override + public int getTotalCount() { + return totalCount_; + } + /** + * + * + *
+     * Count of total item(s) inside an operation.
+     * 
+ * + * int32 total_count = 5; + * + * @param value The totalCount to set. + * @return This builder for chaining. + */ + public Builder setTotalCount(int value) { + + totalCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of total item(s) inside an operation.
+     * 
+ * + * int32 total_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearTotalCount() { + + totalCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time when the batch operation is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time when the batch operation status is updated. The metadata and the
+     * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+     * refreshed every minute otherwise cached data is returned.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time when the batch operation is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to `true`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchOperationMetadata) + private static final com.google.cloud.talent.v4.BatchOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchOperationMetadata(); + } + + public static com.google.cloud.talent.v4.BatchOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadataOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadataOrBuilder.java new file mode 100644 index 00000000..c8f50099 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadataOrBuilder.java @@ -0,0 +1,231 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface BatchOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The state of a long running operation.
+   * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of a long running operation.
+   * 
+ * + * .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * + * @return The state. + */ + com.google.cloud.talent.v4.BatchOperationMetadata.State getState(); + + /** + * + * + *
+   * More detailed information about operation state.
+   * 
+ * + * string state_description = 2; + * + * @return The stateDescription. + */ + java.lang.String getStateDescription(); + /** + * + * + *
+   * More detailed information about operation state.
+   * 
+ * + * string state_description = 2; + * + * @return The bytes for stateDescription. + */ + com.google.protobuf.ByteString getStateDescriptionBytes(); + + /** + * + * + *
+   * Count of successful item(s) inside an operation.
+   * 
+ * + * int32 success_count = 3; + * + * @return The successCount. + */ + int getSuccessCount(); + + /** + * + * + *
+   * Count of failed item(s) inside an operation.
+   * 
+ * + * int32 failure_count = 4; + * + * @return The failureCount. + */ + int getFailureCount(); + + /** + * + * + *
+   * Count of total item(s) inside an operation.
+   * 
+ * + * int32 total_count = 5; + * + * @return The totalCount. + */ + int getTotalCount(); + + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time when the batch operation is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time when the batch operation status is updated. The metadata and the
+   * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is
+   * refreshed every minute otherwise cached data is returned.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time when the batch operation is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to `true`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequest.java new file mode 100644 index 00000000..a6befd2f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequest.java @@ -0,0 +1,1605 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request to update a batch of jobs.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchUpdateJobsRequest} + */ +public final class BatchUpdateJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchUpdateJobsRequest) + BatchUpdateJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateJobsRequest.newBuilder() to construct. + private BatchUpdateJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateJobsRequest() { + parent_ = ""; + jobs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchUpdateJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add( + input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchUpdateJobsRequest.class, + com.google.cloud.talent.v4.BatchUpdateJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOBS_FIELD_NUMBER = 2; + private java.util.List jobs_; + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getJobsList() { + return jobs_; + } + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getJobsOrBuilderList() { + return jobs_; + } + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + return jobs_.get(index); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < jobs_.size(); i++) { + output.writeMessage(2, jobs_.get(i)); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < jobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, jobs_.get(i)); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchUpdateJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchUpdateJobsRequest other = + (com.google.cloud.talent.v4.BatchUpdateJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getJobsList().equals(other.getJobsList())) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchUpdateJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to update a batch of jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchUpdateJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchUpdateJobsRequest) + com.google.cloud.talent.v4.BatchUpdateJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchUpdateJobsRequest.class, + com.google.cloud.talent.v4.BatchUpdateJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchUpdateJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobsBuilder_.clear(); + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchUpdateJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsRequest build() { + com.google.cloud.talent.v4.BatchUpdateJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsRequest buildPartial() { + com.google.cloud.talent.v4.BatchUpdateJobsRequest result = + new com.google.cloud.talent.v4.BatchUpdateJobsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (jobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + } else { + result.jobs_ = jobsBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchUpdateJobsRequest) { + return mergeFrom((com.google.cloud.talent.v4.BatchUpdateJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchUpdateJobsRequest other) { + if (other == com.google.cloud.talent.v4.BatchUpdateJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (jobsBuilder_ == null) { + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + } else { + if (!other.jobs_.isEmpty()) { + if (jobsBuilder_.isEmpty()) { + jobsBuilder_.dispose(); + jobsBuilder_ = null; + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + jobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobsFieldBuilder() + : null; + } else { + jobsBuilder_.addAllMessages(other.jobs_); + } + } + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchUpdateJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchUpdateJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.util.List jobs_ = + java.util.Collections.emptyList(); + + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobsBuilder_; + + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getJobsList() { + if (jobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobs_); + } else { + return jobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getJobsCount() { + if (jobsBuilder_ == null) { + return jobs_.size(); + } else { + return jobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job getJobs(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + } else { + jobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.set(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + } else { + jobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(index, value); + onChanged(); + } else { + jobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllJobs(java.lang.Iterable values) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); + onChanged(); + } else { + jobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearJobs() { + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeJobs(int index) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.remove(index); + onChanged(); + } else { + jobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder getJobsBuilder(int index) { + return getJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getJobsOrBuilderList() { + if (jobsBuilder_ != null) { + return jobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobs_); + } + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder() { + return getJobsFieldBuilder().addBuilder(com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder(int index) { + return getJobsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The jobs to be updated.
+     * A maximum of 200 jobs can be updated in a batch.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getJobsBuilderList() { + return getJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobsFieldBuilder() { + if (jobsBuilder_ == null) { + jobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + jobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobs_ = null; + } + return jobsBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience. Be aware that it will
+     * also increase latency when checking the status of a batch operation.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+     * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+     * [JobResult][JobOperationResult.JobResult]
+     * will only contains fields that is updated, plus the Id of the Job.
+     * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+     * large response.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchUpdateJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchUpdateJobsRequest) + private static final com.google.cloud.talent.v4.BatchUpdateJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchUpdateJobsRequest(); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchUpdateJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequestOrBuilder.java new file mode 100644 index 00000000..876f9818 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequestOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchUpdateJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchUpdateJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getJobsList(); + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.Job getJobs(int index); + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getJobsCount(); + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getJobsOrBuilderList(); + /** + * + * + *
+   * Required. The jobs to be updated.
+   * A maximum of 200 jobs can be updated in a batch.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index); + + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience. Be aware that it will
+   * also increase latency when checking the status of a batch operation.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in
+   * [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside
+   * [JobResult][JobOperationResult.JobResult]
+   * will only contains fields that is updated, plus the Id of the Job.
+   * Otherwise,  [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very
+   * large response.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponse.java new file mode 100644 index 00000000..203373c6 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponse.java @@ -0,0 +1,973 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The result of [JobService.BatchUpdateJobs][google.cloud.talent.v4.JobService.BatchUpdateJobs]. It's used to
+ * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchUpdateJobsResponse} + */ +public final class BatchUpdateJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.BatchUpdateJobsResponse) + BatchUpdateJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchUpdateJobsResponse.newBuilder() to construct. + private BatchUpdateJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchUpdateJobsResponse() { + jobResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchUpdateJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchUpdateJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobResults_.add( + input.readMessage( + com.google.cloud.talent.v4.JobResult.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchUpdateJobsResponse.class, + com.google.cloud.talent.v4.BatchUpdateJobsResponse.Builder.class); + } + + public static final int JOB_RESULTS_FIELD_NUMBER = 1; + private java.util.List jobResults_; + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List getJobResultsList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public java.util.List + getJobResultsOrBuilderList() { + return jobResults_; + } + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public int getJobResultsCount() { + return jobResults_.size(); + } + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + return jobResults_.get(index); + } + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + return jobResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < jobResults_.size(); i++) { + output.writeMessage(1, jobResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.BatchUpdateJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.BatchUpdateJobsResponse other = + (com.google.cloud.talent.v4.BatchUpdateJobsResponse) obj; + + if (!getJobResultsList().equals(other.getJobResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobResultsCount() > 0) { + hash = (37 * hash) + JOB_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getJobResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.BatchUpdateJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The result of [JobService.BatchUpdateJobs][google.cloud.talent.v4.JobService.BatchUpdateJobs]. It's used to
+   * replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.BatchUpdateJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.BatchUpdateJobsResponse) + com.google.cloud.talent.v4.BatchUpdateJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.BatchUpdateJobsResponse.class, + com.google.cloud.talent.v4.BatchUpdateJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.BatchUpdateJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.BatchUpdateJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsResponse build() { + com.google.cloud.talent.v4.BatchUpdateJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsResponse buildPartial() { + com.google.cloud.talent.v4.BatchUpdateJobsResponse result = + new com.google.cloud.talent.v4.BatchUpdateJobsResponse(this); + int from_bitField0_ = bitField0_; + if (jobResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobResults_ = java.util.Collections.unmodifiableList(jobResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobResults_ = jobResults_; + } else { + result.jobResults_ = jobResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.BatchUpdateJobsResponse) { + return mergeFrom((com.google.cloud.talent.v4.BatchUpdateJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.BatchUpdateJobsResponse other) { + if (other == com.google.cloud.talent.v4.BatchUpdateJobsResponse.getDefaultInstance()) + return this; + if (jobResultsBuilder_ == null) { + if (!other.jobResults_.isEmpty()) { + if (jobResults_.isEmpty()) { + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobResultsIsMutable(); + jobResults_.addAll(other.jobResults_); + } + onChanged(); + } + } else { + if (!other.jobResults_.isEmpty()) { + if (jobResultsBuilder_.isEmpty()) { + jobResultsBuilder_.dispose(); + jobResultsBuilder_ = null; + jobResults_ = other.jobResults_; + bitField0_ = (bitField0_ & ~0x00000001); + jobResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobResultsFieldBuilder() + : null; + } else { + jobResultsBuilder_.addAllMessages(other.jobResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.BatchUpdateJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.BatchUpdateJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List jobResults_ = + java.util.Collections.emptyList(); + + private void ensureJobResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobResults_ = new java.util.ArrayList(jobResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + jobResultsBuilder_; + + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsList() { + if (jobResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobResults_); + } else { + return jobResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public int getJobResultsCount() { + if (jobResultsBuilder_ == null) { + return jobResults_.size(); + } else { + return jobResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult getJobResults(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.set(index, value); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder setJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.set(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(int index, com.google.cloud.talent.v4.JobResult value) { + if (jobResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobResultsIsMutable(); + jobResults_.add(index, value); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults(com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addJobResults( + int index, com.google.cloud.talent.v4.JobResult.Builder builderForValue) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.add(index, builderForValue.build()); + onChanged(); + } else { + jobResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder addAllJobResults( + java.lang.Iterable values) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobResults_); + onChanged(); + } else { + jobResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder clearJobResults() { + if (jobResultsBuilder_ == null) { + jobResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public Builder removeJobResults(int index) { + if (jobResultsBuilder_ == null) { + ensureJobResultsIsMutable(); + jobResults_.remove(index); + onChanged(); + } else { + jobResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder getJobResultsBuilder(int index) { + return getJobResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index) { + if (jobResultsBuilder_ == null) { + return jobResults_.get(index); + } else { + return jobResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List + getJobResultsOrBuilderList() { + if (jobResultsBuilder_ != null) { + return jobResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobResults_); + } + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder() { + return getJobResultsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public com.google.cloud.talent.v4.JobResult.Builder addJobResultsBuilder(int index) { + return getJobResultsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.JobResult.getDefaultInstance()); + } + /** + * + * + *
+     * List of job mutation results from a batch update operation. It can change
+     * until operation status is FINISHED, FAILED or CANCELLED.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + public java.util.List getJobResultsBuilderList() { + return getJobResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder> + getJobResultsFieldBuilder() { + if (jobResultsBuilder_ == null) { + jobResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.JobResult, + com.google.cloud.talent.v4.JobResult.Builder, + com.google.cloud.talent.v4.JobResultOrBuilder>( + jobResults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobResults_ = null; + } + return jobResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.BatchUpdateJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.BatchUpdateJobsResponse) + private static final com.google.cloud.talent.v4.BatchUpdateJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.BatchUpdateJobsResponse(); + } + + public static com.google.cloud.talent.v4.BatchUpdateJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchUpdateJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.BatchUpdateJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponseOrBuilder.java new file mode 100644 index 00000000..3e569db0 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponseOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface BatchUpdateJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.BatchUpdateJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List getJobResultsList(); + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResult getJobResults(int index); + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + int getJobResultsCount(); + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + java.util.List + getJobResultsOrBuilderList(); + /** + * + * + *
+   * List of job mutation results from a batch update operation. It can change
+   * until operation status is FINISHED, FAILED or CANCELLED.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + com.google.cloud.talent.v4.JobResultOrBuilder getJobResultsOrBuilder(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEvent.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEvent.java new file mode 100644 index 00000000..ff1b2e16 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEvent.java @@ -0,0 +1,1691 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An event issued when an end user interacts with the application that
+ * implements Cloud Talent Solution. Providing this information improves the
+ * quality of results for the API clients, enabling the
+ * service to perform optimally. The number of events sent must be consistent
+ * with other calls, such as job searches, issued to the service by the client.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ClientEvent} + */ +public final class ClientEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ClientEvent) + ClientEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClientEvent.newBuilder() to construct. + private ClientEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClientEvent() { + requestId_ = ""; + eventId_ = ""; + eventNotes_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClientEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ClientEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + eventId_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.talent.v4.JobEvent.Builder subBuilder = null; + if (eventCase_ == 5) { + subBuilder = ((com.google.cloud.talent.v4.JobEvent) event_).toBuilder(); + } + event_ = + input.readMessage( + com.google.cloud.talent.v4.JobEvent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.talent.v4.JobEvent) event_); + event_ = subBuilder.buildPartial(); + } + eventCase_ = 5; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + eventNotes_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_ClientEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_ClientEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ClientEvent.class, + com.google.cloud.talent.v4.ClientEvent.Builder.class); + } + + private int eventCase_ = 0; + private java.lang.Object event_; + + public enum EventCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JOB_EVENT(5), + EVENT_NOT_SET(0); + private final int value; + + private EventCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventCase valueOf(int value) { + return forNumber(value); + } + + public static EventCase forNumber(int value) { + switch (value) { + case 5: + return JOB_EVENT; + case 0: + return EVENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EventCase getEventCase() { + return EventCase.forNumber(eventCase_); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * A unique ID generated in the API responses. It can be found in
+   * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+   * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * A unique ID generated in the API responses. It can be found in
+   * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+   * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object eventId_; + /** + * + * + *
+   * Required. A unique identifier, generated by the client application.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + @java.lang.Override + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A unique identifier, generated by the client application.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int JOB_EVENT_FIELD_NUMBER = 5; + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return Whether the jobEvent field is set. + */ + @java.lang.Override + public boolean hasJobEvent() { + return eventCase_ == 5; + } + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return The jobEvent. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent getJobEvent() { + if (eventCase_ == 5) { + return (com.google.cloud.talent.v4.JobEvent) event_; + } + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEventOrBuilder getJobEventOrBuilder() { + if (eventCase_ == 5) { + return (com.google.cloud.talent.v4.JobEvent) event_; + } + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + + public static final int EVENT_NOTES_FIELD_NUMBER = 9; + private volatile java.lang.Object eventNotes_; + /** + * + * + *
+   * Notes about the event provided by recruiters or other users, for example,
+   * feedback on why a job was bookmarked.
+   * 
+ * + * string event_notes = 9; + * + * @return The eventNotes. + */ + @java.lang.Override + public java.lang.String getEventNotes() { + java.lang.Object ref = eventNotes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventNotes_ = s; + return s; + } + } + /** + * + * + *
+   * Notes about the event provided by recruiters or other users, for example,
+   * feedback on why a job was bookmarked.
+   * 
+ * + * string event_notes = 9; + * + * @return The bytes for eventNotes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventNotesBytes() { + java.lang.Object ref = eventNotes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventNotes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_); + } + if (!getEventIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, eventId_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (eventCase_ == 5) { + output.writeMessage(5, (com.google.cloud.talent.v4.JobEvent) event_); + } + if (!getEventNotesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, eventNotes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_); + } + if (!getEventIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, eventId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (eventCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.talent.v4.JobEvent) event_); + } + if (!getEventNotesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, eventNotes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ClientEvent)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ClientEvent other = (com.google.cloud.talent.v4.ClientEvent) obj; + + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getEventId().equals(other.getEventId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getEventNotes().equals(other.getEventNotes())) return false; + if (!getEventCase().equals(other.getEventCase())) return false; + switch (eventCase_) { + case 5: + if (!getJobEvent().equals(other.getJobEvent())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + EVENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEventId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + EVENT_NOTES_FIELD_NUMBER; + hash = (53 * hash) + getEventNotes().hashCode(); + switch (eventCase_) { + case 5: + hash = (37 * hash) + JOB_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getJobEvent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ClientEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ClientEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ClientEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ClientEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event issued when an end user interacts with the application that
+   * implements Cloud Talent Solution. Providing this information improves the
+   * quality of results for the API clients, enabling the
+   * service to perform optimally. The number of events sent must be consistent
+   * with other calls, such as job searches, issued to the service by the client.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ClientEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ClientEvent) + com.google.cloud.talent.v4.ClientEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_ClientEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_ClientEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ClientEvent.class, + com.google.cloud.talent.v4.ClientEvent.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ClientEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + requestId_ = ""; + + eventId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + eventNotes_ = ""; + + eventCase_ = 0; + event_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_ClientEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ClientEvent getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ClientEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ClientEvent build() { + com.google.cloud.talent.v4.ClientEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ClientEvent buildPartial() { + com.google.cloud.talent.v4.ClientEvent result = + new com.google.cloud.talent.v4.ClientEvent(this); + result.requestId_ = requestId_; + result.eventId_ = eventId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (eventCase_ == 5) { + if (jobEventBuilder_ == null) { + result.event_ = event_; + } else { + result.event_ = jobEventBuilder_.build(); + } + } + result.eventNotes_ = eventNotes_; + result.eventCase_ = eventCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ClientEvent) { + return mergeFrom((com.google.cloud.talent.v4.ClientEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ClientEvent other) { + if (other == com.google.cloud.talent.v4.ClientEvent.getDefaultInstance()) return this; + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (!other.getEventId().isEmpty()) { + eventId_ = other.eventId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getEventNotes().isEmpty()) { + eventNotes_ = other.eventNotes_; + onChanged(); + } + switch (other.getEventCase()) { + case JOB_EVENT: + { + mergeJobEvent(other.getJobEvent()); + break; + } + case EVENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ClientEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ClientEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int eventCase_ = 0; + private java.lang.Object event_; + + public EventCase getEventCase() { + return EventCase.forNumber(eventCase_); + } + + public Builder clearEvent() { + eventCase_ = 0; + event_ = null; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * A unique ID generated in the API responses. It can be found in
+     * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+     * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * A unique ID generated in the API responses. It can be found in
+     * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+     * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * A unique ID generated in the API responses. It can be found in
+     * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+     * 
+ * + * string request_id = 1; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * A unique ID generated in the API responses. It can be found in
+     * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+     * 
+ * + * string request_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * A unique ID generated in the API responses. It can be found in
+     * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+     * 
+ * + * string request_id = 1; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private java.lang.Object eventId_ = ""; + /** + * + * + *
+     * Required. A unique identifier, generated by the client application.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier, generated by the client application.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier, generated by the client application.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The eventId to set. + * @return This builder for chaining. + */ + public Builder setEventId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + eventId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier, generated by the client application.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEventId() { + + eventId_ = getDefaultInstance().getEventId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier, generated by the client application.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for eventId to set. + * @return This builder for chaining. + */ + public Builder setEventIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + eventId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Required. The timestamp of the event.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobEvent, + com.google.cloud.talent.v4.JobEvent.Builder, + com.google.cloud.talent.v4.JobEventOrBuilder> + jobEventBuilder_; + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return Whether the jobEvent field is set. + */ + @java.lang.Override + public boolean hasJobEvent() { + return eventCase_ == 5; + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return The jobEvent. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent getJobEvent() { + if (jobEventBuilder_ == null) { + if (eventCase_ == 5) { + return (com.google.cloud.talent.v4.JobEvent) event_; + } + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } else { + if (eventCase_ == 5) { + return jobEventBuilder_.getMessage(); + } + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + public Builder setJobEvent(com.google.cloud.talent.v4.JobEvent value) { + if (jobEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + jobEventBuilder_.setMessage(value); + } + eventCase_ = 5; + return this; + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + public Builder setJobEvent(com.google.cloud.talent.v4.JobEvent.Builder builderForValue) { + if (jobEventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + jobEventBuilder_.setMessage(builderForValue.build()); + } + eventCase_ = 5; + return this; + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + public Builder mergeJobEvent(com.google.cloud.talent.v4.JobEvent value) { + if (jobEventBuilder_ == null) { + if (eventCase_ == 5 && event_ != com.google.cloud.talent.v4.JobEvent.getDefaultInstance()) { + event_ = + com.google.cloud.talent.v4.JobEvent.newBuilder( + (com.google.cloud.talent.v4.JobEvent) event_) + .mergeFrom(value) + .buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + if (eventCase_ == 5) { + jobEventBuilder_.mergeFrom(value); + } + jobEventBuilder_.setMessage(value); + } + eventCase_ = 5; + return this; + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + public Builder clearJobEvent() { + if (jobEventBuilder_ == null) { + if (eventCase_ == 5) { + eventCase_ = 0; + event_ = null; + onChanged(); + } + } else { + if (eventCase_ == 5) { + eventCase_ = 0; + event_ = null; + } + jobEventBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + public com.google.cloud.talent.v4.JobEvent.Builder getJobEventBuilder() { + return getJobEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEventOrBuilder getJobEventOrBuilder() { + if ((eventCase_ == 5) && (jobEventBuilder_ != null)) { + return jobEventBuilder_.getMessageOrBuilder(); + } else { + if (eventCase_ == 5) { + return (com.google.cloud.talent.v4.JobEvent) event_; + } + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * An event issued when a job seeker interacts with the application that
+     * implements Cloud Talent Solution.
+     * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobEvent, + com.google.cloud.talent.v4.JobEvent.Builder, + com.google.cloud.talent.v4.JobEventOrBuilder> + getJobEventFieldBuilder() { + if (jobEventBuilder_ == null) { + if (!(eventCase_ == 5)) { + event_ = com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + jobEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobEvent, + com.google.cloud.talent.v4.JobEvent.Builder, + com.google.cloud.talent.v4.JobEventOrBuilder>( + (com.google.cloud.talent.v4.JobEvent) event_, getParentForChildren(), isClean()); + event_ = null; + } + eventCase_ = 5; + onChanged(); + ; + return jobEventBuilder_; + } + + private java.lang.Object eventNotes_ = ""; + /** + * + * + *
+     * Notes about the event provided by recruiters or other users, for example,
+     * feedback on why a job was bookmarked.
+     * 
+ * + * string event_notes = 9; + * + * @return The eventNotes. + */ + public java.lang.String getEventNotes() { + java.lang.Object ref = eventNotes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventNotes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Notes about the event provided by recruiters or other users, for example,
+     * feedback on why a job was bookmarked.
+     * 
+ * + * string event_notes = 9; + * + * @return The bytes for eventNotes. + */ + public com.google.protobuf.ByteString getEventNotesBytes() { + java.lang.Object ref = eventNotes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventNotes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Notes about the event provided by recruiters or other users, for example,
+     * feedback on why a job was bookmarked.
+     * 
+ * + * string event_notes = 9; + * + * @param value The eventNotes to set. + * @return This builder for chaining. + */ + public Builder setEventNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + eventNotes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Notes about the event provided by recruiters or other users, for example,
+     * feedback on why a job was bookmarked.
+     * 
+ * + * string event_notes = 9; + * + * @return This builder for chaining. + */ + public Builder clearEventNotes() { + + eventNotes_ = getDefaultInstance().getEventNotes(); + onChanged(); + return this; + } + /** + * + * + *
+     * Notes about the event provided by recruiters or other users, for example,
+     * feedback on why a job was bookmarked.
+     * 
+ * + * string event_notes = 9; + * + * @param value The bytes for eventNotes to set. + * @return This builder for chaining. + */ + public Builder setEventNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + eventNotes_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ClientEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ClientEvent) + private static final com.google.cloud.talent.v4.ClientEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ClientEvent(); + } + + public static com.google.cloud.talent.v4.ClientEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientEvent(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ClientEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEventOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEventOrBuilder.java new file mode 100644 index 00000000..ef27e7e9 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEventOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event.proto + +package com.google.cloud.talent.v4; + +public interface ClientEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ClientEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * A unique ID generated in the API responses. It can be found in
+   * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+   * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * A unique ID generated in the API responses. It can be found in
+   * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id].
+   * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Required. A unique identifier, generated by the client application.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + java.lang.String getEventId(); + /** + * + * + *
+   * Required. A unique identifier, generated by the client application.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + com.google.protobuf.ByteString getEventIdBytes(); + + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Required. The timestamp of the event.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return Whether the jobEvent field is set. + */ + boolean hasJobEvent(); + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + * + * @return The jobEvent. + */ + com.google.cloud.talent.v4.JobEvent getJobEvent(); + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * .google.cloud.talent.v4.JobEvent job_event = 5; + */ + com.google.cloud.talent.v4.JobEventOrBuilder getJobEventOrBuilder(); + + /** + * + * + *
+   * Notes about the event provided by recruiters or other users, for example,
+   * feedback on why a job was bookmarked.
+   * 
+ * + * string event_notes = 9; + * + * @return The eventNotes. + */ + java.lang.String getEventNotes(); + /** + * + * + *
+   * Notes about the event provided by recruiters or other users, for example,
+   * feedback on why a job was bookmarked.
+   * 
+ * + * string event_notes = 9; + * + * @return The bytes for eventNotes. + */ + com.google.protobuf.ByteString getEventNotesBytes(); + + public com.google.cloud.talent.v4.ClientEvent.EventCase getEventCase(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommonProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommonProto.java new file mode 100644 index 00000000..89999477 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommonProto.java @@ -0,0 +1,347 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public final class CommonProto { + private CommonProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_TimestampRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_TimestampRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Location_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_RequestMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_RequestMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_ResponseMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_ResponseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_DeviceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_DeviceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CustomAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CustomAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SpellingCorrection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SpellingCorrection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompensationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompensationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/talent/v4/common.proto\022\026g" + + "oogle.cloud.talent.v4\032\034google/api/annota" + + "tions.proto\032\037google/api/field_behavior.p" + + "roto\032\037google/protobuf/timestamp.proto\032\036g" + + "oogle/protobuf/wrappers.proto\032\030google/ty" + + "pe/latlng.proto\032\027google/type/money.proto" + + "\032 google/type/postal_address.proto\"n\n\016Ti" + + "mestampRange\022.\n\nstart_time\030\001 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032" + + ".google.protobuf.Timestamp\"\262\003\n\010Location\022" + + "D\n\rlocation_type\030\001 \001(\0162-.google.cloud.ta" + + "lent.v4.Location.LocationType\0222\n\016postal_" + + "address\030\002 \001(\0132\032.google.type.PostalAddres" + + "s\022$\n\007lat_lng\030\003 \001(\0132\023.google.type.LatLng\022" + + "\024\n\014radius_miles\030\004 \001(\001\"\357\001\n\014LocationType\022\035" + + "\n\031LOCATION_TYPE_UNSPECIFIED\020\000\022\013\n\007COUNTRY" + + "\020\001\022\027\n\023ADMINISTRATIVE_AREA\020\002\022\033\n\027SUB_ADMIN" + + "ISTRATIVE_AREA\020\003\022\014\n\010LOCALITY\020\004\022\017\n\013POSTAL" + + "_CODE\020\005\022\020\n\014SUB_LOCALITY\020\006\022\022\n\016SUB_LOCALIT" + + "Y_1\020\007\022\022\n\016SUB_LOCALITY_2\020\010\022\020\n\014NEIGHBORHOO" + + "D\020\t\022\022\n\016STREET_ADDRESS\020\n\"\232\001\n\017RequestMetad" + + "ata\022\016\n\006domain\030\001 \001(\t\022\022\n\nsession_id\030\002 \001(\t\022" + + "\017\n\007user_id\030\003 \001(\t\022\031\n\021allow_missing_ids\030\004 " + + "\001(\010\0227\n\013device_info\030\005 \001(\0132\".google.cloud." + + "talent.v4.DeviceInfo\"&\n\020ResponseMetadata" + + "\022\022\n\nrequest_id\030\001 \001(\t\"\312\001\n\nDeviceInfo\022B\n\013d" + + "evice_type\030\001 \001(\0162-.google.cloud.talent.v" + + "4.DeviceInfo.DeviceType\022\n\n\002id\030\002 \001(\t\"l\n\nD" + + "eviceType\022\033\n\027DEVICE_TYPE_UNSPECIFIED\020\000\022\007" + + "\n\003WEB\020\001\022\016\n\nMOBILE_WEB\020\002\022\013\n\007ANDROID\020\003\022\007\n\003" + + "IOS\020\004\022\007\n\003BOT\020\005\022\t\n\005OTHER\020\006\"m\n\017CustomAttri" + + "bute\022\025\n\rstring_values\030\001 \003(\t\022\023\n\013long_valu" + + "es\030\002 \003(\003\022\022\n\nfilterable\030\003 \001(\010\022\032\n\022keyword_" + + "searchable\030\004 \001(\010\"W\n\022SpellingCorrection\022\021" + + "\n\tcorrected\030\001 \001(\010\022\026\n\016corrected_text\030\002 \001(" + + "\t\022\026\n\016corrected_html\030\003 \001(\t\"\210\t\n\020Compensati" + + "onInfo\022K\n\007entries\030\001 \003(\0132:.google.cloud.t" + + "alent.v4.CompensationInfo.CompensationEn" + + "try\022k\n\"annualized_base_compensation_rang" + + "e\030\002 \001(\0132:.google.cloud.talent.v4.Compens" + + "ationInfo.CompensationRangeB\003\340A\003\022l\n#annu" + + "alized_total_compensation_range\030\003 \001(\0132:." + + "google.cloud.talent.v4.CompensationInfo." + + "CompensationRangeB\003\340A\003\032\203\003\n\021CompensationE" + + "ntry\022G\n\004type\030\001 \001(\01629.google.cloud.talent" + + ".v4.CompensationInfo.CompensationType\022G\n" + + "\004unit\030\002 \001(\01629.google.cloud.talent.v4.Com" + + "pensationInfo.CompensationUnit\022$\n\006amount" + + "\030\003 \001(\0132\022.google.type.MoneyH\000\022K\n\005range\030\004 " + + "\001(\0132:.google.cloud.talent.v4.Compensatio" + + "nInfo.CompensationRangeH\000\022\023\n\013description" + + "\030\005 \001(\t\022=\n\027expected_units_per_year\030\006 \001(\0132" + + "\034.google.protobuf.DoubleValueB\025\n\023compens" + + "ation_amount\032o\n\021CompensationRange\022,\n\020max" + + "_compensation\030\002 \001(\0132\022.google.type.Money\022" + + ",\n\020min_compensation\030\001 \001(\0132\022.google.type." + + "Money\"\265\001\n\020CompensationType\022!\n\035COMPENSATI" + + "ON_TYPE_UNSPECIFIED\020\000\022\010\n\004BASE\020\001\022\t\n\005BONUS" + + "\020\002\022\021\n\rSIGNING_BONUS\020\003\022\n\n\006EQUITY\020\004\022\022\n\016PRO" + + "FIT_SHARING\020\005\022\017\n\013COMMISSIONS\020\006\022\010\n\004TIPS\020\007" + + "\022\033\n\027OTHER_COMPENSATION_TYPE\020\010\"\234\001\n\020Compen" + + "sationUnit\022!\n\035COMPENSATION_UNIT_UNSPECIF" + + "IED\020\000\022\n\n\006HOURLY\020\001\022\t\n\005DAILY\020\002\022\n\n\006WEEKLY\020\003" + + "\022\013\n\007MONTHLY\020\004\022\n\n\006YEARLY\020\005\022\014\n\010ONE_TIME\020\006\022" + + "\033\n\027OTHER_COMPENSATION_UNIT\020\007\"\307\003\n\026BatchOp" + + "erationMetadata\022C\n\005state\030\001 \001(\01624.google." + + "cloud.talent.v4.BatchOperationMetadata.S" + + "tate\022\031\n\021state_description\030\002 \001(\t\022\025\n\rsucce" + + "ss_count\030\003 \001(\005\022\025\n\rfailure_count\030\004 \001(\005\022\023\n" + + "\013total_count\030\005 \001(\005\022/\n\013create_time\030\006 \001(\0132" + + "\032.google.protobuf.Timestamp\022/\n\013update_ti" + + "me\030\007 \001(\0132\032.google.protobuf.Timestamp\022,\n\010" + + "end_time\030\010 \001(\0132\032.google.protobuf.Timesta" + + "mp\"z\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\020\n\014IN" + + "ITIALIZING\020\001\022\016\n\nPROCESSING\020\002\022\r\n\tSUCCEEDE" + + "D\020\003\022\n\n\006FAILED\020\004\022\016\n\nCANCELLING\020\005\022\r\n\tCANCE" + + "LLED\020\006*y\n\013CompanySize\022\034\n\030COMPANY_SIZE_UN" + + "SPECIFIED\020\000\022\010\n\004MINI\020\001\022\t\n\005SMALL\020\002\022\013\n\007SMED" + + "IUM\020\003\022\n\n\006MEDIUM\020\004\022\007\n\003BIG\020\005\022\n\n\006BIGGER\020\006\022\t" + + "\n\005GIANT\020\007*\342\001\n\nJobBenefit\022\033\n\027JOB_BENEFIT_" + + "UNSPECIFIED\020\000\022\016\n\nCHILD_CARE\020\001\022\n\n\006DENTAL\020" + + "\002\022\024\n\020DOMESTIC_PARTNER\020\003\022\022\n\016FLEXIBLE_HOUR" + + "S\020\004\022\013\n\007MEDICAL\020\005\022\022\n\016LIFE_INSURANCE\020\006\022\022\n\016" + + "PARENTAL_LEAVE\020\007\022\023\n\017RETIREMENT_PLAN\020\010\022\r\n" + + "\tSICK_DAYS\020\t\022\014\n\010VACATION\020\n\022\n\n\006VISION\020\013*\216" + + "\002\n\nDegreeType\022\033\n\027DEGREE_TYPE_UNSPECIFIED" + + "\020\000\022\025\n\021PRIMARY_EDUCATION\020\001\022\035\n\031LOWER_SECON" + + "DARY_EDUCATION\020\002\022\035\n\031UPPER_SECONDARY_EDUC" + + "ATION\020\003\022\034\n\030ADULT_REMEDIAL_EDUCATION\020\004\022\034\n" + + "\030ASSOCIATES_OR_EQUIVALENT\020\005\022\033\n\027BACHELORS" + + "_OR_EQUIVALENT\020\006\022\031\n\025MASTERS_OR_EQUIVALEN" + + "T\020\007\022\032\n\026DOCTORAL_OR_EQUIVALENT\020\010*\334\001\n\016Empl" + + "oymentType\022\037\n\033EMPLOYMENT_TYPE_UNSPECIFIE" + + "D\020\000\022\r\n\tFULL_TIME\020\001\022\r\n\tPART_TIME\020\002\022\016\n\nCON" + + "TRACTOR\020\003\022\024\n\020CONTRACT_TO_HIRE\020\004\022\r\n\tTEMPO" + + "RARY\020\005\022\n\n\006INTERN\020\006\022\r\n\tVOLUNTEER\020\007\022\014\n\010PER" + + "_DIEM\020\010\022\022\n\016FLY_IN_FLY_OUT\020\t\022\031\n\025OTHER_EMP" + + "LOYMENT_TYPE\020\n*q\n\010JobLevel\022\031\n\025JOB_LEVEL_" + + "UNSPECIFIED\020\000\022\017\n\013ENTRY_LEVEL\020\001\022\017\n\013EXPERI" + + "ENCED\020\002\022\013\n\007MANAGER\020\003\022\014\n\010DIRECTOR\020\004\022\r\n\tEX" + + "ECUTIVE\020\005*\272\006\n\013JobCategory\022\034\n\030JOB_CATEGOR" + + "Y_UNSPECIFIED\020\000\022\032\n\026ACCOUNTING_AND_FINANC" + + "E\020\001\022\035\n\031ADMINISTRATIVE_AND_OFFICE\020\002\022\035\n\031AD" + + "VERTISING_AND_MARKETING\020\003\022\017\n\013ANIMAL_CARE" + + "\020\004\022\032\n\026ART_FASHION_AND_DESIGN\020\005\022\027\n\023BUSINE" + + "SS_OPERATIONS\020\006\022\033\n\027CLEANING_AND_FACILITI" + + "ES\020\007\022\023\n\017COMPUTER_AND_IT\020\010\022\020\n\014CONSTRUCTIO" + + "N\020\t\022\024\n\020CUSTOMER_SERVICE\020\n\022\r\n\tEDUCATION\020\013" + + "\022\034\n\030ENTERTAINMENT_AND_TRAVEL\020\014\022\030\n\024FARMIN" + + "G_AND_OUTDOORS\020\r\022\016\n\nHEALTHCARE\020\016\022\023\n\017HUMA" + + "N_RESOURCES\020\017\022\'\n#INSTALLATION_MAINTENANC" + + "E_AND_REPAIR\020\020\022\t\n\005LEGAL\020\021\022\016\n\nMANAGEMENT\020" + + "\022\022\037\n\033MANUFACTURING_AND_WAREHOUSE\020\023\022$\n ME" + + "DIA_COMMUNICATIONS_AND_WRITING\020\024\022\026\n\022OIL_" + + "GAS_AND_MINING\020\025\022\036\n\032PERSONAL_CARE_AND_SE" + + "RVICES\020\026\022\027\n\023PROTECTIVE_SERVICES\020\027\022\017\n\013REA" + + "L_ESTATE\020\030\022\036\n\032RESTAURANT_AND_HOSPITALITY" + + "\020\031\022\024\n\020SALES_AND_RETAIL\020\032\022\033\n\027SCIENCE_AND_" + + "ENGINEERING\020\033\022\"\n\036SOCIAL_SERVICES_AND_NON" + + "_PROFIT\020\034\022!\n\035SPORTS_FITNESS_AND_RECREATI" + + "ON\020\035\022 \n\034TRANSPORTATION_AND_LOGISTICS\020\036*e" + + "\n\rPostingRegion\022\036\n\032POSTING_REGION_UNSPEC" + + "IFIED\020\000\022\027\n\023ADMINISTRATIVE_AREA\020\001\022\n\n\006NATI" + + "ON\020\002\022\017\n\013TELECOMMUTE\020\003*n\n\nVisibility\022\032\n\026V" + + "ISIBILITY_UNSPECIFIED\020\000\022\020\n\014ACCOUNT_ONLY\020" + + "\001\022\026\n\022SHARED_WITH_GOOGLE\020\002\022\026\n\022SHARED_WITH" + + "_PUBLIC\020\003\032\002\030\001*q\n\020HtmlSanitization\022!\n\035HTM" + + "L_SANITIZATION_UNSPECIFIED\020\000\022\036\n\032HTML_SAN" + + "ITIZATION_DISABLED\020\001\022\032\n\026SIMPLE_FORMATTIN" + + "G_ONLY\020\002*c\n\rCommuteMethod\022\036\n\032COMMUTE_MET" + + "HOD_UNSPECIFIED\020\000\022\013\n\007DRIVING\020\001\022\013\n\007TRANSI" + + "T\020\002\022\013\n\007WALKING\020\003\022\013\n\007CYCLING\020\004Bo\n\032com.goo" + + "gle.cloud.talent.v4B\013CommonProtoP\001Z + * Parameters needed for commute search. + * + * + * Protobuf type {@code google.cloud.talent.v4.CommuteFilter} + */ +public final class CommuteFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CommuteFilter) + CommuteFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommuteFilter.newBuilder() to construct. + private CommuteFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommuteFilter() { + commuteMethod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommuteFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommuteFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + commuteMethod_ = rawValue; + break; + } + case 18: + { + com.google.type.LatLng.Builder subBuilder = null; + if (startCoordinates_ != null) { + subBuilder = startCoordinates_.toBuilder(); + } + startCoordinates_ = + input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startCoordinates_); + startCoordinates_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (travelDuration_ != null) { + subBuilder = travelDuration_.toBuilder(); + } + travelDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(travelDuration_); + travelDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + allowImpreciseAddresses_ = input.readBool(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + trafficOptionCase_ = 5; + trafficOption_ = rawValue; + break; + } + case 50: + { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (trafficOptionCase_ == 6) { + subBuilder = ((com.google.type.TimeOfDay) trafficOption_).toBuilder(); + } + trafficOption_ = + input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.TimeOfDay) trafficOption_); + trafficOption_ = subBuilder.buildPartial(); + } + trafficOptionCase_ = 6; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CommuteFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CommuteFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CommuteFilter.class, + com.google.cloud.talent.v4.CommuteFilter.Builder.class); + } + + /** + * + * + *
+   * The traffic density to use when calculating commute time.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CommuteFilter.RoadTraffic} + */ + public enum RoadTraffic implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Road traffic situation isn't specified.
+     * 
+ * + * ROAD_TRAFFIC_UNSPECIFIED = 0; + */ + ROAD_TRAFFIC_UNSPECIFIED(0), + /** + * + * + *
+     * Optimal commute time without considering any traffic impact.
+     * 
+ * + * TRAFFIC_FREE = 1; + */ + TRAFFIC_FREE(1), + /** + * + * + *
+     * Commute time calculation takes in account the peak traffic impact.
+     * 
+ * + * BUSY_HOUR = 2; + */ + BUSY_HOUR(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Road traffic situation isn't specified.
+     * 
+ * + * ROAD_TRAFFIC_UNSPECIFIED = 0; + */ + public static final int ROAD_TRAFFIC_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Optimal commute time without considering any traffic impact.
+     * 
+ * + * TRAFFIC_FREE = 1; + */ + public static final int TRAFFIC_FREE_VALUE = 1; + /** + * + * + *
+     * Commute time calculation takes in account the peak traffic impact.
+     * 
+ * + * BUSY_HOUR = 2; + */ + public static final int BUSY_HOUR_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RoadTraffic valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RoadTraffic forNumber(int value) { + switch (value) { + case 0: + return ROAD_TRAFFIC_UNSPECIFIED; + case 1: + return TRAFFIC_FREE; + case 2: + return BUSY_HOUR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RoadTraffic findValueByNumber(int number) { + return RoadTraffic.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommuteFilter.getDescriptor().getEnumTypes().get(0); + } + + private static final RoadTraffic[] VALUES = values(); + + public static RoadTraffic valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RoadTraffic(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CommuteFilter.RoadTraffic) + } + + private int trafficOptionCase_ = 0; + private java.lang.Object trafficOption_; + + public enum TrafficOptionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ROAD_TRAFFIC(5), + DEPARTURE_TIME(6), + TRAFFICOPTION_NOT_SET(0); + private final int value; + + private TrafficOptionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TrafficOptionCase valueOf(int value) { + return forNumber(value); + } + + public static TrafficOptionCase forNumber(int value) { + switch (value) { + case 5: + return ROAD_TRAFFIC; + case 6: + return DEPARTURE_TIME; + case 0: + return TRAFFICOPTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TrafficOptionCase getTrafficOptionCase() { + return TrafficOptionCase.forNumber(trafficOptionCase_); + } + + public static final int COMMUTE_METHOD_FIELD_NUMBER = 1; + private int commuteMethod_; + /** + * + * + *
+   * Required. The method of transportation to calculate the commute time for.
+   * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for commuteMethod. + */ + @java.lang.Override + public int getCommuteMethodValue() { + return commuteMethod_; + } + /** + * + * + *
+   * Required. The method of transportation to calculate the commute time for.
+   * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The commuteMethod. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CommuteMethod getCommuteMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CommuteMethod result = + com.google.cloud.talent.v4.CommuteMethod.valueOf(commuteMethod_); + return result == null ? com.google.cloud.talent.v4.CommuteMethod.UNRECOGNIZED : result; + } + + public static final int START_COORDINATES_FIELD_NUMBER = 2; + private com.google.type.LatLng startCoordinates_; + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startCoordinates field is set. + */ + @java.lang.Override + public boolean hasStartCoordinates() { + return startCoordinates_ != null; + } + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startCoordinates. + */ + @java.lang.Override + public com.google.type.LatLng getStartCoordinates() { + return startCoordinates_ == null + ? com.google.type.LatLng.getDefaultInstance() + : startCoordinates_; + } + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getStartCoordinatesOrBuilder() { + return getStartCoordinates(); + } + + public static final int TRAVEL_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration travelDuration_; + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the travelDuration field is set. + */ + @java.lang.Override + public boolean hasTravelDuration() { + return travelDuration_ != null; + } + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The travelDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTravelDuration() { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { + return getTravelDuration(); + } + + public static final int ALLOW_IMPRECISE_ADDRESSES_FIELD_NUMBER = 4; + private boolean allowImpreciseAddresses_; + /** + * + * + *
+   * If `true`, jobs without street level addresses may also be returned.
+   * For city level addresses, the city center is used. For state and coarser
+   * level addresses, text matching is used.
+   * If this field is set to `false` or isn't specified, only jobs that include
+   * street level addresses will be returned by commute search.
+   * 
+ * + * bool allow_imprecise_addresses = 4; + * + * @return The allowImpreciseAddresses. + */ + @java.lang.Override + public boolean getAllowImpreciseAddresses() { + return allowImpreciseAddresses_; + } + + public static final int ROAD_TRAFFIC_FIELD_NUMBER = 5; + /** + * + * + *
+   * Specifies the traffic density to use when calculating commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The enum numeric value on the wire for roadTraffic. + */ + public int getRoadTrafficValue() { + if (trafficOptionCase_ == 5) { + return (java.lang.Integer) trafficOption_; + } + return 0; + } + /** + * + * + *
+   * Specifies the traffic density to use when calculating commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The roadTraffic. + */ + public com.google.cloud.talent.v4.CommuteFilter.RoadTraffic getRoadTraffic() { + if (trafficOptionCase_ == 5) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CommuteFilter.RoadTraffic result = + com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.valueOf( + (java.lang.Integer) trafficOption_); + return result == null + ? com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.UNRECOGNIZED + : result; + } + return com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.ROAD_TRAFFIC_UNSPECIFIED; + } + + public static final int DEPARTURE_TIME_FIELD_NUMBER = 6; + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return Whether the departureTime field is set. + */ + @java.lang.Override + public boolean hasDepartureTime() { + return trafficOptionCase_ == 6; + } + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return The departureTime. + */ + @java.lang.Override + public com.google.type.TimeOfDay getDepartureTime() { + if (trafficOptionCase_ == 6) { + return (com.google.type.TimeOfDay) trafficOption_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getDepartureTimeOrBuilder() { + if (trafficOptionCase_ == 6) { + return (com.google.type.TimeOfDay) trafficOption_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (commuteMethod_ + != com.google.cloud.talent.v4.CommuteMethod.COMMUTE_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(1, commuteMethod_); + } + if (startCoordinates_ != null) { + output.writeMessage(2, getStartCoordinates()); + } + if (travelDuration_ != null) { + output.writeMessage(3, getTravelDuration()); + } + if (allowImpreciseAddresses_ != false) { + output.writeBool(4, allowImpreciseAddresses_); + } + if (trafficOptionCase_ == 5) { + output.writeEnum(5, ((java.lang.Integer) trafficOption_)); + } + if (trafficOptionCase_ == 6) { + output.writeMessage(6, (com.google.type.TimeOfDay) trafficOption_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commuteMethod_ + != com.google.cloud.talent.v4.CommuteMethod.COMMUTE_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, commuteMethod_); + } + if (startCoordinates_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartCoordinates()); + } + if (travelDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTravelDuration()); + } + if (allowImpreciseAddresses_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowImpreciseAddresses_); + } + if (trafficOptionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 5, ((java.lang.Integer) trafficOption_)); + } + if (trafficOptionCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.type.TimeOfDay) trafficOption_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CommuteFilter)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CommuteFilter other = (com.google.cloud.talent.v4.CommuteFilter) obj; + + if (commuteMethod_ != other.commuteMethod_) return false; + if (hasStartCoordinates() != other.hasStartCoordinates()) return false; + if (hasStartCoordinates()) { + if (!getStartCoordinates().equals(other.getStartCoordinates())) return false; + } + if (hasTravelDuration() != other.hasTravelDuration()) return false; + if (hasTravelDuration()) { + if (!getTravelDuration().equals(other.getTravelDuration())) return false; + } + if (getAllowImpreciseAddresses() != other.getAllowImpreciseAddresses()) return false; + if (!getTrafficOptionCase().equals(other.getTrafficOptionCase())) return false; + switch (trafficOptionCase_) { + case 5: + if (getRoadTrafficValue() != other.getRoadTrafficValue()) return false; + break; + case 6: + if (!getDepartureTime().equals(other.getDepartureTime())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COMMUTE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + commuteMethod_; + if (hasStartCoordinates()) { + hash = (37 * hash) + START_COORDINATES_FIELD_NUMBER; + hash = (53 * hash) + getStartCoordinates().hashCode(); + } + if (hasTravelDuration()) { + hash = (37 * hash) + TRAVEL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTravelDuration().hashCode(); + } + hash = (37 * hash) + ALLOW_IMPRECISE_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowImpreciseAddresses()); + switch (trafficOptionCase_) { + case 5: + hash = (37 * hash) + ROAD_TRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + getRoadTrafficValue(); + break; + case 6: + hash = (37 * hash) + DEPARTURE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDepartureTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CommuteFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CommuteFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Parameters needed for commute search.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CommuteFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CommuteFilter) + com.google.cloud.talent.v4.CommuteFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CommuteFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CommuteFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CommuteFilter.class, + com.google.cloud.talent.v4.CommuteFilter.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CommuteFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + commuteMethod_ = 0; + + if (startCoordinatesBuilder_ == null) { + startCoordinates_ = null; + } else { + startCoordinates_ = null; + startCoordinatesBuilder_ = null; + } + if (travelDurationBuilder_ == null) { + travelDuration_ = null; + } else { + travelDuration_ = null; + travelDurationBuilder_ = null; + } + allowImpreciseAddresses_ = false; + + trafficOptionCase_ = 0; + trafficOption_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CommuteFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CommuteFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter build() { + com.google.cloud.talent.v4.CommuteFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter buildPartial() { + com.google.cloud.talent.v4.CommuteFilter result = + new com.google.cloud.talent.v4.CommuteFilter(this); + result.commuteMethod_ = commuteMethod_; + if (startCoordinatesBuilder_ == null) { + result.startCoordinates_ = startCoordinates_; + } else { + result.startCoordinates_ = startCoordinatesBuilder_.build(); + } + if (travelDurationBuilder_ == null) { + result.travelDuration_ = travelDuration_; + } else { + result.travelDuration_ = travelDurationBuilder_.build(); + } + result.allowImpreciseAddresses_ = allowImpreciseAddresses_; + if (trafficOptionCase_ == 5) { + result.trafficOption_ = trafficOption_; + } + if (trafficOptionCase_ == 6) { + if (departureTimeBuilder_ == null) { + result.trafficOption_ = trafficOption_; + } else { + result.trafficOption_ = departureTimeBuilder_.build(); + } + } + result.trafficOptionCase_ = trafficOptionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CommuteFilter) { + return mergeFrom((com.google.cloud.talent.v4.CommuteFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CommuteFilter other) { + if (other == com.google.cloud.talent.v4.CommuteFilter.getDefaultInstance()) return this; + if (other.commuteMethod_ != 0) { + setCommuteMethodValue(other.getCommuteMethodValue()); + } + if (other.hasStartCoordinates()) { + mergeStartCoordinates(other.getStartCoordinates()); + } + if (other.hasTravelDuration()) { + mergeTravelDuration(other.getTravelDuration()); + } + if (other.getAllowImpreciseAddresses() != false) { + setAllowImpreciseAddresses(other.getAllowImpreciseAddresses()); + } + switch (other.getTrafficOptionCase()) { + case ROAD_TRAFFIC: + { + setRoadTrafficValue(other.getRoadTrafficValue()); + break; + } + case DEPARTURE_TIME: + { + mergeDepartureTime(other.getDepartureTime()); + break; + } + case TRAFFICOPTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CommuteFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CommuteFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int trafficOptionCase_ = 0; + private java.lang.Object trafficOption_; + + public TrafficOptionCase getTrafficOptionCase() { + return TrafficOptionCase.forNumber(trafficOptionCase_); + } + + public Builder clearTrafficOption() { + trafficOptionCase_ = 0; + trafficOption_ = null; + onChanged(); + return this; + } + + private int commuteMethod_ = 0; + /** + * + * + *
+     * Required. The method of transportation to calculate the commute time for.
+     * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for commuteMethod. + */ + @java.lang.Override + public int getCommuteMethodValue() { + return commuteMethod_; + } + /** + * + * + *
+     * Required. The method of transportation to calculate the commute time for.
+     * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for commuteMethod to set. + * @return This builder for chaining. + */ + public Builder setCommuteMethodValue(int value) { + + commuteMethod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The method of transportation to calculate the commute time for.
+     * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The commuteMethod. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CommuteMethod getCommuteMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CommuteMethod result = + com.google.cloud.talent.v4.CommuteMethod.valueOf(commuteMethod_); + return result == null ? com.google.cloud.talent.v4.CommuteMethod.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The method of transportation to calculate the commute time for.
+     * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The commuteMethod to set. + * @return This builder for chaining. + */ + public Builder setCommuteMethod(com.google.cloud.talent.v4.CommuteMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + commuteMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The method of transportation to calculate the commute time for.
+     * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCommuteMethod() { + + commuteMethod_ = 0; + onChanged(); + return this; + } + + private com.google.type.LatLng startCoordinates_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + startCoordinatesBuilder_; + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startCoordinates field is set. + */ + public boolean hasStartCoordinates() { + return startCoordinatesBuilder_ != null || startCoordinates_ != null; + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startCoordinates. + */ + public com.google.type.LatLng getStartCoordinates() { + if (startCoordinatesBuilder_ == null) { + return startCoordinates_ == null + ? com.google.type.LatLng.getDefaultInstance() + : startCoordinates_; + } else { + return startCoordinatesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartCoordinates(com.google.type.LatLng value) { + if (startCoordinatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startCoordinates_ = value; + onChanged(); + } else { + startCoordinatesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartCoordinates(com.google.type.LatLng.Builder builderForValue) { + if (startCoordinatesBuilder_ == null) { + startCoordinates_ = builderForValue.build(); + onChanged(); + } else { + startCoordinatesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartCoordinates(com.google.type.LatLng value) { + if (startCoordinatesBuilder_ == null) { + if (startCoordinates_ != null) { + startCoordinates_ = + com.google.type.LatLng.newBuilder(startCoordinates_).mergeFrom(value).buildPartial(); + } else { + startCoordinates_ = value; + } + onChanged(); + } else { + startCoordinatesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartCoordinates() { + if (startCoordinatesBuilder_ == null) { + startCoordinates_ = null; + onChanged(); + } else { + startCoordinates_ = null; + startCoordinatesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.LatLng.Builder getStartCoordinatesBuilder() { + + onChanged(); + return getStartCoordinatesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.LatLngOrBuilder getStartCoordinatesOrBuilder() { + if (startCoordinatesBuilder_ != null) { + return startCoordinatesBuilder_.getMessageOrBuilder(); + } else { + return startCoordinates_ == null + ? com.google.type.LatLng.getDefaultInstance() + : startCoordinates_; + } + } + /** + * + * + *
+     * Required. The latitude and longitude of the location to calculate the
+     * commute time from.
+     * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getStartCoordinatesFieldBuilder() { + if (startCoordinatesBuilder_ == null) { + startCoordinatesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + getStartCoordinates(), getParentForChildren(), isClean()); + startCoordinates_ = null; + } + return startCoordinatesBuilder_; + } + + private com.google.protobuf.Duration travelDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + travelDurationBuilder_; + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the travelDuration field is set. + */ + public boolean hasTravelDuration() { + return travelDurationBuilder_ != null || travelDuration_ != null; + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The travelDuration. + */ + public com.google.protobuf.Duration getTravelDuration() { + if (travelDurationBuilder_ == null) { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } else { + return travelDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTravelDuration(com.google.protobuf.Duration value) { + if (travelDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + travelDuration_ = value; + onChanged(); + } else { + travelDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTravelDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (travelDurationBuilder_ == null) { + travelDuration_ = builderForValue.build(); + onChanged(); + } else { + travelDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTravelDuration(com.google.protobuf.Duration value) { + if (travelDurationBuilder_ == null) { + if (travelDuration_ != null) { + travelDuration_ = + com.google.protobuf.Duration.newBuilder(travelDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + travelDuration_ = value; + } + onChanged(); + } else { + travelDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTravelDuration() { + if (travelDurationBuilder_ == null) { + travelDuration_ = null; + onChanged(); + } else { + travelDuration_ = null; + travelDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getTravelDurationBuilder() { + + onChanged(); + return getTravelDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { + if (travelDurationBuilder_ != null) { + return travelDurationBuilder_.getMessageOrBuilder(); + } else { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } + } + /** + * + * + *
+     * Required. The maximum travel time in seconds. The maximum allowed value is
+     * `3600s` (one hour). Format is `123s`.
+     * 
+ * + * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTravelDurationFieldBuilder() { + if (travelDurationBuilder_ == null) { + travelDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTravelDuration(), getParentForChildren(), isClean()); + travelDuration_ = null; + } + return travelDurationBuilder_; + } + + private boolean allowImpreciseAddresses_; + /** + * + * + *
+     * If `true`, jobs without street level addresses may also be returned.
+     * For city level addresses, the city center is used. For state and coarser
+     * level addresses, text matching is used.
+     * If this field is set to `false` or isn't specified, only jobs that include
+     * street level addresses will be returned by commute search.
+     * 
+ * + * bool allow_imprecise_addresses = 4; + * + * @return The allowImpreciseAddresses. + */ + @java.lang.Override + public boolean getAllowImpreciseAddresses() { + return allowImpreciseAddresses_; + } + /** + * + * + *
+     * If `true`, jobs without street level addresses may also be returned.
+     * For city level addresses, the city center is used. For state and coarser
+     * level addresses, text matching is used.
+     * If this field is set to `false` or isn't specified, only jobs that include
+     * street level addresses will be returned by commute search.
+     * 
+ * + * bool allow_imprecise_addresses = 4; + * + * @param value The allowImpreciseAddresses to set. + * @return This builder for chaining. + */ + public Builder setAllowImpreciseAddresses(boolean value) { + + allowImpreciseAddresses_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If `true`, jobs without street level addresses may also be returned.
+     * For city level addresses, the city center is used. For state and coarser
+     * level addresses, text matching is used.
+     * If this field is set to `false` or isn't specified, only jobs that include
+     * street level addresses will be returned by commute search.
+     * 
+ * + * bool allow_imprecise_addresses = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowImpreciseAddresses() { + + allowImpreciseAddresses_ = false; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the traffic density to use when calculating commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The enum numeric value on the wire for roadTraffic. + */ + @java.lang.Override + public int getRoadTrafficValue() { + if (trafficOptionCase_ == 5) { + return ((java.lang.Integer) trafficOption_).intValue(); + } + return 0; + } + /** + * + * + *
+     * Specifies the traffic density to use when calculating commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @param value The enum numeric value on the wire for roadTraffic to set. + * @return This builder for chaining. + */ + public Builder setRoadTrafficValue(int value) { + trafficOptionCase_ = 5; + trafficOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the traffic density to use when calculating commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The roadTraffic. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter.RoadTraffic getRoadTraffic() { + if (trafficOptionCase_ == 5) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CommuteFilter.RoadTraffic result = + com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.valueOf( + (java.lang.Integer) trafficOption_); + return result == null + ? com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.UNRECOGNIZED + : result; + } + return com.google.cloud.talent.v4.CommuteFilter.RoadTraffic.ROAD_TRAFFIC_UNSPECIFIED; + } + /** + * + * + *
+     * Specifies the traffic density to use when calculating commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @param value The roadTraffic to set. + * @return This builder for chaining. + */ + public Builder setRoadTraffic(com.google.cloud.talent.v4.CommuteFilter.RoadTraffic value) { + if (value == null) { + throw new NullPointerException(); + } + trafficOptionCase_ = 5; + trafficOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the traffic density to use when calculating commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return This builder for chaining. + */ + public Builder clearRoadTraffic() { + if (trafficOptionCase_ == 5) { + trafficOptionCase_ = 0; + trafficOption_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + departureTimeBuilder_; + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return Whether the departureTime field is set. + */ + @java.lang.Override + public boolean hasDepartureTime() { + return trafficOptionCase_ == 6; + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return The departureTime. + */ + @java.lang.Override + public com.google.type.TimeOfDay getDepartureTime() { + if (departureTimeBuilder_ == null) { + if (trafficOptionCase_ == 6) { + return (com.google.type.TimeOfDay) trafficOption_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } else { + if (trafficOptionCase_ == 6) { + return departureTimeBuilder_.getMessage(); + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + public Builder setDepartureTime(com.google.type.TimeOfDay value) { + if (departureTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trafficOption_ = value; + onChanged(); + } else { + departureTimeBuilder_.setMessage(value); + } + trafficOptionCase_ = 6; + return this; + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + public Builder setDepartureTime(com.google.type.TimeOfDay.Builder builderForValue) { + if (departureTimeBuilder_ == null) { + trafficOption_ = builderForValue.build(); + onChanged(); + } else { + departureTimeBuilder_.setMessage(builderForValue.build()); + } + trafficOptionCase_ = 6; + return this; + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + public Builder mergeDepartureTime(com.google.type.TimeOfDay value) { + if (departureTimeBuilder_ == null) { + if (trafficOptionCase_ == 6 + && trafficOption_ != com.google.type.TimeOfDay.getDefaultInstance()) { + trafficOption_ = + com.google.type.TimeOfDay.newBuilder((com.google.type.TimeOfDay) trafficOption_) + .mergeFrom(value) + .buildPartial(); + } else { + trafficOption_ = value; + } + onChanged(); + } else { + if (trafficOptionCase_ == 6) { + departureTimeBuilder_.mergeFrom(value); + } + departureTimeBuilder_.setMessage(value); + } + trafficOptionCase_ = 6; + return this; + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + public Builder clearDepartureTime() { + if (departureTimeBuilder_ == null) { + if (trafficOptionCase_ == 6) { + trafficOptionCase_ = 0; + trafficOption_ = null; + onChanged(); + } + } else { + if (trafficOptionCase_ == 6) { + trafficOptionCase_ = 0; + trafficOption_ = null; + } + departureTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + public com.google.type.TimeOfDay.Builder getDepartureTimeBuilder() { + return getDepartureTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getDepartureTimeOrBuilder() { + if ((trafficOptionCase_ == 6) && (departureTimeBuilder_ != null)) { + return departureTimeBuilder_.getMessageOrBuilder(); + } else { + if (trafficOptionCase_ == 6) { + return (com.google.type.TimeOfDay) trafficOption_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + } + /** + * + * + *
+     * The departure time used to calculate traffic impact, represented as
+     * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+     * Currently traffic model is restricted to hour level resolution.
+     * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getDepartureTimeFieldBuilder() { + if (departureTimeBuilder_ == null) { + if (!(trafficOptionCase_ == 6)) { + trafficOption_ = com.google.type.TimeOfDay.getDefaultInstance(); + } + departureTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + (com.google.type.TimeOfDay) trafficOption_, getParentForChildren(), isClean()); + trafficOption_ = null; + } + trafficOptionCase_ = 6; + onChanged(); + ; + return departureTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CommuteFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CommuteFilter) + private static final com.google.cloud.talent.v4.CommuteFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CommuteFilter(); + } + + public static com.google.cloud.talent.v4.CommuteFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommuteFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommuteFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteFilterOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteFilterOrBuilder.java new file mode 100644 index 00000000..9ac359c8 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteFilterOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +public interface CommuteFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CommuteFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The method of transportation to calculate the commute time for.
+   * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for commuteMethod. + */ + int getCommuteMethodValue(); + /** + * + * + *
+   * Required. The method of transportation to calculate the commute time for.
+   * 
+ * + * + * .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The commuteMethod. + */ + com.google.cloud.talent.v4.CommuteMethod getCommuteMethod(); + + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startCoordinates field is set. + */ + boolean hasStartCoordinates(); + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startCoordinates. + */ + com.google.type.LatLng getStartCoordinates(); + /** + * + * + *
+   * Required. The latitude and longitude of the location to calculate the
+   * commute time from.
+   * 
+ * + * .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.type.LatLngOrBuilder getStartCoordinatesOrBuilder(); + + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the travelDuration field is set. + */ + boolean hasTravelDuration(); + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The travelDuration. + */ + com.google.protobuf.Duration getTravelDuration(); + /** + * + * + *
+   * Required. The maximum travel time in seconds. The maximum allowed value is
+   * `3600s` (one hour). Format is `123s`.
+   * 
+ * + * .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder(); + + /** + * + * + *
+   * If `true`, jobs without street level addresses may also be returned.
+   * For city level addresses, the city center is used. For state and coarser
+   * level addresses, text matching is used.
+   * If this field is set to `false` or isn't specified, only jobs that include
+   * street level addresses will be returned by commute search.
+   * 
+ * + * bool allow_imprecise_addresses = 4; + * + * @return The allowImpreciseAddresses. + */ + boolean getAllowImpreciseAddresses(); + + /** + * + * + *
+   * Specifies the traffic density to use when calculating commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The enum numeric value on the wire for roadTraffic. + */ + int getRoadTrafficValue(); + /** + * + * + *
+   * Specifies the traffic density to use when calculating commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * + * @return The roadTraffic. + */ + com.google.cloud.talent.v4.CommuteFilter.RoadTraffic getRoadTraffic(); + + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return Whether the departureTime field is set. + */ + boolean hasDepartureTime(); + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + * + * @return The departureTime. + */ + com.google.type.TimeOfDay getDepartureTime(); + /** + * + * + *
+   * The departure time used to calculate traffic impact, represented as
+   * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone.
+   * Currently traffic model is restricted to hour level resolution.
+   * 
+ * + * .google.type.TimeOfDay departure_time = 6; + */ + com.google.type.TimeOfDayOrBuilder getDepartureTimeOrBuilder(); + + public com.google.cloud.talent.v4.CommuteFilter.TrafficOptionCase getTrafficOptionCase(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteMethod.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteMethod.java new file mode 100644 index 00000000..06befdef --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteMethod.java @@ -0,0 +1,222 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Method for commute.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CommuteMethod} + */ +public enum CommuteMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Commute method isn't specified.
+   * 
+ * + * COMMUTE_METHOD_UNSPECIFIED = 0; + */ + COMMUTE_METHOD_UNSPECIFIED(0), + /** + * + * + *
+   * Commute time is calculated based on driving time.
+   * 
+ * + * DRIVING = 1; + */ + DRIVING(1), + /** + * + * + *
+   * Commute time is calculated based on public transit including bus, metro,
+   * subway, and so on.
+   * 
+ * + * TRANSIT = 2; + */ + TRANSIT(2), + /** + * + * + *
+   * Commute time is calculated based on walking time.
+   * 
+ * + * WALKING = 3; + */ + WALKING(3), + /** + * + * + *
+   * Commute time is calculated based on biking time.
+   * 
+ * + * CYCLING = 4; + */ + CYCLING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Commute method isn't specified.
+   * 
+ * + * COMMUTE_METHOD_UNSPECIFIED = 0; + */ + public static final int COMMUTE_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Commute time is calculated based on driving time.
+   * 
+ * + * DRIVING = 1; + */ + public static final int DRIVING_VALUE = 1; + /** + * + * + *
+   * Commute time is calculated based on public transit including bus, metro,
+   * subway, and so on.
+   * 
+ * + * TRANSIT = 2; + */ + public static final int TRANSIT_VALUE = 2; + /** + * + * + *
+   * Commute time is calculated based on walking time.
+   * 
+ * + * WALKING = 3; + */ + public static final int WALKING_VALUE = 3; + /** + * + * + *
+   * Commute time is calculated based on biking time.
+   * 
+ * + * CYCLING = 4; + */ + public static final int CYCLING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CommuteMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CommuteMethod forNumber(int value) { + switch (value) { + case 0: + return COMMUTE_METHOD_UNSPECIFIED; + case 1: + return DRIVING; + case 2: + return TRANSIT; + case 3: + return WALKING; + case 4: + return CYCLING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CommuteMethod findValueByNumber(int number) { + return CommuteMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(9); + } + + private static final CommuteMethod[] VALUES = values(); + + public static CommuteMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CommuteMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CommuteMethod) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Company.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Company.java new file mode 100644 index 00000000..d9185c74 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Company.java @@ -0,0 +1,3812 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * A Company resource represents a company in the service. A company is the
+ * entity that owns job postings, that is, the hiring entity responsible for
+ * employing applicants for the job position.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Company} + */ +public final class Company extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Company) + CompanyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Company.newBuilder() to construct. + private Company(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Company() { + name_ = ""; + displayName_ = ""; + externalId_ = ""; + size_ = 0; + headquartersAddress_ = ""; + eeoText_ = ""; + websiteUri_ = ""; + careerSiteUri_ = ""; + imageUri_ = ""; + keywordSearchableJobCustomAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Company(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Company( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalId_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + size_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + headquartersAddress_ = s; + break; + } + case 48: + { + hiringAgency_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + eeoText_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + websiteUri_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + careerSiteUri_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + keywordSearchableJobCustomAttributes_ = + new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + keywordSearchableJobCustomAttributes_.add(s); + break; + } + case 98: + { + com.google.cloud.talent.v4.Company.DerivedInfo.Builder subBuilder = null; + if (derivedInfo_ != null) { + subBuilder = derivedInfo_.toBuilder(); + } + derivedInfo_ = + input.readMessage( + com.google.cloud.talent.v4.Company.DerivedInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(derivedInfo_); + derivedInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 104: + { + suspended_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + keywordSearchableJobCustomAttributes_ = + keywordSearchableJobCustomAttributes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Company.class, + com.google.cloud.talent.v4.Company.Builder.class); + } + + public interface DerivedInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Company.DerivedInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return Whether the headquartersLocation field is set. + */ + boolean hasHeadquartersLocation(); + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return The headquartersLocation. + */ + com.google.cloud.talent.v4.Location getHeadquartersLocation(); + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + com.google.cloud.talent.v4.LocationOrBuilder getHeadquartersLocationOrBuilder(); + } + /** + * + * + *
+   * Derived details about the company.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Company.DerivedInfo} + */ + public static final class DerivedInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Company.DerivedInfo) + DerivedInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DerivedInfo.newBuilder() to construct. + private DerivedInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DerivedInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DerivedInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DerivedInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Location.Builder subBuilder = null; + if (headquartersLocation_ != null) { + subBuilder = headquartersLocation_.toBuilder(); + } + headquartersLocation_ = + input.readMessage( + com.google.cloud.talent.v4.Location.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(headquartersLocation_); + headquartersLocation_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_DerivedInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_DerivedInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Company.DerivedInfo.class, + com.google.cloud.talent.v4.Company.DerivedInfo.Builder.class); + } + + public static final int HEADQUARTERS_LOCATION_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Location headquartersLocation_; + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return Whether the headquartersLocation field is set. + */ + @java.lang.Override + public boolean hasHeadquartersLocation() { + return headquartersLocation_ != null; + } + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return The headquartersLocation. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location getHeadquartersLocation() { + return headquartersLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : headquartersLocation_; + } + /** + * + * + *
+     * A structured headquarters location of the company, resolved from
+     * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+     * if provided.
+     * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationOrBuilder getHeadquartersLocationOrBuilder() { + return getHeadquartersLocation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (headquartersLocation_ != null) { + output.writeMessage(1, getHeadquartersLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (headquartersLocation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeadquartersLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Company.DerivedInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Company.DerivedInfo other = + (com.google.cloud.talent.v4.Company.DerivedInfo) obj; + + if (hasHeadquartersLocation() != other.hasHeadquartersLocation()) return false; + if (hasHeadquartersLocation()) { + if (!getHeadquartersLocation().equals(other.getHeadquartersLocation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeadquartersLocation()) { + hash = (37 * hash) + HEADQUARTERS_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getHeadquartersLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Company.DerivedInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Derived details about the company.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Company.DerivedInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Company.DerivedInfo) + com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_DerivedInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_DerivedInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Company.DerivedInfo.class, + com.google.cloud.talent.v4.Company.DerivedInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Company.DerivedInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (headquartersLocationBuilder_ == null) { + headquartersLocation_ = null; + } else { + headquartersLocation_ = null; + headquartersLocationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_DerivedInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Company.DerivedInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfo build() { + com.google.cloud.talent.v4.Company.DerivedInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfo buildPartial() { + com.google.cloud.talent.v4.Company.DerivedInfo result = + new com.google.cloud.talent.v4.Company.DerivedInfo(this); + if (headquartersLocationBuilder_ == null) { + result.headquartersLocation_ = headquartersLocation_; + } else { + result.headquartersLocation_ = headquartersLocationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Company.DerivedInfo) { + return mergeFrom((com.google.cloud.talent.v4.Company.DerivedInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Company.DerivedInfo other) { + if (other == com.google.cloud.talent.v4.Company.DerivedInfo.getDefaultInstance()) + return this; + if (other.hasHeadquartersLocation()) { + mergeHeadquartersLocation(other.getHeadquartersLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Company.DerivedInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Company.DerivedInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Location headquartersLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + headquartersLocationBuilder_; + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return Whether the headquartersLocation field is set. + */ + public boolean hasHeadquartersLocation() { + return headquartersLocationBuilder_ != null || headquartersLocation_ != null; + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + * + * @return The headquartersLocation. + */ + public com.google.cloud.talent.v4.Location getHeadquartersLocation() { + if (headquartersLocationBuilder_ == null) { + return headquartersLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : headquartersLocation_; + } else { + return headquartersLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public Builder setHeadquartersLocation(com.google.cloud.talent.v4.Location value) { + if (headquartersLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + headquartersLocation_ = value; + onChanged(); + } else { + headquartersLocationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public Builder setHeadquartersLocation( + com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (headquartersLocationBuilder_ == null) { + headquartersLocation_ = builderForValue.build(); + onChanged(); + } else { + headquartersLocationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public Builder mergeHeadquartersLocation(com.google.cloud.talent.v4.Location value) { + if (headquartersLocationBuilder_ == null) { + if (headquartersLocation_ != null) { + headquartersLocation_ = + com.google.cloud.talent.v4.Location.newBuilder(headquartersLocation_) + .mergeFrom(value) + .buildPartial(); + } else { + headquartersLocation_ = value; + } + onChanged(); + } else { + headquartersLocationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public Builder clearHeadquartersLocation() { + if (headquartersLocationBuilder_ == null) { + headquartersLocation_ = null; + onChanged(); + } else { + headquartersLocation_ = null; + headquartersLocationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public com.google.cloud.talent.v4.Location.Builder getHeadquartersLocationBuilder() { + + onChanged(); + return getHeadquartersLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + public com.google.cloud.talent.v4.LocationOrBuilder getHeadquartersLocationOrBuilder() { + if (headquartersLocationBuilder_ != null) { + return headquartersLocationBuilder_.getMessageOrBuilder(); + } else { + return headquartersLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : headquartersLocation_; + } + } + /** + * + * + *
+       * A structured headquarters location of the company, resolved from
+       * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address]
+       * if provided.
+       * 
+ * + * .google.cloud.talent.v4.Location headquarters_location = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + getHeadquartersLocationFieldBuilder() { + if (headquartersLocationBuilder_ == null) { + headquartersLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder>( + getHeadquartersLocation(), getParentForChildren(), isClean()); + headquartersLocation_ = null; + } + return headquartersLocationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Company.DerivedInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Company.DerivedInfo) + private static final com.google.cloud.talent.v4.Company.DerivedInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Company.DerivedInfo(); + } + + public static com.google.cloud.talent.v4.Company.DerivedInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DerivedInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DerivedInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required during company update.
+   * The resource name for a company. This is generated by the service when a
+   * company is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required during company update.
+   * The resource name for a company. This is generated by the service when a
+   * company is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the company, for example, "Google LLC".
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the company, for example, "Google LLC".
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object externalId_; + /** + * + * + *
+   * Required. Client side company identifier, used to uniquely identify the
+   * company.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + @java.lang.Override + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Client side company identifier, used to uniquely identify the
+   * company.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 4; + private int size_; + /** + * + * + *
+   * The employer's company size.
+   * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The enum numeric value on the wire for size. + */ + @java.lang.Override + public int getSizeValue() { + return size_; + } + /** + * + * + *
+   * The employer's company size.
+   * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The size. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompanySize getSize() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompanySize result = + com.google.cloud.talent.v4.CompanySize.valueOf(size_); + return result == null ? com.google.cloud.talent.v4.CompanySize.UNRECOGNIZED : result; + } + + public static final int HEADQUARTERS_ADDRESS_FIELD_NUMBER = 5; + private volatile java.lang.Object headquartersAddress_; + /** + * + * + *
+   * The street address of the company's main headquarters, which may be
+   * different from the job location. The service attempts
+   * to geolocate the provided address, and populates a more specific
+   * location wherever possible in
+   * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+   * 
+ * + * string headquarters_address = 5; + * + * @return The headquartersAddress. + */ + @java.lang.Override + public java.lang.String getHeadquartersAddress() { + java.lang.Object ref = headquartersAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headquartersAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The street address of the company's main headquarters, which may be
+   * different from the job location. The service attempts
+   * to geolocate the provided address, and populates a more specific
+   * location wherever possible in
+   * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+   * 
+ * + * string headquarters_address = 5; + * + * @return The bytes for headquartersAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHeadquartersAddressBytes() { + java.lang.Object ref = headquartersAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + headquartersAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HIRING_AGENCY_FIELD_NUMBER = 6; + private boolean hiringAgency_; + /** + * + * + *
+   * Set to true if it is the hiring agency that post jobs for other
+   * employers.
+   * Defaults to false if not provided.
+   * 
+ * + * bool hiring_agency = 6; + * + * @return The hiringAgency. + */ + @java.lang.Override + public boolean getHiringAgency() { + return hiringAgency_; + } + + public static final int EEO_TEXT_FIELD_NUMBER = 7; + private volatile java.lang.Object eeoText_; + /** + * + * + *
+   * Equal Employment Opportunity legal disclaimer text to be
+   * associated with all jobs, and typically to be displayed in all
+   * roles.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string eeo_text = 7; + * + * @return The eeoText. + */ + @java.lang.Override + public java.lang.String getEeoText() { + java.lang.Object ref = eeoText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eeoText_ = s; + return s; + } + } + /** + * + * + *
+   * Equal Employment Opportunity legal disclaimer text to be
+   * associated with all jobs, and typically to be displayed in all
+   * roles.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string eeo_text = 7; + * + * @return The bytes for eeoText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEeoTextBytes() { + java.lang.Object ref = eeoText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eeoText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITE_URI_FIELD_NUMBER = 8; + private volatile java.lang.Object websiteUri_; + /** + * + * + *
+   * The URI representing the company's primary web site or home page,
+   * for example, "https://www.google.com".
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string website_uri = 8; + * + * @return The websiteUri. + */ + @java.lang.Override + public java.lang.String getWebsiteUri() { + java.lang.Object ref = websiteUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + websiteUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI representing the company's primary web site or home page,
+   * for example, "https://www.google.com".
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string website_uri = 8; + * + * @return The bytes for websiteUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebsiteUriBytes() { + java.lang.Object ref = websiteUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + websiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAREER_SITE_URI_FIELD_NUMBER = 9; + private volatile java.lang.Object careerSiteUri_; + /** + * + * + *
+   * The URI to employer's career site or careers page on the employer's web
+   * site, for example, "https://careers.google.com".
+   * 
+ * + * string career_site_uri = 9; + * + * @return The careerSiteUri. + */ + @java.lang.Override + public java.lang.String getCareerSiteUri() { + java.lang.Object ref = careerSiteUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + careerSiteUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI to employer's career site or careers page on the employer's web
+   * site, for example, "https://careers.google.com".
+   * 
+ * + * string career_site_uri = 9; + * + * @return The bytes for careerSiteUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCareerSiteUriBytes() { + java.lang.Object ref = careerSiteUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + careerSiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 10; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * A URI that hosts the employer's company logo.
+   * 
+ * + * string image_uri = 10; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * A URI that hosts the employer's company logo.
+   * 
+ * + * string image_uri = 10; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEYWORD_SEARCHABLE_JOB_CUSTOM_ATTRIBUTES_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList keywordSearchableJobCustomAttributes_; + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return A list containing the keywordSearchableJobCustomAttributes. + */ + public com.google.protobuf.ProtocolStringList getKeywordSearchableJobCustomAttributesList() { + return keywordSearchableJobCustomAttributes_; + } + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return The count of keywordSearchableJobCustomAttributes. + */ + public int getKeywordSearchableJobCustomAttributesCount() { + return keywordSearchableJobCustomAttributes_.size(); + } + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the element to return. + * @return The keywordSearchableJobCustomAttributes at the given index. + */ + public java.lang.String getKeywordSearchableJobCustomAttributes(int index) { + return keywordSearchableJobCustomAttributes_.get(index); + } + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the keywordSearchableJobCustomAttributes at the given index. + */ + public com.google.protobuf.ByteString getKeywordSearchableJobCustomAttributesBytes(int index) { + return keywordSearchableJobCustomAttributes_.getByteString(index); + } + + public static final int DERIVED_INFO_FIELD_NUMBER = 12; + private com.google.cloud.talent.v4.Company.DerivedInfo derivedInfo_; + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + @java.lang.Override + public boolean hasDerivedInfo() { + return derivedInfo_ != null; + } + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfo getDerivedInfo() { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Company.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder getDerivedInfoOrBuilder() { + return getDerivedInfo(); + } + + public static final int SUSPENDED_FIELD_NUMBER = 13; + private boolean suspended_; + /** + * + * + *
+   * Output only. Indicates whether a company is flagged to be suspended from
+   * public availability by the service when job content appears suspicious,
+   * abusive, or spammy.
+   * 
+ * + * bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getExternalIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, externalId_); + } + if (size_ != com.google.cloud.talent.v4.CompanySize.COMPANY_SIZE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, size_); + } + if (!getHeadquartersAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, headquartersAddress_); + } + if (hiringAgency_ != false) { + output.writeBool(6, hiringAgency_); + } + if (!getEeoTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, eeoText_); + } + if (!getWebsiteUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, websiteUri_); + } + if (!getCareerSiteUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, careerSiteUri_); + } + if (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, imageUri_); + } + for (int i = 0; i < keywordSearchableJobCustomAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 11, keywordSearchableJobCustomAttributes_.getRaw(i)); + } + if (derivedInfo_ != null) { + output.writeMessage(12, getDerivedInfo()); + } + if (suspended_ != false) { + output.writeBool(13, suspended_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getExternalIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, externalId_); + } + if (size_ != com.google.cloud.talent.v4.CompanySize.COMPANY_SIZE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, size_); + } + if (!getHeadquartersAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, headquartersAddress_); + } + if (hiringAgency_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, hiringAgency_); + } + if (!getEeoTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, eeoText_); + } + if (!getWebsiteUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, websiteUri_); + } + if (!getCareerSiteUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, careerSiteUri_); + } + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, imageUri_); + } + { + int dataSize = 0; + for (int i = 0; i < keywordSearchableJobCustomAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(keywordSearchableJobCustomAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getKeywordSearchableJobCustomAttributesList().size(); + } + if (derivedInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDerivedInfo()); + } + if (suspended_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, suspended_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Company)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Company other = (com.google.cloud.talent.v4.Company) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getExternalId().equals(other.getExternalId())) return false; + if (size_ != other.size_) return false; + if (!getHeadquartersAddress().equals(other.getHeadquartersAddress())) return false; + if (getHiringAgency() != other.getHiringAgency()) return false; + if (!getEeoText().equals(other.getEeoText())) return false; + if (!getWebsiteUri().equals(other.getWebsiteUri())) return false; + if (!getCareerSiteUri().equals(other.getCareerSiteUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getKeywordSearchableJobCustomAttributesList() + .equals(other.getKeywordSearchableJobCustomAttributesList())) return false; + if (hasDerivedInfo() != other.hasDerivedInfo()) return false; + if (hasDerivedInfo()) { + if (!getDerivedInfo().equals(other.getDerivedInfo())) return false; + } + if (getSuspended() != other.getSuspended()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getExternalId().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + size_; + hash = (37 * hash) + HEADQUARTERS_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getHeadquartersAddress().hashCode(); + hash = (37 * hash) + HIRING_AGENCY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHiringAgency()); + hash = (37 * hash) + EEO_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getEeoText().hashCode(); + hash = (37 * hash) + WEBSITE_URI_FIELD_NUMBER; + hash = (53 * hash) + getWebsiteUri().hashCode(); + hash = (37 * hash) + CAREER_SITE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCareerSiteUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + if (getKeywordSearchableJobCustomAttributesCount() > 0) { + hash = (37 * hash) + KEYWORD_SEARCHABLE_JOB_CUSTOM_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getKeywordSearchableJobCustomAttributesList().hashCode(); + } + if (hasDerivedInfo()) { + hash = (37 * hash) + DERIVED_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDerivedInfo().hashCode(); + } + hash = (37 * hash) + SUSPENDED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuspended()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Company parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Company parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Company prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Company resource represents a company in the service. A company is the
+   * entity that owns job postings, that is, the hiring entity responsible for
+   * employing applicants for the job position.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Company} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Company) + com.google.cloud.talent.v4.CompanyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Company.class, + com.google.cloud.talent.v4.Company.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Company.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + externalId_ = ""; + + size_ = 0; + + headquartersAddress_ = ""; + + hiringAgency_ = false; + + eeoText_ = ""; + + websiteUri_ = ""; + + careerSiteUri_ = ""; + + imageUri_ = ""; + + keywordSearchableJobCustomAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (derivedInfoBuilder_ == null) { + derivedInfo_ = null; + } else { + derivedInfo_ = null; + derivedInfoBuilder_ = null; + } + suspended_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyProto + .internal_static_google_cloud_talent_v4_Company_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Company.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company build() { + com.google.cloud.talent.v4.Company result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company buildPartial() { + com.google.cloud.talent.v4.Company result = new com.google.cloud.talent.v4.Company(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.externalId_ = externalId_; + result.size_ = size_; + result.headquartersAddress_ = headquartersAddress_; + result.hiringAgency_ = hiringAgency_; + result.eeoText_ = eeoText_; + result.websiteUri_ = websiteUri_; + result.careerSiteUri_ = careerSiteUri_; + result.imageUri_ = imageUri_; + if (((bitField0_ & 0x00000001) != 0)) { + keywordSearchableJobCustomAttributes_ = + keywordSearchableJobCustomAttributes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.keywordSearchableJobCustomAttributes_ = keywordSearchableJobCustomAttributes_; + if (derivedInfoBuilder_ == null) { + result.derivedInfo_ = derivedInfo_; + } else { + result.derivedInfo_ = derivedInfoBuilder_.build(); + } + result.suspended_ = suspended_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Company) { + return mergeFrom((com.google.cloud.talent.v4.Company) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Company other) { + if (other == com.google.cloud.talent.v4.Company.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getExternalId().isEmpty()) { + externalId_ = other.externalId_; + onChanged(); + } + if (other.size_ != 0) { + setSizeValue(other.getSizeValue()); + } + if (!other.getHeadquartersAddress().isEmpty()) { + headquartersAddress_ = other.headquartersAddress_; + onChanged(); + } + if (other.getHiringAgency() != false) { + setHiringAgency(other.getHiringAgency()); + } + if (!other.getEeoText().isEmpty()) { + eeoText_ = other.eeoText_; + onChanged(); + } + if (!other.getWebsiteUri().isEmpty()) { + websiteUri_ = other.websiteUri_; + onChanged(); + } + if (!other.getCareerSiteUri().isEmpty()) { + careerSiteUri_ = other.careerSiteUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + if (!other.keywordSearchableJobCustomAttributes_.isEmpty()) { + if (keywordSearchableJobCustomAttributes_.isEmpty()) { + keywordSearchableJobCustomAttributes_ = other.keywordSearchableJobCustomAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKeywordSearchableJobCustomAttributesIsMutable(); + keywordSearchableJobCustomAttributes_.addAll(other.keywordSearchableJobCustomAttributes_); + } + onChanged(); + } + if (other.hasDerivedInfo()) { + mergeDerivedInfo(other.getDerivedInfo()); + } + if (other.getSuspended() != false) { + setSuspended(other.getSuspended()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Company parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Company) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required during company update.
+     * The resource name for a company. This is generated by the service when a
+     * company is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required during company update.
+     * The resource name for a company. This is generated by the service when a
+     * company is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required during company update.
+     * The resource name for a company. This is generated by the service when a
+     * company is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required during company update.
+     * The resource name for a company. This is generated by the service when a
+     * company is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required during company update.
+     * The resource name for a company. This is generated by the service when a
+     * company is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the company, for example, "Google LLC".
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the company, for example, "Google LLC".
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the company, for example, "Google LLC".
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the company, for example, "Google LLC".
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the company, for example, "Google LLC".
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalId_ = ""; + /** + * + * + *
+     * Required. Client side company identifier, used to uniquely identify the
+     * company.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Client side company identifier, used to uniquely identify the
+     * company.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Client side company identifier, used to uniquely identify the
+     * company.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Client side company identifier, used to uniquely identify the
+     * company.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExternalId() { + + externalId_ = getDefaultInstance().getExternalId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Client side company identifier, used to uniquely identify the
+     * company.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalId_ = value; + onChanged(); + return this; + } + + private int size_ = 0; + /** + * + * + *
+     * The employer's company size.
+     * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The enum numeric value on the wire for size. + */ + @java.lang.Override + public int getSizeValue() { + return size_; + } + /** + * + * + *
+     * The employer's company size.
+     * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @param value The enum numeric value on the wire for size to set. + * @return This builder for chaining. + */ + public Builder setSizeValue(int value) { + + size_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The employer's company size.
+     * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The size. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompanySize getSize() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompanySize result = + com.google.cloud.talent.v4.CompanySize.valueOf(size_); + return result == null ? com.google.cloud.talent.v4.CompanySize.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The employer's company size.
+     * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(com.google.cloud.talent.v4.CompanySize value) { + if (value == null) { + throw new NullPointerException(); + } + + size_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The employer's company size.
+     * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0; + onChanged(); + return this; + } + + private java.lang.Object headquartersAddress_ = ""; + /** + * + * + *
+     * The street address of the company's main headquarters, which may be
+     * different from the job location. The service attempts
+     * to geolocate the provided address, and populates a more specific
+     * location wherever possible in
+     * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+     * 
+ * + * string headquarters_address = 5; + * + * @return The headquartersAddress. + */ + public java.lang.String getHeadquartersAddress() { + java.lang.Object ref = headquartersAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headquartersAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The street address of the company's main headquarters, which may be
+     * different from the job location. The service attempts
+     * to geolocate the provided address, and populates a more specific
+     * location wherever possible in
+     * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+     * 
+ * + * string headquarters_address = 5; + * + * @return The bytes for headquartersAddress. + */ + public com.google.protobuf.ByteString getHeadquartersAddressBytes() { + java.lang.Object ref = headquartersAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + headquartersAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The street address of the company's main headquarters, which may be
+     * different from the job location. The service attempts
+     * to geolocate the provided address, and populates a more specific
+     * location wherever possible in
+     * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+     * 
+ * + * string headquarters_address = 5; + * + * @param value The headquartersAddress to set. + * @return This builder for chaining. + */ + public Builder setHeadquartersAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + headquartersAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The street address of the company's main headquarters, which may be
+     * different from the job location. The service attempts
+     * to geolocate the provided address, and populates a more specific
+     * location wherever possible in
+     * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+     * 
+ * + * string headquarters_address = 5; + * + * @return This builder for chaining. + */ + public Builder clearHeadquartersAddress() { + + headquartersAddress_ = getDefaultInstance().getHeadquartersAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The street address of the company's main headquarters, which may be
+     * different from the job location. The service attempts
+     * to geolocate the provided address, and populates a more specific
+     * location wherever possible in
+     * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+     * 
+ * + * string headquarters_address = 5; + * + * @param value The bytes for headquartersAddress to set. + * @return This builder for chaining. + */ + public Builder setHeadquartersAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + headquartersAddress_ = value; + onChanged(); + return this; + } + + private boolean hiringAgency_; + /** + * + * + *
+     * Set to true if it is the hiring agency that post jobs for other
+     * employers.
+     * Defaults to false if not provided.
+     * 
+ * + * bool hiring_agency = 6; + * + * @return The hiringAgency. + */ + @java.lang.Override + public boolean getHiringAgency() { + return hiringAgency_; + } + /** + * + * + *
+     * Set to true if it is the hiring agency that post jobs for other
+     * employers.
+     * Defaults to false if not provided.
+     * 
+ * + * bool hiring_agency = 6; + * + * @param value The hiringAgency to set. + * @return This builder for chaining. + */ + public Builder setHiringAgency(boolean value) { + + hiringAgency_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to true if it is the hiring agency that post jobs for other
+     * employers.
+     * Defaults to false if not provided.
+     * 
+ * + * bool hiring_agency = 6; + * + * @return This builder for chaining. + */ + public Builder clearHiringAgency() { + + hiringAgency_ = false; + onChanged(); + return this; + } + + private java.lang.Object eeoText_ = ""; + /** + * + * + *
+     * Equal Employment Opportunity legal disclaimer text to be
+     * associated with all jobs, and typically to be displayed in all
+     * roles.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string eeo_text = 7; + * + * @return The eeoText. + */ + public java.lang.String getEeoText() { + java.lang.Object ref = eeoText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eeoText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Equal Employment Opportunity legal disclaimer text to be
+     * associated with all jobs, and typically to be displayed in all
+     * roles.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string eeo_text = 7; + * + * @return The bytes for eeoText. + */ + public com.google.protobuf.ByteString getEeoTextBytes() { + java.lang.Object ref = eeoText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eeoText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Equal Employment Opportunity legal disclaimer text to be
+     * associated with all jobs, and typically to be displayed in all
+     * roles.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string eeo_text = 7; + * + * @param value The eeoText to set. + * @return This builder for chaining. + */ + public Builder setEeoText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + eeoText_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Equal Employment Opportunity legal disclaimer text to be
+     * associated with all jobs, and typically to be displayed in all
+     * roles.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string eeo_text = 7; + * + * @return This builder for chaining. + */ + public Builder clearEeoText() { + + eeoText_ = getDefaultInstance().getEeoText(); + onChanged(); + return this; + } + /** + * + * + *
+     * Equal Employment Opportunity legal disclaimer text to be
+     * associated with all jobs, and typically to be displayed in all
+     * roles.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string eeo_text = 7; + * + * @param value The bytes for eeoText to set. + * @return This builder for chaining. + */ + public Builder setEeoTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + eeoText_ = value; + onChanged(); + return this; + } + + private java.lang.Object websiteUri_ = ""; + /** + * + * + *
+     * The URI representing the company's primary web site or home page,
+     * for example, "https://www.google.com".
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string website_uri = 8; + * + * @return The websiteUri. + */ + public java.lang.String getWebsiteUri() { + java.lang.Object ref = websiteUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + websiteUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI representing the company's primary web site or home page,
+     * for example, "https://www.google.com".
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string website_uri = 8; + * + * @return The bytes for websiteUri. + */ + public com.google.protobuf.ByteString getWebsiteUriBytes() { + java.lang.Object ref = websiteUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + websiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI representing the company's primary web site or home page,
+     * for example, "https://www.google.com".
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string website_uri = 8; + * + * @param value The websiteUri to set. + * @return This builder for chaining. + */ + public Builder setWebsiteUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + websiteUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI representing the company's primary web site or home page,
+     * for example, "https://www.google.com".
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string website_uri = 8; + * + * @return This builder for chaining. + */ + public Builder clearWebsiteUri() { + + websiteUri_ = getDefaultInstance().getWebsiteUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI representing the company's primary web site or home page,
+     * for example, "https://www.google.com".
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string website_uri = 8; + * + * @param value The bytes for websiteUri to set. + * @return This builder for chaining. + */ + public Builder setWebsiteUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + websiteUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object careerSiteUri_ = ""; + /** + * + * + *
+     * The URI to employer's career site or careers page on the employer's web
+     * site, for example, "https://careers.google.com".
+     * 
+ * + * string career_site_uri = 9; + * + * @return The careerSiteUri. + */ + public java.lang.String getCareerSiteUri() { + java.lang.Object ref = careerSiteUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + careerSiteUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI to employer's career site or careers page on the employer's web
+     * site, for example, "https://careers.google.com".
+     * 
+ * + * string career_site_uri = 9; + * + * @return The bytes for careerSiteUri. + */ + public com.google.protobuf.ByteString getCareerSiteUriBytes() { + java.lang.Object ref = careerSiteUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + careerSiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI to employer's career site or careers page on the employer's web
+     * site, for example, "https://careers.google.com".
+     * 
+ * + * string career_site_uri = 9; + * + * @param value The careerSiteUri to set. + * @return This builder for chaining. + */ + public Builder setCareerSiteUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + careerSiteUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to employer's career site or careers page on the employer's web
+     * site, for example, "https://careers.google.com".
+     * 
+ * + * string career_site_uri = 9; + * + * @return This builder for chaining. + */ + public Builder clearCareerSiteUri() { + + careerSiteUri_ = getDefaultInstance().getCareerSiteUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to employer's career site or careers page on the employer's web
+     * site, for example, "https://careers.google.com".
+     * 
+ * + * string career_site_uri = 9; + * + * @param value The bytes for careerSiteUri to set. + * @return This builder for chaining. + */ + public Builder setCareerSiteUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + careerSiteUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * A URI that hosts the employer's company logo.
+     * 
+ * + * string image_uri = 10; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A URI that hosts the employer's company logo.
+     * 
+ * + * string image_uri = 10; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A URI that hosts the employer's company logo.
+     * 
+ * + * string image_uri = 10; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A URI that hosts the employer's company logo.
+     * 
+ * + * string image_uri = 10; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * A URI that hosts the employer's company logo.
+     * 
+ * + * string image_uri = 10; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList keywordSearchableJobCustomAttributes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureKeywordSearchableJobCustomAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + keywordSearchableJobCustomAttributes_ = + new com.google.protobuf.LazyStringArrayList(keywordSearchableJobCustomAttributes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return A list containing the keywordSearchableJobCustomAttributes. + */ + public com.google.protobuf.ProtocolStringList getKeywordSearchableJobCustomAttributesList() { + return keywordSearchableJobCustomAttributes_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return The count of keywordSearchableJobCustomAttributes. + */ + public int getKeywordSearchableJobCustomAttributesCount() { + return keywordSearchableJobCustomAttributes_.size(); + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the element to return. + * @return The keywordSearchableJobCustomAttributes at the given index. + */ + public java.lang.String getKeywordSearchableJobCustomAttributes(int index) { + return keywordSearchableJobCustomAttributes_.get(index); + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the keywordSearchableJobCustomAttributes at the given index. + */ + public com.google.protobuf.ByteString getKeywordSearchableJobCustomAttributesBytes(int index) { + return keywordSearchableJobCustomAttributes_.getByteString(index); + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index to set the value at. + * @param value The keywordSearchableJobCustomAttributes to set. + * @return This builder for chaining. + */ + public Builder setKeywordSearchableJobCustomAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeywordSearchableJobCustomAttributesIsMutable(); + keywordSearchableJobCustomAttributes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param value The keywordSearchableJobCustomAttributes to add. + * @return This builder for chaining. + */ + public Builder addKeywordSearchableJobCustomAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeywordSearchableJobCustomAttributesIsMutable(); + keywordSearchableJobCustomAttributes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param values The keywordSearchableJobCustomAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllKeywordSearchableJobCustomAttributes( + java.lang.Iterable values) { + ensureKeywordSearchableJobCustomAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, keywordSearchableJobCustomAttributes_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return This builder for chaining. + */ + public Builder clearKeywordSearchableJobCustomAttributes() { + keywordSearchableJobCustomAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of keys of filterable
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+     * whose corresponding `string_values` are used in keyword searches. Jobs with
+     * `string_values` under these specified field keys are returned if any
+     * of the values match the search keyword. Custom field values with
+     * parenthesis, brackets and special symbols are not searchable as-is,
+     * and those keyword queries must be surrounded by quotes.
+     * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param value The bytes of the keywordSearchableJobCustomAttributes to add. + * @return This builder for chaining. + */ + public Builder addKeywordSearchableJobCustomAttributesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureKeywordSearchableJobCustomAttributesIsMutable(); + keywordSearchableJobCustomAttributes_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Company.DerivedInfo derivedInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company.DerivedInfo, + com.google.cloud.talent.v4.Company.DerivedInfo.Builder, + com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder> + derivedInfoBuilder_; + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + public boolean hasDerivedInfo() { + return derivedInfoBuilder_ != null || derivedInfo_ != null; + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + public com.google.cloud.talent.v4.Company.DerivedInfo getDerivedInfo() { + if (derivedInfoBuilder_ == null) { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Company.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } else { + return derivedInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedInfo(com.google.cloud.talent.v4.Company.DerivedInfo value) { + if (derivedInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedInfo_ = value; + onChanged(); + } else { + derivedInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedInfo( + com.google.cloud.talent.v4.Company.DerivedInfo.Builder builderForValue) { + if (derivedInfoBuilder_ == null) { + derivedInfo_ = builderForValue.build(); + onChanged(); + } else { + derivedInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDerivedInfo(com.google.cloud.talent.v4.Company.DerivedInfo value) { + if (derivedInfoBuilder_ == null) { + if (derivedInfo_ != null) { + derivedInfo_ = + com.google.cloud.talent.v4.Company.DerivedInfo.newBuilder(derivedInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + derivedInfo_ = value; + } + onChanged(); + } else { + derivedInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDerivedInfo() { + if (derivedInfoBuilder_ == null) { + derivedInfo_ = null; + onChanged(); + } else { + derivedInfo_ = null; + derivedInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.Company.DerivedInfo.Builder getDerivedInfoBuilder() { + + onChanged(); + return getDerivedInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder getDerivedInfoOrBuilder() { + if (derivedInfoBuilder_ != null) { + return derivedInfoBuilder_.getMessageOrBuilder(); + } else { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Company.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } + } + /** + * + * + *
+     * Output only. Derived details about the company.
+     * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company.DerivedInfo, + com.google.cloud.talent.v4.Company.DerivedInfo.Builder, + com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder> + getDerivedInfoFieldBuilder() { + if (derivedInfoBuilder_ == null) { + derivedInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company.DerivedInfo, + com.google.cloud.talent.v4.Company.DerivedInfo.Builder, + com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder>( + getDerivedInfo(), getParentForChildren(), isClean()); + derivedInfo_ = null; + } + return derivedInfoBuilder_; + } + + private boolean suspended_; + /** + * + * + *
+     * Output only. Indicates whether a company is flagged to be suspended from
+     * public availability by the service when job content appears suspicious,
+     * abusive, or spammy.
+     * 
+ * + * bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + /** + * + * + *
+     * Output only. Indicates whether a company is flagged to be suspended from
+     * public availability by the service when job content appears suspicious,
+     * abusive, or spammy.
+     * 
+ * + * bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The suspended to set. + * @return This builder for chaining. + */ + public Builder setSuspended(boolean value) { + + suspended_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates whether a company is flagged to be suspended from
+     * public availability by the service when job content appears suspicious,
+     * abusive, or spammy.
+     * 
+ * + * bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSuspended() { + + suspended_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Company) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Company) + private static final com.google.cloud.talent.v4.Company DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Company(); + } + + public static com.google.cloud.talent.v4.Company getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Company parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Company(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Company getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyName.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyName.java new file mode 100644 index 00000000..7dea2dec --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyName.java @@ -0,0 +1,210 @@ +/* + * Copyright 2020 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class CompanyName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/tenants/{tenant}/companies/{company}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String tenant; + private final String company; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getCompany() { + return company; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private CompanyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + tenant = Preconditions.checkNotNull(builder.getTenant()); + company = Preconditions.checkNotNull(builder.getCompany()); + } + + public static CompanyName of(String project, String tenant, String company) { + return newBuilder().setProject(project).setTenant(tenant).setCompany(company).build(); + } + + public static String format(String project, String tenant, String company) { + return newBuilder() + .setProject(project) + .setTenant(tenant) + .setCompany(company) + .build() + .toString(); + } + + public static CompanyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "CompanyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("company")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (CompanyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("tenant", tenant); + fieldMapBuilder.put("company", company); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "company", company); + } + + /** Builder for CompanyName. */ + public static class Builder { + + private String project; + private String tenant; + private String company; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getCompany() { + return company; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTenant(String tenant) { + this.tenant = tenant; + return this; + } + + public Builder setCompany(String company) { + this.company = company; + return this; + } + + private Builder() {} + + private Builder(CompanyName companyName) { + project = companyName.project; + tenant = companyName.tenant; + company = companyName.company; + } + + public CompanyName build() { + return new CompanyName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof CompanyName) { + CompanyName that = (CompanyName) o; + return (this.project.equals(that.project)) + && (this.tenant.equals(that.tenant)) + && (this.company.equals(that.company)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= tenant.hashCode(); + h *= 1000003; + h ^= company.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyOrBuilder.java new file mode 100644 index 00000000..084ae6e5 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyOrBuilder.java @@ -0,0 +1,430 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company.proto + +package com.google.cloud.talent.v4; + +public interface CompanyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Company) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required during company update.
+   * The resource name for a company. This is generated by the service when a
+   * company is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required during company update.
+   * The resource name for a company. This is generated by the service when a
+   * company is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the company, for example, "Google LLC".
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the company, for example, "Google LLC".
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Client side company identifier, used to uniquely identify the
+   * company.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + java.lang.String getExternalId(); + /** + * + * + *
+   * Required. Client side company identifier, used to uniquely identify the
+   * company.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + com.google.protobuf.ByteString getExternalIdBytes(); + + /** + * + * + *
+   * The employer's company size.
+   * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The enum numeric value on the wire for size. + */ + int getSizeValue(); + /** + * + * + *
+   * The employer's company size.
+   * 
+ * + * .google.cloud.talent.v4.CompanySize size = 4; + * + * @return The size. + */ + com.google.cloud.talent.v4.CompanySize getSize(); + + /** + * + * + *
+   * The street address of the company's main headquarters, which may be
+   * different from the job location. The service attempts
+   * to geolocate the provided address, and populates a more specific
+   * location wherever possible in
+   * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+   * 
+ * + * string headquarters_address = 5; + * + * @return The headquartersAddress. + */ + java.lang.String getHeadquartersAddress(); + /** + * + * + *
+   * The street address of the company's main headquarters, which may be
+   * different from the job location. The service attempts
+   * to geolocate the provided address, and populates a more specific
+   * location wherever possible in
+   * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location].
+   * 
+ * + * string headquarters_address = 5; + * + * @return The bytes for headquartersAddress. + */ + com.google.protobuf.ByteString getHeadquartersAddressBytes(); + + /** + * + * + *
+   * Set to true if it is the hiring agency that post jobs for other
+   * employers.
+   * Defaults to false if not provided.
+   * 
+ * + * bool hiring_agency = 6; + * + * @return The hiringAgency. + */ + boolean getHiringAgency(); + + /** + * + * + *
+   * Equal Employment Opportunity legal disclaimer text to be
+   * associated with all jobs, and typically to be displayed in all
+   * roles.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string eeo_text = 7; + * + * @return The eeoText. + */ + java.lang.String getEeoText(); + /** + * + * + *
+   * Equal Employment Opportunity legal disclaimer text to be
+   * associated with all jobs, and typically to be displayed in all
+   * roles.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string eeo_text = 7; + * + * @return The bytes for eeoText. + */ + com.google.protobuf.ByteString getEeoTextBytes(); + + /** + * + * + *
+   * The URI representing the company's primary web site or home page,
+   * for example, "https://www.google.com".
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string website_uri = 8; + * + * @return The websiteUri. + */ + java.lang.String getWebsiteUri(); + /** + * + * + *
+   * The URI representing the company's primary web site or home page,
+   * for example, "https://www.google.com".
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string website_uri = 8; + * + * @return The bytes for websiteUri. + */ + com.google.protobuf.ByteString getWebsiteUriBytes(); + + /** + * + * + *
+   * The URI to employer's career site or careers page on the employer's web
+   * site, for example, "https://careers.google.com".
+   * 
+ * + * string career_site_uri = 9; + * + * @return The careerSiteUri. + */ + java.lang.String getCareerSiteUri(); + /** + * + * + *
+   * The URI to employer's career site or careers page on the employer's web
+   * site, for example, "https://careers.google.com".
+   * 
+ * + * string career_site_uri = 9; + * + * @return The bytes for careerSiteUri. + */ + com.google.protobuf.ByteString getCareerSiteUriBytes(); + + /** + * + * + *
+   * A URI that hosts the employer's company logo.
+   * 
+ * + * string image_uri = 10; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * A URI that hosts the employer's company logo.
+   * 
+ * + * string image_uri = 10; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return A list containing the keywordSearchableJobCustomAttributes. + */ + java.util.List getKeywordSearchableJobCustomAttributesList(); + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @return The count of keywordSearchableJobCustomAttributes. + */ + int getKeywordSearchableJobCustomAttributesCount(); + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the element to return. + * @return The keywordSearchableJobCustomAttributes at the given index. + */ + java.lang.String getKeywordSearchableJobCustomAttributes(int index); + /** + * + * + *
+   * A list of keys of filterable
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes],
+   * whose corresponding `string_values` are used in keyword searches. Jobs with
+   * `string_values` under these specified field keys are returned if any
+   * of the values match the search keyword. Custom field values with
+   * parenthesis, brackets and special symbols are not searchable as-is,
+   * and those keyword queries must be surrounded by quotes.
+   * 
+ * + * repeated string keyword_searchable_job_custom_attributes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the keywordSearchableJobCustomAttributes at the given index. + */ + com.google.protobuf.ByteString getKeywordSearchableJobCustomAttributesBytes(int index); + + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + boolean hasDerivedInfo(); + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + com.google.cloud.talent.v4.Company.DerivedInfo getDerivedInfo(); + /** + * + * + *
+   * Output only. Derived details about the company.
+   * 
+ * + * + * .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.talent.v4.Company.DerivedInfoOrBuilder getDerivedInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Indicates whether a company is flagged to be suspended from
+   * public availability by the service when job content appears suspicious,
+   * abusive, or spammy.
+   * 
+ * + * bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The suspended. + */ + boolean getSuspended(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyProto.java new file mode 100644 index 00000000..385ed0e8 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyProto.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company.proto + +package com.google.cloud.talent.v4; + +public final class CompanyProto { + private CompanyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Company_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Company_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Company_DerivedInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Company_DerivedInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n$google/cloud/talent/v4/company.proto\022\026" + + "google.cloud.talent.v4\032\034google/api/annot" + + "ations.proto\032\037google/api/field_behavior." + + "proto\032\031google/api/resource.proto\032#google" + + "/cloud/talent/v4/common.proto\"\304\004\n\007Compan" + + "y\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340" + + "A\002\022\030\n\013external_id\030\003 \001(\tB\003\340A\002\0221\n\004size\030\004 \001" + + "(\0162#.google.cloud.talent.v4.CompanySize\022" + + "\034\n\024headquarters_address\030\005 \001(\t\022\025\n\rhiring_" + + "agency\030\006 \001(\010\022\020\n\010eeo_text\030\007 \001(\t\022\023\n\013websit" + + "e_uri\030\010 \001(\t\022\027\n\017career_site_uri\030\t \001(\t\022\021\n\t" + + "image_uri\030\n \001(\t\0220\n(keyword_searchable_jo" + + "b_custom_attributes\030\013 \003(\t\022F\n\014derived_inf" + + "o\030\014 \001(\0132+.google.cloud.talent.v4.Company" + + ".DerivedInfoB\003\340A\003\022\026\n\tsuspended\030\r \001(\010B\003\340A" + + "\003\032N\n\013DerivedInfo\022?\n\025headquarters_locatio" + + "n\030\001 \001(\0132 .google.cloud.talent.v4.Locatio" + + "n:Y\352AV\n\033jobs.googleapis.com/Company\0227pro" + + "jects/{project}/tenants/{tenant}/compani" + + "es/{company}Bp\n\032com.google.cloud.talent." + + "v4B\014CompanyProtoP\001Z23/v4/{company.name=projects/*/te" + + "nants/*/companies/*}:\007company\332A\023company," + + "update_mask\022\221\001\n\rDeleteCompany\022,.google.c" + + "loud.talent.v4.DeleteCompanyRequest\032\026.go" + + "ogle.protobuf.Empty\":\202\323\344\223\002-*+/v4/{name=p" + + "rojects/*/tenants/*/companies/*}\332A\004name\022" + + "\252\001\n\rListCompanies\022,.google.cloud.talent." + + "v4.ListCompaniesRequest\032-.google.cloud.t" + + "alent.v4.ListCompaniesResponse\"<\202\323\344\223\002-\022+" + + "/v4/{parent=projects/*/tenants/*}/compan" + + "ies\332A\006parent\032l\312A\023jobs.googleapis.com\322ASh" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform,https://www.googleapis.com/auth/jo" + + "bsBw\n\032com.google.cloud.talent.v4B\023Compan" + + "yServiceProtoP\001Z + * An enum that represents the size of the company. + * + * + * Protobuf enum {@code google.cloud.talent.v4.CompanySize} + */ +public enum CompanySize implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value if the size isn't specified.
+   * 
+ * + * COMPANY_SIZE_UNSPECIFIED = 0; + */ + COMPANY_SIZE_UNSPECIFIED(0), + /** + * + * + *
+   * The company has less than 50 employees.
+   * 
+ * + * MINI = 1; + */ + MINI(1), + /** + * + * + *
+   * The company has between 50 and 99 employees.
+   * 
+ * + * SMALL = 2; + */ + SMALL(2), + /** + * + * + *
+   * The company has between 100 and 499 employees.
+   * 
+ * + * SMEDIUM = 3; + */ + SMEDIUM(3), + /** + * + * + *
+   * The company has between 500 and 999 employees.
+   * 
+ * + * MEDIUM = 4; + */ + MEDIUM(4), + /** + * + * + *
+   * The company has between 1,000 and 4,999 employees.
+   * 
+ * + * BIG = 5; + */ + BIG(5), + /** + * + * + *
+   * The company has between 5,000 and 9,999 employees.
+   * 
+ * + * BIGGER = 6; + */ + BIGGER(6), + /** + * + * + *
+   * The company has 10,000 or more employees.
+   * 
+ * + * GIANT = 7; + */ + GIANT(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value if the size isn't specified.
+   * 
+ * + * COMPANY_SIZE_UNSPECIFIED = 0; + */ + public static final int COMPANY_SIZE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The company has less than 50 employees.
+   * 
+ * + * MINI = 1; + */ + public static final int MINI_VALUE = 1; + /** + * + * + *
+   * The company has between 50 and 99 employees.
+   * 
+ * + * SMALL = 2; + */ + public static final int SMALL_VALUE = 2; + /** + * + * + *
+   * The company has between 100 and 499 employees.
+   * 
+ * + * SMEDIUM = 3; + */ + public static final int SMEDIUM_VALUE = 3; + /** + * + * + *
+   * The company has between 500 and 999 employees.
+   * 
+ * + * MEDIUM = 4; + */ + public static final int MEDIUM_VALUE = 4; + /** + * + * + *
+   * The company has between 1,000 and 4,999 employees.
+   * 
+ * + * BIG = 5; + */ + public static final int BIG_VALUE = 5; + /** + * + * + *
+   * The company has between 5,000 and 9,999 employees.
+   * 
+ * + * BIGGER = 6; + */ + public static final int BIGGER_VALUE = 6; + /** + * + * + *
+   * The company has 10,000 or more employees.
+   * 
+ * + * GIANT = 7; + */ + public static final int GIANT_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompanySize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompanySize forNumber(int value) { + switch (value) { + case 0: + return COMPANY_SIZE_UNSPECIFIED; + case 1: + return MINI; + case 2: + return SMALL; + case 3: + return SMEDIUM; + case 4: + return MEDIUM; + case 5: + return BIG; + case 6: + return BIGGER; + case 7: + return GIANT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompanySize findValueByNumber(int number) { + return CompanySize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(0); + } + + private static final CompanySize[] VALUES = values(); + + public static CompanySize valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompanySize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompanySize) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilter.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilter.java new file mode 100644 index 00000000..6f464999 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilter.java @@ -0,0 +1,1708 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Filter on job compensation type and amount.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationFilter} + */ +public final class CompensationFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompensationFilter) + CompensationFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompensationFilter.newBuilder() to construct. + private CompensationFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompensationFilter() { + type_ = 0; + units_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompensationFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompensationFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + units_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + units_.add(rawValue); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + units_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + units_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 26: + { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder subBuilder = + null; + if (range_ != null) { + subBuilder = range_.toBuilder(); + } + range_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(range_); + range_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + includeJobsWithUnspecifiedCompensationRange_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + units_ = java.util.Collections.unmodifiableList(units_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CompensationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CompensationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationFilter.class, + com.google.cloud.talent.v4.CompensationFilter.Builder.class); + } + + /** + * + * + *
+   * Specify the type of filtering.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CompensationFilter.FilterType} + */ + public enum FilterType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Filter type unspecified. Position holder, INVALID, should never be used.
+     * 
+ * + * FILTER_TYPE_UNSPECIFIED = 0; + */ + FILTER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Filter by `base compensation entry's` unit. A job is a match if and
+     * only if the job contains a base CompensationEntry and the base
+     * CompensationEntry's unit matches provided
+     * [units][google.cloud.talent.v4.CompensationFilter.units]. Populate one or
+     * more [units][google.cloud.talent.v4.CompensationFilter.units].
+     * See
+     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for definition of base compensation entry.
+     * 
+ * + * UNIT_ONLY = 1; + */ + UNIT_ONLY(1), + /** + * + * + *
+     * Filter by `base compensation entry's` unit and amount / range. A job
+     * is a match if and only if the job contains a base CompensationEntry, and
+     * the base entry's unit matches provided
+     * [CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]
+     * and amount or range overlaps with provided
+     * [CompensationRange][google.cloud.talent.v4.CompensationInfo.CompensationRange].
+     * See
+     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for definition of base compensation entry.
+     * Set exactly one [units][google.cloud.talent.v4.CompensationFilter.units]
+     * and populate [range][google.cloud.talent.v4.CompensationFilter.range].
+     * 
+ * + * UNIT_AND_AMOUNT = 2; + */ + UNIT_AND_AMOUNT(2), + /** + * + * + *
+     * Filter by annualized base compensation amount and `base compensation
+     * entry's` unit. Populate
+     * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more
+     * [units][google.cloud.talent.v4.CompensationFilter.units].
+     * 
+ * + * ANNUALIZED_BASE_AMOUNT = 3; + */ + ANNUALIZED_BASE_AMOUNT(3), + /** + * + * + *
+     * Filter by annualized total compensation amount and `base compensation
+     * entry's` unit . Populate
+     * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more
+     * [units][google.cloud.talent.v4.CompensationFilter.units].
+     * 
+ * + * ANNUALIZED_TOTAL_AMOUNT = 4; + */ + ANNUALIZED_TOTAL_AMOUNT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Filter type unspecified. Position holder, INVALID, should never be used.
+     * 
+ * + * FILTER_TYPE_UNSPECIFIED = 0; + */ + public static final int FILTER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Filter by `base compensation entry's` unit. A job is a match if and
+     * only if the job contains a base CompensationEntry and the base
+     * CompensationEntry's unit matches provided
+     * [units][google.cloud.talent.v4.CompensationFilter.units]. Populate one or
+     * more [units][google.cloud.talent.v4.CompensationFilter.units].
+     * See
+     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for definition of base compensation entry.
+     * 
+ * + * UNIT_ONLY = 1; + */ + public static final int UNIT_ONLY_VALUE = 1; + /** + * + * + *
+     * Filter by `base compensation entry's` unit and amount / range. A job
+     * is a match if and only if the job contains a base CompensationEntry, and
+     * the base entry's unit matches provided
+     * [CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]
+     * and amount or range overlaps with provided
+     * [CompensationRange][google.cloud.talent.v4.CompensationInfo.CompensationRange].
+     * See
+     * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for definition of base compensation entry.
+     * Set exactly one [units][google.cloud.talent.v4.CompensationFilter.units]
+     * and populate [range][google.cloud.talent.v4.CompensationFilter.range].
+     * 
+ * + * UNIT_AND_AMOUNT = 2; + */ + public static final int UNIT_AND_AMOUNT_VALUE = 2; + /** + * + * + *
+     * Filter by annualized base compensation amount and `base compensation
+     * entry's` unit. Populate
+     * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more
+     * [units][google.cloud.talent.v4.CompensationFilter.units].
+     * 
+ * + * ANNUALIZED_BASE_AMOUNT = 3; + */ + public static final int ANNUALIZED_BASE_AMOUNT_VALUE = 3; + /** + * + * + *
+     * Filter by annualized total compensation amount and `base compensation
+     * entry's` unit . Populate
+     * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more
+     * [units][google.cloud.talent.v4.CompensationFilter.units].
+     * 
+ * + * ANNUALIZED_TOTAL_AMOUNT = 4; + */ + public static final int ANNUALIZED_TOTAL_AMOUNT_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FilterType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FilterType forNumber(int value) { + switch (value) { + case 0: + return FILTER_TYPE_UNSPECIFIED; + case 1: + return UNIT_ONLY; + case 2: + return UNIT_AND_AMOUNT; + case 3: + return ANNUALIZED_BASE_AMOUNT; + case 4: + return ANNUALIZED_TOTAL_AMOUNT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FilterType findValueByNumber(int number) { + return FilterType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CompensationFilter.getDescriptor().getEnumTypes().get(0); + } + + private static final FilterType[] VALUES = values(); + + public static FilterType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FilterType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompensationFilter.FilterType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Required. Type of filter.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Type of filter.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter.FilterType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationFilter.FilterType result = + com.google.cloud.talent.v4.CompensationFilter.FilterType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompensationFilter.FilterType.UNRECOGNIZED + : result; + } + + public static final int UNITS_FIELD_NUMBER = 2; + private java.util.List units_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.CompensationInfo.CompensationUnit> + units_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.CompensationInfo.CompensationUnit>() { + public com.google.cloud.talent.v4.CompensationInfo.CompensationUnit convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit result = + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.valueOf(from); + return result == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the units. + */ + @java.lang.Override + public java.util.List + getUnitsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.CompensationInfo.CompensationUnit>( + units_, units_converter_); + } + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of units. + */ + @java.lang.Override + public int getUnitsCount() { + return units_.size(); + } + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The units at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnits(int index) { + return units_converter_.convert(units_.get(index)); + } + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for units. + */ + @java.lang.Override + public java.util.List getUnitsValueList() { + return units_; + } + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of units at the given index. + */ + @java.lang.Override + public int getUnitsValue(int index) { + return units_.get(index); + } + + private int unitsMemoizedSerializedSize; + + public static final int RANGE_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange range_; + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return range_ != null; + } + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange() { + return range_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : range_; + } + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getRangeOrBuilder() { + return getRange(); + } + + public static final int INCLUDE_JOBS_WITH_UNSPECIFIED_COMPENSATION_RANGE_FIELD_NUMBER = 4; + private boolean includeJobsWithUnspecifiedCompensationRange_; + /** + * + * + *
+   * If set to true, jobs with unspecified compensation range fields are
+   * included.
+   * 
+ * + * bool include_jobs_with_unspecified_compensation_range = 4; + * + * @return The includeJobsWithUnspecifiedCompensationRange. + */ + @java.lang.Override + public boolean getIncludeJobsWithUnspecifiedCompensationRange() { + return includeJobsWithUnspecifiedCompensationRange_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (type_ + != com.google.cloud.talent.v4.CompensationFilter.FilterType.FILTER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (getUnitsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(unitsMemoizedSerializedSize); + } + for (int i = 0; i < units_.size(); i++) { + output.writeEnumNoTag(units_.get(i)); + } + if (range_ != null) { + output.writeMessage(3, getRange()); + } + if (includeJobsWithUnspecifiedCompensationRange_ != false) { + output.writeBool(4, includeJobsWithUnspecifiedCompensationRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.talent.v4.CompensationFilter.FilterType.FILTER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + { + int dataSize = 0; + for (int i = 0; i < units_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(units_.get(i)); + } + size += dataSize; + if (!getUnitsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + unitsMemoizedSerializedSize = dataSize; + } + if (range_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRange()); + } + if (includeJobsWithUnspecifiedCompensationRange_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, includeJobsWithUnspecifiedCompensationRange_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompensationFilter)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompensationFilter other = + (com.google.cloud.talent.v4.CompensationFilter) obj; + + if (type_ != other.type_) return false; + if (!units_.equals(other.units_)) return false; + if (hasRange() != other.hasRange()) return false; + if (hasRange()) { + if (!getRange().equals(other.getRange())) return false; + } + if (getIncludeJobsWithUnspecifiedCompensationRange() + != other.getIncludeJobsWithUnspecifiedCompensationRange()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (getUnitsCount() > 0) { + hash = (37 * hash) + UNITS_FIELD_NUMBER; + hash = (53 * hash) + units_.hashCode(); + } + if (hasRange()) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + } + hash = (37 * hash) + INCLUDE_JOBS_WITH_UNSPECIFIED_COMPENSATION_RANGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean( + getIncludeJobsWithUnspecifiedCompensationRange()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CompensationFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Filter on job compensation type and amount.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompensationFilter) + com.google.cloud.talent.v4.CompensationFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CompensationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CompensationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationFilter.class, + com.google.cloud.talent.v4.CompensationFilter.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompensationFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + units_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (rangeBuilder_ == null) { + range_ = null; + } else { + range_ = null; + rangeBuilder_ = null; + } + includeJobsWithUnspecifiedCompensationRange_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_CompensationFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompensationFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter build() { + com.google.cloud.talent.v4.CompensationFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter buildPartial() { + com.google.cloud.talent.v4.CompensationFilter result = + new com.google.cloud.talent.v4.CompensationFilter(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + if (((bitField0_ & 0x00000001) != 0)) { + units_ = java.util.Collections.unmodifiableList(units_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.units_ = units_; + if (rangeBuilder_ == null) { + result.range_ = range_; + } else { + result.range_ = rangeBuilder_.build(); + } + result.includeJobsWithUnspecifiedCompensationRange_ = + includeJobsWithUnspecifiedCompensationRange_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompensationFilter) { + return mergeFrom((com.google.cloud.talent.v4.CompensationFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CompensationFilter other) { + if (other == com.google.cloud.talent.v4.CompensationFilter.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.units_.isEmpty()) { + if (units_.isEmpty()) { + units_ = other.units_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUnitsIsMutable(); + units_.addAll(other.units_); + } + onChanged(); + } + if (other.hasRange()) { + mergeRange(other.getRange()); + } + if (other.getIncludeJobsWithUnspecifiedCompensationRange() != false) { + setIncludeJobsWithUnspecifiedCompensationRange( + other.getIncludeJobsWithUnspecifiedCompensationRange()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompensationFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CompensationFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+     * Required. Type of filter.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Type of filter.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of filter.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter.FilterType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationFilter.FilterType result = + com.google.cloud.talent.v4.CompensationFilter.FilterType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompensationFilter.FilterType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Type of filter.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.talent.v4.CompensationFilter.FilterType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of filter.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.util.List units_ = java.util.Collections.emptyList(); + + private void ensureUnitsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + units_ = new java.util.ArrayList(units_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the units. + */ + public java.util.List + getUnitsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.CompensationInfo.CompensationUnit>( + units_, units_converter_); + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of units. + */ + public int getUnitsCount() { + return units_.size(); + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The units at the given index. + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnits(int index) { + return units_converter_.convert(units_.get(index)); + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The units to set. + * @return This builder for chaining. + */ + public Builder setUnits( + int index, com.google.cloud.talent.v4.CompensationInfo.CompensationUnit value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnitsIsMutable(); + units_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The units to add. + * @return This builder for chaining. + */ + public Builder addUnits(com.google.cloud.talent.v4.CompensationInfo.CompensationUnit value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnitsIsMutable(); + units_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The units to add. + * @return This builder for chaining. + */ + public Builder addAllUnits( + java.lang.Iterable + values) { + ensureUnitsIsMutable(); + for (com.google.cloud.talent.v4.CompensationInfo.CompensationUnit value : values) { + units_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearUnits() { + units_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for units. + */ + public java.util.List getUnitsValueList() { + return java.util.Collections.unmodifiableList(units_); + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of units at the given index. + */ + public int getUnitsValue(int index) { + return units_.get(index); + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of units at the given index. + * @return This builder for chaining. + */ + public Builder setUnitsValue(int index, int value) { + ensureUnitsIsMutable(); + units_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for units to add. + * @return This builder for chaining. + */ + public Builder addUnitsValue(int value) { + ensureUnitsIsMutable(); + units_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Specify desired `base compensation entry's`
+     * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for units to add. + * @return This builder for chaining. + */ + public Builder addAllUnitsValue(java.lang.Iterable values) { + ensureUnitsIsMutable(); + for (int value : values) { + units_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange range_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + rangeBuilder_; + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return Whether the range field is set. + */ + public boolean hasRange() { + return rangeBuilder_ != null || range_ != null; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return The range. + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange() { + if (rangeBuilder_ == null) { + return range_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : range_; + } else { + return rangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public Builder setRange(com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + onChanged(); + } else { + rangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public Builder setRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder builderForValue) { + if (rangeBuilder_ == null) { + range_ = builderForValue.build(); + onChanged(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public Builder mergeRange(com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (rangeBuilder_ == null) { + if (range_ != null) { + range_ = + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.newBuilder(range_) + .mergeFrom(value) + .buildPartial(); + } else { + range_ = value; + } + onChanged(); + } else { + rangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + range_ = null; + onChanged(); + } else { + range_ = null; + rangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder getRangeBuilder() { + + onChanged(); + return getRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getRangeOrBuilder() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + return range_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : range_; + } + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder>( + getRange(), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private boolean includeJobsWithUnspecifiedCompensationRange_; + /** + * + * + *
+     * If set to true, jobs with unspecified compensation range fields are
+     * included.
+     * 
+ * + * bool include_jobs_with_unspecified_compensation_range = 4; + * + * @return The includeJobsWithUnspecifiedCompensationRange. + */ + @java.lang.Override + public boolean getIncludeJobsWithUnspecifiedCompensationRange() { + return includeJobsWithUnspecifiedCompensationRange_; + } + /** + * + * + *
+     * If set to true, jobs with unspecified compensation range fields are
+     * included.
+     * 
+ * + * bool include_jobs_with_unspecified_compensation_range = 4; + * + * @param value The includeJobsWithUnspecifiedCompensationRange to set. + * @return This builder for chaining. + */ + public Builder setIncludeJobsWithUnspecifiedCompensationRange(boolean value) { + + includeJobsWithUnspecifiedCompensationRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, jobs with unspecified compensation range fields are
+     * included.
+     * 
+ * + * bool include_jobs_with_unspecified_compensation_range = 4; + * + * @return This builder for chaining. + */ + public Builder clearIncludeJobsWithUnspecifiedCompensationRange() { + + includeJobsWithUnspecifiedCompensationRange_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompensationFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompensationFilter) + private static final com.google.cloud.talent.v4.CompensationFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompensationFilter(); + } + + public static com.google.cloud.talent.v4.CompensationFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompensationFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompensationFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilterOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilterOrBuilder.java new file mode 100644 index 00000000..abbebdf6 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilterOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +public interface CompensationFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompensationFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Type of filter.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Type of filter.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.talent.v4.CompensationFilter.FilterType getType(); + + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the units. + */ + java.util.List getUnitsList(); + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of units. + */ + int getUnitsCount(); + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The units at the given index. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnits(int index); + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for units. + */ + java.util.List getUnitsValueList(); + /** + * + * + *
+   * Required. Specify desired `base compensation entry's`
+   * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit].
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of units at the given index. + */ + int getUnitsValue(int index); + + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * + * @return The range. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange(); + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+   * If set to true, jobs with unspecified compensation range fields are
+   * included.
+   * 
+ * + * bool include_jobs_with_unspecified_compensation_range = 4; + * + * @return The includeJobsWithUnspecifiedCompensationRange. + */ + boolean getIncludeJobsWithUnspecifiedCompensationRange(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfo.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfo.java new file mode 100644 index 00000000..bb7058a5 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfo.java @@ -0,0 +1,5904 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Job compensation details.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo} + */ +public final class CompensationInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompensationInfo) + CompensationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompensationInfo.newBuilder() to construct. + private CompensationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompensationInfo() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompensationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompensationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList< + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry>(); + mutable_bitField0_ |= 0x00000001; + } + entries_.add( + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.parser(), + extensionRegistry)); + break; + } + case 18: + { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder subBuilder = + null; + if (annualizedBaseCompensationRange_ != null) { + subBuilder = annualizedBaseCompensationRange_.toBuilder(); + } + annualizedBaseCompensationRange_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annualizedBaseCompensationRange_); + annualizedBaseCompensationRange_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder subBuilder = + null; + if (annualizedTotalCompensationRange_ != null) { + subBuilder = annualizedTotalCompensationRange_.toBuilder(); + } + annualizedTotalCompensationRange_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annualizedTotalCompensationRange_); + annualizedTotalCompensationRange_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.class, + com.google.cloud.talent.v4.CompensationInfo.Builder.class); + } + + /** + * + * + *
+   * The type of compensation.
+   * For compensation amounts specified in non-monetary amounts,
+   * describe the compensation scheme in the
+   * [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description].
+   * For example, tipping format is described in
+   * [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description]
+   * (for example, "expect 15-20% tips based on customer bill.") and an estimate
+   * of the tips provided in
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * or
+   * [CompensationEntry.range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range]
+   * ($10 per hour).
+   * For example, equity is described in
+   * [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description]
+   * (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and
+   * value estimated in
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * or
+   * [CompensationEntry.range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range].
+   * If no value estimate is possible, units are
+   * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]
+   * and then further clarified in
+   * [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description]
+   * field.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CompensationInfo.CompensationType} + */ + public enum CompensationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPENSATION_TYPE_UNSPECIFIED = 0; + */ + COMPENSATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Base compensation: Refers to the fixed amount of money paid to an
+     * employee by an employer in return for work performed. Base compensation
+     * does not include benefits, bonuses or any other potential compensation
+     * from an employer.
+     * 
+ * + * BASE = 1; + */ + BASE(1), + /** + * + * + *
+     * Bonus.
+     * 
+ * + * BONUS = 2; + */ + BONUS(2), + /** + * + * + *
+     * Signing bonus.
+     * 
+ * + * SIGNING_BONUS = 3; + */ + SIGNING_BONUS(3), + /** + * + * + *
+     * Equity.
+     * 
+ * + * EQUITY = 4; + */ + EQUITY(4), + /** + * + * + *
+     * Profit sharing.
+     * 
+ * + * PROFIT_SHARING = 5; + */ + PROFIT_SHARING(5), + /** + * + * + *
+     * Commission.
+     * 
+ * + * COMMISSIONS = 6; + */ + COMMISSIONS(6), + /** + * + * + *
+     * Tips.
+     * 
+ * + * TIPS = 7; + */ + TIPS(7), + /** + * + * + *
+     * Other compensation type.
+     * 
+ * + * OTHER_COMPENSATION_TYPE = 8; + */ + OTHER_COMPENSATION_TYPE(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPENSATION_TYPE_UNSPECIFIED = 0; + */ + public static final int COMPENSATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Base compensation: Refers to the fixed amount of money paid to an
+     * employee by an employer in return for work performed. Base compensation
+     * does not include benefits, bonuses or any other potential compensation
+     * from an employer.
+     * 
+ * + * BASE = 1; + */ + public static final int BASE_VALUE = 1; + /** + * + * + *
+     * Bonus.
+     * 
+ * + * BONUS = 2; + */ + public static final int BONUS_VALUE = 2; + /** + * + * + *
+     * Signing bonus.
+     * 
+ * + * SIGNING_BONUS = 3; + */ + public static final int SIGNING_BONUS_VALUE = 3; + /** + * + * + *
+     * Equity.
+     * 
+ * + * EQUITY = 4; + */ + public static final int EQUITY_VALUE = 4; + /** + * + * + *
+     * Profit sharing.
+     * 
+ * + * PROFIT_SHARING = 5; + */ + public static final int PROFIT_SHARING_VALUE = 5; + /** + * + * + *
+     * Commission.
+     * 
+ * + * COMMISSIONS = 6; + */ + public static final int COMMISSIONS_VALUE = 6; + /** + * + * + *
+     * Tips.
+     * 
+ * + * TIPS = 7; + */ + public static final int TIPS_VALUE = 7; + /** + * + * + *
+     * Other compensation type.
+     * 
+ * + * OTHER_COMPENSATION_TYPE = 8; + */ + public static final int OTHER_COMPENSATION_TYPE_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompensationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompensationType forNumber(int value) { + switch (value) { + case 0: + return COMPENSATION_TYPE_UNSPECIFIED; + case 1: + return BASE; + case 2: + return BONUS; + case 3: + return SIGNING_BONUS; + case 4: + return EQUITY; + case 5: + return PROFIT_SHARING; + case 6: + return COMMISSIONS; + case 7: + return TIPS; + case 8: + return OTHER_COMPENSATION_TYPE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompensationType findValueByNumber(int number) { + return CompensationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CompensationInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final CompensationType[] VALUES = values(); + + public static CompensationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompensationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompensationInfo.CompensationType) + } + + /** + * + * + *
+   * Pay frequency.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CompensationInfo.CompensationUnit} + */ + public enum CompensationUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPENSATION_UNIT_UNSPECIFIED = 0; + */ + COMPENSATION_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Hourly.
+     * 
+ * + * HOURLY = 1; + */ + HOURLY(1), + /** + * + * + *
+     * Daily.
+     * 
+ * + * DAILY = 2; + */ + DAILY(2), + /** + * + * + *
+     * Weekly
+     * 
+ * + * WEEKLY = 3; + */ + WEEKLY(3), + /** + * + * + *
+     * Monthly.
+     * 
+ * + * MONTHLY = 4; + */ + MONTHLY(4), + /** + * + * + *
+     * Yearly.
+     * 
+ * + * YEARLY = 5; + */ + YEARLY(5), + /** + * + * + *
+     * One time.
+     * 
+ * + * ONE_TIME = 6; + */ + ONE_TIME(6), + /** + * + * + *
+     * Other compensation units.
+     * 
+ * + * OTHER_COMPENSATION_UNIT = 7; + */ + OTHER_COMPENSATION_UNIT(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPENSATION_UNIT_UNSPECIFIED = 0; + */ + public static final int COMPENSATION_UNIT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Hourly.
+     * 
+ * + * HOURLY = 1; + */ + public static final int HOURLY_VALUE = 1; + /** + * + * + *
+     * Daily.
+     * 
+ * + * DAILY = 2; + */ + public static final int DAILY_VALUE = 2; + /** + * + * + *
+     * Weekly
+     * 
+ * + * WEEKLY = 3; + */ + public static final int WEEKLY_VALUE = 3; + /** + * + * + *
+     * Monthly.
+     * 
+ * + * MONTHLY = 4; + */ + public static final int MONTHLY_VALUE = 4; + /** + * + * + *
+     * Yearly.
+     * 
+ * + * YEARLY = 5; + */ + public static final int YEARLY_VALUE = 5; + /** + * + * + *
+     * One time.
+     * 
+ * + * ONE_TIME = 6; + */ + public static final int ONE_TIME_VALUE = 6; + /** + * + * + *
+     * Other compensation units.
+     * 
+ * + * OTHER_COMPENSATION_UNIT = 7; + */ + public static final int OTHER_COMPENSATION_UNIT_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompensationUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompensationUnit forNumber(int value) { + switch (value) { + case 0: + return COMPENSATION_UNIT_UNSPECIFIED; + case 1: + return HOURLY; + case 2: + return DAILY; + case 3: + return WEEKLY; + case 4: + return MONTHLY; + case 5: + return YEARLY; + case 6: + return ONE_TIME; + case 7: + return OTHER_COMPENSATION_UNIT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompensationUnit findValueByNumber(int number) { + return CompensationUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CompensationInfo.getDescriptor().getEnumTypes().get(1); + } + + private static final CompensationUnit[] VALUES = values(); + + public static CompensationUnit valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompensationUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompensationInfo.CompensationUnit) + } + + public interface CompensationEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompensationInfo.CompensationEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Compensation type.
+     * Default is
+     * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Compensation type.
+     * Default is
+     * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The type. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationType getType(); + + /** + * + * + *
+     * Frequency of the specified amount.
+     * Default is
+     * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + int getUnitValue(); + /** + * + * + *
+     * Frequency of the specified amount.
+     * Default is
+     * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The unit. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnit(); + + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + * + * @return Whether the amount field is set. + */ + boolean hasAmount(); + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + * + * @return The amount. + */ + com.google.type.Money getAmount(); + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + */ + com.google.type.MoneyOrBuilder getAmountOrBuilder(); + + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return The range. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange(); + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+     * Compensation description.  For example, could
+     * indicate equity terms or provide additional context to an estimated
+     * bonus.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Compensation description.  For example, could
+     * indicate equity terms or provide additional context to an estimated
+     * bonus.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return Whether the expectedUnitsPerYear field is set. + */ + boolean hasExpectedUnitsPerYear(); + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return The expectedUnitsPerYear. + */ + com.google.protobuf.DoubleValue getExpectedUnitsPerYear(); + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + com.google.protobuf.DoubleValueOrBuilder getExpectedUnitsPerYearOrBuilder(); + + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.CompensationAmountCase + getCompensationAmountCase(); + } + /** + * + * + *
+   * A compensation entry that represents one component of compensation, such
+   * as base pay, bonus, or other compensation type.
+   * Annualization: One compensation entry can be annualized if
+   * - it contains valid
+   * [amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * or
+   * [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range].
+   * - and its
+   * [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]
+   * is set or can be derived. Its annualized range is determined as
+   * ([amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * or
+   * [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range])
+   * times
+   * [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo.CompensationEntry} + */ + public static final class CompensationEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompensationInfo.CompensationEntry) + CompensationEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompensationEntry.newBuilder() to construct. + private CompensationEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompensationEntry() { + type_ = 0; + unit_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompensationEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompensationEntry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + unit_ = rawValue; + break; + } + case 26: + { + com.google.type.Money.Builder subBuilder = null; + if (compensationAmountCase_ == 3) { + subBuilder = ((com.google.type.Money) compensationAmount_).toBuilder(); + } + compensationAmount_ = + input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.Money) compensationAmount_); + compensationAmount_ = subBuilder.buildPartial(); + } + compensationAmountCase_ = 3; + break; + } + case 34: + { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder subBuilder = + null; + if (compensationAmountCase_ == 4) { + subBuilder = + ((com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_) + .toBuilder(); + } + compensationAmount_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_); + compensationAmount_ = subBuilder.buildPartial(); + } + compensationAmountCase_ = 4; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + com.google.protobuf.DoubleValue.Builder subBuilder = null; + if (expectedUnitsPerYear_ != null) { + subBuilder = expectedUnitsPerYear_.toBuilder(); + } + expectedUnitsPerYear_ = + input.readMessage(com.google.protobuf.DoubleValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expectedUnitsPerYear_); + expectedUnitsPerYear_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.class, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder.class); + } + + private int compensationAmountCase_ = 0; + private java.lang.Object compensationAmount_; + + public enum CompensationAmountCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AMOUNT(3), + RANGE(4), + COMPENSATIONAMOUNT_NOT_SET(0); + private final int value; + + private CompensationAmountCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompensationAmountCase valueOf(int value) { + return forNumber(value); + } + + public static CompensationAmountCase forNumber(int value) { + switch (value) { + case 3: + return AMOUNT; + case 4: + return RANGE; + case 0: + return COMPENSATIONAMOUNT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CompensationAmountCase getCompensationAmountCase() { + return CompensationAmountCase.forNumber(compensationAmountCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+     * Compensation type.
+     * Default is
+     * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Compensation type.
+     * Default is
+     * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationInfo.CompensationType result = + com.google.cloud.talent.v4.CompensationInfo.CompensationType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationType.UNRECOGNIZED + : result; + } + + public static final int UNIT_FIELD_NUMBER = 2; + private int unit_; + /** + * + * + *
+     * Frequency of the specified amount.
+     * Default is
+     * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + @java.lang.Override + public int getUnitValue() { + return unit_; + } + /** + * + * + *
+     * Frequency of the specified amount.
+     * Default is
+     * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The unit. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnit() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit result = + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.valueOf(unit_); + return result == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.UNRECOGNIZED + : result; + } + + public static final int AMOUNT_FIELD_NUMBER = 3; + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + * + * @return Whether the amount field is set. + */ + @java.lang.Override + public boolean hasAmount() { + return compensationAmountCase_ == 3; + } + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + * + * @return The amount. + */ + @java.lang.Override + public com.google.type.Money getAmount() { + if (compensationAmountCase_ == 3) { + return (com.google.type.Money) compensationAmount_; + } + return com.google.type.Money.getDefaultInstance(); + } + /** + * + * + *
+     * Compensation amount.
+     * 
+ * + * .google.type.Money amount = 3; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getAmountOrBuilder() { + if (compensationAmountCase_ == 3) { + return (com.google.type.Money) compensationAmount_; + } + return com.google.type.Money.getDefaultInstance(); + } + + public static final int RANGE_FIELD_NUMBER = 4; + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return compensationAmountCase_ == 4; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange() { + if (compensationAmountCase_ == 4) { + return (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) compensationAmount_; + } + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getRangeOrBuilder() { + if (compensationAmountCase_ == 4) { + return (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) compensationAmount_; + } + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Compensation description.  For example, could
+     * indicate equity terms or provide additional context to an estimated
+     * bonus.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Compensation description.  For example, could
+     * indicate equity terms or provide additional context to an estimated
+     * bonus.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPECTED_UNITS_PER_YEAR_FIELD_NUMBER = 6; + private com.google.protobuf.DoubleValue expectedUnitsPerYear_; + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return Whether the expectedUnitsPerYear field is set. + */ + @java.lang.Override + public boolean hasExpectedUnitsPerYear() { + return expectedUnitsPerYear_ != null; + } + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return The expectedUnitsPerYear. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getExpectedUnitsPerYear() { + return expectedUnitsPerYear_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : expectedUnitsPerYear_; + } + /** + * + * + *
+     * Expected number of units paid each year. If not specified, when
+     * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+     * FULLTIME, a default value is inferred based on
+     * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+     * Default values:
+     * - HOURLY: 2080
+     * - DAILY: 260
+     * - WEEKLY: 52
+     * - MONTHLY: 12
+     * - ANNUAL: 1
+     * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getExpectedUnitsPerYearOrBuilder() { + return getExpectedUnitsPerYear(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.talent.v4.CompensationInfo.CompensationType + .COMPENSATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (unit_ + != com.google.cloud.talent.v4.CompensationInfo.CompensationUnit + .COMPENSATION_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, unit_); + } + if (compensationAmountCase_ == 3) { + output.writeMessage(3, (com.google.type.Money) compensationAmount_); + } + if (compensationAmountCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) compensationAmount_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (expectedUnitsPerYear_ != null) { + output.writeMessage(6, getExpectedUnitsPerYear()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.talent.v4.CompensationInfo.CompensationType + .COMPENSATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (unit_ + != com.google.cloud.talent.v4.CompensationInfo.CompensationUnit + .COMPENSATION_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, unit_); + } + if (compensationAmountCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.type.Money) compensationAmount_); + } + if (compensationAmountCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (expectedUnitsPerYear_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getExpectedUnitsPerYear()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompensationInfo.CompensationEntry)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry other = + (com.google.cloud.talent.v4.CompensationInfo.CompensationEntry) obj; + + if (type_ != other.type_) return false; + if (unit_ != other.unit_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasExpectedUnitsPerYear() != other.hasExpectedUnitsPerYear()) return false; + if (hasExpectedUnitsPerYear()) { + if (!getExpectedUnitsPerYear().equals(other.getExpectedUnitsPerYear())) return false; + } + if (!getCompensationAmountCase().equals(other.getCompensationAmountCase())) return false; + switch (compensationAmountCase_) { + case 3: + if (!getAmount().equals(other.getAmount())) return false; + break; + case 4: + if (!getRange().equals(other.getRange())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + UNIT_FIELD_NUMBER; + hash = (53 * hash) + unit_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExpectedUnitsPerYear()) { + hash = (37 * hash) + EXPECTED_UNITS_PER_YEAR_FIELD_NUMBER; + hash = (53 * hash) + getExpectedUnitsPerYear().hashCode(); + } + switch (compensationAmountCase_) { + case 3: + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAmount().hashCode(); + break; + case 4: + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A compensation entry that represents one component of compensation, such
+     * as base pay, bonus, or other compensation type.
+     * Annualization: One compensation entry can be annualized if
+     * - it contains valid
+     * [amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * or
+     * [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range].
+     * - and its
+     * [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]
+     * is set or can be derived. Its annualized range is determined as
+     * ([amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * or
+     * [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range])
+     * times
+     * [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo.CompensationEntry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompensationInfo.CompensationEntry) + com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.class, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + unit_ = 0; + + description_ = ""; + + if (expectedUnitsPerYearBuilder_ == null) { + expectedUnitsPerYear_ = null; + } else { + expectedUnitsPerYear_ = null; + expectedUnitsPerYearBuilder_ = null; + } + compensationAmountCase_ = 0; + compensationAmount_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry + getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry build() { + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry buildPartial() { + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry result = + new com.google.cloud.talent.v4.CompensationInfo.CompensationEntry(this); + result.type_ = type_; + result.unit_ = unit_; + if (compensationAmountCase_ == 3) { + if (amountBuilder_ == null) { + result.compensationAmount_ = compensationAmount_; + } else { + result.compensationAmount_ = amountBuilder_.build(); + } + } + if (compensationAmountCase_ == 4) { + if (rangeBuilder_ == null) { + result.compensationAmount_ = compensationAmount_; + } else { + result.compensationAmount_ = rangeBuilder_.build(); + } + } + result.description_ = description_; + if (expectedUnitsPerYearBuilder_ == null) { + result.expectedUnitsPerYear_ = expectedUnitsPerYear_; + } else { + result.expectedUnitsPerYear_ = expectedUnitsPerYearBuilder_.build(); + } + result.compensationAmountCase_ = compensationAmountCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompensationInfo.CompensationEntry) { + return mergeFrom((com.google.cloud.talent.v4.CompensationInfo.CompensationEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry other) { + if (other + == com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.unit_ != 0) { + setUnitValue(other.getUnitValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasExpectedUnitsPerYear()) { + mergeExpectedUnitsPerYear(other.getExpectedUnitsPerYear()); + } + switch (other.getCompensationAmountCase()) { + case AMOUNT: + { + mergeAmount(other.getAmount()); + break; + } + case RANGE: + { + mergeRange(other.getRange()); + break; + } + case COMPENSATIONAMOUNT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.CompensationInfo.CompensationEntry) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int compensationAmountCase_ = 0; + private java.lang.Object compensationAmount_; + + public CompensationAmountCase getCompensationAmountCase() { + return CompensationAmountCase.forNumber(compensationAmountCase_); + } + + public Builder clearCompensationAmount() { + compensationAmountCase_ = 0; + compensationAmount_ = null; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * Compensation type.
+       * Default is
+       * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Compensation type.
+       * Default is
+       * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Compensation type.
+       * Default is
+       * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationInfo.CompensationType result = + com.google.cloud.talent.v4.CompensationInfo.CompensationType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Compensation type.
+       * Default is
+       * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.talent.v4.CompensationInfo.CompensationType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Compensation type.
+       * Default is
+       * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int unit_ = 0; + /** + * + * + *
+       * Frequency of the specified amount.
+       * Default is
+       * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + @java.lang.Override + public int getUnitValue() { + return unit_; + } + /** + * + * + *
+       * Frequency of the specified amount.
+       * Default is
+       * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @param value The enum numeric value on the wire for unit to set. + * @return This builder for chaining. + */ + public Builder setUnitValue(int value) { + + unit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Frequency of the specified amount.
+       * Default is
+       * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return The unit. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationUnit getUnit() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit result = + com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.valueOf(unit_); + return result == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationUnit.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Frequency of the specified amount.
+       * Default is
+       * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @param value The unit to set. + * @return This builder for chaining. + */ + public Builder setUnit(com.google.cloud.talent.v4.CompensationInfo.CompensationUnit value) { + if (value == null) { + throw new NullPointerException(); + } + + unit_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Frequency of the specified amount.
+       * Default is
+       * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED].
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * + * @return This builder for chaining. + */ + public Builder clearUnit() { + + unit_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + amountBuilder_; + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + * + * @return Whether the amount field is set. + */ + @java.lang.Override + public boolean hasAmount() { + return compensationAmountCase_ == 3; + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + * + * @return The amount. + */ + @java.lang.Override + public com.google.type.Money getAmount() { + if (amountBuilder_ == null) { + if (compensationAmountCase_ == 3) { + return (com.google.type.Money) compensationAmount_; + } + return com.google.type.Money.getDefaultInstance(); + } else { + if (compensationAmountCase_ == 3) { + return amountBuilder_.getMessage(); + } + return com.google.type.Money.getDefaultInstance(); + } + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + public Builder setAmount(com.google.type.Money value) { + if (amountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + compensationAmount_ = value; + onChanged(); + } else { + amountBuilder_.setMessage(value); + } + compensationAmountCase_ = 3; + return this; + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + public Builder setAmount(com.google.type.Money.Builder builderForValue) { + if (amountBuilder_ == null) { + compensationAmount_ = builderForValue.build(); + onChanged(); + } else { + amountBuilder_.setMessage(builderForValue.build()); + } + compensationAmountCase_ = 3; + return this; + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + public Builder mergeAmount(com.google.type.Money value) { + if (amountBuilder_ == null) { + if (compensationAmountCase_ == 3 + && compensationAmount_ != com.google.type.Money.getDefaultInstance()) { + compensationAmount_ = + com.google.type.Money.newBuilder((com.google.type.Money) compensationAmount_) + .mergeFrom(value) + .buildPartial(); + } else { + compensationAmount_ = value; + } + onChanged(); + } else { + if (compensationAmountCase_ == 3) { + amountBuilder_.mergeFrom(value); + } + amountBuilder_.setMessage(value); + } + compensationAmountCase_ = 3; + return this; + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + public Builder clearAmount() { + if (amountBuilder_ == null) { + if (compensationAmountCase_ == 3) { + compensationAmountCase_ = 0; + compensationAmount_ = null; + onChanged(); + } + } else { + if (compensationAmountCase_ == 3) { + compensationAmountCase_ = 0; + compensationAmount_ = null; + } + amountBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + public com.google.type.Money.Builder getAmountBuilder() { + return getAmountFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getAmountOrBuilder() { + if ((compensationAmountCase_ == 3) && (amountBuilder_ != null)) { + return amountBuilder_.getMessageOrBuilder(); + } else { + if (compensationAmountCase_ == 3) { + return (com.google.type.Money) compensationAmount_; + } + return com.google.type.Money.getDefaultInstance(); + } + } + /** + * + * + *
+       * Compensation amount.
+       * 
+ * + * .google.type.Money amount = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getAmountFieldBuilder() { + if (amountBuilder_ == null) { + if (!(compensationAmountCase_ == 3)) { + compensationAmount_ = com.google.type.Money.getDefaultInstance(); + } + amountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + (com.google.type.Money) compensationAmount_, getParentForChildren(), isClean()); + compensationAmount_ = null; + } + compensationAmountCase_ = 3; + onChanged(); + ; + return amountBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + rangeBuilder_; + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return compensationAmountCase_ == 4; + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange getRange() { + if (rangeBuilder_ == null) { + if (compensationAmountCase_ == 4) { + return (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_; + } + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } else { + if (compensationAmountCase_ == 4) { + return rangeBuilder_.getMessage(); + } + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + public Builder setRange(com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + compensationAmount_ = value; + onChanged(); + } else { + rangeBuilder_.setMessage(value); + } + compensationAmountCase_ = 4; + return this; + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + public Builder setRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder builderForValue) { + if (rangeBuilder_ == null) { + compensationAmount_ = builderForValue.build(); + onChanged(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + compensationAmountCase_ = 4; + return this; + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + public Builder mergeRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (rangeBuilder_ == null) { + if (compensationAmountCase_ == 4 + && compensationAmount_ + != com.google.cloud.talent.v4.CompensationInfo.CompensationRange + .getDefaultInstance()) { + compensationAmount_ = + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.newBuilder( + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_) + .mergeFrom(value) + .buildPartial(); + } else { + compensationAmount_ = value; + } + onChanged(); + } else { + if (compensationAmountCase_ == 4) { + rangeBuilder_.mergeFrom(value); + } + rangeBuilder_.setMessage(value); + } + compensationAmountCase_ = 4; + return this; + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + if (compensationAmountCase_ == 4) { + compensationAmountCase_ = 0; + compensationAmount_ = null; + onChanged(); + } + } else { + if (compensationAmountCase_ == 4) { + compensationAmountCase_ = 0; + compensationAmount_ = null; + } + rangeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder + getRangeBuilder() { + return getRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getRangeOrBuilder() { + if ((compensationAmountCase_ == 4) && (rangeBuilder_ != null)) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + if (compensationAmountCase_ == 4) { + return (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_; + } + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + } + /** + * + * + *
+       * Compensation range.
+       * 
+ * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + if (!(compensationAmountCase_ == 4)) { + compensationAmount_ = + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder>( + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + compensationAmount_, + getParentForChildren(), + isClean()); + compensationAmount_ = null; + } + compensationAmountCase_ = 4; + onChanged(); + ; + return rangeBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Compensation description.  For example, could
+       * indicate equity terms or provide additional context to an estimated
+       * bonus.
+       * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Compensation description.  For example, could
+       * indicate equity terms or provide additional context to an estimated
+       * bonus.
+       * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Compensation description.  For example, could
+       * indicate equity terms or provide additional context to an estimated
+       * bonus.
+       * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Compensation description.  For example, could
+       * indicate equity terms or provide additional context to an estimated
+       * bonus.
+       * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Compensation description.  For example, could
+       * indicate equity terms or provide additional context to an estimated
+       * bonus.
+       * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.DoubleValue expectedUnitsPerYear_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + expectedUnitsPerYearBuilder_; + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return Whether the expectedUnitsPerYear field is set. + */ + public boolean hasExpectedUnitsPerYear() { + return expectedUnitsPerYearBuilder_ != null || expectedUnitsPerYear_ != null; + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + * + * @return The expectedUnitsPerYear. + */ + public com.google.protobuf.DoubleValue getExpectedUnitsPerYear() { + if (expectedUnitsPerYearBuilder_ == null) { + return expectedUnitsPerYear_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : expectedUnitsPerYear_; + } else { + return expectedUnitsPerYearBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public Builder setExpectedUnitsPerYear(com.google.protobuf.DoubleValue value) { + if (expectedUnitsPerYearBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expectedUnitsPerYear_ = value; + onChanged(); + } else { + expectedUnitsPerYearBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public Builder setExpectedUnitsPerYear( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (expectedUnitsPerYearBuilder_ == null) { + expectedUnitsPerYear_ = builderForValue.build(); + onChanged(); + } else { + expectedUnitsPerYearBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public Builder mergeExpectedUnitsPerYear(com.google.protobuf.DoubleValue value) { + if (expectedUnitsPerYearBuilder_ == null) { + if (expectedUnitsPerYear_ != null) { + expectedUnitsPerYear_ = + com.google.protobuf.DoubleValue.newBuilder(expectedUnitsPerYear_) + .mergeFrom(value) + .buildPartial(); + } else { + expectedUnitsPerYear_ = value; + } + onChanged(); + } else { + expectedUnitsPerYearBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public Builder clearExpectedUnitsPerYear() { + if (expectedUnitsPerYearBuilder_ == null) { + expectedUnitsPerYear_ = null; + onChanged(); + } else { + expectedUnitsPerYear_ = null; + expectedUnitsPerYearBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public com.google.protobuf.DoubleValue.Builder getExpectedUnitsPerYearBuilder() { + + onChanged(); + return getExpectedUnitsPerYearFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + public com.google.protobuf.DoubleValueOrBuilder getExpectedUnitsPerYearOrBuilder() { + if (expectedUnitsPerYearBuilder_ != null) { + return expectedUnitsPerYearBuilder_.getMessageOrBuilder(); + } else { + return expectedUnitsPerYear_ == null + ? com.google.protobuf.DoubleValue.getDefaultInstance() + : expectedUnitsPerYear_; + } + } + /** + * + * + *
+       * Expected number of units paid each year. If not specified, when
+       * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is
+       * FULLTIME, a default value is inferred based on
+       * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit].
+       * Default values:
+       * - HOURLY: 2080
+       * - DAILY: 260
+       * - WEEKLY: 52
+       * - MONTHLY: 12
+       * - ANNUAL: 1
+       * 
+ * + * .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder> + getExpectedUnitsPerYearFieldBuilder() { + if (expectedUnitsPerYearBuilder_ == null) { + expectedUnitsPerYearBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.DoubleValue, + com.google.protobuf.DoubleValue.Builder, + com.google.protobuf.DoubleValueOrBuilder>( + getExpectedUnitsPerYear(), getParentForChildren(), isClean()); + expectedUnitsPerYear_ = null; + } + return expectedUnitsPerYearBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompensationInfo.CompensationEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompensationInfo.CompensationEntry) + private static final com.google.cloud.talent.v4.CompensationInfo.CompensationEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompensationInfo.CompensationEntry(); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationEntry + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompensationEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompensationEntry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CompensationRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompensationInfo.CompensationRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return Whether the maxCompensation field is set. + */ + boolean hasMaxCompensation(); + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return The maxCompensation. + */ + com.google.type.Money getMaxCompensation(); + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + */ + com.google.type.MoneyOrBuilder getMaxCompensationOrBuilder(); + + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return Whether the minCompensation field is set. + */ + boolean hasMinCompensation(); + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return The minCompensation. + */ + com.google.type.Money getMinCompensation(); + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + */ + com.google.type.MoneyOrBuilder getMinCompensationOrBuilder(); + } + /** + * + * + *
+   * Compensation range.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo.CompensationRange} + */ + public static final class CompensationRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompensationInfo.CompensationRange) + CompensationRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompensationRange.newBuilder() to construct. + private CompensationRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompensationRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompensationRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompensationRange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.type.Money.Builder subBuilder = null; + if (minCompensation_ != null) { + subBuilder = minCompensation_.toBuilder(); + } + minCompensation_ = + input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minCompensation_); + minCompensation_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.type.Money.Builder subBuilder = null; + if (maxCompensation_ != null) { + subBuilder = maxCompensation_.toBuilder(); + } + maxCompensation_ = + input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxCompensation_); + maxCompensation_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.class, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder.class); + } + + public static final int MAX_COMPENSATION_FIELD_NUMBER = 2; + private com.google.type.Money maxCompensation_; + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return Whether the maxCompensation field is set. + */ + @java.lang.Override + public boolean hasMaxCompensation() { + return maxCompensation_ != null; + } + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return The maxCompensation. + */ + @java.lang.Override + public com.google.type.Money getMaxCompensation() { + return maxCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : maxCompensation_; + } + /** + * + * + *
+     * The maximum amount of compensation. If left empty, the value is set
+     * to a maximal compensation value and the currency code is set to
+     * match the [currency code][google.type.Money.currency_code] of
+     * min_compensation.
+     * 
+ * + * .google.type.Money max_compensation = 2; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMaxCompensationOrBuilder() { + return getMaxCompensation(); + } + + public static final int MIN_COMPENSATION_FIELD_NUMBER = 1; + private com.google.type.Money minCompensation_; + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return Whether the minCompensation field is set. + */ + @java.lang.Override + public boolean hasMinCompensation() { + return minCompensation_ != null; + } + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return The minCompensation. + */ + @java.lang.Override + public com.google.type.Money getMinCompensation() { + return minCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : minCompensation_; + } + /** + * + * + *
+     * The minimum amount of compensation. If left empty, the value is set
+     * to zero and the currency code is set to match the
+     * [currency code][google.type.Money.currency_code] of max_compensation.
+     * 
+ * + * .google.type.Money min_compensation = 1; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getMinCompensationOrBuilder() { + return getMinCompensation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minCompensation_ != null) { + output.writeMessage(1, getMinCompensation()); + } + if (maxCompensation_ != null) { + output.writeMessage(2, getMaxCompensation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minCompensation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMinCompensation()); + } + if (maxCompensation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaxCompensation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompensationInfo.CompensationRange)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompensationInfo.CompensationRange other = + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) obj; + + if (hasMaxCompensation() != other.hasMaxCompensation()) return false; + if (hasMaxCompensation()) { + if (!getMaxCompensation().equals(other.getMaxCompensation())) return false; + } + if (hasMinCompensation() != other.hasMinCompensation()) return false; + if (hasMinCompensation()) { + if (!getMinCompensation().equals(other.getMinCompensation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMaxCompensation()) { + hash = (37 * hash) + MAX_COMPENSATION_FIELD_NUMBER; + hash = (53 * hash) + getMaxCompensation().hashCode(); + } + if (hasMinCompensation()) { + hash = (37 * hash) + MIN_COMPENSATION_FIELD_NUMBER; + hash = (53 * hash) + getMinCompensation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Compensation range.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo.CompensationRange} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompensationInfo.CompensationRange) + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.class, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompensationInfo.CompensationRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (maxCompensationBuilder_ == null) { + maxCompensation_ = null; + } else { + maxCompensation_ = null; + maxCompensationBuilder_ = null; + } + if (minCompensationBuilder_ == null) { + minCompensation_ = null; + } else { + minCompensation_ = null; + minCompensationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_CompensationRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange build() { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange buildPartial() { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange result = + new com.google.cloud.talent.v4.CompensationInfo.CompensationRange(this); + if (maxCompensationBuilder_ == null) { + result.maxCompensation_ = maxCompensation_; + } else { + result.maxCompensation_ = maxCompensationBuilder_.build(); + } + if (minCompensationBuilder_ == null) { + result.minCompensation_ = minCompensation_; + } else { + result.minCompensation_ = minCompensationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompensationInfo.CompensationRange) { + return mergeFrom((com.google.cloud.talent.v4.CompensationInfo.CompensationRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange other) { + if (other + == com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance()) + return this; + if (other.hasMaxCompensation()) { + mergeMaxCompensation(other.getMaxCompensation()); + } + if (other.hasMinCompensation()) { + mergeMinCompensation(other.getMinCompensation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompensationInfo.CompensationRange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.CompensationInfo.CompensationRange) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Money maxCompensation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + maxCompensationBuilder_; + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return Whether the maxCompensation field is set. + */ + public boolean hasMaxCompensation() { + return maxCompensationBuilder_ != null || maxCompensation_ != null; + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + * + * @return The maxCompensation. + */ + public com.google.type.Money getMaxCompensation() { + if (maxCompensationBuilder_ == null) { + return maxCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : maxCompensation_; + } else { + return maxCompensationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public Builder setMaxCompensation(com.google.type.Money value) { + if (maxCompensationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxCompensation_ = value; + onChanged(); + } else { + maxCompensationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public Builder setMaxCompensation(com.google.type.Money.Builder builderForValue) { + if (maxCompensationBuilder_ == null) { + maxCompensation_ = builderForValue.build(); + onChanged(); + } else { + maxCompensationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public Builder mergeMaxCompensation(com.google.type.Money value) { + if (maxCompensationBuilder_ == null) { + if (maxCompensation_ != null) { + maxCompensation_ = + com.google.type.Money.newBuilder(maxCompensation_).mergeFrom(value).buildPartial(); + } else { + maxCompensation_ = value; + } + onChanged(); + } else { + maxCompensationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public Builder clearMaxCompensation() { + if (maxCompensationBuilder_ == null) { + maxCompensation_ = null; + onChanged(); + } else { + maxCompensation_ = null; + maxCompensationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public com.google.type.Money.Builder getMaxCompensationBuilder() { + + onChanged(); + return getMaxCompensationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + public com.google.type.MoneyOrBuilder getMaxCompensationOrBuilder() { + if (maxCompensationBuilder_ != null) { + return maxCompensationBuilder_.getMessageOrBuilder(); + } else { + return maxCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : maxCompensation_; + } + } + /** + * + * + *
+       * The maximum amount of compensation. If left empty, the value is set
+       * to a maximal compensation value and the currency code is set to
+       * match the [currency code][google.type.Money.currency_code] of
+       * min_compensation.
+       * 
+ * + * .google.type.Money max_compensation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMaxCompensationFieldBuilder() { + if (maxCompensationBuilder_ == null) { + maxCompensationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMaxCompensation(), getParentForChildren(), isClean()); + maxCompensation_ = null; + } + return maxCompensationBuilder_; + } + + private com.google.type.Money minCompensation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + minCompensationBuilder_; + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return Whether the minCompensation field is set. + */ + public boolean hasMinCompensation() { + return minCompensationBuilder_ != null || minCompensation_ != null; + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + * + * @return The minCompensation. + */ + public com.google.type.Money getMinCompensation() { + if (minCompensationBuilder_ == null) { + return minCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : minCompensation_; + } else { + return minCompensationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public Builder setMinCompensation(com.google.type.Money value) { + if (minCompensationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minCompensation_ = value; + onChanged(); + } else { + minCompensationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public Builder setMinCompensation(com.google.type.Money.Builder builderForValue) { + if (minCompensationBuilder_ == null) { + minCompensation_ = builderForValue.build(); + onChanged(); + } else { + minCompensationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public Builder mergeMinCompensation(com.google.type.Money value) { + if (minCompensationBuilder_ == null) { + if (minCompensation_ != null) { + minCompensation_ = + com.google.type.Money.newBuilder(minCompensation_).mergeFrom(value).buildPartial(); + } else { + minCompensation_ = value; + } + onChanged(); + } else { + minCompensationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public Builder clearMinCompensation() { + if (minCompensationBuilder_ == null) { + minCompensation_ = null; + onChanged(); + } else { + minCompensation_ = null; + minCompensationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public com.google.type.Money.Builder getMinCompensationBuilder() { + + onChanged(); + return getMinCompensationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + public com.google.type.MoneyOrBuilder getMinCompensationOrBuilder() { + if (minCompensationBuilder_ != null) { + return minCompensationBuilder_.getMessageOrBuilder(); + } else { + return minCompensation_ == null + ? com.google.type.Money.getDefaultInstance() + : minCompensation_; + } + } + /** + * + * + *
+       * The minimum amount of compensation. If left empty, the value is set
+       * to zero and the currency code is set to match the
+       * [currency code][google.type.Money.currency_code] of max_compensation.
+       * 
+ * + * .google.type.Money min_compensation = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getMinCompensationFieldBuilder() { + if (minCompensationBuilder_ == null) { + minCompensationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getMinCompensation(), getParentForChildren(), isClean()); + minCompensation_ = null; + } + return minCompensationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompensationInfo.CompensationRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompensationInfo.CompensationRange) + private static final com.google.cloud.talent.v4.CompensationInfo.CompensationRange + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompensationInfo.CompensationRange(); + } + + public static com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompensationRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompensationRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + private java.util.List entries_; + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesList() { + return entries_; + } + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder> + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + public static final int ANNUALIZED_BASE_COMPENSATION_RANGE_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange + annualizedBaseCompensationRange_; + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedBaseCompensationRange field is set. + */ + @java.lang.Override + public boolean hasAnnualizedBaseCompensationRange() { + return annualizedBaseCompensationRange_ != null; + } + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedBaseCompensationRange. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedBaseCompensationRange() { + return annualizedBaseCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedBaseCompensationRange_; + } + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedBaseCompensationRangeOrBuilder() { + return getAnnualizedBaseCompensationRange(); + } + + public static final int ANNUALIZED_TOTAL_COMPENSATION_RANGE_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange + annualizedTotalCompensationRange_; + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedTotalCompensationRange field is set. + */ + @java.lang.Override + public boolean hasAnnualizedTotalCompensationRange() { + return annualizedTotalCompensationRange_ != null; + } + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedTotalCompensationRange. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedTotalCompensationRange() { + return annualizedTotalCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedTotalCompensationRange_; + } + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedTotalCompensationRangeOrBuilder() { + return getAnnualizedTotalCompensationRange(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + if (annualizedBaseCompensationRange_ != null) { + output.writeMessage(2, getAnnualizedBaseCompensationRange()); + } + if (annualizedTotalCompensationRange_ != null) { + output.writeMessage(3, getAnnualizedTotalCompensationRange()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + if (annualizedBaseCompensationRange_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getAnnualizedBaseCompensationRange()); + } + if (annualizedTotalCompensationRange_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getAnnualizedTotalCompensationRange()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompensationInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompensationInfo other = + (com.google.cloud.talent.v4.CompensationInfo) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (hasAnnualizedBaseCompensationRange() != other.hasAnnualizedBaseCompensationRange()) + return false; + if (hasAnnualizedBaseCompensationRange()) { + if (!getAnnualizedBaseCompensationRange().equals(other.getAnnualizedBaseCompensationRange())) + return false; + } + if (hasAnnualizedTotalCompensationRange() != other.hasAnnualizedTotalCompensationRange()) + return false; + if (hasAnnualizedTotalCompensationRange()) { + if (!getAnnualizedTotalCompensationRange() + .equals(other.getAnnualizedTotalCompensationRange())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + if (hasAnnualizedBaseCompensationRange()) { + hash = (37 * hash) + ANNUALIZED_BASE_COMPENSATION_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getAnnualizedBaseCompensationRange().hashCode(); + } + if (hasAnnualizedTotalCompensationRange()) { + hash = (37 * hash) + ANNUALIZED_TOTAL_COMPENSATION_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getAnnualizedTotalCompensationRange().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompensationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CompensationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Job compensation details.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompensationInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompensationInfo) + com.google.cloud.talent.v4.CompensationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompensationInfo.class, + com.google.cloud.talent.v4.CompensationInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompensationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + if (annualizedBaseCompensationRangeBuilder_ == null) { + annualizedBaseCompensationRange_ = null; + } else { + annualizedBaseCompensationRange_ = null; + annualizedBaseCompensationRangeBuilder_ = null; + } + if (annualizedTotalCompensationRangeBuilder_ == null) { + annualizedTotalCompensationRange_ = null; + } else { + annualizedTotalCompensationRange_ = null; + annualizedTotalCompensationRangeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CompensationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompensationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo build() { + com.google.cloud.talent.v4.CompensationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo buildPartial() { + com.google.cloud.talent.v4.CompensationInfo result = + new com.google.cloud.talent.v4.CompensationInfo(this); + int from_bitField0_ = bitField0_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + if (annualizedBaseCompensationRangeBuilder_ == null) { + result.annualizedBaseCompensationRange_ = annualizedBaseCompensationRange_; + } else { + result.annualizedBaseCompensationRange_ = annualizedBaseCompensationRangeBuilder_.build(); + } + if (annualizedTotalCompensationRangeBuilder_ == null) { + result.annualizedTotalCompensationRange_ = annualizedTotalCompensationRange_; + } else { + result.annualizedTotalCompensationRange_ = annualizedTotalCompensationRangeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompensationInfo) { + return mergeFrom((com.google.cloud.talent.v4.CompensationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CompensationInfo other) { + if (other == com.google.cloud.talent.v4.CompensationInfo.getDefaultInstance()) return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + if (other.hasAnnualizedBaseCompensationRange()) { + mergeAnnualizedBaseCompensationRange(other.getAnnualizedBaseCompensationRange()); + } + if (other.hasAnnualizedTotalCompensationRange()) { + mergeAnnualizedTotalCompensationRange(other.getAnnualizedTotalCompensationRange()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompensationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CompensationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList( + entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public java.util.List + getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.talent.v4.CompensationInfo.CompensationEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder setEntries( + int index, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder addEntries(com.google.cloud.talent.v4.CompensationInfo.CompensationEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.talent.v4.CompensationInfo.CompensationEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder addEntries( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder addEntries( + int index, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable + values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder + getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public java.util.List< + ? extends com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder> + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder + addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder( + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.getDefaultInstance()); + } + /** + * + * + *
+     * Job compensation information.
+     * At most one entry can be of type
+     * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+     * which is referred as **base compensation entry** for the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange + annualizedBaseCompensationRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + annualizedBaseCompensationRangeBuilder_; + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedBaseCompensationRange field is set. + */ + public boolean hasAnnualizedBaseCompensationRange() { + return annualizedBaseCompensationRangeBuilder_ != null + || annualizedBaseCompensationRange_ != null; + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedBaseCompensationRange. + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedBaseCompensationRange() { + if (annualizedBaseCompensationRangeBuilder_ == null) { + return annualizedBaseCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedBaseCompensationRange_; + } else { + return annualizedBaseCompensationRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnualizedBaseCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (annualizedBaseCompensationRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annualizedBaseCompensationRange_ = value; + onChanged(); + } else { + annualizedBaseCompensationRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnualizedBaseCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder builderForValue) { + if (annualizedBaseCompensationRangeBuilder_ == null) { + annualizedBaseCompensationRange_ = builderForValue.build(); + onChanged(); + } else { + annualizedBaseCompensationRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAnnualizedBaseCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (annualizedBaseCompensationRangeBuilder_ == null) { + if (annualizedBaseCompensationRange_ != null) { + annualizedBaseCompensationRange_ = + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.newBuilder( + annualizedBaseCompensationRange_) + .mergeFrom(value) + .buildPartial(); + } else { + annualizedBaseCompensationRange_ = value; + } + onChanged(); + } else { + annualizedBaseCompensationRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAnnualizedBaseCompensationRange() { + if (annualizedBaseCompensationRangeBuilder_ == null) { + annualizedBaseCompensationRange_ = null; + onChanged(); + } else { + annualizedBaseCompensationRange_ = null; + annualizedBaseCompensationRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder + getAnnualizedBaseCompensationRangeBuilder() { + + onChanged(); + return getAnnualizedBaseCompensationRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedBaseCompensationRangeOrBuilder() { + if (annualizedBaseCompensationRangeBuilder_ != null) { + return annualizedBaseCompensationRangeBuilder_.getMessageOrBuilder(); + } else { + return annualizedBaseCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedBaseCompensationRange_; + } + } + /** + * + * + *
+     * Output only. Annualized base compensation range. Computed as base
+     * compensation entry's
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + getAnnualizedBaseCompensationRangeFieldBuilder() { + if (annualizedBaseCompensationRangeBuilder_ == null) { + annualizedBaseCompensationRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder>( + getAnnualizedBaseCompensationRange(), getParentForChildren(), isClean()); + annualizedBaseCompensationRange_ = null; + } + return annualizedBaseCompensationRangeBuilder_; + } + + private com.google.cloud.talent.v4.CompensationInfo.CompensationRange + annualizedTotalCompensationRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + annualizedTotalCompensationRangeBuilder_; + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedTotalCompensationRange field is set. + */ + public boolean hasAnnualizedTotalCompensationRange() { + return annualizedTotalCompensationRangeBuilder_ != null + || annualizedTotalCompensationRange_ != null; + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedTotalCompensationRange. + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedTotalCompensationRange() { + if (annualizedTotalCompensationRangeBuilder_ == null) { + return annualizedTotalCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedTotalCompensationRange_; + } else { + return annualizedTotalCompensationRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnualizedTotalCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (annualizedTotalCompensationRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annualizedTotalCompensationRange_ = value; + onChanged(); + } else { + annualizedTotalCompensationRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAnnualizedTotalCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder builderForValue) { + if (annualizedTotalCompensationRangeBuilder_ == null) { + annualizedTotalCompensationRange_ = builderForValue.build(); + onChanged(); + } else { + annualizedTotalCompensationRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAnnualizedTotalCompensationRange( + com.google.cloud.talent.v4.CompensationInfo.CompensationRange value) { + if (annualizedTotalCompensationRangeBuilder_ == null) { + if (annualizedTotalCompensationRange_ != null) { + annualizedTotalCompensationRange_ = + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.newBuilder( + annualizedTotalCompensationRange_) + .mergeFrom(value) + .buildPartial(); + } else { + annualizedTotalCompensationRange_ = value; + } + onChanged(); + } else { + annualizedTotalCompensationRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAnnualizedTotalCompensationRange() { + if (annualizedTotalCompensationRangeBuilder_ == null) { + annualizedTotalCompensationRange_ = null; + onChanged(); + } else { + annualizedTotalCompensationRange_ = null; + annualizedTotalCompensationRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder + getAnnualizedTotalCompensationRangeBuilder() { + + onChanged(); + return getAnnualizedTotalCompensationRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedTotalCompensationRangeOrBuilder() { + if (annualizedTotalCompensationRangeBuilder_ != null) { + return annualizedTotalCompensationRangeBuilder_.getMessageOrBuilder(); + } else { + return annualizedTotalCompensationRange_ == null + ? com.google.cloud.talent.v4.CompensationInfo.CompensationRange.getDefaultInstance() + : annualizedTotalCompensationRange_; + } + } + /** + * + * + *
+     * Output only. Annualized total compensation range. Computed as all
+     * compensation entries'
+     * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+     * times
+     * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+     * See
+     * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+     * for explanation on compensation annualization.
+     * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder> + getAnnualizedTotalCompensationRangeFieldBuilder() { + if (annualizedTotalCompensationRangeBuilder_ == null) { + annualizedTotalCompensationRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo.CompensationRange, + com.google.cloud.talent.v4.CompensationInfo.CompensationRange.Builder, + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder>( + getAnnualizedTotalCompensationRange(), getParentForChildren(), isClean()); + annualizedTotalCompensationRange_ = null; + } + return annualizedTotalCompensationRangeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompensationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompensationInfo) + private static final com.google.cloud.talent.v4.CompensationInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompensationInfo(); + } + + public static com.google.cloud.talent.v4.CompensationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompensationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompensationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfoOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfoOrBuilder.java new file mode 100644 index 00000000..fc918ada --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfoOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface CompensationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompensationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationEntry getEntries(int index); + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * Job compensation information.
+   * At most one entry can be of type
+   * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE],
+   * which is referred as **base compensation entry** for the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationEntryOrBuilder getEntriesOrBuilder( + int index); + + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedBaseCompensationRange field is set. + */ + boolean hasAnnualizedBaseCompensationRange(); + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedBaseCompensationRange. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedBaseCompensationRange(); + /** + * + * + *
+   * Output only. Annualized base compensation range. Computed as base
+   * compensation entry's
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedBaseCompensationRangeOrBuilder(); + + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the annualizedTotalCompensationRange field is set. + */ + boolean hasAnnualizedTotalCompensationRange(); + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The annualizedTotalCompensationRange. + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRange + getAnnualizedTotalCompensationRange(); + /** + * + * + *
+   * Output only. Annualized total compensation range. Computed as all
+   * compensation entries'
+   * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount]
+   * times
+   * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year].
+   * See
+   * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry]
+   * for explanation on compensation annualization.
+   * 
+ * + * + * .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.talent.v4.CompensationInfo.CompensationRangeOrBuilder + getAnnualizedTotalCompensationRangeOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequest.java new file mode 100644 index 00000000..9283c18d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequest.java @@ -0,0 +1,2183 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/completion_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Auto-complete parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryRequest} + */ +public final class CompleteQueryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompleteQueryRequest) + CompleteQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompleteQueryRequest.newBuilder() to construct. + private CompleteQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompleteQueryRequest() { + tenant_ = ""; + query_ = ""; + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + company_ = ""; + scope_ = 0; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompleteQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompleteQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + tenant_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageCodes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageCodes_.add(s); + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + company_ = s; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + scope_ = rawValue; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageCodes_ = languageCodes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryRequest.class, + com.google.cloud.talent.v4.CompleteQueryRequest.Builder.class); + } + + /** + * + * + *
+   * Enum to specify the scope of completion.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CompleteQueryRequest.CompletionScope} + */ + public enum CompletionScope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPLETION_SCOPE_UNSPECIFIED = 0; + */ + COMPLETION_SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * Suggestions are based only on the data provided by the client.
+     * 
+ * + * TENANT = 1; + */ + TENANT(1), + /** + * + * + *
+     * Suggestions are based on all jobs data in the system that's visible to
+     * the client
+     * 
+ * + * PUBLIC = 2; + */ + PUBLIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPLETION_SCOPE_UNSPECIFIED = 0; + */ + public static final int COMPLETION_SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Suggestions are based only on the data provided by the client.
+     * 
+ * + * TENANT = 1; + */ + public static final int TENANT_VALUE = 1; + /** + * + * + *
+     * Suggestions are based on all jobs data in the system that's visible to
+     * the client
+     * 
+ * + * PUBLIC = 2; + */ + public static final int PUBLIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompletionScope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompletionScope forNumber(int value) { + switch (value) { + case 0: + return COMPLETION_SCOPE_UNSPECIFIED; + case 1: + return TENANT; + case 2: + return PUBLIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompletionScope findValueByNumber(int number) { + return CompletionScope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CompleteQueryRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final CompletionScope[] VALUES = values(); + + public static CompletionScope valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompletionScope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompleteQueryRequest.CompletionScope) + } + + /** + * + * + *
+   * Enum to specify auto-completion topics.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.CompleteQueryRequest.CompletionType} + */ + public enum CompletionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPLETION_TYPE_UNSPECIFIED = 0; + */ + COMPLETION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Suggest job titles for jobs autocomplete.
+     * For
+     * [CompletionType.JOB_TITLE][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.JOB_TITLE]
+     * type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * JOB_TITLE = 1; + */ + JOB_TITLE(1), + /** + * + * + *
+     * Suggest company names for jobs autocomplete.
+     * For
+     * [CompletionType.COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]
+     * type, only companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * COMPANY_NAME = 2; + */ + COMPANY_NAME(2), + /** + * + * + *
+     * Suggest both job titles and company names for jobs autocomplete.
+     * For
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]
+     * type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * or companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * COMBINED = 3; + */ + COMBINED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * COMPLETION_TYPE_UNSPECIFIED = 0; + */ + public static final int COMPLETION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Suggest job titles for jobs autocomplete.
+     * For
+     * [CompletionType.JOB_TITLE][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.JOB_TITLE]
+     * type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * JOB_TITLE = 1; + */ + public static final int JOB_TITLE_VALUE = 1; + /** + * + * + *
+     * Suggest company names for jobs autocomplete.
+     * For
+     * [CompletionType.COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]
+     * type, only companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * COMPANY_NAME = 2; + */ + public static final int COMPANY_NAME_VALUE = 2; + /** + * + * + *
+     * Suggest both job titles and company names for jobs autocomplete.
+     * For
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]
+     * type, only open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * or companies having open jobs with the same
+     * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes]
+     * are returned.
+     * 
+ * + * COMBINED = 3; + */ + public static final int COMBINED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompletionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompletionType forNumber(int value) { + switch (value) { + case 0: + return COMPLETION_TYPE_UNSPECIFIED; + case 1: + return JOB_TITLE; + case 2: + return COMPANY_NAME; + case 3: + return COMBINED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompletionType findValueByNumber(int number) { + return CompletionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CompleteQueryRequest.getDescriptor().getEnumTypes().get(1); + } + + private static final CompletionType[] VALUES = values(); + + public static CompletionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompletionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.CompleteQueryRequest.CompletionType) + } + + public static final int TENANT_FIELD_NUMBER = 1; + private volatile java.lang.Object tenant_; + /** + * + * + *
+   * Required. Resource name of tenant the completion is performed within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tenant. + */ + @java.lang.Override + public java.lang.String getTenant() { + java.lang.Object ref = tenant_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenant_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of tenant the completion is performed within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tenant. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTenantBytes() { + java.lang.Object ref = tenant_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenant_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + * + * + *
+   * Required. The query used to generate suggestions.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The query used to generate suggestions.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList languageCodes_; + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @return A list containing the languageCodes. + */ + public com.google.protobuf.ProtocolStringList getLanguageCodesList() { + return languageCodes_; + } + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @return The count of languageCodes. + */ + public int getLanguageCodesCount() { + return languageCodes_.size(); + } + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + public java.lang.String getLanguageCodes(int index) { + return languageCodes_.get(index); + } + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { + return languageCodes_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Required. Completion result count.
+   * The maximum allowed page size is 10.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int COMPANY_FIELD_NUMBER = 5; + private volatile java.lang.Object company_; + /** + * + * + *
+   * If provided, restricts completion to specified company.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The company. + */ + @java.lang.Override + public java.lang.String getCompany() { + java.lang.Object ref = company_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + company_ = s; + return s; + } + } + /** + * + * + *
+   * If provided, restricts completion to specified company.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for company. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompanyBytes() { + java.lang.Object ref = company_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + company_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPE_FIELD_NUMBER = 6; + private int scope_; + /** + * + * + *
+   * The scope of the completion. The defaults is
+   * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * The scope of the completion. The defaults is
+   * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.valueOf(scope_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.UNRECOGNIZED + : result; + } + + public static final int TYPE_FIELD_NUMBER = 7; + private int type_; + /** + * + * + *
+   * The completion topic. The default is
+   * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The completion topic. The default is
+   * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTenantBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tenant_); + } + if (!getQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + for (int i = 0; i < languageCodes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCodes_.getRaw(i)); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getCompanyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, company_); + } + if (scope_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope + .COMPLETION_SCOPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, scope_); + } + if (type_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType + .COMPLETION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTenantBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tenant_); + } + if (!getQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + { + int dataSize = 0; + for (int i = 0; i < languageCodes_.size(); i++) { + dataSize += computeStringSizeNoTag(languageCodes_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageCodesList().size(); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getCompanyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, company_); + } + if (scope_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope + .COMPLETION_SCOPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, scope_); + } + if (type_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType + .COMPLETION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompleteQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompleteQueryRequest other = + (com.google.cloud.talent.v4.CompleteQueryRequest) obj; + + if (!getTenant().equals(other.getTenant())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getLanguageCodesList().equals(other.getLanguageCodesList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getCompany().equals(other.getCompany())) return false; + if (scope_ != other.scope_) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TENANT_FIELD_NUMBER; + hash = (53 * hash) + getTenant().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getLanguageCodesCount() > 0) { + hash = (37 * hash) + LANGUAGE_CODES_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCodesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + COMPANY_FIELD_NUMBER; + hash = (53 * hash) + getCompany().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CompleteQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Auto-complete parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompleteQueryRequest) + com.google.cloud.talent.v4.CompleteQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryRequest.class, + com.google.cloud.talent.v4.CompleteQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompleteQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tenant_ = ""; + + query_ = ""; + + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pageSize_ = 0; + + company_ = ""; + + scope_ = 0; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompleteQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest build() { + com.google.cloud.talent.v4.CompleteQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest buildPartial() { + com.google.cloud.talent.v4.CompleteQueryRequest result = + new com.google.cloud.talent.v4.CompleteQueryRequest(this); + int from_bitField0_ = bitField0_; + result.tenant_ = tenant_; + result.query_ = query_; + if (((bitField0_ & 0x00000001) != 0)) { + languageCodes_ = languageCodes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageCodes_ = languageCodes_; + result.pageSize_ = pageSize_; + result.company_ = company_; + result.scope_ = scope_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompleteQueryRequest) { + return mergeFrom((com.google.cloud.talent.v4.CompleteQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CompleteQueryRequest other) { + if (other == com.google.cloud.talent.v4.CompleteQueryRequest.getDefaultInstance()) + return this; + if (!other.getTenant().isEmpty()) { + tenant_ = other.tenant_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (!other.languageCodes_.isEmpty()) { + if (languageCodes_.isEmpty()) { + languageCodes_ = other.languageCodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageCodesIsMutable(); + languageCodes_.addAll(other.languageCodes_); + } + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getCompany().isEmpty()) { + company_ = other.company_; + onChanged(); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompleteQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CompleteQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object tenant_ = ""; + /** + * + * + *
+     * Required. Resource name of tenant the completion is performed within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tenant. + */ + public java.lang.String getTenant() { + java.lang.Object ref = tenant_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenant_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of tenant the completion is performed within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tenant. + */ + public com.google.protobuf.ByteString getTenantBytes() { + java.lang.Object ref = tenant_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenant_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of tenant the completion is performed within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tenant to set. + * @return This builder for chaining. + */ + public Builder setTenant(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tenant_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of tenant the completion is performed within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTenant() { + + tenant_ = getDefaultInstance().getTenant(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of tenant the completion is performed within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tenant to set. + * @return This builder for chaining. + */ + public Builder setTenantBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tenant_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * Required. The query used to generate suggestions.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The query used to generate suggestions.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The query used to generate suggestions.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The query used to generate suggestions.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The query used to generate suggestions.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList languageCodes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLanguageCodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageCodes_ = new com.google.protobuf.LazyStringArrayList(languageCodes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @return A list containing the languageCodes. + */ + public com.google.protobuf.ProtocolStringList getLanguageCodesList() { + return languageCodes_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @return The count of languageCodes. + */ + public int getLanguageCodesCount() { + return languageCodes_.size(); + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + public java.lang.String getLanguageCodes(int index) { + return languageCodes_.get(index); + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { + return languageCodes_.getByteString(index); + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param index The index to set the value at. + * @param value The languageCodes to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageCodesIsMutable(); + languageCodes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param value The languageCodes to add. + * @return This builder for chaining. + */ + public Builder addLanguageCodes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageCodesIsMutable(); + languageCodes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param values The languageCodes to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageCodes(java.lang.Iterable values) { + ensureLanguageCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, languageCodes_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCodes() { + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of languages of the query. This is
+     * the BCP-47 language code, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * repeated string language_codes = 3; + * + * @param value The bytes of the languageCodes to add. + * @return This builder for chaining. + */ + public Builder addLanguageCodesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageCodesIsMutable(); + languageCodes_.add(value); + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Required. Completion result count.
+     * The maximum allowed page size is 10.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Required. Completion result count.
+     * The maximum allowed page size is 10.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Completion result count.
+     * The maximum allowed page size is 10.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object company_ = ""; + /** + * + * + *
+     * If provided, restricts completion to specified company.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The company. + */ + public java.lang.String getCompany() { + java.lang.Object ref = company_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + company_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If provided, restricts completion to specified company.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for company. + */ + public com.google.protobuf.ByteString getCompanyBytes() { + java.lang.Object ref = company_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + company_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If provided, restricts completion to specified company.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The company to set. + * @return This builder for chaining. + */ + public Builder setCompany(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + company_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If provided, restricts completion to specified company.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCompany() { + + company_ = getDefaultInstance().getCompany(); + onChanged(); + return this; + } + /** + * + * + *
+     * If provided, restricts completion to specified company.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for company to set. + * @return This builder for chaining. + */ + public Builder setCompanyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + company_ = value; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * + * + *
+     * The scope of the completion. The defaults is
+     * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * The scope of the completion. The defaults is
+     * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The scope of the completion. The defaults is
+     * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.valueOf(scope_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The scope of the completion. The defaults is
+     * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The scope of the completion. The defaults is
+     * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 0; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The completion topic. The default is
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The completion topic. The default is
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The completion topic. The default is
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The completion topic. The default is
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The completion topic. The default is
+     * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompleteQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompleteQueryRequest) + private static final com.google.cloud.talent.v4.CompleteQueryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompleteQueryRequest(); + } + + public static com.google.cloud.talent.v4.CompleteQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompleteQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompleteQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequestOrBuilder.java new file mode 100644 index 00000000..24fad328 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequestOrBuilder.java @@ -0,0 +1,251 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/completion_service.proto + +package com.google.cloud.talent.v4; + +public interface CompleteQueryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompleteQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of tenant the completion is performed within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tenant. + */ + java.lang.String getTenant(); + /** + * + * + *
+   * Required. Resource name of tenant the completion is performed within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tenant. + */ + com.google.protobuf.ByteString getTenantBytes(); + + /** + * + * + *
+   * Required. The query used to generate suggestions.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * Required. The query used to generate suggestions.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @return A list containing the languageCodes. + */ + java.util.List getLanguageCodesList(); + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @return The count of languageCodes. + */ + int getLanguageCodesCount(); + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + java.lang.String getLanguageCodes(int index); + /** + * + * + *
+   * The list of languages of the query. This is
+   * the BCP-47 language code, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * repeated string language_codes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + com.google.protobuf.ByteString getLanguageCodesBytes(int index); + + /** + * + * + *
+   * Required. Completion result count.
+   * The maximum allowed page size is 10.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If provided, restricts completion to specified company.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The company. + */ + java.lang.String getCompany(); + /** + * + * + *
+   * If provided, restricts completion to specified company.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * string company = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for company. + */ + com.google.protobuf.ByteString getCompanyBytes(); + + /** + * + * + *
+   * The scope of the completion. The defaults is
+   * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * The scope of the completion. The defaults is
+   * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * + * @return The scope. + */ + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionScope getScope(); + + /** + * + * + *
+   * The completion topic. The default is
+   * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The completion topic. The default is
+   * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED].
+   * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * + * @return The type. + */ + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponse.java new file mode 100644 index 00000000..7663994b --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponse.java @@ -0,0 +1,2381 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/completion_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Response of auto-complete query.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryResponse} + */ +public final class CompleteQueryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompleteQueryResponse) + CompleteQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompleteQueryResponse.newBuilder() to construct. + private CompleteQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompleteQueryResponse() { + completionResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompleteQueryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompleteQueryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + completionResults_ = + new java.util.ArrayList< + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult>(); + mutable_bitField0_ |= 0x00000001; + } + completionResults_.add( + input.readMessage( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.parser(), + extensionRegistry)); + break; + } + case 18: + { + com.google.cloud.talent.v4.ResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.talent.v4.ResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + completionResults_ = java.util.Collections.unmodifiableList(completionResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryResponse.class, + com.google.cloud.talent.v4.CompleteQueryResponse.Builder.class); + } + + public interface CompletionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + java.lang.String getSuggestion(); + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + com.google.protobuf.ByteString getSuggestionBytes(); + + /** + * + * + *
+     * The completion topic.
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The completion topic.
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The type. + */ + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType(); + + /** + * + * + *
+     * The URI of the company image for
+     * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+     * 
+ * + * string image_uri = 3; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+     * The URI of the company image for
+     * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+     * 
+ * + * string image_uri = 3; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + } + /** + * + * + *
+   * Resource that represents completion results.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryResponse.CompletionResult} + */ + public static final class CompletionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + CompletionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompletionResult.newBuilder() to construct. + private CompletionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompletionResult() { + suggestion_ = ""; + type_ = 0; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompletionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CompletionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + suggestion_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.class, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder.class); + } + + public static final int SUGGESTION_FIELD_NUMBER = 1; + private volatile java.lang.Object suggestion_; + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + @java.lang.Override + public java.lang.String getSuggestion() { + java.lang.Object ref = suggestion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + suggestion_ = s; + return s; + } + } + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuggestionBytes() { + java.lang.Object ref = suggestion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+     * The completion topic.
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The completion topic.
+     * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.UNRECOGNIZED + : result; + } + + public static final int IMAGE_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+     * The URI of the company image for
+     * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+     * 
+ * + * string image_uri = 3; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+     * The URI of the company image for
+     * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+     * 
+ * + * string image_uri = 3; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSuggestionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, suggestion_); + } + if (type_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType + .COMPLETION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSuggestionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, suggestion_); + } + if (type_ + != com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType + .COMPLETION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult other = + (com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) obj; + + if (!getSuggestion().equals(other.getSuggestion())) return false; + if (type_ != other.type_) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUGGESTION_FIELD_NUMBER; + hash = (53 * hash) + getSuggestion().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Resource that represents completion results.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryResponse.CompletionResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.class, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder.class); + } + + // Construct using + // com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + suggestion_ = ""; + + type_ = 0; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult build() { + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult buildPartial() { + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult result = + new com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult(this); + result.suggestion_ = suggestion_; + result.type_ = type_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) { + return mergeFrom( + (com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult other) { + if (other + == com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + .getDefaultInstance()) return this; + if (!other.getSuggestion().isEmpty()) { + suggestion_ = other.suggestion_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object suggestion_ = ""; + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + public java.lang.String getSuggestion() { + java.lang.Object ref = suggestion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + suggestion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + public com.google.protobuf.ByteString getSuggestionBytes() { + java.lang.Object ref = suggestion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @param value The suggestion to set. + * @return This builder for chaining. + */ + public Builder setSuggestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + suggestion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return This builder for chaining. + */ + public Builder clearSuggestion() { + + suggestion_ = getDefaultInstance().getSuggestion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @param value The bytes for suggestion to set. + * @return This builder for chaining. + */ + public Builder setSuggestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + suggestion_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * The completion topic.
+       * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The completion topic.
+       * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The completion topic.
+       * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType result = + com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The completion topic.
+       * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.talent.v4.CompleteQueryRequest.CompletionType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The completion topic.
+       * 
+ * + * .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+       * The URI of the company image for
+       * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+       * 
+ * + * string image_uri = 3; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URI of the company image for
+       * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+       * 
+ * + * string image_uri = 3; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URI of the company image for
+       * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+       * 
+ * + * string image_uri = 3; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the company image for
+       * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+       * 
+ * + * string image_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the company image for
+       * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME].
+       * 
+ * + * string image_uri = 3; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompleteQueryResponse.CompletionResult) + private static final com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult(); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompletionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompletionResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COMPLETION_RESULTS_FIELD_NUMBER = 1; + private java.util.List + completionResults_; + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + @java.lang.Override + public java.util.List + getCompletionResultsList() { + return completionResults_; + } + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder> + getCompletionResultsOrBuilderList() { + return completionResults_; + } + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + @java.lang.Override + public int getCompletionResultsCount() { + return completionResults_.size(); + } + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult getCompletionResults( + int index) { + return completionResults_.get(index); + } + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder + getCompletionResultsOrBuilder(int index) { + return completionResults_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < completionResults_.size(); i++) { + output.writeMessage(1, completionResults_.get(i)); + } + if (metadata_ != null) { + output.writeMessage(2, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < completionResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, completionResults_.get(i)); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CompleteQueryResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CompleteQueryResponse other = + (com.google.cloud.talent.v4.CompleteQueryResponse) obj; + + if (!getCompletionResultsList().equals(other.getCompletionResultsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCompletionResultsCount() > 0) { + hash = (37 * hash) + COMPLETION_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getCompletionResultsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CompleteQueryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of auto-complete query.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CompleteQueryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CompleteQueryResponse) + com.google.cloud.talent.v4.CompleteQueryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CompleteQueryResponse.class, + com.google.cloud.talent.v4.CompleteQueryResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CompleteQueryResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCompletionResultsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (completionResultsBuilder_ == null) { + completionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + completionResultsBuilder_.clear(); + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompletionServiceProto + .internal_static_google_cloud_talent_v4_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CompleteQueryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse build() { + com.google.cloud.talent.v4.CompleteQueryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse buildPartial() { + com.google.cloud.talent.v4.CompleteQueryResponse result = + new com.google.cloud.talent.v4.CompleteQueryResponse(this); + int from_bitField0_ = bitField0_; + if (completionResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + completionResults_ = java.util.Collections.unmodifiableList(completionResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.completionResults_ = completionResults_; + } else { + result.completionResults_ = completionResultsBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CompleteQueryResponse) { + return mergeFrom((com.google.cloud.talent.v4.CompleteQueryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CompleteQueryResponse other) { + if (other == com.google.cloud.talent.v4.CompleteQueryResponse.getDefaultInstance()) + return this; + if (completionResultsBuilder_ == null) { + if (!other.completionResults_.isEmpty()) { + if (completionResults_.isEmpty()) { + completionResults_ = other.completionResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCompletionResultsIsMutable(); + completionResults_.addAll(other.completionResults_); + } + onChanged(); + } + } else { + if (!other.completionResults_.isEmpty()) { + if (completionResultsBuilder_.isEmpty()) { + completionResultsBuilder_.dispose(); + completionResultsBuilder_ = null; + completionResults_ = other.completionResults_; + bitField0_ = (bitField0_ & ~0x00000001); + completionResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCompletionResultsFieldBuilder() + : null; + } else { + completionResultsBuilder_.addAllMessages(other.completionResults_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CompleteQueryResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CompleteQueryResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + completionResults_ = java.util.Collections.emptyList(); + + private void ensureCompletionResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + completionResults_ = + new java.util.ArrayList< + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult>( + completionResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder> + completionResultsBuilder_; + + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public java.util.List + getCompletionResultsList() { + if (completionResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(completionResults_); + } else { + return completionResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public int getCompletionResultsCount() { + if (completionResultsBuilder_ == null) { + return completionResults_.size(); + } else { + return completionResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult getCompletionResults( + int index) { + if (completionResultsBuilder_ == null) { + return completionResults_.get(index); + } else { + return completionResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder setCompletionResults( + int index, com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult value) { + if (completionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionResultsIsMutable(); + completionResults_.set(index, value); + onChanged(); + } else { + completionResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder setCompletionResults( + int index, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder builderForValue) { + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.set(index, builderForValue.build()); + onChanged(); + } else { + completionResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder addCompletionResults( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult value) { + if (completionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionResultsIsMutable(); + completionResults_.add(value); + onChanged(); + } else { + completionResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder addCompletionResults( + int index, com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult value) { + if (completionResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionResultsIsMutable(); + completionResults_.add(index, value); + onChanged(); + } else { + completionResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder addCompletionResults( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder builderForValue) { + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.add(builderForValue.build()); + onChanged(); + } else { + completionResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder addCompletionResults( + int index, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder builderForValue) { + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.add(index, builderForValue.build()); + onChanged(); + } else { + completionResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder addAllCompletionResults( + java.lang.Iterable< + ? extends com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult> + values) { + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, completionResults_); + onChanged(); + } else { + completionResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder clearCompletionResults() { + if (completionResultsBuilder_ == null) { + completionResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + completionResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public Builder removeCompletionResults(int index) { + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.remove(index); + onChanged(); + } else { + completionResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder + getCompletionResultsBuilder(int index) { + return getCompletionResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder + getCompletionResultsOrBuilder(int index) { + if (completionResultsBuilder_ == null) { + return completionResults_.get(index); + } else { + return completionResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder> + getCompletionResultsOrBuilderList() { + if (completionResultsBuilder_ != null) { + return completionResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(completionResults_); + } + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder + addCompletionResultsBuilder() { + return getCompletionResultsFieldBuilder() + .addBuilder( + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder + addCompletionResultsBuilder(int index) { + return getCompletionResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Results of the matching job/company candidates.
+     * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + public java.util.List + getCompletionResultsBuilderList() { + return getCompletionResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder> + getCompletionResultsFieldBuilder() { + if (completionResultsBuilder_ == null) { + completionResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult.Builder, + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder>( + completionResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + completionResults_ = null; + } + return completionResultsBuilder_; + } + + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return The metadata. + */ + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public Builder setMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public Builder setMetadata( + com.google.cloud.talent.v4.ResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public Builder mergeMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.talent.v4.ResponseMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public com.google.cloud.talent.v4.ResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CompleteQueryResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CompleteQueryResponse) + private static final com.google.cloud.talent.v4.CompleteQueryResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CompleteQueryResponse(); + } + + public static com.google.cloud.talent.v4.CompleteQueryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompleteQueryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompleteQueryResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CompleteQueryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponseOrBuilder.java new file mode 100644 index 00000000..45964ab4 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponseOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/completion_service.proto + +package com.google.cloud.talent.v4; + +public interface CompleteQueryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CompleteQueryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + java.util.List + getCompletionResultsList(); + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResult getCompletionResults(int index); + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + int getCompletionResultsCount(); + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + java.util.List< + ? extends com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder> + getCompletionResultsOrBuilderList(); + /** + * + * + *
+   * Results of the matching job/company candidates.
+   * 
+ * + * + * repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * + */ + com.google.cloud.talent.v4.CompleteQueryResponse.CompletionResultOrBuilder + getCompletionResultsOrBuilder(int index); + + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * + * @return The metadata. + */ + com.google.cloud.talent.v4.ResponseMetadata getMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionServiceProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionServiceProto.java new file mode 100644 index 00000000..2a409632 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionServiceProto.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/completion_service.proto + +package com.google.cloud.talent.v4; + +public final class CompletionServiceProto { + private CompletionServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompleteQueryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompleteQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompleteQueryResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompleteQueryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CompleteQueryResponse_CompletionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/talent/v4/completion_serv" + + "ice.proto\022\026google.cloud.talent.v4\032\034googl" + + "e/api/annotations.proto\032\027google/api/clie" + + "nt.proto\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032#google/clo" + + "ud/talent/v4/common.proto\"\210\004\n\024CompleteQu" + + "eryRequest\0222\n\006tenant\030\001 \001(\tB\"\340A\002\372A\034\n\032jobs" + + ".googleapis.com/Tenant\022\022\n\005query\030\002 \001(\tB\003\340" + + "A\002\022\026\n\016language_codes\030\003 \003(\t\022\026\n\tpage_size\030" + + "\004 \001(\005B\003\340A\002\0221\n\007company\030\005 \001(\tB \372A\035\n\033jobs.g" + + "oogleapis.com/Company\022K\n\005scope\030\006 \001(\0162<.g" + + "oogle.cloud.talent.v4.CompleteQueryReque" + + "st.CompletionScope\022I\n\004type\030\007 \001(\0162;.googl" + + "e.cloud.talent.v4.CompleteQueryRequest.C" + + "ompletionType\"K\n\017CompletionScope\022 \n\034COMP" + + "LETION_SCOPE_UNSPECIFIED\020\000\022\n\n\006TENANT\020\001\022\n" + + "\n\006PUBLIC\020\002\"`\n\016CompletionType\022\037\n\033COMPLETI" + + "ON_TYPE_UNSPECIFIED\020\000\022\r\n\tJOB_TITLE\020\001\022\020\n\014" + + "COMPANY_NAME\020\002\022\014\n\010COMBINED\020\003\"\266\002\n\025Complet" + + "eQueryResponse\022Z\n\022completion_results\030\001 \003" + + "(\0132>.google.cloud.talent.v4.CompleteQuer" + + "yResponse.CompletionResult\022:\n\010metadata\030\002" + + " \001(\0132(.google.cloud.talent.v4.ResponseMe" + + "tadata\032\204\001\n\020CompletionResult\022\022\n\nsuggestio" + + "n\030\001 \001(\t\022I\n\004type\030\002 \001(\0162;.google.cloud.tal" + + "ent.v4.CompleteQueryRequest.CompletionTy" + + "pe\022\021\n\timage_uri\030\003 \001(\t2\242\002\n\nCompletion\022\245\001\n" + + "\rCompleteQuery\022,.google.cloud.talent.v4." + + "CompleteQueryRequest\032-.google.cloud.tale" + + "nt.v4.CompleteQueryResponse\"7\202\323\344\223\0021\022//v4" + + "/{tenant=projects/*/tenants/*}:completeQ" + + "uery\032l\312A\023jobs.googleapis.com\322AShttps://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/jobsBz\n\032co" + + "m.google.cloud.talent.v4B\026CompletionServ" + + "iceProtoP\001Z + * The report event request. + * + * + * Protobuf type {@code google.cloud.talent.v4.CreateClientEventRequest} + */ +public final class CreateClientEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CreateClientEventRequest) + CreateClientEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateClientEventRequest.newBuilder() to construct. + private CreateClientEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateClientEventRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateClientEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateClientEventRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.talent.v4.ClientEvent.Builder subBuilder = null; + if (clientEvent_ != null) { + subBuilder = clientEvent_.toBuilder(); + } + clientEvent_ = + input.readMessage( + com.google.cloud.talent.v4.ClientEvent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clientEvent_); + clientEvent_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventServiceProto + .internal_static_google_cloud_talent_v4_CreateClientEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventServiceProto + .internal_static_google_cloud_talent_v4_CreateClientEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateClientEventRequest.class, + com.google.cloud.talent.v4.CreateClientEventRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the tenant under which the event is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the tenant under which the event is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_EVENT_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.ClientEvent clientEvent_; + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientEvent field is set. + */ + @java.lang.Override + public boolean hasClientEvent() { + return clientEvent_ != null; + } + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientEvent. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ClientEvent getClientEvent() { + return clientEvent_ == null + ? com.google.cloud.talent.v4.ClientEvent.getDefaultInstance() + : clientEvent_; + } + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.ClientEventOrBuilder getClientEventOrBuilder() { + return getClientEvent(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (clientEvent_ != null) { + output.writeMessage(2, getClientEvent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (clientEvent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClientEvent()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CreateClientEventRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CreateClientEventRequest other = + (com.google.cloud.talent.v4.CreateClientEventRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasClientEvent() != other.hasClientEvent()) return false; + if (hasClientEvent()) { + if (!getClientEvent().equals(other.getClientEvent())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasClientEvent()) { + hash = (37 * hash) + CLIENT_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getClientEvent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CreateClientEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The report event request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateClientEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CreateClientEventRequest) + com.google.cloud.talent.v4.CreateClientEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventServiceProto + .internal_static_google_cloud_talent_v4_CreateClientEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventServiceProto + .internal_static_google_cloud_talent_v4_CreateClientEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateClientEventRequest.class, + com.google.cloud.talent.v4.CreateClientEventRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CreateClientEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (clientEventBuilder_ == null) { + clientEvent_ = null; + } else { + clientEvent_ = null; + clientEventBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.EventServiceProto + .internal_static_google_cloud_talent_v4_CreateClientEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateClientEventRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CreateClientEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateClientEventRequest build() { + com.google.cloud.talent.v4.CreateClientEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateClientEventRequest buildPartial() { + com.google.cloud.talent.v4.CreateClientEventRequest result = + new com.google.cloud.talent.v4.CreateClientEventRequest(this); + result.parent_ = parent_; + if (clientEventBuilder_ == null) { + result.clientEvent_ = clientEvent_; + } else { + result.clientEvent_ = clientEventBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CreateClientEventRequest) { + return mergeFrom((com.google.cloud.talent.v4.CreateClientEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CreateClientEventRequest other) { + if (other == com.google.cloud.talent.v4.CreateClientEventRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasClientEvent()) { + mergeClientEvent(other.getClientEvent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CreateClientEventRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.CreateClientEventRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the tenant under which the event is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the event is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the event is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the event is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the event is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.ClientEvent clientEvent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ClientEvent, + com.google.cloud.talent.v4.ClientEvent.Builder, + com.google.cloud.talent.v4.ClientEventOrBuilder> + clientEventBuilder_; + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientEvent field is set. + */ + public boolean hasClientEvent() { + return clientEventBuilder_ != null || clientEvent_ != null; + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientEvent. + */ + public com.google.cloud.talent.v4.ClientEvent getClientEvent() { + if (clientEventBuilder_ == null) { + return clientEvent_ == null + ? com.google.cloud.talent.v4.ClientEvent.getDefaultInstance() + : clientEvent_; + } else { + return clientEventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientEvent(com.google.cloud.talent.v4.ClientEvent value) { + if (clientEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientEvent_ = value; + onChanged(); + } else { + clientEventBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientEvent(com.google.cloud.talent.v4.ClientEvent.Builder builderForValue) { + if (clientEventBuilder_ == null) { + clientEvent_ = builderForValue.build(); + onChanged(); + } else { + clientEventBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeClientEvent(com.google.cloud.talent.v4.ClientEvent value) { + if (clientEventBuilder_ == null) { + if (clientEvent_ != null) { + clientEvent_ = + com.google.cloud.talent.v4.ClientEvent.newBuilder(clientEvent_) + .mergeFrom(value) + .buildPartial(); + } else { + clientEvent_ = value; + } + onChanged(); + } else { + clientEventBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearClientEvent() { + if (clientEventBuilder_ == null) { + clientEvent_ = null; + onChanged(); + } else { + clientEvent_ = null; + clientEventBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.ClientEvent.Builder getClientEventBuilder() { + + onChanged(); + return getClientEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.ClientEventOrBuilder getClientEventOrBuilder() { + if (clientEventBuilder_ != null) { + return clientEventBuilder_.getMessageOrBuilder(); + } else { + return clientEvent_ == null + ? com.google.cloud.talent.v4.ClientEvent.getDefaultInstance() + : clientEvent_; + } + } + /** + * + * + *
+     * Required. Events issued when end user interacts with customer's application
+     * that uses Cloud Talent Solution.
+     * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ClientEvent, + com.google.cloud.talent.v4.ClientEvent.Builder, + com.google.cloud.talent.v4.ClientEventOrBuilder> + getClientEventFieldBuilder() { + if (clientEventBuilder_ == null) { + clientEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ClientEvent, + com.google.cloud.talent.v4.ClientEvent.Builder, + com.google.cloud.talent.v4.ClientEventOrBuilder>( + getClientEvent(), getParentForChildren(), isClean()); + clientEvent_ = null; + } + return clientEventBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CreateClientEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CreateClientEventRequest) + private static final com.google.cloud.talent.v4.CreateClientEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CreateClientEventRequest(); + } + + public static com.google.cloud.talent.v4.CreateClientEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateClientEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateClientEventRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateClientEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateClientEventRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateClientEventRequestOrBuilder.java new file mode 100644 index 00000000..40b6d48d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateClientEventRequestOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event_service.proto + +package com.google.cloud.talent.v4; + +public interface CreateClientEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CreateClientEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the tenant under which the event is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the tenant under which the event is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientEvent field is set. + */ + boolean hasClientEvent(); + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientEvent. + */ + com.google.cloud.talent.v4.ClientEvent getClientEvent(); + /** + * + * + *
+   * Required. Events issued when end user interacts with customer's application
+   * that uses Cloud Talent Solution.
+   * 
+ * + * + * .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.ClientEventOrBuilder getClientEventOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequest.java new file mode 100644 index 00000000..650fb07f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequest.java @@ -0,0 +1,949 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The Request of the CreateCompany method.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateCompanyRequest} + */ +public final class CreateCompanyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CreateCompanyRequest) + CreateCompanyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCompanyRequest.newBuilder() to construct. + private CreateCompanyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCompanyRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCompanyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCompanyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.talent.v4.Company.Builder subBuilder = null; + if (company_ != null) { + subBuilder = company_.toBuilder(); + } + company_ = + input.readMessage(com.google.cloud.talent.v4.Company.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(company_); + company_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_CreateCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_CreateCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateCompanyRequest.class, + com.google.cloud.talent.v4.CreateCompanyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPANY_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.Company company_; + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + @java.lang.Override + public boolean hasCompany() { + return company_ != null; + } + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Company getCompany() { + return company_ == null ? com.google.cloud.talent.v4.Company.getDefaultInstance() : company_; + } + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder() { + return getCompany(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (company_ != null) { + output.writeMessage(2, getCompany()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (company_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCompany()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CreateCompanyRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CreateCompanyRequest other = + (com.google.cloud.talent.v4.CreateCompanyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCompany() != other.hasCompany()) return false; + if (hasCompany()) { + if (!getCompany().equals(other.getCompany())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCompany()) { + hash = (37 * hash) + COMPANY_FIELD_NUMBER; + hash = (53 * hash) + getCompany().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CreateCompanyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Request of the CreateCompany method.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateCompanyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CreateCompanyRequest) + com.google.cloud.talent.v4.CreateCompanyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_CreateCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_CreateCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateCompanyRequest.class, + com.google.cloud.talent.v4.CreateCompanyRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CreateCompanyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (companyBuilder_ == null) { + company_ = null; + } else { + company_ = null; + companyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_CreateCompanyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateCompanyRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CreateCompanyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateCompanyRequest build() { + com.google.cloud.talent.v4.CreateCompanyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateCompanyRequest buildPartial() { + com.google.cloud.talent.v4.CreateCompanyRequest result = + new com.google.cloud.talent.v4.CreateCompanyRequest(this); + result.parent_ = parent_; + if (companyBuilder_ == null) { + result.company_ = company_; + } else { + result.company_ = companyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CreateCompanyRequest) { + return mergeFrom((com.google.cloud.talent.v4.CreateCompanyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CreateCompanyRequest other) { + if (other == com.google.cloud.talent.v4.CreateCompanyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCompany()) { + mergeCompany(other.getCompany()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CreateCompanyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CreateCompanyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Company company_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + companyBuilder_; + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + public boolean hasCompany() { + return companyBuilder_ != null || company_ != null; + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + public com.google.cloud.talent.v4.Company getCompany() { + if (companyBuilder_ == null) { + return company_ == null + ? com.google.cloud.talent.v4.Company.getDefaultInstance() + : company_; + } else { + return companyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCompany(com.google.cloud.talent.v4.Company value) { + if (companyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + company_ = value; + onChanged(); + } else { + companyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCompany(com.google.cloud.talent.v4.Company.Builder builderForValue) { + if (companyBuilder_ == null) { + company_ = builderForValue.build(); + onChanged(); + } else { + companyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCompany(com.google.cloud.talent.v4.Company value) { + if (companyBuilder_ == null) { + if (company_ != null) { + company_ = + com.google.cloud.talent.v4.Company.newBuilder(company_) + .mergeFrom(value) + .buildPartial(); + } else { + company_ = value; + } + onChanged(); + } else { + companyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCompany() { + if (companyBuilder_ == null) { + company_ = null; + onChanged(); + } else { + company_ = null; + companyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Company.Builder getCompanyBuilder() { + + onChanged(); + return getCompanyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder() { + if (companyBuilder_ != null) { + return companyBuilder_.getMessageOrBuilder(); + } else { + return company_ == null + ? com.google.cloud.talent.v4.Company.getDefaultInstance() + : company_; + } + } + /** + * + * + *
+     * Required. The company to be created.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + getCompanyFieldBuilder() { + if (companyBuilder_ == null) { + companyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder>( + getCompany(), getParentForChildren(), isClean()); + company_ = null; + } + return companyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CreateCompanyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CreateCompanyRequest) + private static final com.google.cloud.talent.v4.CreateCompanyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CreateCompanyRequest(); + } + + public static com.google.cloud.talent.v4.CreateCompanyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCompanyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCompanyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateCompanyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequestOrBuilder.java new file mode 100644 index 00000000..fa6004ae --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface CreateCompanyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CreateCompanyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + boolean hasCompany(); + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + com.google.cloud.talent.v4.Company getCompany(); + /** + * + * + *
+   * Required. The company to be created.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequest.java new file mode 100644 index 00000000..cb61874d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequest.java @@ -0,0 +1,928 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Create job request.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateJobRequest} + */ +public final class CreateJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CreateJobRequest) + CreateJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateJobRequest.newBuilder() to construct. + private CreateJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.talent.v4.Job.Builder subBuilder = null; + if (job_ != null) { + subBuilder = job_.toBuilder(); + } + job_ = input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(job_); + job_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_CreateJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_CreateJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateJobRequest.class, + com.google.cloud.talent.v4.CreateJobRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.Job job_; + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + @java.lang.Override + public boolean hasJob() { + return job_ != null; + } + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJob() { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + return getJob(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (job_ != null) { + output.writeMessage(2, getJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (job_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getJob()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CreateJobRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CreateJobRequest other = + (com.google.cloud.talent.v4.CreateJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasJob() != other.hasJob()) return false; + if (hasJob()) { + if (!getJob().equals(other.getJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasJob()) { + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CreateJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Create job request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CreateJobRequest) + com.google.cloud.talent.v4.CreateJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_CreateJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_CreateJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateJobRequest.class, + com.google.cloud.talent.v4.CreateJobRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CreateJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (jobBuilder_ == null) { + job_ = null; + } else { + job_ = null; + jobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_CreateJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateJobRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CreateJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateJobRequest build() { + com.google.cloud.talent.v4.CreateJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateJobRequest buildPartial() { + com.google.cloud.talent.v4.CreateJobRequest result = + new com.google.cloud.talent.v4.CreateJobRequest(this); + result.parent_ = parent_; + if (jobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = jobBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CreateJobRequest) { + return mergeFrom((com.google.cloud.talent.v4.CreateJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CreateJobRequest other) { + if (other == com.google.cloud.talent.v4.CreateJobRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasJob()) { + mergeJob(other.getJob()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CreateJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CreateJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Job job_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobBuilder_; + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + public boolean hasJob() { + return jobBuilder_ != null || job_ != null; + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + public com.google.cloud.talent.v4.Job getJob() { + if (jobBuilder_ == null) { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } else { + return jobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + jobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJob(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + jobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (job_ != null) { + job_ = com.google.cloud.talent.v4.Job.newBuilder(job_).mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + jobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearJob() { + if (jobBuilder_ == null) { + job_ = null; + onChanged(); + } else { + job_ = null; + jobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.talent.v4.Job.Builder getJobBuilder() { + + onChanged(); + return getJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + if (jobBuilder_ != null) { + return jobBuilder_.getMessageOrBuilder(); + } else { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + } + /** + * + * + *
+     * Required. The Job to be created.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobFieldBuilder() { + if (jobBuilder_ == null) { + jobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + getJob(), getParentForChildren(), isClean()); + job_ = null; + } + return jobBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CreateJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CreateJobRequest) + private static final com.google.cloud.talent.v4.CreateJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CreateJobRequest(); + } + + public static com.google.cloud.talent.v4.CreateJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequestOrBuilder.java new file mode 100644 index 00000000..6bf6a113 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequestOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface CreateJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CreateJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + boolean hasJob(); + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + com.google.cloud.talent.v4.Job getJob(); + /** + * + * + *
+   * Required. The Job to be created.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequest.java new file mode 100644 index 00000000..512c2aad --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequest.java @@ -0,0 +1,942 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The Request of the CreateTenant method.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateTenantRequest} + */ +public final class CreateTenantRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CreateTenantRequest) + CreateTenantRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTenantRequest.newBuilder() to construct. + private CreateTenantRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTenantRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTenantRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTenantRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.talent.v4.Tenant.Builder subBuilder = null; + if (tenant_ != null) { + subBuilder = tenant_.toBuilder(); + } + tenant_ = + input.readMessage(com.google.cloud.talent.v4.Tenant.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tenant_); + tenant_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_CreateTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_CreateTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateTenantRequest.class, + com.google.cloud.talent.v4.CreateTenantRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENANT_FIELD_NUMBER = 2; + private com.google.cloud.talent.v4.Tenant tenant_; + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + @java.lang.Override + public boolean hasTenant() { + return tenant_ != null; + } + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Tenant getTenant() { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder() { + return getTenant(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (tenant_ != null) { + output.writeMessage(2, getTenant()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (tenant_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTenant()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CreateTenantRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CreateTenantRequest other = + (com.google.cloud.talent.v4.CreateTenantRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTenant() != other.hasTenant()) return false; + if (hasTenant()) { + if (!getTenant().equals(other.getTenant())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTenant()) { + hash = (37 * hash) + TENANT_FIELD_NUMBER; + hash = (53 * hash) + getTenant().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CreateTenantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Request of the CreateTenant method.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CreateTenantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CreateTenantRequest) + com.google.cloud.talent.v4.CreateTenantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_CreateTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_CreateTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CreateTenantRequest.class, + com.google.cloud.talent.v4.CreateTenantRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CreateTenantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (tenantBuilder_ == null) { + tenant_ = null; + } else { + tenant_ = null; + tenantBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_CreateTenantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateTenantRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CreateTenantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateTenantRequest build() { + com.google.cloud.talent.v4.CreateTenantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateTenantRequest buildPartial() { + com.google.cloud.talent.v4.CreateTenantRequest result = + new com.google.cloud.talent.v4.CreateTenantRequest(this); + result.parent_ = parent_; + if (tenantBuilder_ == null) { + result.tenant_ = tenant_; + } else { + result.tenant_ = tenantBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CreateTenantRequest) { + return mergeFrom((com.google.cloud.talent.v4.CreateTenantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CreateTenantRequest other) { + if (other == com.google.cloud.talent.v4.CreateTenantRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTenant()) { + mergeTenant(other.getTenant()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CreateTenantRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CreateTenantRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Tenant tenant_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + tenantBuilder_; + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + public boolean hasTenant() { + return tenantBuilder_ != null || tenant_ != null; + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + public com.google.cloud.talent.v4.Tenant getTenant() { + if (tenantBuilder_ == null) { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } else { + return tenantBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTenant(com.google.cloud.talent.v4.Tenant value) { + if (tenantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tenant_ = value; + onChanged(); + } else { + tenantBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTenant(com.google.cloud.talent.v4.Tenant.Builder builderForValue) { + if (tenantBuilder_ == null) { + tenant_ = builderForValue.build(); + onChanged(); + } else { + tenantBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTenant(com.google.cloud.talent.v4.Tenant value) { + if (tenantBuilder_ == null) { + if (tenant_ != null) { + tenant_ = + com.google.cloud.talent.v4.Tenant.newBuilder(tenant_).mergeFrom(value).buildPartial(); + } else { + tenant_ = value; + } + onChanged(); + } else { + tenantBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTenant() { + if (tenantBuilder_ == null) { + tenant_ = null; + onChanged(); + } else { + tenant_ = null; + tenantBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Tenant.Builder getTenantBuilder() { + + onChanged(); + return getTenantFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder() { + if (tenantBuilder_ != null) { + return tenantBuilder_.getMessageOrBuilder(); + } else { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } + } + /** + * + * + *
+     * Required. The tenant to be created.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + getTenantFieldBuilder() { + if (tenantBuilder_ == null) { + tenantBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder>( + getTenant(), getParentForChildren(), isClean()); + tenant_ = null; + } + return tenantBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CreateTenantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CreateTenantRequest) + private static final com.google.cloud.talent.v4.CreateTenantRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CreateTenantRequest(); + } + + public static com.google.cloud.talent.v4.CreateTenantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTenantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTenantRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CreateTenantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequestOrBuilder.java new file mode 100644 index 00000000..89cb7dd2 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface CreateTenantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CreateTenantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + boolean hasTenant(); + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + com.google.cloud.talent.v4.Tenant getTenant(); + /** + * + * + *
+   * Required. The tenant to be created.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttribute.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttribute.java new file mode 100644 index 00000000..0f66c7b6 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttribute.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Custom attribute values that are either filterable or non-filterable.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CustomAttribute} + */ +public final class CustomAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.CustomAttribute) + CustomAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomAttribute.newBuilder() to construct. + private CustomAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomAttribute() { + stringValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + longValues_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomAttribute(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomAttribute( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + stringValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + stringValues_.add(s); + break; + } + case 16: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + longValues_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + longValues_.addLong(input.readInt64()); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + longValues_ = newLongList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + longValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 24: + { + filterable_ = input.readBool(); + break; + } + case 32: + { + keywordSearchable_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + stringValues_ = stringValues_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + longValues_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CustomAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CustomAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CustomAttribute.class, + com.google.cloud.talent.v4.CustomAttribute.Builder.class); + } + + public static final int STRING_VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList stringValues_; + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @return A list containing the stringValues. + */ + public com.google.protobuf.ProtocolStringList getStringValuesList() { + return stringValues_; + } + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @return The count of stringValues. + */ + public int getStringValuesCount() { + return stringValues_.size(); + } + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the element to return. + * @return The stringValues at the given index. + */ + public java.lang.String getStringValues(int index) { + return stringValues_.get(index); + } + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the stringValues at the given index. + */ + public com.google.protobuf.ByteString getStringValuesBytes(int index) { + return stringValues_.getByteString(index); + } + + public static final int LONG_VALUES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.LongList longValues_; + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @return A list containing the longValues. + */ + @java.lang.Override + public java.util.List getLongValuesList() { + return longValues_; + } + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @return The count of longValues. + */ + public int getLongValuesCount() { + return longValues_.size(); + } + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @param index The index of the element to return. + * @return The longValues at the given index. + */ + public long getLongValues(int index) { + return longValues_.getLong(index); + } + + private int longValuesMemoizedSerializedSize = -1; + + public static final int FILTERABLE_FIELD_NUMBER = 3; + private boolean filterable_; + /** + * + * + *
+   * If the `filterable` flag is true, the custom field values may be used for
+   * custom attribute filters
+   * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter].
+   * If false, these values may not be used for custom attribute filters.
+   * Default is false.
+   * 
+ * + * bool filterable = 3; + * + * @return The filterable. + */ + @java.lang.Override + public boolean getFilterable() { + return filterable_; + } + + public static final int KEYWORD_SEARCHABLE_FIELD_NUMBER = 4; + private boolean keywordSearchable_; + /** + * + * + *
+   * If the `keyword_searchable` flag is true, the keywords in custom fields are
+   * searchable by keyword match.
+   * If false, the values are not searchable by keyword match.
+   * Default is false.
+   * 
+ * + * bool keyword_searchable = 4; + * + * @return The keywordSearchable. + */ + @java.lang.Override + public boolean getKeywordSearchable() { + return keywordSearchable_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < stringValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringValues_.getRaw(i)); + } + if (getLongValuesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(longValuesMemoizedSerializedSize); + } + for (int i = 0; i < longValues_.size(); i++) { + output.writeInt64NoTag(longValues_.getLong(i)); + } + if (filterable_ != false) { + output.writeBool(3, filterable_); + } + if (keywordSearchable_ != false) { + output.writeBool(4, keywordSearchable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < stringValues_.size(); i++) { + dataSize += computeStringSizeNoTag(stringValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getStringValuesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < longValues_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(longValues_.getLong(i)); + } + size += dataSize; + if (!getLongValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + longValuesMemoizedSerializedSize = dataSize; + } + if (filterable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, filterable_); + } + if (keywordSearchable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, keywordSearchable_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.CustomAttribute)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.CustomAttribute other = + (com.google.cloud.talent.v4.CustomAttribute) obj; + + if (!getStringValuesList().equals(other.getStringValuesList())) return false; + if (!getLongValuesList().equals(other.getLongValuesList())) return false; + if (getFilterable() != other.getFilterable()) return false; + if (getKeywordSearchable() != other.getKeywordSearchable()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStringValuesCount() > 0) { + hash = (37 * hash) + STRING_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getStringValuesList().hashCode(); + } + if (getLongValuesCount() > 0) { + hash = (37 * hash) + LONG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getLongValuesList().hashCode(); + } + hash = (37 * hash) + FILTERABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFilterable()); + hash = (37 * hash) + KEYWORD_SEARCHABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getKeywordSearchable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.CustomAttribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.CustomAttribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Custom attribute values that are either filterable or non-filterable.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.CustomAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.CustomAttribute) + com.google.cloud.talent.v4.CustomAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CustomAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CustomAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.CustomAttribute.class, + com.google.cloud.talent.v4.CustomAttribute.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.CustomAttribute.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + stringValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + longValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + filterable_ = false; + + keywordSearchable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_CustomAttribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getDefaultInstanceForType() { + return com.google.cloud.talent.v4.CustomAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute build() { + com.google.cloud.talent.v4.CustomAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute buildPartial() { + com.google.cloud.talent.v4.CustomAttribute result = + new com.google.cloud.talent.v4.CustomAttribute(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + stringValues_ = stringValues_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.stringValues_ = stringValues_; + if (((bitField0_ & 0x00000002) != 0)) { + longValues_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.longValues_ = longValues_; + result.filterable_ = filterable_; + result.keywordSearchable_ = keywordSearchable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.CustomAttribute) { + return mergeFrom((com.google.cloud.talent.v4.CustomAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.CustomAttribute other) { + if (other == com.google.cloud.talent.v4.CustomAttribute.getDefaultInstance()) return this; + if (!other.stringValues_.isEmpty()) { + if (stringValues_.isEmpty()) { + stringValues_ = other.stringValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStringValuesIsMutable(); + stringValues_.addAll(other.stringValues_); + } + onChanged(); + } + if (!other.longValues_.isEmpty()) { + if (longValues_.isEmpty()) { + longValues_ = other.longValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLongValuesIsMutable(); + longValues_.addAll(other.longValues_); + } + onChanged(); + } + if (other.getFilterable() != false) { + setFilterable(other.getFilterable()); + } + if (other.getKeywordSearchable() != false) { + setKeywordSearchable(other.getKeywordSearchable()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.CustomAttribute parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.CustomAttribute) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList stringValues_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureStringValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + stringValues_ = new com.google.protobuf.LazyStringArrayList(stringValues_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @return A list containing the stringValues. + */ + public com.google.protobuf.ProtocolStringList getStringValuesList() { + return stringValues_.getUnmodifiableView(); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @return The count of stringValues. + */ + public int getStringValuesCount() { + return stringValues_.size(); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the element to return. + * @return The stringValues at the given index. + */ + public java.lang.String getStringValues(int index) { + return stringValues_.get(index); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the stringValues at the given index. + */ + public com.google.protobuf.ByteString getStringValuesBytes(int index) { + return stringValues_.getByteString(index); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param index The index to set the value at. + * @param value The stringValues to set. + * @return This builder for chaining. + */ + public Builder setStringValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringValuesIsMutable(); + stringValues_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param value The stringValues to add. + * @return This builder for chaining. + */ + public Builder addStringValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringValuesIsMutable(); + stringValues_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param values The stringValues to add. + * @return This builder for chaining. + */ + public Builder addAllStringValues(java.lang.Iterable values) { + ensureStringValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stringValues_); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @return This builder for chaining. + */ + public Builder clearStringValues() { + stringValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+     * `CASE_INSENSITIVE_MATCH`) search.
+     * For filterable `string_value`s, a maximum total number of 200 values
+     * is allowed, with each `string_value` has a byte size of no more than
+     * 500B. For unfilterable `string_values`, the maximum total byte size of
+     * unfilterable `string_values` is 50KB.
+     * Empty string isn't allowed.
+     * 
+ * + * repeated string string_values = 1; + * + * @param value The bytes of the stringValues to add. + * @return This builder for chaining. + */ + public Builder addStringValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureStringValuesIsMutable(); + stringValues_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList longValues_ = emptyLongList(); + + private void ensureLongValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + longValues_ = mutableCopy(longValues_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @return A list containing the longValues. + */ + public java.util.List getLongValuesList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(longValues_) + : longValues_; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @return The count of longValues. + */ + public int getLongValuesCount() { + return longValues_.size(); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @param index The index of the element to return. + * @return The longValues at the given index. + */ + public long getLongValues(int index) { + return longValues_.getLong(index); + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @param index The index to set the value at. + * @param value The longValues to set. + * @return This builder for chaining. + */ + public Builder setLongValues(int index, long value) { + ensureLongValuesIsMutable(); + longValues_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @param value The longValues to add. + * @return This builder for chaining. + */ + public Builder addLongValues(long value) { + ensureLongValuesIsMutable(); + longValues_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @param values The longValues to add. + * @return This builder for chaining. + */ + public Builder addAllLongValues(java.lang.Iterable values) { + ensureLongValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, longValues_); + onChanged(); + return this; + } + /** + * + * + *
+     * Exactly one of
+     * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+     * specified.
+     * This field is used to perform number range search.
+     * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+     * Currently at most 1
+     * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+     * supported.
+     * 
+ * + * repeated int64 long_values = 2; + * + * @return This builder for chaining. + */ + public Builder clearLongValues() { + longValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private boolean filterable_; + /** + * + * + *
+     * If the `filterable` flag is true, the custom field values may be used for
+     * custom attribute filters
+     * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter].
+     * If false, these values may not be used for custom attribute filters.
+     * Default is false.
+     * 
+ * + * bool filterable = 3; + * + * @return The filterable. + */ + @java.lang.Override + public boolean getFilterable() { + return filterable_; + } + /** + * + * + *
+     * If the `filterable` flag is true, the custom field values may be used for
+     * custom attribute filters
+     * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter].
+     * If false, these values may not be used for custom attribute filters.
+     * Default is false.
+     * 
+ * + * bool filterable = 3; + * + * @param value The filterable to set. + * @return This builder for chaining. + */ + public Builder setFilterable(boolean value) { + + filterable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the `filterable` flag is true, the custom field values may be used for
+     * custom attribute filters
+     * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter].
+     * If false, these values may not be used for custom attribute filters.
+     * Default is false.
+     * 
+ * + * bool filterable = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilterable() { + + filterable_ = false; + onChanged(); + return this; + } + + private boolean keywordSearchable_; + /** + * + * + *
+     * If the `keyword_searchable` flag is true, the keywords in custom fields are
+     * searchable by keyword match.
+     * If false, the values are not searchable by keyword match.
+     * Default is false.
+     * 
+ * + * bool keyword_searchable = 4; + * + * @return The keywordSearchable. + */ + @java.lang.Override + public boolean getKeywordSearchable() { + return keywordSearchable_; + } + /** + * + * + *
+     * If the `keyword_searchable` flag is true, the keywords in custom fields are
+     * searchable by keyword match.
+     * If false, the values are not searchable by keyword match.
+     * Default is false.
+     * 
+ * + * bool keyword_searchable = 4; + * + * @param value The keywordSearchable to set. + * @return This builder for chaining. + */ + public Builder setKeywordSearchable(boolean value) { + + keywordSearchable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the `keyword_searchable` flag is true, the keywords in custom fields are
+     * searchable by keyword match.
+     * If false, the values are not searchable by keyword match.
+     * Default is false.
+     * 
+ * + * bool keyword_searchable = 4; + * + * @return This builder for chaining. + */ + public Builder clearKeywordSearchable() { + + keywordSearchable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.CustomAttribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.CustomAttribute) + private static final com.google.cloud.talent.v4.CustomAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.CustomAttribute(); + } + + public static com.google.cloud.talent.v4.CustomAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomAttribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomAttribute(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttributeOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttributeOrBuilder.java new file mode 100644 index 00000000..8f69c60c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttributeOrBuilder.java @@ -0,0 +1,211 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface CustomAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.CustomAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @return A list containing the stringValues. + */ + java.util.List getStringValuesList(); + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @return The count of stringValues. + */ + int getStringValuesCount(); + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the element to return. + * @return The stringValues at the given index. + */ + java.lang.String getStringValues(int index); + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or
+   * `CASE_INSENSITIVE_MATCH`) search.
+   * For filterable `string_value`s, a maximum total number of 200 values
+   * is allowed, with each `string_value` has a byte size of no more than
+   * 500B. For unfilterable `string_values`, the maximum total byte size of
+   * unfilterable `string_values` is 50KB.
+   * Empty string isn't allowed.
+   * 
+ * + * repeated string string_values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the stringValues at the given index. + */ + com.google.protobuf.ByteString getStringValuesBytes(int index); + + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @return A list containing the longValues. + */ + java.util.List getLongValuesList(); + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @return The count of longValues. + */ + int getLongValuesCount(); + /** + * + * + *
+   * Exactly one of
+   * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be
+   * specified.
+   * This field is used to perform number range search.
+   * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`.
+   * Currently at most 1
+   * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is
+   * supported.
+   * 
+ * + * repeated int64 long_values = 2; + * + * @param index The index of the element to return. + * @return The longValues at the given index. + */ + long getLongValues(int index); + + /** + * + * + *
+   * If the `filterable` flag is true, the custom field values may be used for
+   * custom attribute filters
+   * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter].
+   * If false, these values may not be used for custom attribute filters.
+   * Default is false.
+   * 
+ * + * bool filterable = 3; + * + * @return The filterable. + */ + boolean getFilterable(); + + /** + * + * + *
+   * If the `keyword_searchable` flag is true, the keywords in custom fields are
+   * searchable by keyword match.
+   * If false, the values are not searchable by keyword match.
+   * Default is false.
+   * 
+ * + * bool keyword_searchable = 4; + * + * @return The keywordSearchable. + */ + boolean getKeywordSearchable(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DegreeType.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DegreeType.java new file mode 100644 index 00000000..90502af8 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DegreeType.java @@ -0,0 +1,357 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Educational degree level defined in International Standard Classification
+ * of Education (ISCED).
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.DegreeType} + */ +public enum DegreeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value. Represents no degree, or early childhood education.
+   * Maps to ISCED code 0.
+   * Ex) Kindergarten
+   * 
+ * + * DEGREE_TYPE_UNSPECIFIED = 0; + */ + DEGREE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Primary education which is typically the first stage of compulsory
+   * education. ISCED code 1.
+   * Ex) Elementary school
+   * 
+ * + * PRIMARY_EDUCATION = 1; + */ + PRIMARY_EDUCATION(1), + /** + * + * + *
+   * Lower secondary education; First stage of secondary education building on
+   * primary education, typically with a more subject-oriented curriculum.
+   * ISCED code 2.
+   * Ex) Middle school
+   * 
+ * + * LOWER_SECONDARY_EDUCATION = 2; + */ + LOWER_SECONDARY_EDUCATION(2), + /** + * + * + *
+   * Middle education; Second/final stage of secondary education preparing for
+   * tertiary education and/or providing skills relevant to employment.
+   * Usually with an increased range of subject options and streams. ISCED
+   * code 3.
+   * Ex) High school
+   * 
+ * + * UPPER_SECONDARY_EDUCATION = 3; + */ + UPPER_SECONDARY_EDUCATION(3), + /** + * + * + *
+   * Adult Remedial Education; Programmes providing learning experiences that
+   * build on secondary education and prepare for labour market entry and/or
+   * tertiary education. The content is broader than secondary but not as
+   * complex as tertiary education. ISCED code 4.
+   * 
+ * + * ADULT_REMEDIAL_EDUCATION = 4; + */ + ADULT_REMEDIAL_EDUCATION(4), + /** + * + * + *
+   * Associate's or equivalent; Short first tertiary programmes that are
+   * typically practically-based, occupationally-specific and prepare for
+   * labour market entry. These programmes may also provide a pathway to other
+   * tertiary programmes. ISCED code 5.
+   * 
+ * + * ASSOCIATES_OR_EQUIVALENT = 5; + */ + ASSOCIATES_OR_EQUIVALENT(5), + /** + * + * + *
+   * Bachelor's or equivalent; Programmes designed to provide intermediate
+   * academic and/or professional knowledge, skills and competencies leading
+   * to a first tertiary degree or equivalent qualification. ISCED code 6.
+   * 
+ * + * BACHELORS_OR_EQUIVALENT = 6; + */ + BACHELORS_OR_EQUIVALENT(6), + /** + * + * + *
+   * Master's or equivalent; Programmes designed to provide advanced academic
+   * and/or professional knowledge, skills and competencies leading to a
+   * second tertiary degree or equivalent qualification. ISCED code 7.
+   * 
+ * + * MASTERS_OR_EQUIVALENT = 7; + */ + MASTERS_OR_EQUIVALENT(7), + /** + * + * + *
+   * Doctoral or equivalent; Programmes designed primarily to lead to an
+   * advanced research qualification, usually concluding with the submission
+   * and defense of a substantive dissertation of publishable quality based on
+   * original research. ISCED code 8.
+   * 
+ * + * DOCTORAL_OR_EQUIVALENT = 8; + */ + DOCTORAL_OR_EQUIVALENT(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value. Represents no degree, or early childhood education.
+   * Maps to ISCED code 0.
+   * Ex) Kindergarten
+   * 
+ * + * DEGREE_TYPE_UNSPECIFIED = 0; + */ + public static final int DEGREE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Primary education which is typically the first stage of compulsory
+   * education. ISCED code 1.
+   * Ex) Elementary school
+   * 
+ * + * PRIMARY_EDUCATION = 1; + */ + public static final int PRIMARY_EDUCATION_VALUE = 1; + /** + * + * + *
+   * Lower secondary education; First stage of secondary education building on
+   * primary education, typically with a more subject-oriented curriculum.
+   * ISCED code 2.
+   * Ex) Middle school
+   * 
+ * + * LOWER_SECONDARY_EDUCATION = 2; + */ + public static final int LOWER_SECONDARY_EDUCATION_VALUE = 2; + /** + * + * + *
+   * Middle education; Second/final stage of secondary education preparing for
+   * tertiary education and/or providing skills relevant to employment.
+   * Usually with an increased range of subject options and streams. ISCED
+   * code 3.
+   * Ex) High school
+   * 
+ * + * UPPER_SECONDARY_EDUCATION = 3; + */ + public static final int UPPER_SECONDARY_EDUCATION_VALUE = 3; + /** + * + * + *
+   * Adult Remedial Education; Programmes providing learning experiences that
+   * build on secondary education and prepare for labour market entry and/or
+   * tertiary education. The content is broader than secondary but not as
+   * complex as tertiary education. ISCED code 4.
+   * 
+ * + * ADULT_REMEDIAL_EDUCATION = 4; + */ + public static final int ADULT_REMEDIAL_EDUCATION_VALUE = 4; + /** + * + * + *
+   * Associate's or equivalent; Short first tertiary programmes that are
+   * typically practically-based, occupationally-specific and prepare for
+   * labour market entry. These programmes may also provide a pathway to other
+   * tertiary programmes. ISCED code 5.
+   * 
+ * + * ASSOCIATES_OR_EQUIVALENT = 5; + */ + public static final int ASSOCIATES_OR_EQUIVALENT_VALUE = 5; + /** + * + * + *
+   * Bachelor's or equivalent; Programmes designed to provide intermediate
+   * academic and/or professional knowledge, skills and competencies leading
+   * to a first tertiary degree or equivalent qualification. ISCED code 6.
+   * 
+ * + * BACHELORS_OR_EQUIVALENT = 6; + */ + public static final int BACHELORS_OR_EQUIVALENT_VALUE = 6; + /** + * + * + *
+   * Master's or equivalent; Programmes designed to provide advanced academic
+   * and/or professional knowledge, skills and competencies leading to a
+   * second tertiary degree or equivalent qualification. ISCED code 7.
+   * 
+ * + * MASTERS_OR_EQUIVALENT = 7; + */ + public static final int MASTERS_OR_EQUIVALENT_VALUE = 7; + /** + * + * + *
+   * Doctoral or equivalent; Programmes designed primarily to lead to an
+   * advanced research qualification, usually concluding with the submission
+   * and defense of a substantive dissertation of publishable quality based on
+   * original research. ISCED code 8.
+   * 
+ * + * DOCTORAL_OR_EQUIVALENT = 8; + */ + public static final int DOCTORAL_OR_EQUIVALENT_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DegreeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DegreeType forNumber(int value) { + switch (value) { + case 0: + return DEGREE_TYPE_UNSPECIFIED; + case 1: + return PRIMARY_EDUCATION; + case 2: + return LOWER_SECONDARY_EDUCATION; + case 3: + return UPPER_SECONDARY_EDUCATION; + case 4: + return ADULT_REMEDIAL_EDUCATION; + case 5: + return ASSOCIATES_OR_EQUIVALENT; + case 6: + return BACHELORS_OR_EQUIVALENT; + case 7: + return MASTERS_OR_EQUIVALENT; + case 8: + return DOCTORAL_OR_EQUIVALENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DegreeType findValueByNumber(int number) { + return DegreeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(2); + } + + private static final DegreeType[] VALUES = values(); + + public static DegreeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DegreeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.DegreeType) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequest.java new file mode 100644 index 00000000..3a4075f5 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequest.java @@ -0,0 +1,670 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request to delete a company.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteCompanyRequest} + */ +public final class DeleteCompanyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.DeleteCompanyRequest) + DeleteCompanyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCompanyRequest.newBuilder() to construct. + private DeleteCompanyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCompanyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCompanyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCompanyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_DeleteCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_DeleteCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteCompanyRequest.class, + com.google.cloud.talent.v4.DeleteCompanyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the company to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the company to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.DeleteCompanyRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.DeleteCompanyRequest other = + (com.google.cloud.talent.v4.DeleteCompanyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.DeleteCompanyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to delete a company.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteCompanyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.DeleteCompanyRequest) + com.google.cloud.talent.v4.DeleteCompanyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_DeleteCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_DeleteCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteCompanyRequest.class, + com.google.cloud.talent.v4.DeleteCompanyRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.DeleteCompanyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_DeleteCompanyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteCompanyRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.DeleteCompanyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteCompanyRequest build() { + com.google.cloud.talent.v4.DeleteCompanyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteCompanyRequest buildPartial() { + com.google.cloud.talent.v4.DeleteCompanyRequest result = + new com.google.cloud.talent.v4.DeleteCompanyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.DeleteCompanyRequest) { + return mergeFrom((com.google.cloud.talent.v4.DeleteCompanyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.DeleteCompanyRequest other) { + if (other == com.google.cloud.talent.v4.DeleteCompanyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.DeleteCompanyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.DeleteCompanyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the company to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.DeleteCompanyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.DeleteCompanyRequest) + private static final com.google.cloud.talent.v4.DeleteCompanyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.DeleteCompanyRequest(); + } + + public static com.google.cloud.talent.v4.DeleteCompanyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCompanyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCompanyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteCompanyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequestOrBuilder.java new file mode 100644 index 00000000..6090689c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface DeleteCompanyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.DeleteCompanyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the company to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the company to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequest.java new file mode 100644 index 00000000..014717ea --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Delete job request.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteJobRequest} + */ +public final class DeleteJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.DeleteJobRequest) + DeleteJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteJobRequest.newBuilder() to construct. + private DeleteJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_DeleteJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_DeleteJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteJobRequest.class, + com.google.cloud.talent.v4.DeleteJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the job to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the job to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.DeleteJobRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.DeleteJobRequest other = + (com.google.cloud.talent.v4.DeleteJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.DeleteJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Delete job request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.DeleteJobRequest) + com.google.cloud.talent.v4.DeleteJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_DeleteJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_DeleteJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteJobRequest.class, + com.google.cloud.talent.v4.DeleteJobRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.DeleteJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_DeleteJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteJobRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.DeleteJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteJobRequest build() { + com.google.cloud.talent.v4.DeleteJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteJobRequest buildPartial() { + com.google.cloud.talent.v4.DeleteJobRequest result = + new com.google.cloud.talent.v4.DeleteJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.DeleteJobRequest) { + return mergeFrom((com.google.cloud.talent.v4.DeleteJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.DeleteJobRequest other) { + if (other == com.google.cloud.talent.v4.DeleteJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.DeleteJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.DeleteJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the job to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the job to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the job to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the job to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the job to be deleted.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.DeleteJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.DeleteJobRequest) + private static final com.google.cloud.talent.v4.DeleteJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.DeleteJobRequest(); + } + + public static com.google.cloud.talent.v4.DeleteJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequestOrBuilder.java new file mode 100644 index 00000000..67be0b74 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface DeleteJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.DeleteJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the job to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the job to be deleted.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequest.java new file mode 100644 index 00000000..2277b912 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequest.java @@ -0,0 +1,662 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request to delete a tenant.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteTenantRequest} + */ +public final class DeleteTenantRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.DeleteTenantRequest) + DeleteTenantRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTenantRequest.newBuilder() to construct. + private DeleteTenantRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTenantRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTenantRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTenantRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_DeleteTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_DeleteTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteTenantRequest.class, + com.google.cloud.talent.v4.DeleteTenantRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the tenant to be deleted.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant to be deleted.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.DeleteTenantRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.DeleteTenantRequest other = + (com.google.cloud.talent.v4.DeleteTenantRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.DeleteTenantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to delete a tenant.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeleteTenantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.DeleteTenantRequest) + com.google.cloud.talent.v4.DeleteTenantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_DeleteTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_DeleteTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeleteTenantRequest.class, + com.google.cloud.talent.v4.DeleteTenantRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.DeleteTenantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_DeleteTenantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteTenantRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.DeleteTenantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteTenantRequest build() { + com.google.cloud.talent.v4.DeleteTenantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteTenantRequest buildPartial() { + com.google.cloud.talent.v4.DeleteTenantRequest result = + new com.google.cloud.talent.v4.DeleteTenantRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.DeleteTenantRequest) { + return mergeFrom((com.google.cloud.talent.v4.DeleteTenantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.DeleteTenantRequest other) { + if (other == com.google.cloud.talent.v4.DeleteTenantRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.DeleteTenantRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.DeleteTenantRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant to be deleted.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to be deleted.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to be deleted.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to be deleted.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to be deleted.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.DeleteTenantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.DeleteTenantRequest) + private static final com.google.cloud.talent.v4.DeleteTenantRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.DeleteTenantRequest(); + } + + public static com.google.cloud.talent.v4.DeleteTenantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTenantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTenantRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeleteTenantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequestOrBuilder.java new file mode 100644 index 00000000..52c67799 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface DeleteTenantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.DeleteTenantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant to be deleted.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the tenant to be deleted.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfo.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfo.java new file mode 100644 index 00000000..bc7fb360 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfo.java @@ -0,0 +1,1048 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Device information collected from the job seeker, candidate, or
+ * other entity conducting the job search. Providing this information improves
+ * the quality of the search results across devices.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeviceInfo} + */ +public final class DeviceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.DeviceInfo) + DeviceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeviceInfo.newBuilder() to construct. + private DeviceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceInfo() { + deviceType_ = 0; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeviceInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + deviceType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_DeviceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_DeviceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeviceInfo.class, + com.google.cloud.talent.v4.DeviceInfo.Builder.class); + } + + /** + * + * + *
+   * An enumeration describing an API access portal and exposure mechanism.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.DeviceInfo.DeviceType} + */ + public enum DeviceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The device type isn't specified.
+     * 
+ * + * DEVICE_TYPE_UNSPECIFIED = 0; + */ + DEVICE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A desktop web browser, such as, Chrome, Firefox, Safari, or Internet
+     * Explorer)
+     * 
+ * + * WEB = 1; + */ + WEB(1), + /** + * + * + *
+     * A mobile device web browser, such as a phone or tablet with a Chrome
+     * browser.
+     * 
+ * + * MOBILE_WEB = 2; + */ + MOBILE_WEB(2), + /** + * + * + *
+     * An Android device native application.
+     * 
+ * + * ANDROID = 3; + */ + ANDROID(3), + /** + * + * + *
+     * An iOS device native application.
+     * 
+ * + * IOS = 4; + */ + IOS(4), + /** + * + * + *
+     * A bot, as opposed to a device operated by human beings, such as a web
+     * crawler.
+     * 
+ * + * BOT = 5; + */ + BOT(5), + /** + * + * + *
+     * Other devices types.
+     * 
+ * + * OTHER = 6; + */ + OTHER(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The device type isn't specified.
+     * 
+ * + * DEVICE_TYPE_UNSPECIFIED = 0; + */ + public static final int DEVICE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A desktop web browser, such as, Chrome, Firefox, Safari, or Internet
+     * Explorer)
+     * 
+ * + * WEB = 1; + */ + public static final int WEB_VALUE = 1; + /** + * + * + *
+     * A mobile device web browser, such as a phone or tablet with a Chrome
+     * browser.
+     * 
+ * + * MOBILE_WEB = 2; + */ + public static final int MOBILE_WEB_VALUE = 2; + /** + * + * + *
+     * An Android device native application.
+     * 
+ * + * ANDROID = 3; + */ + public static final int ANDROID_VALUE = 3; + /** + * + * + *
+     * An iOS device native application.
+     * 
+ * + * IOS = 4; + */ + public static final int IOS_VALUE = 4; + /** + * + * + *
+     * A bot, as opposed to a device operated by human beings, such as a web
+     * crawler.
+     * 
+ * + * BOT = 5; + */ + public static final int BOT_VALUE = 5; + /** + * + * + *
+     * Other devices types.
+     * 
+ * + * OTHER = 6; + */ + public static final int OTHER_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceType forNumber(int value) { + switch (value) { + case 0: + return DEVICE_TYPE_UNSPECIFIED; + case 1: + return WEB; + case 2: + return MOBILE_WEB; + case 3: + return ANDROID; + case 4: + return IOS; + case 5: + return BOT; + case 6: + return OTHER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeviceType findValueByNumber(int number) { + return DeviceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.DeviceInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final DeviceType[] VALUES = values(); + + public static DeviceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeviceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.DeviceInfo.DeviceType) + } + + public static final int DEVICE_TYPE_FIELD_NUMBER = 1; + private int deviceType_; + /** + * + * + *
+   * Type of the device.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The enum numeric value on the wire for deviceType. + */ + @java.lang.Override + public int getDeviceTypeValue() { + return deviceType_; + } + /** + * + * + *
+   * Type of the device.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The deviceType. + */ + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo.DeviceType getDeviceType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.DeviceInfo.DeviceType result = + com.google.cloud.talent.v4.DeviceInfo.DeviceType.valueOf(deviceType_); + return result == null ? com.google.cloud.talent.v4.DeviceInfo.DeviceType.UNRECOGNIZED : result; + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * A device-specific ID. The ID must be a unique identifier that
+   * distinguishes the device from other devices.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * A device-specific ID. The ID must be a unique identifier that
+   * distinguishes the device from other devices.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deviceType_ + != com.google.cloud.talent.v4.DeviceInfo.DeviceType.DEVICE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, deviceType_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deviceType_ + != com.google.cloud.talent.v4.DeviceInfo.DeviceType.DEVICE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, deviceType_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.DeviceInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.DeviceInfo other = (com.google.cloud.talent.v4.DeviceInfo) obj; + + if (deviceType_ != other.deviceType_) return false; + if (!getId().equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + deviceType_; + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.DeviceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.DeviceInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Device information collected from the job seeker, candidate, or
+   * other entity conducting the job search. Providing this information improves
+   * the quality of the search results across devices.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.DeviceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.DeviceInfo) + com.google.cloud.talent.v4.DeviceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_DeviceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_DeviceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.DeviceInfo.class, + com.google.cloud.talent.v4.DeviceInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.DeviceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + deviceType_ = 0; + + id_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_DeviceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.DeviceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo build() { + com.google.cloud.talent.v4.DeviceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo buildPartial() { + com.google.cloud.talent.v4.DeviceInfo result = + new com.google.cloud.talent.v4.DeviceInfo(this); + result.deviceType_ = deviceType_; + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.DeviceInfo) { + return mergeFrom((com.google.cloud.talent.v4.DeviceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.DeviceInfo other) { + if (other == com.google.cloud.talent.v4.DeviceInfo.getDefaultInstance()) return this; + if (other.deviceType_ != 0) { + setDeviceTypeValue(other.getDeviceTypeValue()); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.DeviceInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.DeviceInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int deviceType_ = 0; + /** + * + * + *
+     * Type of the device.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The enum numeric value on the wire for deviceType. + */ + @java.lang.Override + public int getDeviceTypeValue() { + return deviceType_; + } + /** + * + * + *
+     * Type of the device.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @param value The enum numeric value on the wire for deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceTypeValue(int value) { + + deviceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the device.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The deviceType. + */ + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo.DeviceType getDeviceType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.DeviceInfo.DeviceType result = + com.google.cloud.talent.v4.DeviceInfo.DeviceType.valueOf(deviceType_); + return result == null + ? com.google.cloud.talent.v4.DeviceInfo.DeviceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the device.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @param value The deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceType(com.google.cloud.talent.v4.DeviceInfo.DeviceType value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the device.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearDeviceType() { + + deviceType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * A device-specific ID. The ID must be a unique identifier that
+     * distinguishes the device from other devices.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A device-specific ID. The ID must be a unique identifier that
+     * distinguishes the device from other devices.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A device-specific ID. The ID must be a unique identifier that
+     * distinguishes the device from other devices.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A device-specific ID. The ID must be a unique identifier that
+     * distinguishes the device from other devices.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A device-specific ID. The ID must be a unique identifier that
+     * distinguishes the device from other devices.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.DeviceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.DeviceInfo) + private static final com.google.cloud.talent.v4.DeviceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.DeviceInfo(); + } + + public static com.google.cloud.talent.v4.DeviceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeviceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfoOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfoOrBuilder.java new file mode 100644 index 00000000..552aded2 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfoOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface DeviceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.DeviceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the device.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The enum numeric value on the wire for deviceType. + */ + int getDeviceTypeValue(); + /** + * + * + *
+   * Type of the device.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * + * @return The deviceType. + */ + com.google.cloud.talent.v4.DeviceInfo.DeviceType getDeviceType(); + + /** + * + * + *
+   * A device-specific ID. The ID must be a unique identifier that
+   * distinguishes the device from other devices.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * A device-specific ID. The ID must be a unique identifier that
+   * distinguishes the device from other devices.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EmploymentType.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EmploymentType.java new file mode 100644 index 00000000..c62e91b8 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EmploymentType.java @@ -0,0 +1,380 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An enum that represents the employment type of a job.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.EmploymentType} + */ +public enum EmploymentType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value if the employment type isn't specified.
+   * 
+ * + * EMPLOYMENT_TYPE_UNSPECIFIED = 0; + */ + EMPLOYMENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The job requires working a number of hours that constitute full
+   * time employment, typically 40 or more hours per week.
+   * 
+ * + * FULL_TIME = 1; + */ + FULL_TIME(1), + /** + * + * + *
+   * The job entails working fewer hours than a full time job,
+   * typically less than 40 hours a week.
+   * 
+ * + * PART_TIME = 2; + */ + PART_TIME(2), + /** + * + * + *
+   * The job is offered as a contracted, as opposed to a salaried employee,
+   * position.
+   * 
+ * + * CONTRACTOR = 3; + */ + CONTRACTOR(3), + /** + * + * + *
+   * The job is offered as a contracted position with the understanding
+   * that it's converted into a full-time position at the end of the
+   * contract. Jobs of this type are also returned by a search for
+   * [EmploymentType.CONTRACTOR][google.cloud.talent.v4.EmploymentType.CONTRACTOR]
+   * jobs.
+   * 
+ * + * CONTRACT_TO_HIRE = 4; + */ + CONTRACT_TO_HIRE(4), + /** + * + * + *
+   * The job is offered as a temporary employment opportunity, usually
+   * a short-term engagement.
+   * 
+ * + * TEMPORARY = 5; + */ + TEMPORARY(5), + /** + * + * + *
+   * The job is a fixed-term opportunity for students or entry-level job
+   * seekers to obtain on-the-job training, typically offered as a summer
+   * position.
+   * 
+ * + * INTERN = 6; + */ + INTERN(6), + /** + * + * + *
+   * The is an opportunity for an individual to volunteer, where there's no
+   * expectation of compensation for the provided services.
+   * 
+ * + * VOLUNTEER = 7; + */ + VOLUNTEER(7), + /** + * + * + *
+   * The job requires an employee to work on an as-needed basis with a
+   * flexible schedule.
+   * 
+ * + * PER_DIEM = 8; + */ + PER_DIEM(8), + /** + * + * + *
+   * The job involves employing people in remote areas and flying them
+   * temporarily to the work site instead of relocating employees and their
+   * families permanently.
+   * 
+ * + * FLY_IN_FLY_OUT = 9; + */ + FLY_IN_FLY_OUT(9), + /** + * + * + *
+   * The job does not fit any of the other listed types.
+   * 
+ * + * OTHER_EMPLOYMENT_TYPE = 10; + */ + OTHER_EMPLOYMENT_TYPE(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value if the employment type isn't specified.
+   * 
+ * + * EMPLOYMENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EMPLOYMENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The job requires working a number of hours that constitute full
+   * time employment, typically 40 or more hours per week.
+   * 
+ * + * FULL_TIME = 1; + */ + public static final int FULL_TIME_VALUE = 1; + /** + * + * + *
+   * The job entails working fewer hours than a full time job,
+   * typically less than 40 hours a week.
+   * 
+ * + * PART_TIME = 2; + */ + public static final int PART_TIME_VALUE = 2; + /** + * + * + *
+   * The job is offered as a contracted, as opposed to a salaried employee,
+   * position.
+   * 
+ * + * CONTRACTOR = 3; + */ + public static final int CONTRACTOR_VALUE = 3; + /** + * + * + *
+   * The job is offered as a contracted position with the understanding
+   * that it's converted into a full-time position at the end of the
+   * contract. Jobs of this type are also returned by a search for
+   * [EmploymentType.CONTRACTOR][google.cloud.talent.v4.EmploymentType.CONTRACTOR]
+   * jobs.
+   * 
+ * + * CONTRACT_TO_HIRE = 4; + */ + public static final int CONTRACT_TO_HIRE_VALUE = 4; + /** + * + * + *
+   * The job is offered as a temporary employment opportunity, usually
+   * a short-term engagement.
+   * 
+ * + * TEMPORARY = 5; + */ + public static final int TEMPORARY_VALUE = 5; + /** + * + * + *
+   * The job is a fixed-term opportunity for students or entry-level job
+   * seekers to obtain on-the-job training, typically offered as a summer
+   * position.
+   * 
+ * + * INTERN = 6; + */ + public static final int INTERN_VALUE = 6; + /** + * + * + *
+   * The is an opportunity for an individual to volunteer, where there's no
+   * expectation of compensation for the provided services.
+   * 
+ * + * VOLUNTEER = 7; + */ + public static final int VOLUNTEER_VALUE = 7; + /** + * + * + *
+   * The job requires an employee to work on an as-needed basis with a
+   * flexible schedule.
+   * 
+ * + * PER_DIEM = 8; + */ + public static final int PER_DIEM_VALUE = 8; + /** + * + * + *
+   * The job involves employing people in remote areas and flying them
+   * temporarily to the work site instead of relocating employees and their
+   * families permanently.
+   * 
+ * + * FLY_IN_FLY_OUT = 9; + */ + public static final int FLY_IN_FLY_OUT_VALUE = 9; + /** + * + * + *
+   * The job does not fit any of the other listed types.
+   * 
+ * + * OTHER_EMPLOYMENT_TYPE = 10; + */ + public static final int OTHER_EMPLOYMENT_TYPE_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EmploymentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EmploymentType forNumber(int value) { + switch (value) { + case 0: + return EMPLOYMENT_TYPE_UNSPECIFIED; + case 1: + return FULL_TIME; + case 2: + return PART_TIME; + case 3: + return CONTRACTOR; + case 4: + return CONTRACT_TO_HIRE; + case 5: + return TEMPORARY; + case 6: + return INTERN; + case 7: + return VOLUNTEER; + case 8: + return PER_DIEM; + case 9: + return FLY_IN_FLY_OUT; + case 10: + return OTHER_EMPLOYMENT_TYPE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EmploymentType findValueByNumber(int number) { + return EmploymentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(3); + } + + private static final EmploymentType[] VALUES = values(); + + public static EmploymentType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EmploymentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.EmploymentType) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventProto.java new file mode 100644 index 00000000..0d4dc503 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventProto.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event.proto + +package com.google.cloud.talent.v4; + +public final class EventProto { + private EventProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_ClientEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_ClientEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_JobEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_JobEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\"google/cloud/talent/v4/event.proto\022\026go" + + "ogle.cloud.talent.v4\032\034google/api/annotat" + + "ions.proto\032\037google/api/field_behavior.pr" + + "oto\032\037google/protobuf/timestamp.proto\"\303\001\n" + + "\013ClientEvent\022\022\n\nrequest_id\030\001 \001(\t\022\025\n\010even" + + "t_id\030\002 \001(\tB\003\340A\002\0224\n\013create_time\030\004 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\002\0225\n\tjob_eve" + + "nt\030\005 \001(\0132 .google.cloud.talent.v4.JobEve" + + "ntH\000\022\023\n\013event_notes\030\t \001(\tB\007\n\005event\"\340\003\n\010J" + + "obEvent\022@\n\004type\030\001 \001(\0162-.google.cloud.tal" + + "ent.v4.JobEvent.JobEventTypeB\003\340A\002\022\021\n\004job" + + "s\030\002 \003(\tB\003\340A\002\"\376\002\n\014JobEventType\022\036\n\032JOB_EVE" + + "NT_TYPE_UNSPECIFIED\020\000\022\016\n\nIMPRESSION\020\001\022\010\n" + + "\004VIEW\020\002\022\021\n\rVIEW_REDIRECT\020\003\022\025\n\021APPLICATIO" + + "N_START\020\004\022\026\n\022APPLICATION_FINISH\020\005\022 \n\034APP" + + "LICATION_QUICK_SUBMISSION\020\006\022\030\n\024APPLICATI" + + "ON_REDIRECT\020\007\022!\n\035APPLICATION_START_FROM_" + + "SEARCH\020\010\022$\n APPLICATION_REDIRECT_FROM_SE" + + "ARCH\020\t\022\036\n\032APPLICATION_COMPANY_SUBMIT\020\n\022\014" + + "\n\010BOOKMARK\020\013\022\020\n\014NOTIFICATION\020\014\022\t\n\005HIRED\020" + + "\r\022\013\n\007SENT_CV\020\016\022\025\n\021INTERVIEW_GRANTED\020\017Bn\n" + + "\032com.google.cloud.talent.v4B\nEventProtoP" + + "\001Z\n\014client_event\030\002 \001" + + "(\0132#.google.cloud.talent.v4.ClientEventB" + + "\003\340A\0022\305\002\n\014EventService\022\306\001\n\021CreateClientEv" + + "ent\0220.google.cloud.talent.v4.CreateClien" + + "tEventRequest\032#.google.cloud.talent.v4.C" + + "lientEvent\"Z\202\323\344\223\002>\"./v4/{parent=projects" + + "/*/tenants/*}/clientEvents:\014client_event" + + "\332A\023parent,client_event\032l\312A\023jobs.googleap" + + "is.com\322AShttps://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.c" + + "om/auth/jobsBu\n\032com.google.cloud.talent." + + "v4B\021EventServiceProtoP\001Z + * Request for getting a company by name. + * + * + * Protobuf type {@code google.cloud.talent.v4.GetCompanyRequest} + */ +public final class GetCompanyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.GetCompanyRequest) + GetCompanyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCompanyRequest.newBuilder() to construct. + private GetCompanyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCompanyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCompanyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCompanyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_GetCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_GetCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetCompanyRequest.class, + com.google.cloud.talent.v4.GetCompanyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the company to be retrieved.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/api-test-project/tenants/foo/companies/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the company to be retrieved.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/api-test-project/tenants/foo/companies/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.GetCompanyRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.GetCompanyRequest other = + (com.google.cloud.talent.v4.GetCompanyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.GetCompanyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting a company by name.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.GetCompanyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.GetCompanyRequest) + com.google.cloud.talent.v4.GetCompanyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_GetCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_GetCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetCompanyRequest.class, + com.google.cloud.talent.v4.GetCompanyRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.GetCompanyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_GetCompanyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetCompanyRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.GetCompanyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetCompanyRequest build() { + com.google.cloud.talent.v4.GetCompanyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetCompanyRequest buildPartial() { + com.google.cloud.talent.v4.GetCompanyRequest result = + new com.google.cloud.talent.v4.GetCompanyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.GetCompanyRequest) { + return mergeFrom((com.google.cloud.talent.v4.GetCompanyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.GetCompanyRequest other) { + if (other == com.google.cloud.talent.v4.GetCompanyRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.GetCompanyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.GetCompanyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the company to be retrieved.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/api-test-project/tenants/foo/companies/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company to be retrieved.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/api-test-project/tenants/foo/companies/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company to be retrieved.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/api-test-project/tenants/foo/companies/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company to be retrieved.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/api-test-project/tenants/foo/companies/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company to be retrieved.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+     * example, "projects/api-test-project/tenants/foo/companies/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.GetCompanyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.GetCompanyRequest) + private static final com.google.cloud.talent.v4.GetCompanyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.GetCompanyRequest(); + } + + public static com.google.cloud.talent.v4.GetCompanyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCompanyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCompanyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetCompanyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetCompanyRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetCompanyRequestOrBuilder.java new file mode 100644 index 00000000..a713a659 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetCompanyRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface GetCompanyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.GetCompanyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the company to be retrieved.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/api-test-project/tenants/foo/companies/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the company to be retrieved.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
+   * example, "projects/api-test-project/tenants/foo/companies/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequest.java new file mode 100644 index 00000000..88df8453 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Get job request.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.GetJobRequest} + */ +public final class GetJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.GetJobRequest) + GetJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetJobRequest.newBuilder() to construct. + private GetJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_GetJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_GetJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetJobRequest.class, + com.google.cloud.talent.v4.GetJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the job to retrieve.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the job to retrieve.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.GetJobRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.GetJobRequest other = (com.google.cloud.talent.v4.GetJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.GetJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Get job request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.GetJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.GetJobRequest) + com.google.cloud.talent.v4.GetJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_GetJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_GetJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetJobRequest.class, + com.google.cloud.talent.v4.GetJobRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.GetJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_GetJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetJobRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.GetJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetJobRequest build() { + com.google.cloud.talent.v4.GetJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetJobRequest buildPartial() { + com.google.cloud.talent.v4.GetJobRequest result = + new com.google.cloud.talent.v4.GetJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.GetJobRequest) { + return mergeFrom((com.google.cloud.talent.v4.GetJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.GetJobRequest other) { + if (other == com.google.cloud.talent.v4.GetJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.GetJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.GetJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the job to retrieve.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the job to retrieve.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the job to retrieve.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the job to retrieve.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the job to retrieve.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.GetJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.GetJobRequest) + private static final com.google.cloud.talent.v4.GetJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.GetJobRequest(); + } + + public static com.google.cloud.talent.v4.GetJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequestOrBuilder.java new file mode 100644 index 00000000..2cd5e905 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface GetJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.GetJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the job to retrieve.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the job to retrieve.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequest.java new file mode 100644 index 00000000..a445400c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequest.java @@ -0,0 +1,662 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request for getting a tenant by name.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.GetTenantRequest} + */ +public final class GetTenantRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.GetTenantRequest) + GetTenantRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTenantRequest.newBuilder() to construct. + private GetTenantRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTenantRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTenantRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTenantRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_GetTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_GetTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetTenantRequest.class, + com.google.cloud.talent.v4.GetTenantRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the tenant to be retrieved.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant to be retrieved.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.GetTenantRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.GetTenantRequest other = + (com.google.cloud.talent.v4.GetTenantRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.GetTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.GetTenantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting a tenant by name.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.GetTenantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.GetTenantRequest) + com.google.cloud.talent.v4.GetTenantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_GetTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_GetTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.GetTenantRequest.class, + com.google.cloud.talent.v4.GetTenantRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.GetTenantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_GetTenantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetTenantRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.GetTenantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetTenantRequest build() { + com.google.cloud.talent.v4.GetTenantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetTenantRequest buildPartial() { + com.google.cloud.talent.v4.GetTenantRequest result = + new com.google.cloud.talent.v4.GetTenantRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.GetTenantRequest) { + return mergeFrom((com.google.cloud.talent.v4.GetTenantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.GetTenantRequest other) { + if (other == com.google.cloud.talent.v4.GetTenantRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.GetTenantRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.GetTenantRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant to be retrieved.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to be retrieved.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to be retrieved.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to be retrieved.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to be retrieved.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.GetTenantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.GetTenantRequest) + private static final com.google.cloud.talent.v4.GetTenantRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.GetTenantRequest(); + } + + public static com.google.cloud.talent.v4.GetTenantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTenantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTenantRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.GetTenantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequestOrBuilder.java new file mode 100644 index 00000000..8daf851a --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface GetTenantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.GetTenantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant to be retrieved.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the tenant to be retrieved.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramProto.java new file mode 100644 index 00000000..3719accf --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramProto.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/histogram.proto + +package com.google.cloud.talent.v4; + +public final class HistogramProto { + private HistogramProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_HistogramQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_HistogramQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_HistogramQueryResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_HistogramQueryResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_HistogramQueryResult_HistogramEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_HistogramQueryResult_HistogramEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/cloud/talent/v4/histogram.proto" + + "\022\026google.cloud.talent.v4\032\034google/api/ann" + + "otations.proto\")\n\016HistogramQuery\022\027\n\017hist" + + "ogram_query\030\001 \001(\t\"\261\001\n\024HistogramQueryResu" + + "lt\022\027\n\017histogram_query\030\001 \001(\t\022N\n\thistogram" + + "\030\002 \003(\0132;.google.cloud.talent.v4.Histogra" + + "mQueryResult.HistogramEntry\0320\n\016Histogram" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001Br\n" + + "\032com.google.cloud.talent.v4B\016HistogramPr" + + "otoP\001Z + * The histogram request. + * + * + * Protobuf type {@code google.cloud.talent.v4.HistogramQuery} + */ +public final class HistogramQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.HistogramQuery) + HistogramQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use HistogramQuery.newBuilder() to construct. + private HistogramQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HistogramQuery() { + histogramQuery_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HistogramQuery(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HistogramQuery( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + histogramQuery_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.HistogramQuery.class, + com.google.cloud.talent.v4.HistogramQuery.Builder.class); + } + + public static final int HISTOGRAM_QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object histogramQuery_; + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs for
+   * searches.
+   * See
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+   * for details about syntax.
+   * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + @java.lang.Override + public java.lang.String getHistogramQuery() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + histogramQuery_ = s; + return s; + } + } + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs for
+   * searches.
+   * See
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+   * for details about syntax.
+   * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHistogramQueryBytes() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + histogramQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getHistogramQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, histogramQuery_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getHistogramQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, histogramQuery_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.HistogramQuery)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.HistogramQuery other = + (com.google.cloud.talent.v4.HistogramQuery) obj; + + if (!getHistogramQuery().equals(other.getHistogramQuery())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HISTOGRAM_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getHistogramQuery().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.HistogramQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The histogram request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.HistogramQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.HistogramQuery) + com.google.cloud.talent.v4.HistogramQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.HistogramQuery.class, + com.google.cloud.talent.v4.HistogramQuery.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.HistogramQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + histogramQuery_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQuery getDefaultInstanceForType() { + return com.google.cloud.talent.v4.HistogramQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQuery build() { + com.google.cloud.talent.v4.HistogramQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQuery buildPartial() { + com.google.cloud.talent.v4.HistogramQuery result = + new com.google.cloud.talent.v4.HistogramQuery(this); + result.histogramQuery_ = histogramQuery_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.HistogramQuery) { + return mergeFrom((com.google.cloud.talent.v4.HistogramQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.HistogramQuery other) { + if (other == com.google.cloud.talent.v4.HistogramQuery.getDefaultInstance()) return this; + if (!other.getHistogramQuery().isEmpty()) { + histogramQuery_ = other.histogramQuery_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.HistogramQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.HistogramQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object histogramQuery_ = ""; + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs for
+     * searches.
+     * See
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+     * for details about syntax.
+     * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + public java.lang.String getHistogramQuery() { + java.lang.Object ref = histogramQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + histogramQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs for
+     * searches.
+     * See
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+     * for details about syntax.
+     * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + public com.google.protobuf.ByteString getHistogramQueryBytes() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + histogramQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs for
+     * searches.
+     * See
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+     * for details about syntax.
+     * 
+ * + * string histogram_query = 1; + * + * @param value The histogramQuery to set. + * @return This builder for chaining. + */ + public Builder setHistogramQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + histogramQuery_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs for
+     * searches.
+     * See
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+     * for details about syntax.
+     * 
+ * + * string histogram_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearHistogramQuery() { + + histogramQuery_ = getDefaultInstance().getHistogramQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs for
+     * searches.
+     * See
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+     * for details about syntax.
+     * 
+ * + * string histogram_query = 1; + * + * @param value The bytes for histogramQuery to set. + * @return This builder for chaining. + */ + public Builder setHistogramQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + histogramQuery_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.HistogramQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.HistogramQuery) + private static final com.google.cloud.talent.v4.HistogramQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.HistogramQuery(); + } + + public static com.google.cloud.talent.v4.HistogramQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HistogramQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HistogramQuery(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryOrBuilder.java new file mode 100644 index 00000000..c41cd423 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/histogram.proto + +package com.google.cloud.talent.v4; + +public interface HistogramQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.HistogramQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs for
+   * searches.
+   * See
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+   * for details about syntax.
+   * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + java.lang.String getHistogramQuery(); + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs for
+   * searches.
+   * See
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]
+   * for details about syntax.
+   * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + com.google.protobuf.ByteString getHistogramQueryBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResult.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResult.java new file mode 100644 index 00000000..67a53c95 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResult.java @@ -0,0 +1,1040 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/histogram.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Histogram result that matches
+ * [HistogramQuery][google.cloud.talent.v4.HistogramQuery] specified in
+ * searches.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.HistogramQueryResult} + */ +public final class HistogramQueryResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.HistogramQueryResult) + HistogramQueryResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use HistogramQueryResult.newBuilder() to construct. + private HistogramQueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HistogramQueryResult() { + histogramQuery_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HistogramQueryResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HistogramQueryResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + histogramQuery_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + histogram_ = + com.google.protobuf.MapField.newMapField( + HistogramDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry histogram__ = + input.readMessage( + HistogramDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + histogram_.getMutableMap().put(histogram__.getKey(), histogram__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHistogram(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.HistogramQueryResult.class, + com.google.cloud.talent.v4.HistogramQueryResult.Builder.class); + } + + public static final int HISTOGRAM_QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object histogramQuery_; + /** + * + * + *
+   * Requested histogram expression.
+   * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + @java.lang.Override + public java.lang.String getHistogramQuery() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + histogramQuery_ = s; + return s; + } + } + /** + * + * + *
+   * Requested histogram expression.
+   * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHistogramQueryBytes() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + histogramQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HISTOGRAM_FIELD_NUMBER = 2; + + private static final class HistogramDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_HistogramEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + private com.google.protobuf.MapField histogram_; + + private com.google.protobuf.MapField internalGetHistogram() { + if (histogram_ == null) { + return com.google.protobuf.MapField.emptyMapField(HistogramDefaultEntryHolder.defaultEntry); + } + return histogram_; + } + + public int getHistogramCount() { + return internalGetHistogram().getMap().size(); + } + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public boolean containsHistogram(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHistogram().getMap().containsKey(key); + } + /** Use {@link #getHistogramMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHistogram() { + return getHistogramMap(); + } + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public java.util.Map getHistogramMap() { + return internalGetHistogram().getMap(); + } + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public long getHistogramOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHistogram().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public long getHistogramOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHistogram().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getHistogramQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, histogramQuery_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetHistogram(), HistogramDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getHistogramQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, histogramQuery_); + } + for (java.util.Map.Entry entry : + internalGetHistogram().getMap().entrySet()) { + com.google.protobuf.MapEntry histogram__ = + HistogramDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, histogram__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.HistogramQueryResult)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.HistogramQueryResult other = + (com.google.cloud.talent.v4.HistogramQueryResult) obj; + + if (!getHistogramQuery().equals(other.getHistogramQuery())) return false; + if (!internalGetHistogram().equals(other.internalGetHistogram())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HISTOGRAM_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getHistogramQuery().hashCode(); + if (!internalGetHistogram().getMap().isEmpty()) { + hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + internalGetHistogram().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.HistogramQueryResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Histogram result that matches
+   * [HistogramQuery][google.cloud.talent.v4.HistogramQuery] specified in
+   * searches.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.HistogramQueryResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.HistogramQueryResult) + com.google.cloud.talent.v4.HistogramQueryResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHistogram(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableHistogram(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.HistogramQueryResult.class, + com.google.cloud.talent.v4.HistogramQueryResult.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.HistogramQueryResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + histogramQuery_ = ""; + + internalGetMutableHistogram().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.HistogramProto + .internal_static_google_cloud_talent_v4_HistogramQueryResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResult getDefaultInstanceForType() { + return com.google.cloud.talent.v4.HistogramQueryResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResult build() { + com.google.cloud.talent.v4.HistogramQueryResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResult buildPartial() { + com.google.cloud.talent.v4.HistogramQueryResult result = + new com.google.cloud.talent.v4.HistogramQueryResult(this); + int from_bitField0_ = bitField0_; + result.histogramQuery_ = histogramQuery_; + result.histogram_ = internalGetHistogram(); + result.histogram_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.HistogramQueryResult) { + return mergeFrom((com.google.cloud.talent.v4.HistogramQueryResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.HistogramQueryResult other) { + if (other == com.google.cloud.talent.v4.HistogramQueryResult.getDefaultInstance()) + return this; + if (!other.getHistogramQuery().isEmpty()) { + histogramQuery_ = other.histogramQuery_; + onChanged(); + } + internalGetMutableHistogram().mergeFrom(other.internalGetHistogram()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.HistogramQueryResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.HistogramQueryResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object histogramQuery_ = ""; + /** + * + * + *
+     * Requested histogram expression.
+     * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + public java.lang.String getHistogramQuery() { + java.lang.Object ref = histogramQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + histogramQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Requested histogram expression.
+     * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + public com.google.protobuf.ByteString getHistogramQueryBytes() { + java.lang.Object ref = histogramQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + histogramQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Requested histogram expression.
+     * 
+ * + * string histogram_query = 1; + * + * @param value The histogramQuery to set. + * @return This builder for chaining. + */ + public Builder setHistogramQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + histogramQuery_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested histogram expression.
+     * 
+ * + * string histogram_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearHistogramQuery() { + + histogramQuery_ = getDefaultInstance().getHistogramQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * Requested histogram expression.
+     * 
+ * + * string histogram_query = 1; + * + * @param value The bytes for histogramQuery to set. + * @return This builder for chaining. + */ + public Builder setHistogramQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + histogramQuery_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField histogram_; + + private com.google.protobuf.MapField internalGetHistogram() { + if (histogram_ == null) { + return com.google.protobuf.MapField.emptyMapField(HistogramDefaultEntryHolder.defaultEntry); + } + return histogram_; + } + + private com.google.protobuf.MapField + internalGetMutableHistogram() { + onChanged(); + ; + if (histogram_ == null) { + histogram_ = + com.google.protobuf.MapField.newMapField(HistogramDefaultEntryHolder.defaultEntry); + } + if (!histogram_.isMutable()) { + histogram_ = histogram_.copy(); + } + return histogram_; + } + + public int getHistogramCount() { + return internalGetHistogram().getMap().size(); + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public boolean containsHistogram(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHistogram().getMap().containsKey(key); + } + /** Use {@link #getHistogramMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHistogram() { + return getHistogramMap(); + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public java.util.Map getHistogramMap() { + return internalGetHistogram().getMap(); + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public long getHistogramOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHistogram().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + @java.lang.Override + public long getHistogramOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHistogram().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHistogram() { + internalGetMutableHistogram().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + public Builder removeHistogram(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHistogram().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHistogram() { + return internalGetMutableHistogram().getMutableMap(); + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + public Builder putHistogram(java.lang.String key, long value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableHistogram().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map from the values of the facet associated with distinct values to the
+     * number of matching entries with corresponding value.
+     * The key format is:
+     * * (for string histogram) string values stored in the field.
+     * * (for named numeric bucket) name specified in `bucket()` function, like
+     *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+     * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+     *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+     * 
+ * + * map<string, int64> histogram = 2; + */ + public Builder putAllHistogram(java.util.Map values) { + internalGetMutableHistogram().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.HistogramQueryResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.HistogramQueryResult) + private static final com.google.cloud.talent.v4.HistogramQueryResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.HistogramQueryResult(); + } + + public static com.google.cloud.talent.v4.HistogramQueryResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HistogramQueryResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HistogramQueryResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResultOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResultOrBuilder.java new file mode 100644 index 00000000..ae90b9fd --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResultOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/histogram.proto + +package com.google.cloud.talent.v4; + +public interface HistogramQueryResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.HistogramQueryResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Requested histogram expression.
+   * 
+ * + * string histogram_query = 1; + * + * @return The histogramQuery. + */ + java.lang.String getHistogramQuery(); + /** + * + * + *
+   * Requested histogram expression.
+   * 
+ * + * string histogram_query = 1; + * + * @return The bytes for histogramQuery. + */ + com.google.protobuf.ByteString getHistogramQueryBytes(); + + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + int getHistogramCount(); + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + boolean containsHistogram(java.lang.String key); + /** Use {@link #getHistogramMap()} instead. */ + @java.lang.Deprecated + java.util.Map getHistogram(); + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + java.util.Map getHistogramMap(); + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + long getHistogramOrDefault(java.lang.String key, long defaultValue); + /** + * + * + *
+   * A map from the values of the facet associated with distinct values to the
+   * number of matching entries with corresponding value.
+   * The key format is:
+   * * (for string histogram) string values stored in the field.
+   * * (for named numeric bucket) name specified in `bucket()` function, like
+   *   for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
+   * * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
+   *   example, `0-1000`, `MIN-0`, and `0-MAX`.
+   * 
+ * + * map<string, int64> histogram = 2; + */ + long getHistogramOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HtmlSanitization.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HtmlSanitization.java new file mode 100644 index 00000000..f5af53b7 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HtmlSanitization.java @@ -0,0 +1,180 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Option for HTML content sanitization on user input fields, for example, job
+ * description. By setting this option, user can determine whether and how
+ * sanitization is performed on these fields.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.HtmlSanitization} + */ +public enum HtmlSanitization implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value.
+   * 
+ * + * HTML_SANITIZATION_UNSPECIFIED = 0; + */ + HTML_SANITIZATION_UNSPECIFIED(0), + /** + * + * + *
+   * Disables sanitization on HTML input.
+   * 
+ * + * HTML_SANITIZATION_DISABLED = 1; + */ + HTML_SANITIZATION_DISABLED(1), + /** + * + * + *
+   * Sanitizes HTML input, only accepts bold, italic, ordered list, and
+   * unordered list markup tags.
+   * 
+ * + * SIMPLE_FORMATTING_ONLY = 2; + */ + SIMPLE_FORMATTING_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value.
+   * 
+ * + * HTML_SANITIZATION_UNSPECIFIED = 0; + */ + public static final int HTML_SANITIZATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Disables sanitization on HTML input.
+   * 
+ * + * HTML_SANITIZATION_DISABLED = 1; + */ + public static final int HTML_SANITIZATION_DISABLED_VALUE = 1; + /** + * + * + *
+   * Sanitizes HTML input, only accepts bold, italic, ordered list, and
+   * unordered list markup tags.
+   * 
+ * + * SIMPLE_FORMATTING_ONLY = 2; + */ + public static final int SIMPLE_FORMATTING_ONLY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HtmlSanitization valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HtmlSanitization forNumber(int value) { + switch (value) { + case 0: + return HTML_SANITIZATION_UNSPECIFIED; + case 1: + return HTML_SANITIZATION_DISABLED; + case 2: + return SIMPLE_FORMATTING_ONLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HtmlSanitization findValueByNumber(int number) { + return HtmlSanitization.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(8); + } + + private static final HtmlSanitization[] VALUES = values(); + + public static HtmlSanitization valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HtmlSanitization(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.HtmlSanitization) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Job.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Job.java new file mode 100644 index 00000000..3dae84da --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Job.java @@ -0,0 +1,12816 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * A Job resource represents a job posting (also referred to as a "job listing"
+ * or "job requisition"). A job belongs to a
+ * [Company][google.cloud.talent.v4.Company], which is the hiring entity
+ * responsible for the job.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job} + */ +public final class Job extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Job) + JobOrBuilder { + private static final long serialVersionUID = 0L; + // Use Job.newBuilder() to construct. + private Job(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Job() { + name_ = ""; + company_ = ""; + requisitionId_ = ""; + title_ = ""; + description_ = ""; + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + jobBenefits_ = java.util.Collections.emptyList(); + degreeTypes_ = java.util.Collections.emptyList(); + department_ = ""; + employmentTypes_ = java.util.Collections.emptyList(); + incentives_ = ""; + languageCode_ = ""; + jobLevel_ = 0; + qualifications_ = ""; + responsibilities_ = ""; + postingRegion_ = 0; + visibility_ = 0; + companyDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Job(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Job( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + company_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requisitionId_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + addresses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + addresses_.add(s); + break; + } + case 58: + { + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder subBuilder = null; + if (applicationInfo_ != null) { + subBuilder = applicationInfo_.toBuilder(); + } + applicationInfo_ = + input.readMessage( + com.google.cloud.talent.v4.Job.ApplicationInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(applicationInfo_); + applicationInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + jobBenefits_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + jobBenefits_.add(rawValue); + break; + } + case 66: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + jobBenefits_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + jobBenefits_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 74: + { + com.google.cloud.talent.v4.CompensationInfo.Builder subBuilder = null; + if (compensationInfo_ != null) { + subBuilder = compensationInfo_.toBuilder(); + } + compensationInfo_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(compensationInfo_); + compensationInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + customAttributes_ = + com.google.protobuf.MapField.newMapField( + CustomAttributesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.talent.v4.CustomAttribute> + customAttributes__ = + input.readMessage( + CustomAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + customAttributes_ + .getMutableMap() + .put(customAttributes__.getKey(), customAttributes__.getValue()); + break; + } + case 88: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + degreeTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + degreeTypes_.add(rawValue); + break; + } + case 90: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + degreeTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + degreeTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + department_ = s; + break; + } + case 104: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + employmentTypes_.add(rawValue); + break; + } + case 106: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + employmentTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + incentives_ = s; + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 128: + { + int rawValue = input.readEnum(); + + jobLevel_ = rawValue; + break; + } + case 136: + { + promotionValue_ = input.readInt32(); + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + qualifications_ = s; + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + responsibilities_ = s; + break; + } + case 160: + { + int rawValue = input.readEnum(); + + postingRegion_ = rawValue; + break; + } + case 168: + { + int rawValue = input.readEnum(); + + visibility_ = rawValue; + break; + } + case 178: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (jobStartTime_ != null) { + subBuilder = jobStartTime_.toBuilder(); + } + jobStartTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobStartTime_); + jobStartTime_ = subBuilder.buildPartial(); + } + + break; + } + case 186: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (jobEndTime_ != null) { + subBuilder = jobEndTime_.toBuilder(); + } + jobEndTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobEndTime_); + jobEndTime_ = subBuilder.buildPartial(); + } + + break; + } + case 194: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (postingPublishTime_ != null) { + subBuilder = postingPublishTime_.toBuilder(); + } + postingPublishTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postingPublishTime_); + postingPublishTime_ = subBuilder.buildPartial(); + } + + break; + } + case 202: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (postingExpireTime_ != null) { + subBuilder = postingExpireTime_.toBuilder(); + } + postingExpireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postingExpireTime_); + postingExpireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 210: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (postingCreateTime_ != null) { + subBuilder = postingCreateTime_.toBuilder(); + } + postingCreateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postingCreateTime_); + postingCreateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 218: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (postingUpdateTime_ != null) { + subBuilder = postingUpdateTime_.toBuilder(); + } + postingUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postingUpdateTime_); + postingUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + + companyDisplayName_ = s; + break; + } + case 234: + { + com.google.cloud.talent.v4.Job.DerivedInfo.Builder subBuilder = null; + if (derivedInfo_ != null) { + subBuilder = derivedInfo_.toBuilder(); + } + derivedInfo_ = + input.readMessage( + com.google.cloud.talent.v4.Job.DerivedInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(derivedInfo_); + derivedInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 242: + { + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder subBuilder = null; + if (processingOptions_ != null) { + subBuilder = processingOptions_.toBuilder(); + } + processingOptions_ = + input.readMessage( + com.google.cloud.talent.v4.Job.ProcessingOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(processingOptions_); + processingOptions_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + addresses_ = addresses_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + jobBenefits_ = java.util.Collections.unmodifiableList(jobBenefits_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + degreeTypes_ = java.util.Collections.unmodifiableList(degreeTypes_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = java.util.Collections.unmodifiableList(employmentTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetCustomAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.class, com.google.cloud.talent.v4.Job.Builder.class); + } + + public interface ApplicationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Job.ApplicationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @return A list containing the emails. + */ + java.util.List getEmailsList(); + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @return The count of emails. + */ + int getEmailsCount(); + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @param index The index of the element to return. + * @return The emails at the given index. + */ + java.lang.String getEmails(int index); + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @param index The index of the value to return. + * @return The bytes of the emails at the given index. + */ + com.google.protobuf.ByteString getEmailsBytes(int index); + + /** + * + * + *
+     * Use this field to provide instructions, such as "Mail your application
+     * to ...", that a candidate can follow to apply for the job.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 3,000.
+     * 
+ * + * string instruction = 2; + * + * @return The instruction. + */ + java.lang.String getInstruction(); + /** + * + * + *
+     * Use this field to provide instructions, such as "Mail your application
+     * to ...", that a candidate can follow to apply for the job.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 3,000.
+     * 
+ * + * string instruction = 2; + * + * @return The bytes for instruction. + */ + com.google.protobuf.ByteString getInstructionBytes(); + + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); + } + /** + * + * + *
+   * Application related details of a job posting.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.ApplicationInfo} + */ + public static final class ApplicationInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Job.ApplicationInfo) + ApplicationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationInfo.newBuilder() to construct. + private ApplicationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationInfo() { + emails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instruction_ = ""; + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ApplicationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + emails_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + emails_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instruction_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + uris_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + emails_ = emails_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + uris_ = uris_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ApplicationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ApplicationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.ApplicationInfo.class, + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder.class); + } + + public static final int EMAILS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList emails_; + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @return A list containing the emails. + */ + public com.google.protobuf.ProtocolStringList getEmailsList() { + return emails_; + } + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @return The count of emails. + */ + public int getEmailsCount() { + return emails_.size(); + } + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @param index The index of the element to return. + * @return The emails at the given index. + */ + public java.lang.String getEmails(int index) { + return emails_.get(index); + } + /** + * + * + *
+     * Use this field to specify email address(es) to which resumes or
+     * applications can be sent.
+     * The maximum number of allowed characters for each entry is 255.
+     * 
+ * + * repeated string emails = 1; + * + * @param index The index of the value to return. + * @return The bytes of the emails at the given index. + */ + public com.google.protobuf.ByteString getEmailsBytes(int index) { + return emails_.getByteString(index); + } + + public static final int INSTRUCTION_FIELD_NUMBER = 2; + private volatile java.lang.Object instruction_; + /** + * + * + *
+     * Use this field to provide instructions, such as "Mail your application
+     * to ...", that a candidate can follow to apply for the job.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 3,000.
+     * 
+ * + * string instruction = 2; + * + * @return The instruction. + */ + @java.lang.Override + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } + } + /** + * + * + *
+     * Use this field to provide instructions, such as "Mail your application
+     * to ...", that a candidate can follow to apply for the job.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 3,000.
+     * 
+ * + * string instruction = 2; + * + * @return The bytes for instruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URIS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList uris_; + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * Use this URI field to direct an applicant to a website, for example to
+     * link to an online application form.
+     * The maximum number of allowed characters for each entry is 2,000.
+     * 
+ * + * repeated string uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < emails_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, emails_.getRaw(i)); + } + if (!getInstructionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instruction_); + } + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uris_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < emails_.size(); i++) { + dataSize += computeStringSizeNoTag(emails_.getRaw(i)); + } + size += dataSize; + size += 1 * getEmailsList().size(); + } + if (!getInstructionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instruction_); + } + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Job.ApplicationInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Job.ApplicationInfo other = + (com.google.cloud.talent.v4.Job.ApplicationInfo) obj; + + if (!getEmailsList().equals(other.getEmailsList())) return false; + if (!getInstruction().equals(other.getInstruction())) return false; + if (!getUrisList().equals(other.getUrisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEmailsCount() > 0) { + hash = (37 * hash) + EMAILS_FIELD_NUMBER; + hash = (53 * hash) + getEmailsList().hashCode(); + } + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Job.ApplicationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Application related details of a job posting.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.ApplicationInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Job.ApplicationInfo) + com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ApplicationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ApplicationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.ApplicationInfo.class, + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Job.ApplicationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + emails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + instruction_ = ""; + + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ApplicationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Job.ApplicationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfo build() { + com.google.cloud.talent.v4.Job.ApplicationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfo buildPartial() { + com.google.cloud.talent.v4.Job.ApplicationInfo result = + new com.google.cloud.talent.v4.Job.ApplicationInfo(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + emails_ = emails_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.emails_ = emails_; + result.instruction_ = instruction_; + if (((bitField0_ & 0x00000002) != 0)) { + uris_ = uris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.uris_ = uris_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Job.ApplicationInfo) { + return mergeFrom((com.google.cloud.talent.v4.Job.ApplicationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Job.ApplicationInfo other) { + if (other == com.google.cloud.talent.v4.Job.ApplicationInfo.getDefaultInstance()) + return this; + if (!other.emails_.isEmpty()) { + if (emails_.isEmpty()) { + emails_ = other.emails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEmailsIsMutable(); + emails_.addAll(other.emails_); + } + onChanged(); + } + if (!other.getInstruction().isEmpty()) { + instruction_ = other.instruction_; + onChanged(); + } + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Job.ApplicationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Job.ApplicationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList emails_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureEmailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + emails_ = new com.google.protobuf.LazyStringArrayList(emails_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @return A list containing the emails. + */ + public com.google.protobuf.ProtocolStringList getEmailsList() { + return emails_.getUnmodifiableView(); + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @return The count of emails. + */ + public int getEmailsCount() { + return emails_.size(); + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param index The index of the element to return. + * @return The emails at the given index. + */ + public java.lang.String getEmails(int index) { + return emails_.get(index); + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param index The index of the value to return. + * @return The bytes of the emails at the given index. + */ + public com.google.protobuf.ByteString getEmailsBytes(int index) { + return emails_.getByteString(index); + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param index The index to set the value at. + * @param value The emails to set. + * @return This builder for chaining. + */ + public Builder setEmails(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmailsIsMutable(); + emails_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param value The emails to add. + * @return This builder for chaining. + */ + public Builder addEmails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmailsIsMutable(); + emails_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param values The emails to add. + * @return This builder for chaining. + */ + public Builder addAllEmails(java.lang.Iterable values) { + ensureEmailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, emails_); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmails() { + emails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to specify email address(es) to which resumes or
+       * applications can be sent.
+       * The maximum number of allowed characters for each entry is 255.
+       * 
+ * + * repeated string emails = 1; + * + * @param value The bytes of the emails to add. + * @return This builder for chaining. + */ + public Builder addEmailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEmailsIsMutable(); + emails_.add(value); + onChanged(); + return this; + } + + private java.lang.Object instruction_ = ""; + /** + * + * + *
+       * Use this field to provide instructions, such as "Mail your application
+       * to ...", that a candidate can follow to apply for the job.
+       * This field accepts and sanitizes HTML input, and also accepts
+       * bold, italic, ordered list, and unordered list markup tags.
+       * The maximum number of allowed characters is 3,000.
+       * 
+ * + * string instruction = 2; + * + * @return The instruction. + */ + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Use this field to provide instructions, such as "Mail your application
+       * to ...", that a candidate can follow to apply for the job.
+       * This field accepts and sanitizes HTML input, and also accepts
+       * bold, italic, ordered list, and unordered list markup tags.
+       * The maximum number of allowed characters is 3,000.
+       * 
+ * + * string instruction = 2; + * + * @return The bytes for instruction. + */ + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Use this field to provide instructions, such as "Mail your application
+       * to ...", that a candidate can follow to apply for the job.
+       * This field accepts and sanitizes HTML input, and also accepts
+       * bold, italic, ordered list, and unordered list markup tags.
+       * The maximum number of allowed characters is 3,000.
+       * 
+ * + * string instruction = 2; + * + * @param value The instruction to set. + * @return This builder for chaining. + */ + public Builder setInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instruction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to provide instructions, such as "Mail your application
+       * to ...", that a candidate can follow to apply for the job.
+       * This field accepts and sanitizes HTML input, and also accepts
+       * bold, italic, ordered list, and unordered list markup tags.
+       * The maximum number of allowed characters is 3,000.
+       * 
+ * + * string instruction = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstruction() { + + instruction_ = getDefaultInstance().getInstruction(); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this field to provide instructions, such as "Mail your application
+       * to ...", that a candidate can follow to apply for the job.
+       * This field accepts and sanitizes HTML input, and also accepts
+       * bold, italic, ordered list, and unordered list markup tags.
+       * The maximum number of allowed characters is 3,000.
+       * 
+ * + * string instruction = 2; + * + * @param value The bytes for instruction to set. + * @return This builder for chaining. + */ + public Builder setInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instruction_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList uris_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUrisIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_.getUnmodifiableView(); + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Use this URI field to direct an applicant to a website, for example to
+       * link to an online application form.
+       * The maximum number of allowed characters for each entry is 2,000.
+       * 
+ * + * repeated string uris = 3; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Job.ApplicationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Job.ApplicationInfo) + private static final com.google.cloud.talent.v4.Job.ApplicationInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Job.ApplicationInfo(); + } + + public static com.google.cloud.talent.v4.Job.ApplicationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplicationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DerivedInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Job.DerivedInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + java.util.List getLocationsList(); + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + com.google.cloud.talent.v4.Location getLocations(int index); + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + int getLocationsCount(); + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + java.util.List + getLocationsOrBuilderList(); + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + com.google.cloud.talent.v4.LocationOrBuilder getLocationsOrBuilder(int index); + + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the jobCategories. + */ + java.util.List getJobCategoriesList(); + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return The count of jobCategories. + */ + int getJobCategoriesCount(); + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + com.google.cloud.talent.v4.JobCategory getJobCategories(int index); + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + java.util.List getJobCategoriesValueList(); + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + int getJobCategoriesValue(int index); + } + /** + * + * + *
+   * Derived details about the job posting.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.DerivedInfo} + */ + public static final class DerivedInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Job.DerivedInfo) + DerivedInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DerivedInfo.newBuilder() to construct. + private DerivedInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DerivedInfo() { + locations_ = java.util.Collections.emptyList(); + jobCategories_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DerivedInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DerivedInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage( + com.google.cloud.talent.v4.Location.parser(), extensionRegistry)); + break; + } + case 24: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + jobCategories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + jobCategories_.add(rawValue); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + jobCategories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + jobCategories_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + jobCategories_ = java.util.Collections.unmodifiableList(jobCategories_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_DerivedInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_DerivedInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.DerivedInfo.class, + com.google.cloud.talent.v4.Job.DerivedInfo.Builder.class); + } + + public static final int LOCATIONS_FIELD_NUMBER = 1; + private java.util.List locations_; + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location getLocations(int index) { + return locations_.get(index); + } + /** + * + * + *
+     * Structured locations of the job, resolved from
+     * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+     * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+     * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+     * same order.
+     * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationOrBuilder getLocationsOrBuilder(int index) { + return locations_.get(index); + } + + public static final int JOB_CATEGORIES_FIELD_NUMBER = 3; + private java.util.List jobCategories_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory> + jobCategories_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>() { + public com.google.cloud.talent.v4.JobCategory convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobCategory result = + com.google.cloud.talent.v4.JobCategory.valueOf(from); + return result == null + ? com.google.cloud.talent.v4.JobCategory.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the jobCategories. + */ + @java.lang.Override + public java.util.List getJobCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>( + jobCategories_, jobCategories_converter_); + } + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return The count of jobCategories. + */ + @java.lang.Override + public int getJobCategoriesCount() { + return jobCategories_.size(); + } + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobCategory getJobCategories(int index) { + return jobCategories_converter_.convert(jobCategories_.get(index)); + } + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + @java.lang.Override + public java.util.List getJobCategoriesValueList() { + return jobCategories_; + } + /** + * + * + *
+     * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+     * and [Job.description][google.cloud.talent.v4.Job.description].
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + @java.lang.Override + public int getJobCategoriesValue(int index) { + return jobCategories_.get(index); + } + + private int jobCategoriesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(1, locations_.get(i)); + } + if (getJobCategoriesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(jobCategoriesMemoizedSerializedSize); + } + for (int i = 0; i < jobCategories_.size(); i++) { + output.writeEnumNoTag(jobCategories_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < jobCategories_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(jobCategories_.get(i)); + } + size += dataSize; + if (!getJobCategoriesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + jobCategoriesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Job.DerivedInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Job.DerivedInfo other = + (com.google.cloud.talent.v4.Job.DerivedInfo) obj; + + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!jobCategories_.equals(other.jobCategories_)) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getJobCategoriesCount() > 0) { + hash = (37 * hash) + JOB_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + jobCategories_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Job.DerivedInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Derived details about the job posting.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.DerivedInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Job.DerivedInfo) + com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_DerivedInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_DerivedInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.DerivedInfo.class, + com.google.cloud.talent.v4.Job.DerivedInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Job.DerivedInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + jobCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_DerivedInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Job.DerivedInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfo build() { + com.google.cloud.talent.v4.Job.DerivedInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfo buildPartial() { + com.google.cloud.talent.v4.Job.DerivedInfo result = + new com.google.cloud.talent.v4.Job.DerivedInfo(this); + int from_bitField0_ = bitField0_; + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + jobCategories_ = java.util.Collections.unmodifiableList(jobCategories_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.jobCategories_ = jobCategories_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Job.DerivedInfo) { + return mergeFrom((com.google.cloud.talent.v4.Job.DerivedInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Job.DerivedInfo other) { + if (other == com.google.cloud.talent.v4.Job.DerivedInfo.getDefaultInstance()) return this; + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLocationsFieldBuilder() + : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (!other.jobCategories_.isEmpty()) { + if (jobCategories_.isEmpty()) { + jobCategories_ = other.jobCategories_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJobCategoriesIsMutable(); + jobCategories_.addAll(other.jobCategories_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Job.DerivedInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Job.DerivedInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List locations_ = + java.util.Collections.emptyList(); + + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + locationsBuilder_; + + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public com.google.cloud.talent.v4.Location getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder setLocations(int index, com.google.cloud.talent.v4.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder setLocations( + int index, com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder addLocations(com.google.cloud.talent.v4.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder addLocations(int index, com.google.cloud.talent.v4.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder addLocations(com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder addLocations( + int index, com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public com.google.cloud.talent.v4.Location.Builder getLocationsBuilder(int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public com.google.cloud.talent.v4.LocationOrBuilder getLocationsOrBuilder(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public com.google.cloud.talent.v4.Location.Builder addLocationsBuilder() { + return getLocationsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.Location.getDefaultInstance()); + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public com.google.cloud.talent.v4.Location.Builder addLocationsBuilder(int index) { + return getLocationsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Location.getDefaultInstance()); + } + /** + * + * + *
+       * Structured locations of the job, resolved from
+       * [Job.addresses][google.cloud.talent.v4.Job.addresses].
+       * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly
+       * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the
+       * same order.
+       * 
+ * + * repeated .google.cloud.talent.v4.Location locations = 1; + */ + public java.util.List getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder>( + locations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List jobCategories_ = java.util.Collections.emptyList(); + + private void ensureJobCategoriesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + jobCategories_ = new java.util.ArrayList(jobCategories_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the jobCategories. + */ + public java.util.List getJobCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>( + jobCategories_, jobCategories_converter_); + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return The count of jobCategories. + */ + public int getJobCategoriesCount() { + return jobCategories_.size(); + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + public com.google.cloud.talent.v4.JobCategory getJobCategories(int index) { + return jobCategories_converter_.convert(jobCategories_.get(index)); + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index to set the value at. + * @param value The jobCategories to set. + * @return This builder for chaining. + */ + public Builder setJobCategories(int index, com.google.cloud.talent.v4.JobCategory value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobCategoriesIsMutable(); + jobCategories_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param value The jobCategories to add. + * @return This builder for chaining. + */ + public Builder addJobCategories(com.google.cloud.talent.v4.JobCategory value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobCategoriesIsMutable(); + jobCategories_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param values The jobCategories to add. + * @return This builder for chaining. + */ + public Builder addAllJobCategories( + java.lang.Iterable values) { + ensureJobCategoriesIsMutable(); + for (com.google.cloud.talent.v4.JobCategory value : values) { + jobCategories_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return This builder for chaining. + */ + public Builder clearJobCategories() { + jobCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + public java.util.List getJobCategoriesValueList() { + return java.util.Collections.unmodifiableList(jobCategories_); + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + public int getJobCategoriesValue(int index) { + return jobCategories_.get(index); + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + * @return This builder for chaining. + */ + public Builder setJobCategoriesValue(int index, int value) { + ensureJobCategoriesIsMutable(); + jobCategories_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param value The enum numeric value on the wire for jobCategories to add. + * @return This builder for chaining. + */ + public Builder addJobCategoriesValue(int value) { + ensureJobCategoriesIsMutable(); + jobCategories_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title]
+       * and [Job.description][google.cloud.talent.v4.Job.description].
+       * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * + * @param values The enum numeric values on the wire for jobCategories to add. + * @return This builder for chaining. + */ + public Builder addAllJobCategoriesValue(java.lang.Iterable values) { + ensureJobCategoriesIsMutable(); + for (int value : values) { + jobCategories_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Job.DerivedInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Job.DerivedInfo) + private static final com.google.cloud.talent.v4.Job.DerivedInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Job.DerivedInfo(); + } + + public static com.google.cloud.talent.v4.Job.DerivedInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DerivedInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DerivedInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ProcessingOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Job.ProcessingOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If set to `true`, the service does not attempt to resolve a
+     * more precise address for the job.
+     * 
+ * + * bool disable_street_address_resolution = 1; + * + * @return The disableStreetAddressResolution. + */ + boolean getDisableStreetAddressResolution(); + + /** + * + * + *
+     * Option for job HTML content sanitization. Applied fields are:
+     * * description
+     * * applicationInfo.instruction
+     * * incentives
+     * * qualifications
+     * * responsibilities
+     * HTML tags in these fields may be stripped if sanitiazation isn't
+     * disabled.
+     * Defaults to
+     * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+     * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The enum numeric value on the wire for htmlSanitization. + */ + int getHtmlSanitizationValue(); + /** + * + * + *
+     * Option for job HTML content sanitization. Applied fields are:
+     * * description
+     * * applicationInfo.instruction
+     * * incentives
+     * * qualifications
+     * * responsibilities
+     * HTML tags in these fields may be stripped if sanitiazation isn't
+     * disabled.
+     * Defaults to
+     * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+     * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The htmlSanitization. + */ + com.google.cloud.talent.v4.HtmlSanitization getHtmlSanitization(); + } + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.ProcessingOptions} + */ + public static final class ProcessingOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Job.ProcessingOptions) + ProcessingOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessingOptions.newBuilder() to construct. + private ProcessingOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessingOptions() { + htmlSanitization_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessingOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProcessingOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + disableStreetAddressResolution_ = input.readBool(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + htmlSanitization_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ProcessingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ProcessingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.ProcessingOptions.class, + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder.class); + } + + public static final int DISABLE_STREET_ADDRESS_RESOLUTION_FIELD_NUMBER = 1; + private boolean disableStreetAddressResolution_; + /** + * + * + *
+     * If set to `true`, the service does not attempt to resolve a
+     * more precise address for the job.
+     * 
+ * + * bool disable_street_address_resolution = 1; + * + * @return The disableStreetAddressResolution. + */ + @java.lang.Override + public boolean getDisableStreetAddressResolution() { + return disableStreetAddressResolution_; + } + + public static final int HTML_SANITIZATION_FIELD_NUMBER = 2; + private int htmlSanitization_; + /** + * + * + *
+     * Option for job HTML content sanitization. Applied fields are:
+     * * description
+     * * applicationInfo.instruction
+     * * incentives
+     * * qualifications
+     * * responsibilities
+     * HTML tags in these fields may be stripped if sanitiazation isn't
+     * disabled.
+     * Defaults to
+     * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+     * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The enum numeric value on the wire for htmlSanitization. + */ + @java.lang.Override + public int getHtmlSanitizationValue() { + return htmlSanitization_; + } + /** + * + * + *
+     * Option for job HTML content sanitization. Applied fields are:
+     * * description
+     * * applicationInfo.instruction
+     * * incentives
+     * * qualifications
+     * * responsibilities
+     * HTML tags in these fields may be stripped if sanitiazation isn't
+     * disabled.
+     * Defaults to
+     * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+     * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The htmlSanitization. + */ + @java.lang.Override + public com.google.cloud.talent.v4.HtmlSanitization getHtmlSanitization() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.HtmlSanitization result = + com.google.cloud.talent.v4.HtmlSanitization.valueOf(htmlSanitization_); + return result == null ? com.google.cloud.talent.v4.HtmlSanitization.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (disableStreetAddressResolution_ != false) { + output.writeBool(1, disableStreetAddressResolution_); + } + if (htmlSanitization_ + != com.google.cloud.talent.v4.HtmlSanitization.HTML_SANITIZATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, htmlSanitization_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (disableStreetAddressResolution_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, disableStreetAddressResolution_); + } + if (htmlSanitization_ + != com.google.cloud.talent.v4.HtmlSanitization.HTML_SANITIZATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, htmlSanitization_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Job.ProcessingOptions)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Job.ProcessingOptions other = + (com.google.cloud.talent.v4.Job.ProcessingOptions) obj; + + if (getDisableStreetAddressResolution() != other.getDisableStreetAddressResolution()) + return false; + if (htmlSanitization_ != other.htmlSanitization_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISABLE_STREET_ADDRESS_RESOLUTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisableStreetAddressResolution()); + hash = (37 * hash) + HTML_SANITIZATION_FIELD_NUMBER; + hash = (53 * hash) + htmlSanitization_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Job.ProcessingOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job.ProcessingOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Job.ProcessingOptions) + com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ProcessingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ProcessingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.ProcessingOptions.class, + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Job.ProcessingOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + disableStreetAddressResolution_ = false; + + htmlSanitization_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_ProcessingOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptions getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Job.ProcessingOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptions build() { + com.google.cloud.talent.v4.Job.ProcessingOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptions buildPartial() { + com.google.cloud.talent.v4.Job.ProcessingOptions result = + new com.google.cloud.talent.v4.Job.ProcessingOptions(this); + result.disableStreetAddressResolution_ = disableStreetAddressResolution_; + result.htmlSanitization_ = htmlSanitization_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Job.ProcessingOptions) { + return mergeFrom((com.google.cloud.talent.v4.Job.ProcessingOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Job.ProcessingOptions other) { + if (other == com.google.cloud.talent.v4.Job.ProcessingOptions.getDefaultInstance()) + return this; + if (other.getDisableStreetAddressResolution() != false) { + setDisableStreetAddressResolution(other.getDisableStreetAddressResolution()); + } + if (other.htmlSanitization_ != 0) { + setHtmlSanitizationValue(other.getHtmlSanitizationValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Job.ProcessingOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.Job.ProcessingOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean disableStreetAddressResolution_; + /** + * + * + *
+       * If set to `true`, the service does not attempt to resolve a
+       * more precise address for the job.
+       * 
+ * + * bool disable_street_address_resolution = 1; + * + * @return The disableStreetAddressResolution. + */ + @java.lang.Override + public boolean getDisableStreetAddressResolution() { + return disableStreetAddressResolution_; + } + /** + * + * + *
+       * If set to `true`, the service does not attempt to resolve a
+       * more precise address for the job.
+       * 
+ * + * bool disable_street_address_resolution = 1; + * + * @param value The disableStreetAddressResolution to set. + * @return This builder for chaining. + */ + public Builder setDisableStreetAddressResolution(boolean value) { + + disableStreetAddressResolution_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If set to `true`, the service does not attempt to resolve a
+       * more precise address for the job.
+       * 
+ * + * bool disable_street_address_resolution = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisableStreetAddressResolution() { + + disableStreetAddressResolution_ = false; + onChanged(); + return this; + } + + private int htmlSanitization_ = 0; + /** + * + * + *
+       * Option for job HTML content sanitization. Applied fields are:
+       * * description
+       * * applicationInfo.instruction
+       * * incentives
+       * * qualifications
+       * * responsibilities
+       * HTML tags in these fields may be stripped if sanitiazation isn't
+       * disabled.
+       * Defaults to
+       * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+       * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The enum numeric value on the wire for htmlSanitization. + */ + @java.lang.Override + public int getHtmlSanitizationValue() { + return htmlSanitization_; + } + /** + * + * + *
+       * Option for job HTML content sanitization. Applied fields are:
+       * * description
+       * * applicationInfo.instruction
+       * * incentives
+       * * qualifications
+       * * responsibilities
+       * HTML tags in these fields may be stripped if sanitiazation isn't
+       * disabled.
+       * Defaults to
+       * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+       * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @param value The enum numeric value on the wire for htmlSanitization to set. + * @return This builder for chaining. + */ + public Builder setHtmlSanitizationValue(int value) { + + htmlSanitization_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Option for job HTML content sanitization. Applied fields are:
+       * * description
+       * * applicationInfo.instruction
+       * * incentives
+       * * qualifications
+       * * responsibilities
+       * HTML tags in these fields may be stripped if sanitiazation isn't
+       * disabled.
+       * Defaults to
+       * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+       * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return The htmlSanitization. + */ + @java.lang.Override + public com.google.cloud.talent.v4.HtmlSanitization getHtmlSanitization() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.HtmlSanitization result = + com.google.cloud.talent.v4.HtmlSanitization.valueOf(htmlSanitization_); + return result == null ? com.google.cloud.talent.v4.HtmlSanitization.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Option for job HTML content sanitization. Applied fields are:
+       * * description
+       * * applicationInfo.instruction
+       * * incentives
+       * * qualifications
+       * * responsibilities
+       * HTML tags in these fields may be stripped if sanitiazation isn't
+       * disabled.
+       * Defaults to
+       * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+       * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @param value The htmlSanitization to set. + * @return This builder for chaining. + */ + public Builder setHtmlSanitization(com.google.cloud.talent.v4.HtmlSanitization value) { + if (value == null) { + throw new NullPointerException(); + } + + htmlSanitization_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Option for job HTML content sanitization. Applied fields are:
+       * * description
+       * * applicationInfo.instruction
+       * * incentives
+       * * qualifications
+       * * responsibilities
+       * HTML tags in these fields may be stripped if sanitiazation isn't
+       * disabled.
+       * Defaults to
+       * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY].
+       * 
+ * + * .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * + * @return This builder for chaining. + */ + public Builder clearHtmlSanitization() { + + htmlSanitization_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Job.ProcessingOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Job.ProcessingOptions) + private static final com.google.cloud.talent.v4.Job.ProcessingOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Job.ProcessingOptions(); + } + + public static com.google.cloud.talent.v4.Job.ProcessingOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessingOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProcessingOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required during job update.
+   * The resource name for the job. This is generated by the service when a
+   * job is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * Use of this field in job queries and API calls is preferred over the use of
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+   * value is unique.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required during job update.
+   * The resource name for the job. This is generated by the service when a
+   * job is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * Use of this field in job queries and API calls is preferred over the use of
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+   * value is unique.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPANY_FIELD_NUMBER = 2; + private volatile java.lang.Object company_; + /** + * + * + *
+   * Required. The resource name of the company listing the job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The company. + */ + @java.lang.Override + public java.lang.String getCompany() { + java.lang.Object ref = company_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + company_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the company listing the job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for company. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompanyBytes() { + java.lang.Object ref = company_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + company_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUISITION_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requisitionId_; + /** + * + * + *
+   * Required. The requisition ID, also referred to as the posting ID, is
+   * assigned by the client to identify a job. This field is intended to be used
+   * by clients for client identification and tracking of postings. A job isn't
+   * allowed to be created if there is another job with the same
+   * [company][google.cloud.talent.v4.Job.name],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requisitionId. + */ + @java.lang.Override + public java.lang.String getRequisitionId() { + java.lang.Object ref = requisitionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requisitionId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The requisition ID, also referred to as the posting ID, is
+   * assigned by the client to identify a job. This field is intended to be used
+   * by clients for client identification and tracking of postings. A job isn't
+   * allowed to be created if there is another job with the same
+   * [company][google.cloud.talent.v4.Job.name],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requisitionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequisitionIdBytes() { + java.lang.Object ref = requisitionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requisitionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 4; + private volatile java.lang.Object title_; + /** + * + * + *
+   * Required. The title of the job, such as "Software Engineer"
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The title of the job, such as "Software Engineer"
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Required. The description of the job, which typically includes a
+   * multi-paragraph description of the company and related information.
+   * Separate fields are provided on the job object for
+   * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+   * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+   * characteristics. Use of these separate job fields is recommended.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 100,000.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The description of the job, which typically includes a
+   * multi-paragraph description of the company and related information.
+   * Separate fields are provided on the job object for
+   * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+   * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+   * characteristics. Use of these separate job fields is recommended.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 100,000.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESSES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList addresses_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @return A list containing the addresses. + */ + public com.google.protobuf.ProtocolStringList getAddressesList() { + return addresses_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @return The count of addresses. + */ + public int getAddressesCount() { + return addresses_.size(); + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + public java.lang.String getAddresses(int index) { + return addresses_.get(index); + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + public com.google.protobuf.ByteString getAddressesBytes(int index) { + return addresses_.getByteString(index); + } + + public static final int APPLICATION_INFO_FIELD_NUMBER = 7; + private com.google.cloud.talent.v4.Job.ApplicationInfo applicationInfo_; + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return Whether the applicationInfo field is set. + */ + @java.lang.Override + public boolean hasApplicationInfo() { + return applicationInfo_ != null; + } + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return The applicationInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfo getApplicationInfo() { + return applicationInfo_ == null + ? com.google.cloud.talent.v4.Job.ApplicationInfo.getDefaultInstance() + : applicationInfo_; + } + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder getApplicationInfoOrBuilder() { + return getApplicationInfo(); + } + + public static final int JOB_BENEFITS_FIELD_NUMBER = 8; + private java.util.List jobBenefits_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobBenefit> + jobBenefits_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobBenefit>() { + public com.google.cloud.talent.v4.JobBenefit convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobBenefit result = + com.google.cloud.talent.v4.JobBenefit.valueOf(from); + return result == null ? com.google.cloud.talent.v4.JobBenefit.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the jobBenefits. + */ + @java.lang.Override + public java.util.List getJobBenefitsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobBenefit>( + jobBenefits_, jobBenefits_converter_); + } + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return The count of jobBenefits. + */ + @java.lang.Override + public int getJobBenefitsCount() { + return jobBenefits_.size(); + } + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the element to return. + * @return The jobBenefits at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobBenefit getJobBenefits(int index) { + return jobBenefits_converter_.convert(jobBenefits_.get(index)); + } + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the enum numeric values on the wire for jobBenefits. + */ + @java.lang.Override + public java.util.List getJobBenefitsValueList() { + return jobBenefits_; + } + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobBenefits at the given index. + */ + @java.lang.Override + public int getJobBenefitsValue(int index) { + return jobBenefits_.get(index); + } + + private int jobBenefitsMemoizedSerializedSize; + + public static final int COMPENSATION_INFO_FIELD_NUMBER = 9; + private com.google.cloud.talent.v4.CompensationInfo compensationInfo_; + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return Whether the compensationInfo field is set. + */ + @java.lang.Override + public boolean hasCompensationInfo() { + return compensationInfo_ != null; + } + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return The compensationInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfo getCompensationInfo() { + return compensationInfo_ == null + ? com.google.cloud.talent.v4.CompensationInfo.getDefaultInstance() + : compensationInfo_; + } + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationInfoOrBuilder getCompensationInfoOrBuilder() { + return getCompensationInfo(); + } + + public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER = 10; + + private static final class CustomAttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.talent.v4.CustomAttribute> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_CustomAttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.talent.v4.CustomAttribute.getDefaultInstance()); + } + + private com.google.protobuf.MapField + customAttributes_; + + private com.google.protobuf.MapField + internalGetCustomAttributes() { + if (customAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomAttributesDefaultEntryHolder.defaultEntry); + } + return customAttributes_; + } + + public int getCustomAttributesCount() { + return internalGetCustomAttributes().getMap().size(); + } + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + @java.lang.Override + public boolean containsCustomAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetCustomAttributes().getMap().containsKey(key); + } + /** Use {@link #getCustomAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCustomAttributes() { + return getCustomAttributesMap(); + } + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + @java.lang.Override + public java.util.Map + getCustomAttributesMap() { + return internalGetCustomAttributes().getMap(); + } + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrDefault( + java.lang.String key, com.google.cloud.talent.v4.CustomAttribute defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetCustomAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetCustomAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DEGREE_TYPES_FIELD_NUMBER = 11; + private java.util.List degreeTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.DegreeType> + degreeTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.DegreeType>() { + public com.google.cloud.talent.v4.DegreeType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.DegreeType result = + com.google.cloud.talent.v4.DegreeType.valueOf(from); + return result == null ? com.google.cloud.talent.v4.DegreeType.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the degreeTypes. + */ + @java.lang.Override + public java.util.List getDegreeTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.DegreeType>( + degreeTypes_, degreeTypes_converter_); + } + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return The count of degreeTypes. + */ + @java.lang.Override + public int getDegreeTypesCount() { + return degreeTypes_.size(); + } + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the element to return. + * @return The degreeTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.DegreeType getDegreeTypes(int index) { + return degreeTypes_converter_.convert(degreeTypes_.get(index)); + } + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the enum numeric values on the wire for degreeTypes. + */ + @java.lang.Override + public java.util.List getDegreeTypesValueList() { + return degreeTypes_; + } + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of degreeTypes at the given index. + */ + @java.lang.Override + public int getDegreeTypesValue(int index) { + return degreeTypes_.get(index); + } + + private int degreeTypesMemoizedSerializedSize; + + public static final int DEPARTMENT_FIELD_NUMBER = 12; + private volatile java.lang.Object department_; + /** + * + * + *
+   * The department or functional area within the company with the open
+   * position.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string department = 12; + * + * @return The department. + */ + @java.lang.Override + public java.lang.String getDepartment() { + java.lang.Object ref = department_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + department_ = s; + return s; + } + } + /** + * + * + *
+   * The department or functional area within the company with the open
+   * position.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string department = 12; + * + * @return The bytes for department. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDepartmentBytes() { + java.lang.Object ref = department_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + department_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMPLOYMENT_TYPES_FIELD_NUMBER = 13; + private java.util.List employmentTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType> + employmentTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>() { + public com.google.cloud.talent.v4.EmploymentType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.EmploymentType result = + com.google.cloud.talent.v4.EmploymentType.valueOf(from); + return result == null + ? com.google.cloud.talent.v4.EmploymentType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the employmentTypes. + */ + @java.lang.Override + public java.util.List getEmploymentTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>( + employmentTypes_, employmentTypes_converter_); + } + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return The count of employmentTypes. + */ + @java.lang.Override + public int getEmploymentTypesCount() { + return employmentTypes_.size(); + } + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index) { + return employmentTypes_converter_.convert(employmentTypes_.get(index)); + } + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + @java.lang.Override + public java.util.List getEmploymentTypesValueList() { + return employmentTypes_; + } + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + @java.lang.Override + public int getEmploymentTypesValue(int index) { + return employmentTypes_.get(index); + } + + private int employmentTypesMemoizedSerializedSize; + + public static final int INCENTIVES_FIELD_NUMBER = 14; + private volatile java.lang.Object incentives_; + /** + * + * + *
+   * A description of bonus, commission, and other compensation
+   * incentives associated with the job not including salary or pay.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string incentives = 14; + * + * @return The incentives. + */ + @java.lang.Override + public java.lang.String getIncentives() { + java.lang.Object ref = incentives_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + incentives_ = s; + return s; + } + } + /** + * + * + *
+   * A description of bonus, commission, and other compensation
+   * incentives associated with the job not including salary or pay.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string incentives = 14; + * + * @return The bytes for incentives. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncentivesBytes() { + java.lang.Object ref = incentives_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + incentives_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 15; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * The language of the posting. This field is distinct from
+   * any requirements for fluency that are associated with the job.
+   * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+   * class="external" target="_blank" }.
+   * If this field is unspecified and
+   * [Job.description][google.cloud.talent.v4.Job.description] is present,
+   * detected language code based on
+   * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+   * otherwise defaults to 'en_US'.
+   * 
+ * + * string language_code = 15; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The language of the posting. This field is distinct from
+   * any requirements for fluency that are associated with the job.
+   * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+   * class="external" target="_blank" }.
+   * If this field is unspecified and
+   * [Job.description][google.cloud.talent.v4.Job.description] is present,
+   * detected language code based on
+   * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+   * otherwise defaults to 'en_US'.
+   * 
+ * + * string language_code = 15; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_LEVEL_FIELD_NUMBER = 16; + private int jobLevel_; + /** + * + * + *
+   * The experience level associated with the job, such as "Entry Level".
+   * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The enum numeric value on the wire for jobLevel. + */ + @java.lang.Override + public int getJobLevelValue() { + return jobLevel_; + } + /** + * + * + *
+   * The experience level associated with the job, such as "Entry Level".
+   * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The jobLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobLevel getJobLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobLevel result = + com.google.cloud.talent.v4.JobLevel.valueOf(jobLevel_); + return result == null ? com.google.cloud.talent.v4.JobLevel.UNRECOGNIZED : result; + } + + public static final int PROMOTION_VALUE_FIELD_NUMBER = 17; + private int promotionValue_; + /** + * + * + *
+   * A promotion value of the job, as determined by the client.
+   * The value determines the sort order of the jobs returned when searching for
+   * jobs using the featured jobs search call, with higher promotional values
+   * being returned first and ties being resolved by relevance sort. Only the
+   * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+   * Default value is 0, and negative values are treated as 0.
+   * 
+ * + * int32 promotion_value = 17; + * + * @return The promotionValue. + */ + @java.lang.Override + public int getPromotionValue() { + return promotionValue_; + } + + public static final int QUALIFICATIONS_FIELD_NUMBER = 18; + private volatile java.lang.Object qualifications_; + /** + * + * + *
+   * A description of the qualifications required to perform the
+   * job. The use of this field is recommended
+   * as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string qualifications = 18; + * + * @return The qualifications. + */ + @java.lang.Override + public java.lang.String getQualifications() { + java.lang.Object ref = qualifications_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + qualifications_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the qualifications required to perform the
+   * job. The use of this field is recommended
+   * as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string qualifications = 18; + * + * @return The bytes for qualifications. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQualificationsBytes() { + java.lang.Object ref = qualifications_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + qualifications_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSIBILITIES_FIELD_NUMBER = 19; + private volatile java.lang.Object responsibilities_; + /** + * + * + *
+   * A description of job responsibilities. The use of this field is
+   * recommended as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string responsibilities = 19; + * + * @return The responsibilities. + */ + @java.lang.Override + public java.lang.String getResponsibilities() { + java.lang.Object ref = responsibilities_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responsibilities_ = s; + return s; + } + } + /** + * + * + *
+   * A description of job responsibilities. The use of this field is
+   * recommended as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string responsibilities = 19; + * + * @return The bytes for responsibilities. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponsibilitiesBytes() { + java.lang.Object ref = responsibilities_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responsibilities_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTING_REGION_FIELD_NUMBER = 20; + private int postingRegion_; + /** + * + * + *
+   * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+   * state, country) throughout which the job is available. If this field is
+   * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+   * query within the job region finds this job posting if an exact location
+   * match isn't specified. If this field is set to
+   * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+   * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+   * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+   * same location level as this field is strongly recommended.
+   * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The enum numeric value on the wire for postingRegion. + */ + @java.lang.Override + public int getPostingRegionValue() { + return postingRegion_; + } + /** + * + * + *
+   * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+   * state, country) throughout which the job is available. If this field is
+   * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+   * query within the job region finds this job posting if an exact location
+   * match isn't specified. If this field is set to
+   * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+   * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+   * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+   * same location level as this field is strongly recommended.
+   * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The postingRegion. + */ + @java.lang.Override + public com.google.cloud.talent.v4.PostingRegion getPostingRegion() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.PostingRegion result = + com.google.cloud.talent.v4.PostingRegion.valueOf(postingRegion_); + return result == null ? com.google.cloud.talent.v4.PostingRegion.UNRECOGNIZED : result; + } + + public static final int VISIBILITY_FIELD_NUMBER = 21; + private int visibility_; + /** + * + * + *
+   * Deprecated. The job is only visible to the owner.
+   * The visibility of the job.
+   * Defaults to
+   * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+   * if not specified.
+   * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The enum numeric value on the wire for visibility. + */ + @java.lang.Override + @java.lang.Deprecated + public int getVisibilityValue() { + return visibility_; + } + /** + * + * + *
+   * Deprecated. The job is only visible to the owner.
+   * The visibility of the job.
+   * Defaults to
+   * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+   * if not specified.
+   * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The visibility. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.talent.v4.Visibility getVisibility() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.Visibility result = + com.google.cloud.talent.v4.Visibility.valueOf(visibility_); + return result == null ? com.google.cloud.talent.v4.Visibility.UNRECOGNIZED : result; + } + + public static final int JOB_START_TIME_FIELD_NUMBER = 22; + private com.google.protobuf.Timestamp jobStartTime_; + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return Whether the jobStartTime field is set. + */ + @java.lang.Override + public boolean hasJobStartTime() { + return jobStartTime_ != null; + } + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return The jobStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getJobStartTime() { + return jobStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : jobStartTime_; + } + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getJobStartTimeOrBuilder() { + return getJobStartTime(); + } + + public static final int JOB_END_TIME_FIELD_NUMBER = 23; + private com.google.protobuf.Timestamp jobEndTime_; + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return Whether the jobEndTime field is set. + */ + @java.lang.Override + public boolean hasJobEndTime() { + return jobEndTime_ != null; + } + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return The jobEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getJobEndTime() { + return jobEndTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : jobEndTime_; + } + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getJobEndTimeOrBuilder() { + return getJobEndTime(); + } + + public static final int POSTING_PUBLISH_TIME_FIELD_NUMBER = 24; + private com.google.protobuf.Timestamp postingPublishTime_; + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return Whether the postingPublishTime field is set. + */ + @java.lang.Override + public boolean hasPostingPublishTime() { + return postingPublishTime_ != null; + } + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return The postingPublishTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPostingPublishTime() { + return postingPublishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingPublishTime_; + } + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPostingPublishTimeOrBuilder() { + return getPostingPublishTime(); + } + + public static final int POSTING_EXPIRE_TIME_FIELD_NUMBER = 25; + private com.google.protobuf.Timestamp postingExpireTime_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return Whether the postingExpireTime field is set. + */ + @java.lang.Override + public boolean hasPostingExpireTime() { + return postingExpireTime_ != null; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return The postingExpireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPostingExpireTime() { + return postingExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingExpireTime_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPostingExpireTimeOrBuilder() { + return getPostingExpireTime(); + } + + public static final int POSTING_CREATE_TIME_FIELD_NUMBER = 26; + private com.google.protobuf.Timestamp postingCreateTime_; + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingCreateTime field is set. + */ + @java.lang.Override + public boolean hasPostingCreateTime() { + return postingCreateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPostingCreateTime() { + return postingCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingCreateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPostingCreateTimeOrBuilder() { + return getPostingCreateTime(); + } + + public static final int POSTING_UPDATE_TIME_FIELD_NUMBER = 27; + private com.google.protobuf.Timestamp postingUpdateTime_; + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingUpdateTime field is set. + */ + @java.lang.Override + public boolean hasPostingUpdateTime() { + return postingUpdateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPostingUpdateTime() { + return postingUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingUpdateTime_; + } + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPostingUpdateTimeOrBuilder() { + return getPostingUpdateTime(); + } + + public static final int COMPANY_DISPLAY_NAME_FIELD_NUMBER = 28; + private volatile java.lang.Object companyDisplayName_; + /** + * + * + *
+   * Output only. Display name of the company listing the job.
+   * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The companyDisplayName. + */ + @java.lang.Override + public java.lang.String getCompanyDisplayName() { + java.lang.Object ref = companyDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + companyDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Display name of the company listing the job.
+   * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for companyDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompanyDisplayNameBytes() { + java.lang.Object ref = companyDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + companyDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DERIVED_INFO_FIELD_NUMBER = 29; + private com.google.cloud.talent.v4.Job.DerivedInfo derivedInfo_; + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + @java.lang.Override + public boolean hasDerivedInfo() { + return derivedInfo_ != null; + } + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfo getDerivedInfo() { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Job.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder getDerivedInfoOrBuilder() { + return getDerivedInfo(); + } + + public static final int PROCESSING_OPTIONS_FIELD_NUMBER = 30; + private com.google.cloud.talent.v4.Job.ProcessingOptions processingOptions_; + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return Whether the processingOptions field is set. + */ + @java.lang.Override + public boolean hasProcessingOptions() { + return processingOptions_ != null; + } + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return The processingOptions. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptions getProcessingOptions() { + return processingOptions_ == null + ? com.google.cloud.talent.v4.Job.ProcessingOptions.getDefaultInstance() + : processingOptions_; + } + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder getProcessingOptionsOrBuilder() { + return getProcessingOptions(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getCompanyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, company_); + } + if (!getRequisitionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requisitionId_); + } + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, title_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + for (int i = 0; i < addresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, addresses_.getRaw(i)); + } + if (applicationInfo_ != null) { + output.writeMessage(7, getApplicationInfo()); + } + if (getJobBenefitsList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(jobBenefitsMemoizedSerializedSize); + } + for (int i = 0; i < jobBenefits_.size(); i++) { + output.writeEnumNoTag(jobBenefits_.get(i)); + } + if (compensationInfo_ != null) { + output.writeMessage(9, getCompensationInfo()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetCustomAttributes(), CustomAttributesDefaultEntryHolder.defaultEntry, 10); + if (getDegreeTypesList().size() > 0) { + output.writeUInt32NoTag(90); + output.writeUInt32NoTag(degreeTypesMemoizedSerializedSize); + } + for (int i = 0; i < degreeTypes_.size(); i++) { + output.writeEnumNoTag(degreeTypes_.get(i)); + } + if (!getDepartmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, department_); + } + if (getEmploymentTypesList().size() > 0) { + output.writeUInt32NoTag(106); + output.writeUInt32NoTag(employmentTypesMemoizedSerializedSize); + } + for (int i = 0; i < employmentTypes_.size(); i++) { + output.writeEnumNoTag(employmentTypes_.get(i)); + } + if (!getIncentivesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, incentives_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, languageCode_); + } + if (jobLevel_ != com.google.cloud.talent.v4.JobLevel.JOB_LEVEL_UNSPECIFIED.getNumber()) { + output.writeEnum(16, jobLevel_); + } + if (promotionValue_ != 0) { + output.writeInt32(17, promotionValue_); + } + if (!getQualificationsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, qualifications_); + } + if (!getResponsibilitiesBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, responsibilities_); + } + if (postingRegion_ + != com.google.cloud.talent.v4.PostingRegion.POSTING_REGION_UNSPECIFIED.getNumber()) { + output.writeEnum(20, postingRegion_); + } + if (visibility_ != com.google.cloud.talent.v4.Visibility.VISIBILITY_UNSPECIFIED.getNumber()) { + output.writeEnum(21, visibility_); + } + if (jobStartTime_ != null) { + output.writeMessage(22, getJobStartTime()); + } + if (jobEndTime_ != null) { + output.writeMessage(23, getJobEndTime()); + } + if (postingPublishTime_ != null) { + output.writeMessage(24, getPostingPublishTime()); + } + if (postingExpireTime_ != null) { + output.writeMessage(25, getPostingExpireTime()); + } + if (postingCreateTime_ != null) { + output.writeMessage(26, getPostingCreateTime()); + } + if (postingUpdateTime_ != null) { + output.writeMessage(27, getPostingUpdateTime()); + } + if (!getCompanyDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 28, companyDisplayName_); + } + if (derivedInfo_ != null) { + output.writeMessage(29, getDerivedInfo()); + } + if (processingOptions_ != null) { + output.writeMessage(30, getProcessingOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getCompanyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, company_); + } + if (!getRequisitionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requisitionId_); + } + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, title_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + { + int dataSize = 0; + for (int i = 0; i < addresses_.size(); i++) { + dataSize += computeStringSizeNoTag(addresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getAddressesList().size(); + } + if (applicationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getApplicationInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < jobBenefits_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(jobBenefits_.get(i)); + } + size += dataSize; + if (!getJobBenefitsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + jobBenefitsMemoizedSerializedSize = dataSize; + } + if (compensationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCompensationInfo()); + } + for (java.util.Map.Entry entry : + internalGetCustomAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry + customAttributes__ = + CustomAttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, customAttributes__); + } + { + int dataSize = 0; + for (int i = 0; i < degreeTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(degreeTypes_.get(i)); + } + size += dataSize; + if (!getDegreeTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + degreeTypesMemoizedSerializedSize = dataSize; + } + if (!getDepartmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, department_); + } + { + int dataSize = 0; + for (int i = 0; i < employmentTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(employmentTypes_.get(i)); + } + size += dataSize; + if (!getEmploymentTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + employmentTypesMemoizedSerializedSize = dataSize; + } + if (!getIncentivesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, incentives_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, languageCode_); + } + if (jobLevel_ != com.google.cloud.talent.v4.JobLevel.JOB_LEVEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, jobLevel_); + } + if (promotionValue_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(17, promotionValue_); + } + if (!getQualificationsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, qualifications_); + } + if (!getResponsibilitiesBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, responsibilities_); + } + if (postingRegion_ + != com.google.cloud.talent.v4.PostingRegion.POSTING_REGION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, postingRegion_); + } + if (visibility_ != com.google.cloud.talent.v4.Visibility.VISIBILITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, visibility_); + } + if (jobStartTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getJobStartTime()); + } + if (jobEndTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getJobEndTime()); + } + if (postingPublishTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getPostingPublishTime()); + } + if (postingExpireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getPostingExpireTime()); + } + if (postingCreateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getPostingCreateTime()); + } + if (postingUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getPostingUpdateTime()); + } + if (!getCompanyDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, companyDisplayName_); + } + if (derivedInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getDerivedInfo()); + } + if (processingOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getProcessingOptions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Job)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Job other = (com.google.cloud.talent.v4.Job) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCompany().equals(other.getCompany())) return false; + if (!getRequisitionId().equals(other.getRequisitionId())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getAddressesList().equals(other.getAddressesList())) return false; + if (hasApplicationInfo() != other.hasApplicationInfo()) return false; + if (hasApplicationInfo()) { + if (!getApplicationInfo().equals(other.getApplicationInfo())) return false; + } + if (!jobBenefits_.equals(other.jobBenefits_)) return false; + if (hasCompensationInfo() != other.hasCompensationInfo()) return false; + if (hasCompensationInfo()) { + if (!getCompensationInfo().equals(other.getCompensationInfo())) return false; + } + if (!internalGetCustomAttributes().equals(other.internalGetCustomAttributes())) return false; + if (!degreeTypes_.equals(other.degreeTypes_)) return false; + if (!getDepartment().equals(other.getDepartment())) return false; + if (!employmentTypes_.equals(other.employmentTypes_)) return false; + if (!getIncentives().equals(other.getIncentives())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (jobLevel_ != other.jobLevel_) return false; + if (getPromotionValue() != other.getPromotionValue()) return false; + if (!getQualifications().equals(other.getQualifications())) return false; + if (!getResponsibilities().equals(other.getResponsibilities())) return false; + if (postingRegion_ != other.postingRegion_) return false; + if (visibility_ != other.visibility_) return false; + if (hasJobStartTime() != other.hasJobStartTime()) return false; + if (hasJobStartTime()) { + if (!getJobStartTime().equals(other.getJobStartTime())) return false; + } + if (hasJobEndTime() != other.hasJobEndTime()) return false; + if (hasJobEndTime()) { + if (!getJobEndTime().equals(other.getJobEndTime())) return false; + } + if (hasPostingPublishTime() != other.hasPostingPublishTime()) return false; + if (hasPostingPublishTime()) { + if (!getPostingPublishTime().equals(other.getPostingPublishTime())) return false; + } + if (hasPostingExpireTime() != other.hasPostingExpireTime()) return false; + if (hasPostingExpireTime()) { + if (!getPostingExpireTime().equals(other.getPostingExpireTime())) return false; + } + if (hasPostingCreateTime() != other.hasPostingCreateTime()) return false; + if (hasPostingCreateTime()) { + if (!getPostingCreateTime().equals(other.getPostingCreateTime())) return false; + } + if (hasPostingUpdateTime() != other.hasPostingUpdateTime()) return false; + if (hasPostingUpdateTime()) { + if (!getPostingUpdateTime().equals(other.getPostingUpdateTime())) return false; + } + if (!getCompanyDisplayName().equals(other.getCompanyDisplayName())) return false; + if (hasDerivedInfo() != other.hasDerivedInfo()) return false; + if (hasDerivedInfo()) { + if (!getDerivedInfo().equals(other.getDerivedInfo())) return false; + } + if (hasProcessingOptions() != other.hasProcessingOptions()) return false; + if (hasProcessingOptions()) { + if (!getProcessingOptions().equals(other.getProcessingOptions())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + COMPANY_FIELD_NUMBER; + hash = (53 * hash) + getCompany().hashCode(); + hash = (37 * hash) + REQUISITION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequisitionId().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getAddressesCount() > 0) { + hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getAddressesList().hashCode(); + } + if (hasApplicationInfo()) { + hash = (37 * hash) + APPLICATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getApplicationInfo().hashCode(); + } + if (getJobBenefitsCount() > 0) { + hash = (37 * hash) + JOB_BENEFITS_FIELD_NUMBER; + hash = (53 * hash) + jobBenefits_.hashCode(); + } + if (hasCompensationInfo()) { + hash = (37 * hash) + COMPENSATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCompensationInfo().hashCode(); + } + if (!internalGetCustomAttributes().getMap().isEmpty()) { + hash = (37 * hash) + CUSTOM_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetCustomAttributes().hashCode(); + } + if (getDegreeTypesCount() > 0) { + hash = (37 * hash) + DEGREE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + degreeTypes_.hashCode(); + } + hash = (37 * hash) + DEPARTMENT_FIELD_NUMBER; + hash = (53 * hash) + getDepartment().hashCode(); + if (getEmploymentTypesCount() > 0) { + hash = (37 * hash) + EMPLOYMENT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + employmentTypes_.hashCode(); + } + hash = (37 * hash) + INCENTIVES_FIELD_NUMBER; + hash = (53 * hash) + getIncentives().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + JOB_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + jobLevel_; + hash = (37 * hash) + PROMOTION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getPromotionValue(); + hash = (37 * hash) + QUALIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getQualifications().hashCode(); + hash = (37 * hash) + RESPONSIBILITIES_FIELD_NUMBER; + hash = (53 * hash) + getResponsibilities().hashCode(); + hash = (37 * hash) + POSTING_REGION_FIELD_NUMBER; + hash = (53 * hash) + postingRegion_; + hash = (37 * hash) + VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + visibility_; + if (hasJobStartTime()) { + hash = (37 * hash) + JOB_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getJobStartTime().hashCode(); + } + if (hasJobEndTime()) { + hash = (37 * hash) + JOB_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getJobEndTime().hashCode(); + } + if (hasPostingPublishTime()) { + hash = (37 * hash) + POSTING_PUBLISH_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPostingPublishTime().hashCode(); + } + if (hasPostingExpireTime()) { + hash = (37 * hash) + POSTING_EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPostingExpireTime().hashCode(); + } + if (hasPostingCreateTime()) { + hash = (37 * hash) + POSTING_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPostingCreateTime().hashCode(); + } + if (hasPostingUpdateTime()) { + hash = (37 * hash) + POSTING_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPostingUpdateTime().hashCode(); + } + hash = (37 * hash) + COMPANY_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCompanyDisplayName().hashCode(); + if (hasDerivedInfo()) { + hash = (37 * hash) + DERIVED_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDerivedInfo().hashCode(); + } + if (hasProcessingOptions()) { + hash = (37 * hash) + PROCESSING_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getProcessingOptions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Job parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Job parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Job parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Job parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Job prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Job resource represents a job posting (also referred to as a "job listing"
+   * or "job requisition"). A job belongs to a
+   * [Company][google.cloud.talent.v4.Company], which is the hiring entity
+   * responsible for the job.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Job} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Job) + com.google.cloud.talent.v4.JobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetCustomAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 10: + return internalGetMutableCustomAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Job.class, com.google.cloud.talent.v4.Job.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Job.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + company_ = ""; + + requisitionId_ = ""; + + title_ = ""; + + description_ = ""; + + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (applicationInfoBuilder_ == null) { + applicationInfo_ = null; + } else { + applicationInfo_ = null; + applicationInfoBuilder_ = null; + } + jobBenefits_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + if (compensationInfoBuilder_ == null) { + compensationInfo_ = null; + } else { + compensationInfo_ = null; + compensationInfoBuilder_ = null; + } + internalGetMutableCustomAttributes().clear(); + degreeTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + department_ = ""; + + employmentTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + incentives_ = ""; + + languageCode_ = ""; + + jobLevel_ = 0; + + promotionValue_ = 0; + + qualifications_ = ""; + + responsibilities_ = ""; + + postingRegion_ = 0; + + visibility_ = 0; + + if (jobStartTimeBuilder_ == null) { + jobStartTime_ = null; + } else { + jobStartTime_ = null; + jobStartTimeBuilder_ = null; + } + if (jobEndTimeBuilder_ == null) { + jobEndTime_ = null; + } else { + jobEndTime_ = null; + jobEndTimeBuilder_ = null; + } + if (postingPublishTimeBuilder_ == null) { + postingPublishTime_ = null; + } else { + postingPublishTime_ = null; + postingPublishTimeBuilder_ = null; + } + if (postingExpireTimeBuilder_ == null) { + postingExpireTime_ = null; + } else { + postingExpireTime_ = null; + postingExpireTimeBuilder_ = null; + } + if (postingCreateTimeBuilder_ == null) { + postingCreateTime_ = null; + } else { + postingCreateTime_ = null; + postingCreateTimeBuilder_ = null; + } + if (postingUpdateTimeBuilder_ == null) { + postingUpdateTime_ = null; + } else { + postingUpdateTime_ = null; + postingUpdateTimeBuilder_ = null; + } + companyDisplayName_ = ""; + + if (derivedInfoBuilder_ == null) { + derivedInfo_ = null; + } else { + derivedInfo_ = null; + derivedInfoBuilder_ = null; + } + if (processingOptionsBuilder_ == null) { + processingOptions_ = null; + } else { + processingOptions_ = null; + processingOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobProto + .internal_static_google_cloud_talent_v4_Job_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Job.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job build() { + com.google.cloud.talent.v4.Job result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job buildPartial() { + com.google.cloud.talent.v4.Job result = new com.google.cloud.talent.v4.Job(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.company_ = company_; + result.requisitionId_ = requisitionId_; + result.title_ = title_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + addresses_ = addresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.addresses_ = addresses_; + if (applicationInfoBuilder_ == null) { + result.applicationInfo_ = applicationInfo_; + } else { + result.applicationInfo_ = applicationInfoBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + jobBenefits_ = java.util.Collections.unmodifiableList(jobBenefits_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.jobBenefits_ = jobBenefits_; + if (compensationInfoBuilder_ == null) { + result.compensationInfo_ = compensationInfo_; + } else { + result.compensationInfo_ = compensationInfoBuilder_.build(); + } + result.customAttributes_ = internalGetCustomAttributes(); + result.customAttributes_.makeImmutable(); + if (((bitField0_ & 0x00000008) != 0)) { + degreeTypes_ = java.util.Collections.unmodifiableList(degreeTypes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.degreeTypes_ = degreeTypes_; + result.department_ = department_; + if (((bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = java.util.Collections.unmodifiableList(employmentTypes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.employmentTypes_ = employmentTypes_; + result.incentives_ = incentives_; + result.languageCode_ = languageCode_; + result.jobLevel_ = jobLevel_; + result.promotionValue_ = promotionValue_; + result.qualifications_ = qualifications_; + result.responsibilities_ = responsibilities_; + result.postingRegion_ = postingRegion_; + result.visibility_ = visibility_; + if (jobStartTimeBuilder_ == null) { + result.jobStartTime_ = jobStartTime_; + } else { + result.jobStartTime_ = jobStartTimeBuilder_.build(); + } + if (jobEndTimeBuilder_ == null) { + result.jobEndTime_ = jobEndTime_; + } else { + result.jobEndTime_ = jobEndTimeBuilder_.build(); + } + if (postingPublishTimeBuilder_ == null) { + result.postingPublishTime_ = postingPublishTime_; + } else { + result.postingPublishTime_ = postingPublishTimeBuilder_.build(); + } + if (postingExpireTimeBuilder_ == null) { + result.postingExpireTime_ = postingExpireTime_; + } else { + result.postingExpireTime_ = postingExpireTimeBuilder_.build(); + } + if (postingCreateTimeBuilder_ == null) { + result.postingCreateTime_ = postingCreateTime_; + } else { + result.postingCreateTime_ = postingCreateTimeBuilder_.build(); + } + if (postingUpdateTimeBuilder_ == null) { + result.postingUpdateTime_ = postingUpdateTime_; + } else { + result.postingUpdateTime_ = postingUpdateTimeBuilder_.build(); + } + result.companyDisplayName_ = companyDisplayName_; + if (derivedInfoBuilder_ == null) { + result.derivedInfo_ = derivedInfo_; + } else { + result.derivedInfo_ = derivedInfoBuilder_.build(); + } + if (processingOptionsBuilder_ == null) { + result.processingOptions_ = processingOptions_; + } else { + result.processingOptions_ = processingOptionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Job) { + return mergeFrom((com.google.cloud.talent.v4.Job) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Job other) { + if (other == com.google.cloud.talent.v4.Job.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getCompany().isEmpty()) { + company_ = other.company_; + onChanged(); + } + if (!other.getRequisitionId().isEmpty()) { + requisitionId_ = other.requisitionId_; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.addresses_.isEmpty()) { + if (addresses_.isEmpty()) { + addresses_ = other.addresses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAddressesIsMutable(); + addresses_.addAll(other.addresses_); + } + onChanged(); + } + if (other.hasApplicationInfo()) { + mergeApplicationInfo(other.getApplicationInfo()); + } + if (!other.jobBenefits_.isEmpty()) { + if (jobBenefits_.isEmpty()) { + jobBenefits_ = other.jobBenefits_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJobBenefitsIsMutable(); + jobBenefits_.addAll(other.jobBenefits_); + } + onChanged(); + } + if (other.hasCompensationInfo()) { + mergeCompensationInfo(other.getCompensationInfo()); + } + internalGetMutableCustomAttributes().mergeFrom(other.internalGetCustomAttributes()); + if (!other.degreeTypes_.isEmpty()) { + if (degreeTypes_.isEmpty()) { + degreeTypes_ = other.degreeTypes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDegreeTypesIsMutable(); + degreeTypes_.addAll(other.degreeTypes_); + } + onChanged(); + } + if (!other.getDepartment().isEmpty()) { + department_ = other.department_; + onChanged(); + } + if (!other.employmentTypes_.isEmpty()) { + if (employmentTypes_.isEmpty()) { + employmentTypes_ = other.employmentTypes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureEmploymentTypesIsMutable(); + employmentTypes_.addAll(other.employmentTypes_); + } + onChanged(); + } + if (!other.getIncentives().isEmpty()) { + incentives_ = other.incentives_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.jobLevel_ != 0) { + setJobLevelValue(other.getJobLevelValue()); + } + if (other.getPromotionValue() != 0) { + setPromotionValue(other.getPromotionValue()); + } + if (!other.getQualifications().isEmpty()) { + qualifications_ = other.qualifications_; + onChanged(); + } + if (!other.getResponsibilities().isEmpty()) { + responsibilities_ = other.responsibilities_; + onChanged(); + } + if (other.postingRegion_ != 0) { + setPostingRegionValue(other.getPostingRegionValue()); + } + if (other.visibility_ != 0) { + setVisibilityValue(other.getVisibilityValue()); + } + if (other.hasJobStartTime()) { + mergeJobStartTime(other.getJobStartTime()); + } + if (other.hasJobEndTime()) { + mergeJobEndTime(other.getJobEndTime()); + } + if (other.hasPostingPublishTime()) { + mergePostingPublishTime(other.getPostingPublishTime()); + } + if (other.hasPostingExpireTime()) { + mergePostingExpireTime(other.getPostingExpireTime()); + } + if (other.hasPostingCreateTime()) { + mergePostingCreateTime(other.getPostingCreateTime()); + } + if (other.hasPostingUpdateTime()) { + mergePostingUpdateTime(other.getPostingUpdateTime()); + } + if (!other.getCompanyDisplayName().isEmpty()) { + companyDisplayName_ = other.companyDisplayName_; + onChanged(); + } + if (other.hasDerivedInfo()) { + mergeDerivedInfo(other.getDerivedInfo()); + } + if (other.hasProcessingOptions()) { + mergeProcessingOptions(other.getProcessingOptions()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Job parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Job) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required during job update.
+     * The resource name for the job. This is generated by the service when a
+     * job is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * Use of this field in job queries and API calls is preferred over the use of
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+     * value is unique.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required during job update.
+     * The resource name for the job. This is generated by the service when a
+     * job is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * Use of this field in job queries and API calls is preferred over the use of
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+     * value is unique.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required during job update.
+     * The resource name for the job. This is generated by the service when a
+     * job is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * Use of this field in job queries and API calls is preferred over the use of
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+     * value is unique.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required during job update.
+     * The resource name for the job. This is generated by the service when a
+     * job is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * Use of this field in job queries and API calls is preferred over the use of
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+     * value is unique.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required during job update.
+     * The resource name for the job. This is generated by the service when a
+     * job is created.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * Use of this field in job queries and API calls is preferred over the use of
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+     * value is unique.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object company_ = ""; + /** + * + * + *
+     * Required. The resource name of the company listing the job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The company. + */ + public java.lang.String getCompany() { + java.lang.Object ref = company_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + company_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company listing the job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for company. + */ + public com.google.protobuf.ByteString getCompanyBytes() { + java.lang.Object ref = company_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + company_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the company listing the job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The company to set. + * @return This builder for chaining. + */ + public Builder setCompany(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + company_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company listing the job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCompany() { + + company_ = getDefaultInstance().getCompany(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the company listing the job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for company to set. + * @return This builder for chaining. + */ + public Builder setCompanyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + company_ = value; + onChanged(); + return this; + } + + private java.lang.Object requisitionId_ = ""; + /** + * + * + *
+     * Required. The requisition ID, also referred to as the posting ID, is
+     * assigned by the client to identify a job. This field is intended to be used
+     * by clients for client identification and tracking of postings. A job isn't
+     * allowed to be created if there is another job with the same
+     * [company][google.cloud.talent.v4.Job.name],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requisitionId. + */ + public java.lang.String getRequisitionId() { + java.lang.Object ref = requisitionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requisitionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The requisition ID, also referred to as the posting ID, is
+     * assigned by the client to identify a job. This field is intended to be used
+     * by clients for client identification and tracking of postings. A job isn't
+     * allowed to be created if there is another job with the same
+     * [company][google.cloud.talent.v4.Job.name],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requisitionId. + */ + public com.google.protobuf.ByteString getRequisitionIdBytes() { + java.lang.Object ref = requisitionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requisitionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The requisition ID, also referred to as the posting ID, is
+     * assigned by the client to identify a job. This field is intended to be used
+     * by clients for client identification and tracking of postings. A job isn't
+     * allowed to be created if there is another job with the same
+     * [company][google.cloud.talent.v4.Job.name],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The requisitionId to set. + * @return This builder for chaining. + */ + public Builder setRequisitionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requisitionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The requisition ID, also referred to as the posting ID, is
+     * assigned by the client to identify a job. This field is intended to be used
+     * by clients for client identification and tracking of postings. A job isn't
+     * allowed to be created if there is another job with the same
+     * [company][google.cloud.talent.v4.Job.name],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRequisitionId() { + + requisitionId_ = getDefaultInstance().getRequisitionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The requisition ID, also referred to as the posting ID, is
+     * assigned by the client to identify a job. This field is intended to be used
+     * by clients for client identification and tracking of postings. A job isn't
+     * allowed to be created if there is another job with the same
+     * [company][google.cloud.talent.v4.Job.name],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for requisitionId to set. + * @return This builder for chaining. + */ + public Builder setRequisitionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requisitionId_ = value; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * Required. The title of the job, such as "Software Engineer"
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The title of the job, such as "Software Engineer"
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The title of the job, such as "Software Engineer"
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The title of the job, such as "Software Engineer"
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The title of the job, such as "Software Engineer"
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Required. The description of the job, which typically includes a
+     * multi-paragraph description of the company and related information.
+     * Separate fields are provided on the job object for
+     * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+     * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+     * characteristics. Use of these separate job fields is recommended.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 100,000.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The description of the job, which typically includes a
+     * multi-paragraph description of the company and related information.
+     * Separate fields are provided on the job object for
+     * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+     * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+     * characteristics. Use of these separate job fields is recommended.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 100,000.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The description of the job, which typically includes a
+     * multi-paragraph description of the company and related information.
+     * Separate fields are provided on the job object for
+     * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+     * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+     * characteristics. Use of these separate job fields is recommended.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 100,000.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The description of the job, which typically includes a
+     * multi-paragraph description of the company and related information.
+     * Separate fields are provided on the job object for
+     * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+     * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+     * characteristics. Use of these separate job fields is recommended.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 100,000.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The description of the job, which typically includes a
+     * multi-paragraph description of the company and related information.
+     * Separate fields are provided on the job object for
+     * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+     * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+     * characteristics. Use of these separate job fields is recommended.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 100,000.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList addresses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAddressesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @return A list containing the addresses. + */ + public com.google.protobuf.ProtocolStringList getAddressesList() { + return addresses_.getUnmodifiableView(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @return The count of addresses. + */ + public int getAddressesCount() { + return addresses_.size(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + public java.lang.String getAddresses(int index) { + return addresses_.get(index); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + public com.google.protobuf.ByteString getAddressesBytes(int index) { + return addresses_.getByteString(index); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param index The index to set the value at. + * @param value The addresses to set. + * @return This builder for chaining. + */ + public Builder setAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressesIsMutable(); + addresses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param value The addresses to add. + * @return This builder for chaining. + */ + public Builder addAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressesIsMutable(); + addresses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param values The addresses to add. + * @return This builder for chaining. + */ + public Builder addAllAddresses(java.lang.Iterable values) { + ensureAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, addresses_); + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @return This builder for chaining. + */ + public Builder clearAddresses() { + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * Location(s) where the employer is looking to hire for this job posting.
+     * Specifying the full street address(es) of the hiring location enables
+     * better API results, especially job searches by commute time.
+     * At most 50 locations are allowed for best search performance. If a job has
+     * more locations, it is suggested to split it into multiple jobs with unique
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+     * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+     * [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+     * allowed. If the original
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+     * preserved, a custom field should be used for storage. It is also suggested
+     * to group the locations that close to each other in the same job for better
+     * search experience.
+     * The maximum number of allowed characters is 500.
+     * 
+ * + * repeated string addresses = 6; + * + * @param value The bytes of the addresses to add. + * @return This builder for chaining. + */ + public Builder addAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAddressesIsMutable(); + addresses_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Job.ApplicationInfo applicationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ApplicationInfo, + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder, + com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder> + applicationInfoBuilder_; + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return Whether the applicationInfo field is set. + */ + public boolean hasApplicationInfo() { + return applicationInfoBuilder_ != null || applicationInfo_ != null; + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return The applicationInfo. + */ + public com.google.cloud.talent.v4.Job.ApplicationInfo getApplicationInfo() { + if (applicationInfoBuilder_ == null) { + return applicationInfo_ == null + ? com.google.cloud.talent.v4.Job.ApplicationInfo.getDefaultInstance() + : applicationInfo_; + } else { + return applicationInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public Builder setApplicationInfo(com.google.cloud.talent.v4.Job.ApplicationInfo value) { + if (applicationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applicationInfo_ = value; + onChanged(); + } else { + applicationInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public Builder setApplicationInfo( + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder builderForValue) { + if (applicationInfoBuilder_ == null) { + applicationInfo_ = builderForValue.build(); + onChanged(); + } else { + applicationInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public Builder mergeApplicationInfo(com.google.cloud.talent.v4.Job.ApplicationInfo value) { + if (applicationInfoBuilder_ == null) { + if (applicationInfo_ != null) { + applicationInfo_ = + com.google.cloud.talent.v4.Job.ApplicationInfo.newBuilder(applicationInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + applicationInfo_ = value; + } + onChanged(); + } else { + applicationInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public Builder clearApplicationInfo() { + if (applicationInfoBuilder_ == null) { + applicationInfo_ = null; + onChanged(); + } else { + applicationInfo_ = null; + applicationInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public com.google.cloud.talent.v4.Job.ApplicationInfo.Builder getApplicationInfoBuilder() { + + onChanged(); + return getApplicationInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + public com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder getApplicationInfoOrBuilder() { + if (applicationInfoBuilder_ != null) { + return applicationInfoBuilder_.getMessageOrBuilder(); + } else { + return applicationInfo_ == null + ? com.google.cloud.talent.v4.Job.ApplicationInfo.getDefaultInstance() + : applicationInfo_; + } + } + /** + * + * + *
+     * Job application information.
+     * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ApplicationInfo, + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder, + com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder> + getApplicationInfoFieldBuilder() { + if (applicationInfoBuilder_ == null) { + applicationInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ApplicationInfo, + com.google.cloud.talent.v4.Job.ApplicationInfo.Builder, + com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder>( + getApplicationInfo(), getParentForChildren(), isClean()); + applicationInfo_ = null; + } + return applicationInfoBuilder_; + } + + private java.util.List jobBenefits_ = java.util.Collections.emptyList(); + + private void ensureJobBenefitsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + jobBenefits_ = new java.util.ArrayList(jobBenefits_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the jobBenefits. + */ + public java.util.List getJobBenefitsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobBenefit>( + jobBenefits_, jobBenefits_converter_); + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return The count of jobBenefits. + */ + public int getJobBenefitsCount() { + return jobBenefits_.size(); + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the element to return. + * @return The jobBenefits at the given index. + */ + public com.google.cloud.talent.v4.JobBenefit getJobBenefits(int index) { + return jobBenefits_converter_.convert(jobBenefits_.get(index)); + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index to set the value at. + * @param value The jobBenefits to set. + * @return This builder for chaining. + */ + public Builder setJobBenefits(int index, com.google.cloud.talent.v4.JobBenefit value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobBenefitsIsMutable(); + jobBenefits_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param value The jobBenefits to add. + * @return This builder for chaining. + */ + public Builder addJobBenefits(com.google.cloud.talent.v4.JobBenefit value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobBenefitsIsMutable(); + jobBenefits_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param values The jobBenefits to add. + * @return This builder for chaining. + */ + public Builder addAllJobBenefits( + java.lang.Iterable values) { + ensureJobBenefitsIsMutable(); + for (com.google.cloud.talent.v4.JobBenefit value : values) { + jobBenefits_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return This builder for chaining. + */ + public Builder clearJobBenefits() { + jobBenefits_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the enum numeric values on the wire for jobBenefits. + */ + public java.util.List getJobBenefitsValueList() { + return java.util.Collections.unmodifiableList(jobBenefits_); + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobBenefits at the given index. + */ + public int getJobBenefitsValue(int index) { + return jobBenefits_.get(index); + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobBenefits at the given index. + * @return This builder for chaining. + */ + public Builder setJobBenefitsValue(int index, int value) { + ensureJobBenefitsIsMutable(); + jobBenefits_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param value The enum numeric value on the wire for jobBenefits to add. + * @return This builder for chaining. + */ + public Builder addJobBenefitsValue(int value) { + ensureJobBenefitsIsMutable(); + jobBenefits_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The benefits included with the job.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param values The enum numeric values on the wire for jobBenefits to add. + * @return This builder for chaining. + */ + public Builder addAllJobBenefitsValue(java.lang.Iterable values) { + ensureJobBenefitsIsMutable(); + for (int value : values) { + jobBenefits_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.CompensationInfo compensationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo, + com.google.cloud.talent.v4.CompensationInfo.Builder, + com.google.cloud.talent.v4.CompensationInfoOrBuilder> + compensationInfoBuilder_; + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return Whether the compensationInfo field is set. + */ + public boolean hasCompensationInfo() { + return compensationInfoBuilder_ != null || compensationInfo_ != null; + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return The compensationInfo. + */ + public com.google.cloud.talent.v4.CompensationInfo getCompensationInfo() { + if (compensationInfoBuilder_ == null) { + return compensationInfo_ == null + ? com.google.cloud.talent.v4.CompensationInfo.getDefaultInstance() + : compensationInfo_; + } else { + return compensationInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public Builder setCompensationInfo(com.google.cloud.talent.v4.CompensationInfo value) { + if (compensationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + compensationInfo_ = value; + onChanged(); + } else { + compensationInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public Builder setCompensationInfo( + com.google.cloud.talent.v4.CompensationInfo.Builder builderForValue) { + if (compensationInfoBuilder_ == null) { + compensationInfo_ = builderForValue.build(); + onChanged(); + } else { + compensationInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public Builder mergeCompensationInfo(com.google.cloud.talent.v4.CompensationInfo value) { + if (compensationInfoBuilder_ == null) { + if (compensationInfo_ != null) { + compensationInfo_ = + com.google.cloud.talent.v4.CompensationInfo.newBuilder(compensationInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + compensationInfo_ = value; + } + onChanged(); + } else { + compensationInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public Builder clearCompensationInfo() { + if (compensationInfoBuilder_ == null) { + compensationInfo_ = null; + onChanged(); + } else { + compensationInfo_ = null; + compensationInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public com.google.cloud.talent.v4.CompensationInfo.Builder getCompensationInfoBuilder() { + + onChanged(); + return getCompensationInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + public com.google.cloud.talent.v4.CompensationInfoOrBuilder getCompensationInfoOrBuilder() { + if (compensationInfoBuilder_ != null) { + return compensationInfoBuilder_.getMessageOrBuilder(); + } else { + return compensationInfo_ == null + ? com.google.cloud.talent.v4.CompensationInfo.getDefaultInstance() + : compensationInfo_; + } + } + /** + * + * + *
+     * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+     * that will paid to the employee.
+     * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo, + com.google.cloud.talent.v4.CompensationInfo.Builder, + com.google.cloud.talent.v4.CompensationInfoOrBuilder> + getCompensationInfoFieldBuilder() { + if (compensationInfoBuilder_ == null) { + compensationInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationInfo, + com.google.cloud.talent.v4.CompensationInfo.Builder, + com.google.cloud.talent.v4.CompensationInfoOrBuilder>( + getCompensationInfo(), getParentForChildren(), isClean()); + compensationInfo_ = null; + } + return compensationInfoBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.talent.v4.CustomAttribute> + customAttributes_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.talent.v4.CustomAttribute> + internalGetCustomAttributes() { + if (customAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomAttributesDefaultEntryHolder.defaultEntry); + } + return customAttributes_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.talent.v4.CustomAttribute> + internalGetMutableCustomAttributes() { + onChanged(); + ; + if (customAttributes_ == null) { + customAttributes_ = + com.google.protobuf.MapField.newMapField( + CustomAttributesDefaultEntryHolder.defaultEntry); + } + if (!customAttributes_.isMutable()) { + customAttributes_ = customAttributes_.copy(); + } + return customAttributes_; + } + + public int getCustomAttributesCount() { + return internalGetCustomAttributes().getMap().size(); + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + @java.lang.Override + public boolean containsCustomAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetCustomAttributes().getMap().containsKey(key); + } + /** Use {@link #getCustomAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCustomAttributes() { + return getCustomAttributesMap(); + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + @java.lang.Override + public java.util.Map + getCustomAttributesMap() { + return internalGetCustomAttributes().getMap(); + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrDefault( + java.lang.String key, com.google.cloud.talent.v4.CustomAttribute defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetCustomAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetCustomAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCustomAttributes() { + internalGetMutableCustomAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + public Builder removeCustomAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableCustomAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableCustomAttributes() { + return internalGetMutableCustomAttributes().getMutableMap(); + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + public Builder putCustomAttributes( + java.lang.String key, com.google.cloud.talent.v4.CustomAttribute value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableCustomAttributes().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map of fields to hold both filterable and non-filterable custom job
+     * attributes that are not covered by the provided structured fields.
+     * The keys of the map are strings up to 64 bytes and must match the
+     * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+     * KEY_1_LIKE_THIS.
+     * At most 100 filterable and at most 100 unfilterable keys are supported.
+     * For filterable `string_values`, across all keys at most 200 values are
+     * allowed, with each string no more than 255 characters. For unfilterable
+     * `string_values`, the maximum total size of `string_values` across all keys
+     * is 50KB.
+     * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + * + */ + public Builder putAllCustomAttributes( + java.util.Map values) { + internalGetMutableCustomAttributes().getMutableMap().putAll(values); + return this; + } + + private java.util.List degreeTypes_ = java.util.Collections.emptyList(); + + private void ensureDegreeTypesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + degreeTypes_ = new java.util.ArrayList(degreeTypes_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the degreeTypes. + */ + public java.util.List getDegreeTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.DegreeType>( + degreeTypes_, degreeTypes_converter_); + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return The count of degreeTypes. + */ + public int getDegreeTypesCount() { + return degreeTypes_.size(); + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the element to return. + * @return The degreeTypes at the given index. + */ + public com.google.cloud.talent.v4.DegreeType getDegreeTypes(int index) { + return degreeTypes_converter_.convert(degreeTypes_.get(index)); + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index to set the value at. + * @param value The degreeTypes to set. + * @return This builder for chaining. + */ + public Builder setDegreeTypes(int index, com.google.cloud.talent.v4.DegreeType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDegreeTypesIsMutable(); + degreeTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param value The degreeTypes to add. + * @return This builder for chaining. + */ + public Builder addDegreeTypes(com.google.cloud.talent.v4.DegreeType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDegreeTypesIsMutable(); + degreeTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param values The degreeTypes to add. + * @return This builder for chaining. + */ + public Builder addAllDegreeTypes( + java.lang.Iterable values) { + ensureDegreeTypesIsMutable(); + for (com.google.cloud.talent.v4.DegreeType value : values) { + degreeTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return This builder for chaining. + */ + public Builder clearDegreeTypes() { + degreeTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the enum numeric values on the wire for degreeTypes. + */ + public java.util.List getDegreeTypesValueList() { + return java.util.Collections.unmodifiableList(degreeTypes_); + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of degreeTypes at the given index. + */ + public int getDegreeTypesValue(int index) { + return degreeTypes_.get(index); + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of degreeTypes at the given index. + * @return This builder for chaining. + */ + public Builder setDegreeTypesValue(int index, int value) { + ensureDegreeTypesIsMutable(); + degreeTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param value The enum numeric value on the wire for degreeTypes to add. + * @return This builder for chaining. + */ + public Builder addDegreeTypesValue(int value) { + ensureDegreeTypesIsMutable(); + degreeTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired education degrees for the job, such as Bachelors, Masters.
+     * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param values The enum numeric values on the wire for degreeTypes to add. + * @return This builder for chaining. + */ + public Builder addAllDegreeTypesValue(java.lang.Iterable values) { + ensureDegreeTypesIsMutable(); + for (int value : values) { + degreeTypes_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object department_ = ""; + /** + * + * + *
+     * The department or functional area within the company with the open
+     * position.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string department = 12; + * + * @return The department. + */ + public java.lang.String getDepartment() { + java.lang.Object ref = department_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + department_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The department or functional area within the company with the open
+     * position.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string department = 12; + * + * @return The bytes for department. + */ + public com.google.protobuf.ByteString getDepartmentBytes() { + java.lang.Object ref = department_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + department_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The department or functional area within the company with the open
+     * position.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string department = 12; + * + * @param value The department to set. + * @return This builder for chaining. + */ + public Builder setDepartment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + department_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The department or functional area within the company with the open
+     * position.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string department = 12; + * + * @return This builder for chaining. + */ + public Builder clearDepartment() { + + department_ = getDefaultInstance().getDepartment(); + onChanged(); + return this; + } + /** + * + * + *
+     * The department or functional area within the company with the open
+     * position.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string department = 12; + * + * @param value The bytes for department to set. + * @return This builder for chaining. + */ + public Builder setDepartmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + department_ = value; + onChanged(); + return this; + } + + private java.util.List employmentTypes_ = java.util.Collections.emptyList(); + + private void ensureEmploymentTypesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(employmentTypes_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the employmentTypes. + */ + public java.util.List getEmploymentTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>( + employmentTypes_, employmentTypes_converter_); + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return The count of employmentTypes. + */ + public int getEmploymentTypesCount() { + return employmentTypes_.size(); + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + public com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index) { + return employmentTypes_converter_.convert(employmentTypes_.get(index)); + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index to set the value at. + * @param value The employmentTypes to set. + * @return This builder for chaining. + */ + public Builder setEmploymentTypes(int index, com.google.cloud.talent.v4.EmploymentType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmploymentTypesIsMutable(); + employmentTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param value The employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addEmploymentTypes(com.google.cloud.talent.v4.EmploymentType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmploymentTypesIsMutable(); + employmentTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param values The employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEmploymentTypes( + java.lang.Iterable values) { + ensureEmploymentTypesIsMutable(); + for (com.google.cloud.talent.v4.EmploymentType value : values) { + employmentTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return This builder for chaining. + */ + public Builder clearEmploymentTypes() { + employmentTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + public java.util.List getEmploymentTypesValueList() { + return java.util.Collections.unmodifiableList(employmentTypes_); + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + public int getEmploymentTypesValue(int index) { + return employmentTypes_.get(index); + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + * @return This builder for chaining. + */ + public Builder setEmploymentTypesValue(int index, int value) { + ensureEmploymentTypesIsMutable(); + employmentTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param value The enum numeric value on the wire for employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addEmploymentTypesValue(int value) { + ensureEmploymentTypesIsMutable(); + employmentTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type(s) of a job, for example,
+     * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+     * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param values The enum numeric values on the wire for employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEmploymentTypesValue(java.lang.Iterable values) { + ensureEmploymentTypesIsMutable(); + for (int value : values) { + employmentTypes_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object incentives_ = ""; + /** + * + * + *
+     * A description of bonus, commission, and other compensation
+     * incentives associated with the job not including salary or pay.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string incentives = 14; + * + * @return The incentives. + */ + public java.lang.String getIncentives() { + java.lang.Object ref = incentives_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + incentives_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of bonus, commission, and other compensation
+     * incentives associated with the job not including salary or pay.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string incentives = 14; + * + * @return The bytes for incentives. + */ + public com.google.protobuf.ByteString getIncentivesBytes() { + java.lang.Object ref = incentives_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + incentives_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of bonus, commission, and other compensation
+     * incentives associated with the job not including salary or pay.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string incentives = 14; + * + * @param value The incentives to set. + * @return This builder for chaining. + */ + public Builder setIncentives(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + incentives_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of bonus, commission, and other compensation
+     * incentives associated with the job not including salary or pay.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string incentives = 14; + * + * @return This builder for chaining. + */ + public Builder clearIncentives() { + + incentives_ = getDefaultInstance().getIncentives(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of bonus, commission, and other compensation
+     * incentives associated with the job not including salary or pay.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string incentives = 14; + * + * @param value The bytes for incentives to set. + * @return This builder for chaining. + */ + public Builder setIncentivesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + incentives_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The language of the posting. This field is distinct from
+     * any requirements for fluency that are associated with the job.
+     * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+     * class="external" target="_blank" }.
+     * If this field is unspecified and
+     * [Job.description][google.cloud.talent.v4.Job.description] is present,
+     * detected language code based on
+     * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+     * otherwise defaults to 'en_US'.
+     * 
+ * + * string language_code = 15; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The language of the posting. This field is distinct from
+     * any requirements for fluency that are associated with the job.
+     * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+     * class="external" target="_blank" }.
+     * If this field is unspecified and
+     * [Job.description][google.cloud.talent.v4.Job.description] is present,
+     * detected language code based on
+     * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+     * otherwise defaults to 'en_US'.
+     * 
+ * + * string language_code = 15; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The language of the posting. This field is distinct from
+     * any requirements for fluency that are associated with the job.
+     * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+     * class="external" target="_blank" }.
+     * If this field is unspecified and
+     * [Job.description][google.cloud.talent.v4.Job.description] is present,
+     * detected language code based on
+     * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+     * otherwise defaults to 'en_US'.
+     * 
+ * + * string language_code = 15; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The language of the posting. This field is distinct from
+     * any requirements for fluency that are associated with the job.
+     * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+     * class="external" target="_blank" }.
+     * If this field is unspecified and
+     * [Job.description][google.cloud.talent.v4.Job.description] is present,
+     * detected language code based on
+     * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+     * otherwise defaults to 'en_US'.
+     * 
+ * + * string language_code = 15; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The language of the posting. This field is distinct from
+     * any requirements for fluency that are associated with the job.
+     * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+     * class="external" target="_blank" }.
+     * If this field is unspecified and
+     * [Job.description][google.cloud.talent.v4.Job.description] is present,
+     * detected language code based on
+     * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+     * otherwise defaults to 'en_US'.
+     * 
+ * + * string language_code = 15; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private int jobLevel_ = 0; + /** + * + * + *
+     * The experience level associated with the job, such as "Entry Level".
+     * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The enum numeric value on the wire for jobLevel. + */ + @java.lang.Override + public int getJobLevelValue() { + return jobLevel_; + } + /** + * + * + *
+     * The experience level associated with the job, such as "Entry Level".
+     * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @param value The enum numeric value on the wire for jobLevel to set. + * @return This builder for chaining. + */ + public Builder setJobLevelValue(int value) { + + jobLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The experience level associated with the job, such as "Entry Level".
+     * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The jobLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobLevel getJobLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobLevel result = + com.google.cloud.talent.v4.JobLevel.valueOf(jobLevel_); + return result == null ? com.google.cloud.talent.v4.JobLevel.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The experience level associated with the job, such as "Entry Level".
+     * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @param value The jobLevel to set. + * @return This builder for chaining. + */ + public Builder setJobLevel(com.google.cloud.talent.v4.JobLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + jobLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The experience level associated with the job, such as "Entry Level".
+     * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return This builder for chaining. + */ + public Builder clearJobLevel() { + + jobLevel_ = 0; + onChanged(); + return this; + } + + private int promotionValue_; + /** + * + * + *
+     * A promotion value of the job, as determined by the client.
+     * The value determines the sort order of the jobs returned when searching for
+     * jobs using the featured jobs search call, with higher promotional values
+     * being returned first and ties being resolved by relevance sort. Only the
+     * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+     * Default value is 0, and negative values are treated as 0.
+     * 
+ * + * int32 promotion_value = 17; + * + * @return The promotionValue. + */ + @java.lang.Override + public int getPromotionValue() { + return promotionValue_; + } + /** + * + * + *
+     * A promotion value of the job, as determined by the client.
+     * The value determines the sort order of the jobs returned when searching for
+     * jobs using the featured jobs search call, with higher promotional values
+     * being returned first and ties being resolved by relevance sort. Only the
+     * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+     * Default value is 0, and negative values are treated as 0.
+     * 
+ * + * int32 promotion_value = 17; + * + * @param value The promotionValue to set. + * @return This builder for chaining. + */ + public Builder setPromotionValue(int value) { + + promotionValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A promotion value of the job, as determined by the client.
+     * The value determines the sort order of the jobs returned when searching for
+     * jobs using the featured jobs search call, with higher promotional values
+     * being returned first and ties being resolved by relevance sort. Only the
+     * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+     * Default value is 0, and negative values are treated as 0.
+     * 
+ * + * int32 promotion_value = 17; + * + * @return This builder for chaining. + */ + public Builder clearPromotionValue() { + + promotionValue_ = 0; + onChanged(); + return this; + } + + private java.lang.Object qualifications_ = ""; + /** + * + * + *
+     * A description of the qualifications required to perform the
+     * job. The use of this field is recommended
+     * as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string qualifications = 18; + * + * @return The qualifications. + */ + public java.lang.String getQualifications() { + java.lang.Object ref = qualifications_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + qualifications_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the qualifications required to perform the
+     * job. The use of this field is recommended
+     * as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string qualifications = 18; + * + * @return The bytes for qualifications. + */ + public com.google.protobuf.ByteString getQualificationsBytes() { + java.lang.Object ref = qualifications_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + qualifications_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the qualifications required to perform the
+     * job. The use of this field is recommended
+     * as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string qualifications = 18; + * + * @param value The qualifications to set. + * @return This builder for chaining. + */ + public Builder setQualifications(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + qualifications_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the qualifications required to perform the
+     * job. The use of this field is recommended
+     * as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string qualifications = 18; + * + * @return This builder for chaining. + */ + public Builder clearQualifications() { + + qualifications_ = getDefaultInstance().getQualifications(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the qualifications required to perform the
+     * job. The use of this field is recommended
+     * as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string qualifications = 18; + * + * @param value The bytes for qualifications to set. + * @return This builder for chaining. + */ + public Builder setQualificationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + qualifications_ = value; + onChanged(); + return this; + } + + private java.lang.Object responsibilities_ = ""; + /** + * + * + *
+     * A description of job responsibilities. The use of this field is
+     * recommended as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string responsibilities = 19; + * + * @return The responsibilities. + */ + public java.lang.String getResponsibilities() { + java.lang.Object ref = responsibilities_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responsibilities_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of job responsibilities. The use of this field is
+     * recommended as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string responsibilities = 19; + * + * @return The bytes for responsibilities. + */ + public com.google.protobuf.ByteString getResponsibilitiesBytes() { + java.lang.Object ref = responsibilities_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responsibilities_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of job responsibilities. The use of this field is
+     * recommended as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string responsibilities = 19; + * + * @param value The responsibilities to set. + * @return This builder for chaining. + */ + public Builder setResponsibilities(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + responsibilities_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of job responsibilities. The use of this field is
+     * recommended as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string responsibilities = 19; + * + * @return This builder for chaining. + */ + public Builder clearResponsibilities() { + + responsibilities_ = getDefaultInstance().getResponsibilities(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of job responsibilities. The use of this field is
+     * recommended as an alternative to using the more general
+     * [description][google.cloud.talent.v4.Job.description] field.
+     * This field accepts and sanitizes HTML input, and also accepts
+     * bold, italic, ordered list, and unordered list markup tags.
+     * The maximum number of allowed characters is 10,000.
+     * 
+ * + * string responsibilities = 19; + * + * @param value The bytes for responsibilities to set. + * @return This builder for chaining. + */ + public Builder setResponsibilitiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + responsibilities_ = value; + onChanged(); + return this; + } + + private int postingRegion_ = 0; + /** + * + * + *
+     * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+     * state, country) throughout which the job is available. If this field is
+     * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+     * query within the job region finds this job posting if an exact location
+     * match isn't specified. If this field is set to
+     * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+     * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+     * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+     * same location level as this field is strongly recommended.
+     * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The enum numeric value on the wire for postingRegion. + */ + @java.lang.Override + public int getPostingRegionValue() { + return postingRegion_; + } + /** + * + * + *
+     * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+     * state, country) throughout which the job is available. If this field is
+     * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+     * query within the job region finds this job posting if an exact location
+     * match isn't specified. If this field is set to
+     * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+     * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+     * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+     * same location level as this field is strongly recommended.
+     * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @param value The enum numeric value on the wire for postingRegion to set. + * @return This builder for chaining. + */ + public Builder setPostingRegionValue(int value) { + + postingRegion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+     * state, country) throughout which the job is available. If this field is
+     * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+     * query within the job region finds this job posting if an exact location
+     * match isn't specified. If this field is set to
+     * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+     * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+     * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+     * same location level as this field is strongly recommended.
+     * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The postingRegion. + */ + @java.lang.Override + public com.google.cloud.talent.v4.PostingRegion getPostingRegion() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.PostingRegion result = + com.google.cloud.talent.v4.PostingRegion.valueOf(postingRegion_); + return result == null ? com.google.cloud.talent.v4.PostingRegion.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+     * state, country) throughout which the job is available. If this field is
+     * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+     * query within the job region finds this job posting if an exact location
+     * match isn't specified. If this field is set to
+     * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+     * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+     * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+     * same location level as this field is strongly recommended.
+     * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @param value The postingRegion to set. + * @return This builder for chaining. + */ + public Builder setPostingRegion(com.google.cloud.talent.v4.PostingRegion value) { + if (value == null) { + throw new NullPointerException(); + } + + postingRegion_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+     * state, country) throughout which the job is available. If this field is
+     * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+     * query within the job region finds this job posting if an exact location
+     * match isn't specified. If this field is set to
+     * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+     * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+     * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+     * same location level as this field is strongly recommended.
+     * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return This builder for chaining. + */ + public Builder clearPostingRegion() { + + postingRegion_ = 0; + onChanged(); + return this; + } + + private int visibility_ = 0; + /** + * + * + *
+     * Deprecated. The job is only visible to the owner.
+     * The visibility of the job.
+     * Defaults to
+     * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+     * if not specified.
+     * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The enum numeric value on the wire for visibility. + */ + @java.lang.Override + @java.lang.Deprecated + public int getVisibilityValue() { + return visibility_; + } + /** + * + * + *
+     * Deprecated. The job is only visible to the owner.
+     * The visibility of the job.
+     * Defaults to
+     * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+     * if not specified.
+     * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @param value The enum numeric value on the wire for visibility to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setVisibilityValue(int value) { + + visibility_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated. The job is only visible to the owner.
+     * The visibility of the job.
+     * Defaults to
+     * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+     * if not specified.
+     * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The visibility. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.talent.v4.Visibility getVisibility() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.Visibility result = + com.google.cloud.talent.v4.Visibility.valueOf(visibility_); + return result == null ? com.google.cloud.talent.v4.Visibility.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Deprecated. The job is only visible to the owner.
+     * The visibility of the job.
+     * Defaults to
+     * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+     * if not specified.
+     * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @param value The visibility to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setVisibility(com.google.cloud.talent.v4.Visibility value) { + if (value == null) { + throw new NullPointerException(); + } + + visibility_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated. The job is only visible to the owner.
+     * The visibility of the job.
+     * Defaults to
+     * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+     * if not specified.
+     * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearVisibility() { + + visibility_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp jobStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + jobStartTimeBuilder_; + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return Whether the jobStartTime field is set. + */ + public boolean hasJobStartTime() { + return jobStartTimeBuilder_ != null || jobStartTime_ != null; + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return The jobStartTime. + */ + public com.google.protobuf.Timestamp getJobStartTime() { + if (jobStartTimeBuilder_ == null) { + return jobStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : jobStartTime_; + } else { + return jobStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public Builder setJobStartTime(com.google.protobuf.Timestamp value) { + if (jobStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobStartTime_ = value; + onChanged(); + } else { + jobStartTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public Builder setJobStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (jobStartTimeBuilder_ == null) { + jobStartTime_ = builderForValue.build(); + onChanged(); + } else { + jobStartTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public Builder mergeJobStartTime(com.google.protobuf.Timestamp value) { + if (jobStartTimeBuilder_ == null) { + if (jobStartTime_ != null) { + jobStartTime_ = + com.google.protobuf.Timestamp.newBuilder(jobStartTime_) + .mergeFrom(value) + .buildPartial(); + } else { + jobStartTime_ = value; + } + onChanged(); + } else { + jobStartTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public Builder clearJobStartTime() { + if (jobStartTimeBuilder_ == null) { + jobStartTime_ = null; + onChanged(); + } else { + jobStartTime_ = null; + jobStartTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public com.google.protobuf.Timestamp.Builder getJobStartTimeBuilder() { + + onChanged(); + return getJobStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + public com.google.protobuf.TimestampOrBuilder getJobStartTimeOrBuilder() { + if (jobStartTimeBuilder_ != null) { + return jobStartTimeBuilder_.getMessageOrBuilder(); + } else { + return jobStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : jobStartTime_; + } + } + /** + * + * + *
+     * The start timestamp of the job in UTC time zone. Typically this field
+     * is used for contracting engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getJobStartTimeFieldBuilder() { + if (jobStartTimeBuilder_ == null) { + jobStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getJobStartTime(), getParentForChildren(), isClean()); + jobStartTime_ = null; + } + return jobStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp jobEndTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + jobEndTimeBuilder_; + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return Whether the jobEndTime field is set. + */ + public boolean hasJobEndTime() { + return jobEndTimeBuilder_ != null || jobEndTime_ != null; + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return The jobEndTime. + */ + public com.google.protobuf.Timestamp getJobEndTime() { + if (jobEndTimeBuilder_ == null) { + return jobEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : jobEndTime_; + } else { + return jobEndTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public Builder setJobEndTime(com.google.protobuf.Timestamp value) { + if (jobEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobEndTime_ = value; + onChanged(); + } else { + jobEndTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public Builder setJobEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (jobEndTimeBuilder_ == null) { + jobEndTime_ = builderForValue.build(); + onChanged(); + } else { + jobEndTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public Builder mergeJobEndTime(com.google.protobuf.Timestamp value) { + if (jobEndTimeBuilder_ == null) { + if (jobEndTime_ != null) { + jobEndTime_ = + com.google.protobuf.Timestamp.newBuilder(jobEndTime_).mergeFrom(value).buildPartial(); + } else { + jobEndTime_ = value; + } + onChanged(); + } else { + jobEndTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public Builder clearJobEndTime() { + if (jobEndTimeBuilder_ == null) { + jobEndTime_ = null; + onChanged(); + } else { + jobEndTime_ = null; + jobEndTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public com.google.protobuf.Timestamp.Builder getJobEndTimeBuilder() { + + onChanged(); + return getJobEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + public com.google.protobuf.TimestampOrBuilder getJobEndTimeOrBuilder() { + if (jobEndTimeBuilder_ != null) { + return jobEndTimeBuilder_.getMessageOrBuilder(); + } else { + return jobEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : jobEndTime_; + } + } + /** + * + * + *
+     * The end timestamp of the job. Typically this field is used for contracting
+     * engagements. Invalid timestamps are ignored.
+     * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getJobEndTimeFieldBuilder() { + if (jobEndTimeBuilder_ == null) { + jobEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getJobEndTime(), getParentForChildren(), isClean()); + jobEndTime_ = null; + } + return jobEndTimeBuilder_; + } + + private com.google.protobuf.Timestamp postingPublishTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + postingPublishTimeBuilder_; + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return Whether the postingPublishTime field is set. + */ + public boolean hasPostingPublishTime() { + return postingPublishTimeBuilder_ != null || postingPublishTime_ != null; + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return The postingPublishTime. + */ + public com.google.protobuf.Timestamp getPostingPublishTime() { + if (postingPublishTimeBuilder_ == null) { + return postingPublishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingPublishTime_; + } else { + return postingPublishTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public Builder setPostingPublishTime(com.google.protobuf.Timestamp value) { + if (postingPublishTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postingPublishTime_ = value; + onChanged(); + } else { + postingPublishTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public Builder setPostingPublishTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (postingPublishTimeBuilder_ == null) { + postingPublishTime_ = builderForValue.build(); + onChanged(); + } else { + postingPublishTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public Builder mergePostingPublishTime(com.google.protobuf.Timestamp value) { + if (postingPublishTimeBuilder_ == null) { + if (postingPublishTime_ != null) { + postingPublishTime_ = + com.google.protobuf.Timestamp.newBuilder(postingPublishTime_) + .mergeFrom(value) + .buildPartial(); + } else { + postingPublishTime_ = value; + } + onChanged(); + } else { + postingPublishTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public Builder clearPostingPublishTime() { + if (postingPublishTimeBuilder_ == null) { + postingPublishTime_ = null; + onChanged(); + } else { + postingPublishTime_ = null; + postingPublishTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public com.google.protobuf.Timestamp.Builder getPostingPublishTimeBuilder() { + + onChanged(); + return getPostingPublishTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + public com.google.protobuf.TimestampOrBuilder getPostingPublishTimeOrBuilder() { + if (postingPublishTimeBuilder_ != null) { + return postingPublishTimeBuilder_.getMessageOrBuilder(); + } else { + return postingPublishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingPublishTime_; + } + } + /** + * + * + *
+     * The timestamp this job posting was most recently published. The default
+     * value is the time the request arrives at the server. Invalid timestamps are
+     * ignored.
+     * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPostingPublishTimeFieldBuilder() { + if (postingPublishTimeBuilder_ == null) { + postingPublishTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPostingPublishTime(), getParentForChildren(), isClean()); + postingPublishTime_ = null; + } + return postingPublishTimeBuilder_; + } + + private com.google.protobuf.Timestamp postingExpireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + postingExpireTimeBuilder_; + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return Whether the postingExpireTime field is set. + */ + public boolean hasPostingExpireTime() { + return postingExpireTimeBuilder_ != null || postingExpireTime_ != null; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return The postingExpireTime. + */ + public com.google.protobuf.Timestamp getPostingExpireTime() { + if (postingExpireTimeBuilder_ == null) { + return postingExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingExpireTime_; + } else { + return postingExpireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public Builder setPostingExpireTime(com.google.protobuf.Timestamp value) { + if (postingExpireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postingExpireTime_ = value; + onChanged(); + } else { + postingExpireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public Builder setPostingExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (postingExpireTimeBuilder_ == null) { + postingExpireTime_ = builderForValue.build(); + onChanged(); + } else { + postingExpireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public Builder mergePostingExpireTime(com.google.protobuf.Timestamp value) { + if (postingExpireTimeBuilder_ == null) { + if (postingExpireTime_ != null) { + postingExpireTime_ = + com.google.protobuf.Timestamp.newBuilder(postingExpireTime_) + .mergeFrom(value) + .buildPartial(); + } else { + postingExpireTime_ = value; + } + onChanged(); + } else { + postingExpireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public Builder clearPostingExpireTime() { + if (postingExpireTimeBuilder_ == null) { + postingExpireTime_ = null; + onChanged(); + } else { + postingExpireTime_ = null; + postingExpireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public com.google.protobuf.Timestamp.Builder getPostingExpireTimeBuilder() { + + onChanged(); + return getPostingExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + public com.google.protobuf.TimestampOrBuilder getPostingExpireTimeOrBuilder() { + if (postingExpireTimeBuilder_ != null) { + return postingExpireTimeBuilder_.getMessageOrBuilder(); + } else { + return postingExpireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingExpireTime_; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * The expiration timestamp of the job. After this timestamp, the
+     * job is marked as expired, and it no longer appears in search results. The
+     * expired job can't be listed by the
+     * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+     * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+     * or updated with the
+     * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+     * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+     * expired job can be updated and opened again by using a future expiration
+     * timestamp. Updating an expired job fails if there is another existing open
+     * job with same [company][google.cloud.talent.v4.Job.company],
+     * [language_code][google.cloud.talent.v4.Job.language_code] and
+     * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+     * The expired jobs are retained in our system for 90 days. However, the
+     * overall expired job count cannot exceed 3 times the maximum number of
+     * open jobs over previous 7 days. If this threshold is exceeded,
+     * expired jobs are cleaned out in order of earliest expire time.
+     * Expired jobs are no longer accessible after they are cleaned
+     * out.
+     * Invalid timestamps are ignored, and treated as expire time not provided.
+     * If the timestamp is before the instant request is made, the job
+     * is treated as expired immediately on creation. This kind of job can
+     * not be updated. And when creating a job with past timestamp, the
+     * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     * must be set before
+     * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+     * purpose of this feature is to allow other objects, such as [Application][],
+     * to refer a job that didn't exist in the system prior to becoming expired.
+     * If you want to modify a job that was expired on creation, delete it and
+     * create a new one.
+     * If this value isn't provided at the time of job creation or is invalid,
+     * the job posting expires after 30 days from the job's creation time. For
+     * example, if the job was created on 2017/01/01 13:00AM UTC with an
+     * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+     * If this value isn't provided on job update, it depends on the field masks
+     * set by
+     * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+     * If the field masks include
+     * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+     * empty meaning that every field is updated, the job posting expires after 30
+     * days from the job's last update time. Otherwise the expiration date isn't
+     * updated.
+     * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPostingExpireTimeFieldBuilder() { + if (postingExpireTimeBuilder_ == null) { + postingExpireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPostingExpireTime(), getParentForChildren(), isClean()); + postingExpireTime_ = null; + } + return postingExpireTimeBuilder_; + } + + private com.google.protobuf.Timestamp postingCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + postingCreateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingCreateTime field is set. + */ + public boolean hasPostingCreateTime() { + return postingCreateTimeBuilder_ != null || postingCreateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingCreateTime. + */ + public com.google.protobuf.Timestamp getPostingCreateTime() { + if (postingCreateTimeBuilder_ == null) { + return postingCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingCreateTime_; + } else { + return postingCreateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostingCreateTime(com.google.protobuf.Timestamp value) { + if (postingCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postingCreateTime_ = value; + onChanged(); + } else { + postingCreateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostingCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (postingCreateTimeBuilder_ == null) { + postingCreateTime_ = builderForValue.build(); + onChanged(); + } else { + postingCreateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePostingCreateTime(com.google.protobuf.Timestamp value) { + if (postingCreateTimeBuilder_ == null) { + if (postingCreateTime_ != null) { + postingCreateTime_ = + com.google.protobuf.Timestamp.newBuilder(postingCreateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + postingCreateTime_ = value; + } + onChanged(); + } else { + postingCreateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPostingCreateTime() { + if (postingCreateTimeBuilder_ == null) { + postingCreateTime_ = null; + onChanged(); + } else { + postingCreateTime_ = null; + postingCreateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPostingCreateTimeBuilder() { + + onChanged(); + return getPostingCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPostingCreateTimeOrBuilder() { + if (postingCreateTimeBuilder_ != null) { + return postingCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return postingCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingCreateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was created.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPostingCreateTimeFieldBuilder() { + if (postingCreateTimeBuilder_ == null) { + postingCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPostingCreateTime(), getParentForChildren(), isClean()); + postingCreateTime_ = null; + } + return postingCreateTimeBuilder_; + } + + private com.google.protobuf.Timestamp postingUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + postingUpdateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingUpdateTime field is set. + */ + public boolean hasPostingUpdateTime() { + return postingUpdateTimeBuilder_ != null || postingUpdateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingUpdateTime. + */ + public com.google.protobuf.Timestamp getPostingUpdateTime() { + if (postingUpdateTimeBuilder_ == null) { + return postingUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingUpdateTime_; + } else { + return postingUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostingUpdateTime(com.google.protobuf.Timestamp value) { + if (postingUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postingUpdateTime_ = value; + onChanged(); + } else { + postingUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostingUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (postingUpdateTimeBuilder_ == null) { + postingUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + postingUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePostingUpdateTime(com.google.protobuf.Timestamp value) { + if (postingUpdateTimeBuilder_ == null) { + if (postingUpdateTime_ != null) { + postingUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(postingUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + postingUpdateTime_ = value; + } + onChanged(); + } else { + postingUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPostingUpdateTime() { + if (postingUpdateTimeBuilder_ == null) { + postingUpdateTime_ = null; + onChanged(); + } else { + postingUpdateTime_ = null; + postingUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getPostingUpdateTimeBuilder() { + + onChanged(); + return getPostingUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPostingUpdateTimeOrBuilder() { + if (postingUpdateTimeBuilder_ != null) { + return postingUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return postingUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : postingUpdateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when this job posting was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPostingUpdateTimeFieldBuilder() { + if (postingUpdateTimeBuilder_ == null) { + postingUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPostingUpdateTime(), getParentForChildren(), isClean()); + postingUpdateTime_ = null; + } + return postingUpdateTimeBuilder_; + } + + private java.lang.Object companyDisplayName_ = ""; + /** + * + * + *
+     * Output only. Display name of the company listing the job.
+     * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The companyDisplayName. + */ + public java.lang.String getCompanyDisplayName() { + java.lang.Object ref = companyDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + companyDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Display name of the company listing the job.
+     * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for companyDisplayName. + */ + public com.google.protobuf.ByteString getCompanyDisplayNameBytes() { + java.lang.Object ref = companyDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + companyDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Display name of the company listing the job.
+     * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The companyDisplayName to set. + * @return This builder for chaining. + */ + public Builder setCompanyDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + companyDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of the company listing the job.
+     * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCompanyDisplayName() { + + companyDisplayName_ = getDefaultInstance().getCompanyDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of the company listing the job.
+     * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for companyDisplayName to set. + * @return This builder for chaining. + */ + public Builder setCompanyDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + companyDisplayName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.Job.DerivedInfo derivedInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.DerivedInfo, + com.google.cloud.talent.v4.Job.DerivedInfo.Builder, + com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder> + derivedInfoBuilder_; + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + public boolean hasDerivedInfo() { + return derivedInfoBuilder_ != null || derivedInfo_ != null; + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + public com.google.cloud.talent.v4.Job.DerivedInfo getDerivedInfo() { + if (derivedInfoBuilder_ == null) { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Job.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } else { + return derivedInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedInfo(com.google.cloud.talent.v4.Job.DerivedInfo value) { + if (derivedInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedInfo_ = value; + onChanged(); + } else { + derivedInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedInfo( + com.google.cloud.talent.v4.Job.DerivedInfo.Builder builderForValue) { + if (derivedInfoBuilder_ == null) { + derivedInfo_ = builderForValue.build(); + onChanged(); + } else { + derivedInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDerivedInfo(com.google.cloud.talent.v4.Job.DerivedInfo value) { + if (derivedInfoBuilder_ == null) { + if (derivedInfo_ != null) { + derivedInfo_ = + com.google.cloud.talent.v4.Job.DerivedInfo.newBuilder(derivedInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + derivedInfo_ = value; + } + onChanged(); + } else { + derivedInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDerivedInfo() { + if (derivedInfoBuilder_ == null) { + derivedInfo_ = null; + onChanged(); + } else { + derivedInfo_ = null; + derivedInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.Job.DerivedInfo.Builder getDerivedInfoBuilder() { + + onChanged(); + return getDerivedInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder getDerivedInfoOrBuilder() { + if (derivedInfoBuilder_ != null) { + return derivedInfoBuilder_.getMessageOrBuilder(); + } else { + return derivedInfo_ == null + ? com.google.cloud.talent.v4.Job.DerivedInfo.getDefaultInstance() + : derivedInfo_; + } + } + /** + * + * + *
+     * Output only. Derived details about the job posting.
+     * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.DerivedInfo, + com.google.cloud.talent.v4.Job.DerivedInfo.Builder, + com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder> + getDerivedInfoFieldBuilder() { + if (derivedInfoBuilder_ == null) { + derivedInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.DerivedInfo, + com.google.cloud.talent.v4.Job.DerivedInfo.Builder, + com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder>( + getDerivedInfo(), getParentForChildren(), isClean()); + derivedInfo_ = null; + } + return derivedInfoBuilder_; + } + + private com.google.cloud.talent.v4.Job.ProcessingOptions processingOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ProcessingOptions, + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder, + com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder> + processingOptionsBuilder_; + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return Whether the processingOptions field is set. + */ + public boolean hasProcessingOptions() { + return processingOptionsBuilder_ != null || processingOptions_ != null; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return The processingOptions. + */ + public com.google.cloud.talent.v4.Job.ProcessingOptions getProcessingOptions() { + if (processingOptionsBuilder_ == null) { + return processingOptions_ == null + ? com.google.cloud.talent.v4.Job.ProcessingOptions.getDefaultInstance() + : processingOptions_; + } else { + return processingOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public Builder setProcessingOptions(com.google.cloud.talent.v4.Job.ProcessingOptions value) { + if (processingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processingOptions_ = value; + onChanged(); + } else { + processingOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public Builder setProcessingOptions( + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder builderForValue) { + if (processingOptionsBuilder_ == null) { + processingOptions_ = builderForValue.build(); + onChanged(); + } else { + processingOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public Builder mergeProcessingOptions(com.google.cloud.talent.v4.Job.ProcessingOptions value) { + if (processingOptionsBuilder_ == null) { + if (processingOptions_ != null) { + processingOptions_ = + com.google.cloud.talent.v4.Job.ProcessingOptions.newBuilder(processingOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + processingOptions_ = value; + } + onChanged(); + } else { + processingOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public Builder clearProcessingOptions() { + if (processingOptionsBuilder_ == null) { + processingOptions_ = null; + onChanged(); + } else { + processingOptions_ = null; + processingOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public com.google.cloud.talent.v4.Job.ProcessingOptions.Builder getProcessingOptionsBuilder() { + + onChanged(); + return getProcessingOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + public com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder + getProcessingOptionsOrBuilder() { + if (processingOptionsBuilder_ != null) { + return processingOptionsBuilder_.getMessageOrBuilder(); + } else { + return processingOptions_ == null + ? com.google.cloud.talent.v4.Job.ProcessingOptions.getDefaultInstance() + : processingOptions_; + } + } + /** + * + * + *
+     * Options for job processing.
+     * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ProcessingOptions, + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder, + com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder> + getProcessingOptionsFieldBuilder() { + if (processingOptionsBuilder_ == null) { + processingOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job.ProcessingOptions, + com.google.cloud.talent.v4.Job.ProcessingOptions.Builder, + com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder>( + getProcessingOptions(), getParentForChildren(), isClean()); + processingOptions_ = null; + } + return processingOptionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Job) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Job) + private static final com.google.cloud.talent.v4.Job DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Job(); + } + + public static com.google.cloud.talent.v4.Job getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Job parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Job(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Job getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobBenefit.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobBenefit.java new file mode 100644 index 00000000..978b62be --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobBenefit.java @@ -0,0 +1,386 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An enum that represents employee benefits included with the job.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.JobBenefit} + */ +public enum JobBenefit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value if the type isn't specified.
+   * 
+ * + * JOB_BENEFIT_UNSPECIFIED = 0; + */ + JOB_BENEFIT_UNSPECIFIED(0), + /** + * + * + *
+   * The job includes access to programs that support child care, such
+   * as daycare.
+   * 
+ * + * CHILD_CARE = 1; + */ + CHILD_CARE(1), + /** + * + * + *
+   * The job includes dental services covered by a dental
+   * insurance plan.
+   * 
+ * + * DENTAL = 2; + */ + DENTAL(2), + /** + * + * + *
+   * The job offers specific benefits to domestic partners.
+   * 
+ * + * DOMESTIC_PARTNER = 3; + */ + DOMESTIC_PARTNER(3), + /** + * + * + *
+   * The job allows for a flexible work schedule.
+   * 
+ * + * FLEXIBLE_HOURS = 4; + */ + FLEXIBLE_HOURS(4), + /** + * + * + *
+   * The job includes health services covered by a medical insurance plan.
+   * 
+ * + * MEDICAL = 5; + */ + MEDICAL(5), + /** + * + * + *
+   * The job includes a life insurance plan provided by the employer or
+   * available for purchase by the employee.
+   * 
+ * + * LIFE_INSURANCE = 6; + */ + LIFE_INSURANCE(6), + /** + * + * + *
+   * The job allows for a leave of absence to a parent to care for a newborn
+   * child.
+   * 
+ * + * PARENTAL_LEAVE = 7; + */ + PARENTAL_LEAVE(7), + /** + * + * + *
+   * The job includes a workplace retirement plan provided by the
+   * employer or available for purchase by the employee.
+   * 
+ * + * RETIREMENT_PLAN = 8; + */ + RETIREMENT_PLAN(8), + /** + * + * + *
+   * The job allows for paid time off due to illness.
+   * 
+ * + * SICK_DAYS = 9; + */ + SICK_DAYS(9), + /** + * + * + *
+   * The job includes paid time off for vacation.
+   * 
+ * + * VACATION = 10; + */ + VACATION(10), + /** + * + * + *
+   * The job includes vision services covered by a vision
+   * insurance plan.
+   * 
+ * + * VISION = 11; + */ + VISION(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value if the type isn't specified.
+   * 
+ * + * JOB_BENEFIT_UNSPECIFIED = 0; + */ + public static final int JOB_BENEFIT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The job includes access to programs that support child care, such
+   * as daycare.
+   * 
+ * + * CHILD_CARE = 1; + */ + public static final int CHILD_CARE_VALUE = 1; + /** + * + * + *
+   * The job includes dental services covered by a dental
+   * insurance plan.
+   * 
+ * + * DENTAL = 2; + */ + public static final int DENTAL_VALUE = 2; + /** + * + * + *
+   * The job offers specific benefits to domestic partners.
+   * 
+ * + * DOMESTIC_PARTNER = 3; + */ + public static final int DOMESTIC_PARTNER_VALUE = 3; + /** + * + * + *
+   * The job allows for a flexible work schedule.
+   * 
+ * + * FLEXIBLE_HOURS = 4; + */ + public static final int FLEXIBLE_HOURS_VALUE = 4; + /** + * + * + *
+   * The job includes health services covered by a medical insurance plan.
+   * 
+ * + * MEDICAL = 5; + */ + public static final int MEDICAL_VALUE = 5; + /** + * + * + *
+   * The job includes a life insurance plan provided by the employer or
+   * available for purchase by the employee.
+   * 
+ * + * LIFE_INSURANCE = 6; + */ + public static final int LIFE_INSURANCE_VALUE = 6; + /** + * + * + *
+   * The job allows for a leave of absence to a parent to care for a newborn
+   * child.
+   * 
+ * + * PARENTAL_LEAVE = 7; + */ + public static final int PARENTAL_LEAVE_VALUE = 7; + /** + * + * + *
+   * The job includes a workplace retirement plan provided by the
+   * employer or available for purchase by the employee.
+   * 
+ * + * RETIREMENT_PLAN = 8; + */ + public static final int RETIREMENT_PLAN_VALUE = 8; + /** + * + * + *
+   * The job allows for paid time off due to illness.
+   * 
+ * + * SICK_DAYS = 9; + */ + public static final int SICK_DAYS_VALUE = 9; + /** + * + * + *
+   * The job includes paid time off for vacation.
+   * 
+ * + * VACATION = 10; + */ + public static final int VACATION_VALUE = 10; + /** + * + * + *
+   * The job includes vision services covered by a vision
+   * insurance plan.
+   * 
+ * + * VISION = 11; + */ + public static final int VISION_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobBenefit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobBenefit forNumber(int value) { + switch (value) { + case 0: + return JOB_BENEFIT_UNSPECIFIED; + case 1: + return CHILD_CARE; + case 2: + return DENTAL; + case 3: + return DOMESTIC_PARTNER; + case 4: + return FLEXIBLE_HOURS; + case 5: + return MEDICAL; + case 6: + return LIFE_INSURANCE; + case 7: + return PARENTAL_LEAVE; + case 8: + return RETIREMENT_PLAN; + case 9: + return SICK_DAYS; + case 10: + return VACATION; + case 11: + return VISION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobBenefit findValueByNumber(int number) { + return JobBenefit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(1); + } + + private static final JobBenefit[] VALUES = values(); + + public static JobBenefit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobBenefit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.JobBenefit) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobCategory.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobCategory.java new file mode 100644 index 00000000..3b98d7ec --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobCategory.java @@ -0,0 +1,796 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An enum that represents the categorization or primary focus of specific
+ * role. This value is different than the "industry" associated with a role,
+ * which is related to the categorization of the company listing the job.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.JobCategory} + */ +public enum JobCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value if the category isn't specified.
+   * 
+ * + * JOB_CATEGORY_UNSPECIFIED = 0; + */ + JOB_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
+   * An accounting and finance job, such as an Accountant.
+   * 
+ * + * ACCOUNTING_AND_FINANCE = 1; + */ + ACCOUNTING_AND_FINANCE(1), + /** + * + * + *
+   * An administrative and office job, such as an Administrative Assistant.
+   * 
+ * + * ADMINISTRATIVE_AND_OFFICE = 2; + */ + ADMINISTRATIVE_AND_OFFICE(2), + /** + * + * + *
+   * An advertising and marketing job, such as Marketing Manager.
+   * 
+ * + * ADVERTISING_AND_MARKETING = 3; + */ + ADVERTISING_AND_MARKETING(3), + /** + * + * + *
+   * An animal care job, such as Veterinarian.
+   * 
+ * + * ANIMAL_CARE = 4; + */ + ANIMAL_CARE(4), + /** + * + * + *
+   * An art, fashion, or design job, such as Designer.
+   * 
+ * + * ART_FASHION_AND_DESIGN = 5; + */ + ART_FASHION_AND_DESIGN(5), + /** + * + * + *
+   * A business operations job, such as Business Operations Manager.
+   * 
+ * + * BUSINESS_OPERATIONS = 6; + */ + BUSINESS_OPERATIONS(6), + /** + * + * + *
+   * A cleaning and facilities job, such as Custodial Staff.
+   * 
+ * + * CLEANING_AND_FACILITIES = 7; + */ + CLEANING_AND_FACILITIES(7), + /** + * + * + *
+   * A computer and IT job, such as Systems Administrator.
+   * 
+ * + * COMPUTER_AND_IT = 8; + */ + COMPUTER_AND_IT(8), + /** + * + * + *
+   * A construction job, such as General Laborer.
+   * 
+ * + * CONSTRUCTION = 9; + */ + CONSTRUCTION(9), + /** + * + * + *
+   * A customer service job, such s Cashier.
+   * 
+ * + * CUSTOMER_SERVICE = 10; + */ + CUSTOMER_SERVICE(10), + /** + * + * + *
+   * An education job, such as School Teacher.
+   * 
+ * + * EDUCATION = 11; + */ + EDUCATION(11), + /** + * + * + *
+   * An entertainment and travel job, such as Flight Attendant.
+   * 
+ * + * ENTERTAINMENT_AND_TRAVEL = 12; + */ + ENTERTAINMENT_AND_TRAVEL(12), + /** + * + * + *
+   * A farming or outdoor job, such as Park Ranger.
+   * 
+ * + * FARMING_AND_OUTDOORS = 13; + */ + FARMING_AND_OUTDOORS(13), + /** + * + * + *
+   * A healthcare job, such as Registered Nurse.
+   * 
+ * + * HEALTHCARE = 14; + */ + HEALTHCARE(14), + /** + * + * + *
+   * A human resources job, such as Human Resources Director.
+   * 
+ * + * HUMAN_RESOURCES = 15; + */ + HUMAN_RESOURCES(15), + /** + * + * + *
+   * An installation, maintenance, or repair job, such as Electrician.
+   * 
+ * + * INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + */ + INSTALLATION_MAINTENANCE_AND_REPAIR(16), + /** + * + * + *
+   * A legal job, such as Law Clerk.
+   * 
+ * + * LEGAL = 17; + */ + LEGAL(17), + /** + * + * + *
+   * A management job, often used in conjunction with another category,
+   * such as Store Manager.
+   * 
+ * + * MANAGEMENT = 18; + */ + MANAGEMENT(18), + /** + * + * + *
+   * A manufacturing or warehouse job, such as Assembly Technician.
+   * 
+ * + * MANUFACTURING_AND_WAREHOUSE = 19; + */ + MANUFACTURING_AND_WAREHOUSE(19), + /** + * + * + *
+   * A media, communications, or writing job, such as Media Relations.
+   * 
+ * + * MEDIA_COMMUNICATIONS_AND_WRITING = 20; + */ + MEDIA_COMMUNICATIONS_AND_WRITING(20), + /** + * + * + *
+   * An oil, gas or mining job, such as Offshore Driller.
+   * 
+ * + * OIL_GAS_AND_MINING = 21; + */ + OIL_GAS_AND_MINING(21), + /** + * + * + *
+   * A personal care and services job, such as Hair Stylist.
+   * 
+ * + * PERSONAL_CARE_AND_SERVICES = 22; + */ + PERSONAL_CARE_AND_SERVICES(22), + /** + * + * + *
+   * A protective services job, such as Security Guard.
+   * 
+ * + * PROTECTIVE_SERVICES = 23; + */ + PROTECTIVE_SERVICES(23), + /** + * + * + *
+   * A real estate job, such as Buyer's Agent.
+   * 
+ * + * REAL_ESTATE = 24; + */ + REAL_ESTATE(24), + /** + * + * + *
+   * A restaurant and hospitality job, such as Restaurant Server.
+   * 
+ * + * RESTAURANT_AND_HOSPITALITY = 25; + */ + RESTAURANT_AND_HOSPITALITY(25), + /** + * + * + *
+   * A sales and/or retail job, such Sales Associate.
+   * 
+ * + * SALES_AND_RETAIL = 26; + */ + SALES_AND_RETAIL(26), + /** + * + * + *
+   * A science and engineering job, such as Lab Technician.
+   * 
+ * + * SCIENCE_AND_ENGINEERING = 27; + */ + SCIENCE_AND_ENGINEERING(27), + /** + * + * + *
+   * A social services or non-profit job, such as Case Worker.
+   * 
+ * + * SOCIAL_SERVICES_AND_NON_PROFIT = 28; + */ + SOCIAL_SERVICES_AND_NON_PROFIT(28), + /** + * + * + *
+   * A sports, fitness, or recreation job, such as Personal Trainer.
+   * 
+ * + * SPORTS_FITNESS_AND_RECREATION = 29; + */ + SPORTS_FITNESS_AND_RECREATION(29), + /** + * + * + *
+   * A transportation or logistics job, such as Truck Driver.
+   * 
+ * + * TRANSPORTATION_AND_LOGISTICS = 30; + */ + TRANSPORTATION_AND_LOGISTICS(30), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value if the category isn't specified.
+   * 
+ * + * JOB_CATEGORY_UNSPECIFIED = 0; + */ + public static final int JOB_CATEGORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * An accounting and finance job, such as an Accountant.
+   * 
+ * + * ACCOUNTING_AND_FINANCE = 1; + */ + public static final int ACCOUNTING_AND_FINANCE_VALUE = 1; + /** + * + * + *
+   * An administrative and office job, such as an Administrative Assistant.
+   * 
+ * + * ADMINISTRATIVE_AND_OFFICE = 2; + */ + public static final int ADMINISTRATIVE_AND_OFFICE_VALUE = 2; + /** + * + * + *
+   * An advertising and marketing job, such as Marketing Manager.
+   * 
+ * + * ADVERTISING_AND_MARKETING = 3; + */ + public static final int ADVERTISING_AND_MARKETING_VALUE = 3; + /** + * + * + *
+   * An animal care job, such as Veterinarian.
+   * 
+ * + * ANIMAL_CARE = 4; + */ + public static final int ANIMAL_CARE_VALUE = 4; + /** + * + * + *
+   * An art, fashion, or design job, such as Designer.
+   * 
+ * + * ART_FASHION_AND_DESIGN = 5; + */ + public static final int ART_FASHION_AND_DESIGN_VALUE = 5; + /** + * + * + *
+   * A business operations job, such as Business Operations Manager.
+   * 
+ * + * BUSINESS_OPERATIONS = 6; + */ + public static final int BUSINESS_OPERATIONS_VALUE = 6; + /** + * + * + *
+   * A cleaning and facilities job, such as Custodial Staff.
+   * 
+ * + * CLEANING_AND_FACILITIES = 7; + */ + public static final int CLEANING_AND_FACILITIES_VALUE = 7; + /** + * + * + *
+   * A computer and IT job, such as Systems Administrator.
+   * 
+ * + * COMPUTER_AND_IT = 8; + */ + public static final int COMPUTER_AND_IT_VALUE = 8; + /** + * + * + *
+   * A construction job, such as General Laborer.
+   * 
+ * + * CONSTRUCTION = 9; + */ + public static final int CONSTRUCTION_VALUE = 9; + /** + * + * + *
+   * A customer service job, such s Cashier.
+   * 
+ * + * CUSTOMER_SERVICE = 10; + */ + public static final int CUSTOMER_SERVICE_VALUE = 10; + /** + * + * + *
+   * An education job, such as School Teacher.
+   * 
+ * + * EDUCATION = 11; + */ + public static final int EDUCATION_VALUE = 11; + /** + * + * + *
+   * An entertainment and travel job, such as Flight Attendant.
+   * 
+ * + * ENTERTAINMENT_AND_TRAVEL = 12; + */ + public static final int ENTERTAINMENT_AND_TRAVEL_VALUE = 12; + /** + * + * + *
+   * A farming or outdoor job, such as Park Ranger.
+   * 
+ * + * FARMING_AND_OUTDOORS = 13; + */ + public static final int FARMING_AND_OUTDOORS_VALUE = 13; + /** + * + * + *
+   * A healthcare job, such as Registered Nurse.
+   * 
+ * + * HEALTHCARE = 14; + */ + public static final int HEALTHCARE_VALUE = 14; + /** + * + * + *
+   * A human resources job, such as Human Resources Director.
+   * 
+ * + * HUMAN_RESOURCES = 15; + */ + public static final int HUMAN_RESOURCES_VALUE = 15; + /** + * + * + *
+   * An installation, maintenance, or repair job, such as Electrician.
+   * 
+ * + * INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + */ + public static final int INSTALLATION_MAINTENANCE_AND_REPAIR_VALUE = 16; + /** + * + * + *
+   * A legal job, such as Law Clerk.
+   * 
+ * + * LEGAL = 17; + */ + public static final int LEGAL_VALUE = 17; + /** + * + * + *
+   * A management job, often used in conjunction with another category,
+   * such as Store Manager.
+   * 
+ * + * MANAGEMENT = 18; + */ + public static final int MANAGEMENT_VALUE = 18; + /** + * + * + *
+   * A manufacturing or warehouse job, such as Assembly Technician.
+   * 
+ * + * MANUFACTURING_AND_WAREHOUSE = 19; + */ + public static final int MANUFACTURING_AND_WAREHOUSE_VALUE = 19; + /** + * + * + *
+   * A media, communications, or writing job, such as Media Relations.
+   * 
+ * + * MEDIA_COMMUNICATIONS_AND_WRITING = 20; + */ + public static final int MEDIA_COMMUNICATIONS_AND_WRITING_VALUE = 20; + /** + * + * + *
+   * An oil, gas or mining job, such as Offshore Driller.
+   * 
+ * + * OIL_GAS_AND_MINING = 21; + */ + public static final int OIL_GAS_AND_MINING_VALUE = 21; + /** + * + * + *
+   * A personal care and services job, such as Hair Stylist.
+   * 
+ * + * PERSONAL_CARE_AND_SERVICES = 22; + */ + public static final int PERSONAL_CARE_AND_SERVICES_VALUE = 22; + /** + * + * + *
+   * A protective services job, such as Security Guard.
+   * 
+ * + * PROTECTIVE_SERVICES = 23; + */ + public static final int PROTECTIVE_SERVICES_VALUE = 23; + /** + * + * + *
+   * A real estate job, such as Buyer's Agent.
+   * 
+ * + * REAL_ESTATE = 24; + */ + public static final int REAL_ESTATE_VALUE = 24; + /** + * + * + *
+   * A restaurant and hospitality job, such as Restaurant Server.
+   * 
+ * + * RESTAURANT_AND_HOSPITALITY = 25; + */ + public static final int RESTAURANT_AND_HOSPITALITY_VALUE = 25; + /** + * + * + *
+   * A sales and/or retail job, such Sales Associate.
+   * 
+ * + * SALES_AND_RETAIL = 26; + */ + public static final int SALES_AND_RETAIL_VALUE = 26; + /** + * + * + *
+   * A science and engineering job, such as Lab Technician.
+   * 
+ * + * SCIENCE_AND_ENGINEERING = 27; + */ + public static final int SCIENCE_AND_ENGINEERING_VALUE = 27; + /** + * + * + *
+   * A social services or non-profit job, such as Case Worker.
+   * 
+ * + * SOCIAL_SERVICES_AND_NON_PROFIT = 28; + */ + public static final int SOCIAL_SERVICES_AND_NON_PROFIT_VALUE = 28; + /** + * + * + *
+   * A sports, fitness, or recreation job, such as Personal Trainer.
+   * 
+ * + * SPORTS_FITNESS_AND_RECREATION = 29; + */ + public static final int SPORTS_FITNESS_AND_RECREATION_VALUE = 29; + /** + * + * + *
+   * A transportation or logistics job, such as Truck Driver.
+   * 
+ * + * TRANSPORTATION_AND_LOGISTICS = 30; + */ + public static final int TRANSPORTATION_AND_LOGISTICS_VALUE = 30; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobCategory valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobCategory forNumber(int value) { + switch (value) { + case 0: + return JOB_CATEGORY_UNSPECIFIED; + case 1: + return ACCOUNTING_AND_FINANCE; + case 2: + return ADMINISTRATIVE_AND_OFFICE; + case 3: + return ADVERTISING_AND_MARKETING; + case 4: + return ANIMAL_CARE; + case 5: + return ART_FASHION_AND_DESIGN; + case 6: + return BUSINESS_OPERATIONS; + case 7: + return CLEANING_AND_FACILITIES; + case 8: + return COMPUTER_AND_IT; + case 9: + return CONSTRUCTION; + case 10: + return CUSTOMER_SERVICE; + case 11: + return EDUCATION; + case 12: + return ENTERTAINMENT_AND_TRAVEL; + case 13: + return FARMING_AND_OUTDOORS; + case 14: + return HEALTHCARE; + case 15: + return HUMAN_RESOURCES; + case 16: + return INSTALLATION_MAINTENANCE_AND_REPAIR; + case 17: + return LEGAL; + case 18: + return MANAGEMENT; + case 19: + return MANUFACTURING_AND_WAREHOUSE; + case 20: + return MEDIA_COMMUNICATIONS_AND_WRITING; + case 21: + return OIL_GAS_AND_MINING; + case 22: + return PERSONAL_CARE_AND_SERVICES; + case 23: + return PROTECTIVE_SERVICES; + case 24: + return REAL_ESTATE; + case 25: + return RESTAURANT_AND_HOSPITALITY; + case 26: + return SALES_AND_RETAIL; + case 27: + return SCIENCE_AND_ENGINEERING; + case 28: + return SOCIAL_SERVICES_AND_NON_PROFIT; + case 29: + return SPORTS_FITNESS_AND_RECREATION; + case 30: + return TRANSPORTATION_AND_LOGISTICS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobCategory findValueByNumber(int number) { + return JobCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(5); + } + + private static final JobCategory[] VALUES = values(); + + public static JobCategory valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.JobCategory) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEvent.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEvent.java new file mode 100644 index 00000000..d4dd21aa --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEvent.java @@ -0,0 +1,1566 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An event issued when a job seeker interacts with the application that
+ * implements Cloud Talent Solution.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.JobEvent} + */ +public final class JobEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.JobEvent) + JobEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobEvent.newBuilder() to construct. + private JobEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JobEvent() { + type_ = 0; + jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JobEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private JobEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = jobs_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_JobEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_JobEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobEvent.class, + com.google.cloud.talent.v4.JobEvent.Builder.class); + } + + /** + * + * + *
+   * An enumeration of an event attributed to the behavior of the end user,
+   * such as a job seeker.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.JobEvent.JobEventType} + */ + public enum JobEventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The event is unspecified by other provided values.
+     * 
+ * + * JOB_EVENT_TYPE_UNSPECIFIED = 0; + */ + JOB_EVENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The job seeker or other entity interacting with the service has
+     * had a job rendered in their view, such as in a list of search results in
+     * a compressed or clipped format. This event is typically associated with
+     * the viewing of a jobs list on a single page by a job seeker.
+     * 
+ * + * IMPRESSION = 1; + */ + IMPRESSION(1), + /** + * + * + *
+     * The job seeker, or other entity interacting with the service, has
+     * viewed the details of a job, including the full description. This
+     * event doesn't apply to the viewing a snippet of a job appearing as a
+     * part of the job search results. Viewing a snippet is associated with an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]).
+     * 
+ * + * VIEW = 2; + */ + VIEW(2), + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * performed an action to view a job and was redirected to a different
+     * website for job.
+     * 
+ * + * VIEW_REDIRECT = 3; + */ + VIEW_REDIRECT(3), + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * began the process or demonstrated the intention of applying for a job.
+     * 
+ * + * APPLICATION_START = 4; + */ + APPLICATION_START(4), + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * submitted an application for a job.
+     * 
+ * + * APPLICATION_FINISH = 5; + */ + APPLICATION_FINISH(5), + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * submitted an application for a job with a single click without
+     * entering information. If a job seeker performs this action, send only
+     * this event to the service. Do not also send
+     * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START]
+     * or
+     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH]
+     * events.
+     * 
+ * + * APPLICATION_QUICK_SUBMISSION = 6; + */ + APPLICATION_QUICK_SUBMISSION(6), + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * performed an action to apply to a job and was redirected to a different
+     * website to complete the application.
+     * 
+ * + * APPLICATION_REDIRECT = 7; + */ + APPLICATION_REDIRECT(7), + /** + * + * + *
+     * The job seeker or other entity interacting with the service began the
+     * process or demonstrated the intention of applying for a job from the
+     * search results page without viewing the details of the job posting.
+     * If sending this event, JobEventType.VIEW event shouldn't be sent.
+     * 
+ * + * APPLICATION_START_FROM_SEARCH = 8; + */ + APPLICATION_START_FROM_SEARCH(8), + /** + * + * + *
+     * The job seeker, or other entity interacting with the service, performs an
+     * action with a single click from the search results page to apply to a job
+     * (without viewing the details of the job posting), and is redirected
+     * to a different website to complete the application. If a candidate
+     * performs this action, send only this event to the service. Do not also
+     * send
+     * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START],
+     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH]
+     * or [JobEventType.VIEW][google.cloud.talent.v4.JobEvent.JobEventType.VIEW]
+     * events.
+     * 
+ * + * APPLICATION_REDIRECT_FROM_SEARCH = 9; + */ + APPLICATION_REDIRECT_FROM_SEARCH(9), + /** + * + * + *
+     * This event should be used when a company submits an application
+     * on behalf of a job seeker. This event is intended for use by staffing
+     * agencies attempting to place candidates.
+     * 
+ * + * APPLICATION_COMPANY_SUBMIT = 10; + */ + APPLICATION_COMPANY_SUBMIT(10), + /** + * + * + *
+     * The job seeker or other entity interacting with the service demonstrated
+     * an interest in a job by bookmarking or saving it.
+     * 
+ * + * BOOKMARK = 11; + */ + BOOKMARK(11), + /** + * + * + *
+     * The job seeker or other entity interacting with the service was
+     * sent a notification, such as an email alert or device notification,
+     * containing one or more jobs listings generated by the service.
+     * 
+ * + * NOTIFICATION = 12; + */ + NOTIFICATION(12), + /** + * + * + *
+     * The job seeker or other entity interacting with the service was
+     * employed by the hiring entity (employer). Send this event
+     * only if the job seeker was hired through an application that was
+     * initiated by a search conducted through the Cloud Talent Solution
+     * service.
+     * 
+ * + * HIRED = 13; + */ + HIRED(13), + /** + * + * + *
+     * A recruiter or staffing agency submitted an application on behalf of the
+     * candidate after interacting with the service to identify a suitable job
+     * posting.
+     * 
+ * + * SENT_CV = 14; + */ + SENT_CV(14), + /** + * + * + *
+     * The entity interacting with the service (for example, the job seeker),
+     * was granted an initial interview by the hiring entity (employer). This
+     * event should only be sent if the job seeker was granted an interview as
+     * part of an application that was initiated by a search conducted through /
+     * recommendation provided by the Cloud Talent Solution service.
+     * 
+ * + * INTERVIEW_GRANTED = 15; + */ + INTERVIEW_GRANTED(15), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The event is unspecified by other provided values.
+     * 
+ * + * JOB_EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int JOB_EVENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job seeker or other entity interacting with the service has
+     * had a job rendered in their view, such as in a list of search results in
+     * a compressed or clipped format. This event is typically associated with
+     * the viewing of a jobs list on a single page by a job seeker.
+     * 
+ * + * IMPRESSION = 1; + */ + public static final int IMPRESSION_VALUE = 1; + /** + * + * + *
+     * The job seeker, or other entity interacting with the service, has
+     * viewed the details of a job, including the full description. This
+     * event doesn't apply to the viewing a snippet of a job appearing as a
+     * part of the job search results. Viewing a snippet is associated with an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]).
+     * 
+ * + * VIEW = 2; + */ + public static final int VIEW_VALUE = 2; + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * performed an action to view a job and was redirected to a different
+     * website for job.
+     * 
+ * + * VIEW_REDIRECT = 3; + */ + public static final int VIEW_REDIRECT_VALUE = 3; + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * began the process or demonstrated the intention of applying for a job.
+     * 
+ * + * APPLICATION_START = 4; + */ + public static final int APPLICATION_START_VALUE = 4; + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * submitted an application for a job.
+     * 
+ * + * APPLICATION_FINISH = 5; + */ + public static final int APPLICATION_FINISH_VALUE = 5; + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * submitted an application for a job with a single click without
+     * entering information. If a job seeker performs this action, send only
+     * this event to the service. Do not also send
+     * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START]
+     * or
+     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH]
+     * events.
+     * 
+ * + * APPLICATION_QUICK_SUBMISSION = 6; + */ + public static final int APPLICATION_QUICK_SUBMISSION_VALUE = 6; + /** + * + * + *
+     * The job seeker or other entity interacting with the service
+     * performed an action to apply to a job and was redirected to a different
+     * website to complete the application.
+     * 
+ * + * APPLICATION_REDIRECT = 7; + */ + public static final int APPLICATION_REDIRECT_VALUE = 7; + /** + * + * + *
+     * The job seeker or other entity interacting with the service began the
+     * process or demonstrated the intention of applying for a job from the
+     * search results page without viewing the details of the job posting.
+     * If sending this event, JobEventType.VIEW event shouldn't be sent.
+     * 
+ * + * APPLICATION_START_FROM_SEARCH = 8; + */ + public static final int APPLICATION_START_FROM_SEARCH_VALUE = 8; + /** + * + * + *
+     * The job seeker, or other entity interacting with the service, performs an
+     * action with a single click from the search results page to apply to a job
+     * (without viewing the details of the job posting), and is redirected
+     * to a different website to complete the application. If a candidate
+     * performs this action, send only this event to the service. Do not also
+     * send
+     * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START],
+     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH]
+     * or [JobEventType.VIEW][google.cloud.talent.v4.JobEvent.JobEventType.VIEW]
+     * events.
+     * 
+ * + * APPLICATION_REDIRECT_FROM_SEARCH = 9; + */ + public static final int APPLICATION_REDIRECT_FROM_SEARCH_VALUE = 9; + /** + * + * + *
+     * This event should be used when a company submits an application
+     * on behalf of a job seeker. This event is intended for use by staffing
+     * agencies attempting to place candidates.
+     * 
+ * + * APPLICATION_COMPANY_SUBMIT = 10; + */ + public static final int APPLICATION_COMPANY_SUBMIT_VALUE = 10; + /** + * + * + *
+     * The job seeker or other entity interacting with the service demonstrated
+     * an interest in a job by bookmarking or saving it.
+     * 
+ * + * BOOKMARK = 11; + */ + public static final int BOOKMARK_VALUE = 11; + /** + * + * + *
+     * The job seeker or other entity interacting with the service was
+     * sent a notification, such as an email alert or device notification,
+     * containing one or more jobs listings generated by the service.
+     * 
+ * + * NOTIFICATION = 12; + */ + public static final int NOTIFICATION_VALUE = 12; + /** + * + * + *
+     * The job seeker or other entity interacting with the service was
+     * employed by the hiring entity (employer). Send this event
+     * only if the job seeker was hired through an application that was
+     * initiated by a search conducted through the Cloud Talent Solution
+     * service.
+     * 
+ * + * HIRED = 13; + */ + public static final int HIRED_VALUE = 13; + /** + * + * + *
+     * A recruiter or staffing agency submitted an application on behalf of the
+     * candidate after interacting with the service to identify a suitable job
+     * posting.
+     * 
+ * + * SENT_CV = 14; + */ + public static final int SENT_CV_VALUE = 14; + /** + * + * + *
+     * The entity interacting with the service (for example, the job seeker),
+     * was granted an initial interview by the hiring entity (employer). This
+     * event should only be sent if the job seeker was granted an interview as
+     * part of an application that was initiated by a search conducted through /
+     * recommendation provided by the Cloud Talent Solution service.
+     * 
+ * + * INTERVIEW_GRANTED = 15; + */ + public static final int INTERVIEW_GRANTED_VALUE = 15; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobEventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobEventType forNumber(int value) { + switch (value) { + case 0: + return JOB_EVENT_TYPE_UNSPECIFIED; + case 1: + return IMPRESSION; + case 2: + return VIEW; + case 3: + return VIEW_REDIRECT; + case 4: + return APPLICATION_START; + case 5: + return APPLICATION_FINISH; + case 6: + return APPLICATION_QUICK_SUBMISSION; + case 7: + return APPLICATION_REDIRECT; + case 8: + return APPLICATION_START_FROM_SEARCH; + case 9: + return APPLICATION_REDIRECT_FROM_SEARCH; + case 10: + return APPLICATION_COMPANY_SUBMIT; + case 11: + return BOOKMARK; + case 12: + return NOTIFICATION; + case 13: + return HIRED; + case 14: + return SENT_CV; + case 15: + return INTERVIEW_GRANTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobEventType findValueByNumber(int number) { + return JobEventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.JobEvent.getDescriptor().getEnumTypes().get(0); + } + + private static final JobEventType[] VALUES = values(); + + public static JobEventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobEventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.JobEvent.JobEventType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Required. The type of the event (see
+   * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+   * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The type of the event (see
+   * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+   * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent.JobEventType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobEvent.JobEventType result = + com.google.cloud.talent.v4.JobEvent.JobEventType.valueOf(type_); + return result == null ? com.google.cloud.talent.v4.JobEvent.JobEventType.UNRECOGNIZED : result; + } + + public static final int JOBS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList jobs_; + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the jobs. + */ + public com.google.protobuf.ProtocolStringList getJobsList() { + return jobs_; + } + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of jobs. + */ + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + public java.lang.String getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + public com.google.protobuf.ByteString getJobsBytes(int index) { + return jobs_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.talent.v4.JobEvent.JobEventType.JOB_EVENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + for (int i = 0; i < jobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobs_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.talent.v4.JobEvent.JobEventType.JOB_EVENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + { + int dataSize = 0; + for (int i = 0; i < jobs_.size(); i++) { + dataSize += computeStringSizeNoTag(jobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getJobsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.JobEvent)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.JobEvent other = (com.google.cloud.talent.v4.JobEvent) obj; + + if (type_ != other.type_) return false; + if (!getJobsList().equals(other.getJobsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.JobEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event issued when a job seeker interacts with the application that
+   * implements Cloud Talent Solution.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.JobEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.JobEvent) + com.google.cloud.talent.v4.JobEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_JobEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_JobEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobEvent.class, + com.google.cloud.talent.v4.JobEvent.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.JobEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.EventProto + .internal_static_google_cloud_talent_v4_JobEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent getDefaultInstanceForType() { + return com.google.cloud.talent.v4.JobEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent build() { + com.google.cloud.talent.v4.JobEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent buildPartial() { + com.google.cloud.talent.v4.JobEvent result = new com.google.cloud.talent.v4.JobEvent(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = jobs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.JobEvent) { + return mergeFrom((com.google.cloud.talent.v4.JobEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.JobEvent other) { + if (other == com.google.cloud.talent.v4.JobEvent.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.JobEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.JobEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+     * Required. The type of the event (see
+     * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+     * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The type of the event (see
+     * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+     * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of the event (see
+     * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+     * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent.JobEventType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobEvent.JobEventType result = + com.google.cloud.talent.v4.JobEvent.JobEventType.valueOf(type_); + return result == null + ? com.google.cloud.talent.v4.JobEvent.JobEventType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of the event (see
+     * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+     * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.talent.v4.JobEvent.JobEventType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of the event (see
+     * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+     * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList jobs_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new com.google.protobuf.LazyStringArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the jobs. + */ + public com.google.protobuf.ProtocolStringList getJobsList() { + return jobs_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of jobs. + */ + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + public java.lang.String getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + public com.google.protobuf.ByteString getJobsBytes(int index) { + return jobs_.getByteString(index); + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The jobs to set. + * @return This builder for chaining. + */ + public Builder setJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobs to add. + * @return This builder for chaining. + */ + public Builder addJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The jobs to add. + * @return This builder for chaining. + */ + public Builder addAllJobs(java.lang.Iterable values) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobs() { + jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+     * with this event. For example, if this is an
+     * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+     * event, this field contains the identifiers of all jobs shown to the job
+     * seeker. If this was a
+     * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+     * contains the identifier of the viewed job.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+     * example, "projects/foo/tenants/bar/jobs/baz".
+     * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the jobs to add. + * @return This builder for chaining. + */ + public Builder addJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.JobEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.JobEvent) + private static final com.google.cloud.talent.v4.JobEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.JobEvent(); + } + + public static com.google.cloud.talent.v4.JobEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobEvent(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEventOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEventOrBuilder.java new file mode 100644 index 00000000..8e1cb38e --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEventOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/event.proto + +package com.google.cloud.talent.v4; + +public interface JobEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.JobEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type of the event (see
+   * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+   * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The type of the event (see
+   * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]).
+   * 
+ * + * + * .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.talent.v4.JobEvent.JobEventType getType(); + + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the jobs. + */ + java.util.List getJobsList(); + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of jobs. + */ + int getJobsCount(); + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + java.lang.String getJobs(int index); + /** + * + * + *
+   * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated
+   * with this event. For example, if this is an
+   * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]
+   * event, this field contains the identifiers of all jobs shown to the job
+   * seeker. If this was a
+   * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field
+   * contains the identifier of the viewed job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * 
+ * + * repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + com.google.protobuf.ByteString getJobsBytes(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobLevel.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobLevel.java new file mode 100644 index 00000000..9066fa3f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobLevel.java @@ -0,0 +1,246 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An enum that represents the required experience level required for the job.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.JobLevel} + */ +public enum JobLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value if the level isn't specified.
+   * 
+ * + * JOB_LEVEL_UNSPECIFIED = 0; + */ + JOB_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+   * Entry-level individual contributors, typically with less than 2 years of
+   * experience in a similar role. Includes interns.
+   * 
+ * + * ENTRY_LEVEL = 1; + */ + ENTRY_LEVEL(1), + /** + * + * + *
+   * Experienced individual contributors, typically with 2+ years of
+   * experience in a similar role.
+   * 
+ * + * EXPERIENCED = 2; + */ + EXPERIENCED(2), + /** + * + * + *
+   * Entry- to mid-level managers responsible for managing a team of people.
+   * 
+ * + * MANAGER = 3; + */ + MANAGER(3), + /** + * + * + *
+   * Senior-level managers responsible for managing teams of managers.
+   * 
+ * + * DIRECTOR = 4; + */ + DIRECTOR(4), + /** + * + * + *
+   * Executive-level managers and above, including C-level positions.
+   * 
+ * + * EXECUTIVE = 5; + */ + EXECUTIVE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value if the level isn't specified.
+   * 
+ * + * JOB_LEVEL_UNSPECIFIED = 0; + */ + public static final int JOB_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Entry-level individual contributors, typically with less than 2 years of
+   * experience in a similar role. Includes interns.
+   * 
+ * + * ENTRY_LEVEL = 1; + */ + public static final int ENTRY_LEVEL_VALUE = 1; + /** + * + * + *
+   * Experienced individual contributors, typically with 2+ years of
+   * experience in a similar role.
+   * 
+ * + * EXPERIENCED = 2; + */ + public static final int EXPERIENCED_VALUE = 2; + /** + * + * + *
+   * Entry- to mid-level managers responsible for managing a team of people.
+   * 
+ * + * MANAGER = 3; + */ + public static final int MANAGER_VALUE = 3; + /** + * + * + *
+   * Senior-level managers responsible for managing teams of managers.
+   * 
+ * + * DIRECTOR = 4; + */ + public static final int DIRECTOR_VALUE = 4; + /** + * + * + *
+   * Executive-level managers and above, including C-level positions.
+   * 
+ * + * EXECUTIVE = 5; + */ + public static final int EXECUTIVE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobLevel forNumber(int value) { + switch (value) { + case 0: + return JOB_LEVEL_UNSPECIFIED; + case 1: + return ENTRY_LEVEL; + case 2: + return EXPERIENCED; + case 3: + return MANAGER; + case 4: + return DIRECTOR; + case 5: + return EXECUTIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobLevel findValueByNumber(int number) { + return JobLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(4); + } + + private static final JobLevel[] VALUES = values(); + + public static JobLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.JobLevel) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobName.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobName.java new file mode 100644 index 00000000..3b407884 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobName.java @@ -0,0 +1,204 @@ +/* + * Copyright 2020 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class JobName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}/jobs/{job}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String tenant; + private final String job; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getJob() { + return job; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private JobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + tenant = Preconditions.checkNotNull(builder.getTenant()); + job = Preconditions.checkNotNull(builder.getJob()); + } + + public static JobName of(String project, String tenant, String job) { + return newBuilder().setProject(project).setTenant(tenant).setJob(job).build(); + } + + public static String format(String project, String tenant, String job) { + return newBuilder().setProject(project).setTenant(tenant).setJob(job).build().toString(); + } + + public static JobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "JobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("tenant"), matchMap.get("job")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (JobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("tenant", tenant); + fieldMapBuilder.put("job", job); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant, "job", job); + } + + /** Builder for JobName. */ + public static class Builder { + + private String project; + private String tenant; + private String job; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public String getJob() { + return job; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTenant(String tenant) { + this.tenant = tenant; + return this; + } + + public Builder setJob(String job) { + this.job = job; + return this; + } + + private Builder() {} + + private Builder(JobName jobName) { + project = jobName.project; + tenant = jobName.tenant; + job = jobName.job; + } + + public JobName build() { + return new JobName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof JobName) { + JobName that = (JobName) o; + return (this.project.equals(that.project)) + && (this.tenant.equals(that.tenant)) + && (this.job.equals(that.job)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= tenant.hashCode(); + h *= 1000003; + h ^= job.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobOrBuilder.java new file mode 100644 index 00000000..88956f98 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobOrBuilder.java @@ -0,0 +1,1451 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job.proto + +package com.google.cloud.talent.v4; + +public interface JobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Job) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required during job update.
+   * The resource name for the job. This is generated by the service when a
+   * job is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * Use of this field in job queries and API calls is preferred over the use of
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+   * value is unique.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required during job update.
+   * The resource name for the job. This is generated by the service when a
+   * job is created.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
+   * example, "projects/foo/tenants/bar/jobs/baz".
+   * Use of this field in job queries and API calls is preferred over the use of
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this
+   * value is unique.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The resource name of the company listing the job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The company. + */ + java.lang.String getCompany(); + /** + * + * + *
+   * Required. The resource name of the company listing the job.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * 
+ * + * + * string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for company. + */ + com.google.protobuf.ByteString getCompanyBytes(); + + /** + * + * + *
+   * Required. The requisition ID, also referred to as the posting ID, is
+   * assigned by the client to identify a job. This field is intended to be used
+   * by clients for client identification and tracking of postings. A job isn't
+   * allowed to be created if there is another job with the same
+   * [company][google.cloud.talent.v4.Job.name],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The requisitionId. + */ + java.lang.String getRequisitionId(); + /** + * + * + *
+   * Required. The requisition ID, also referred to as the posting ID, is
+   * assigned by the client to identify a job. This field is intended to be used
+   * by clients for client identification and tracking of postings. A job isn't
+   * allowed to be created if there is another job with the same
+   * [company][google.cloud.talent.v4.Job.name],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for requisitionId. + */ + com.google.protobuf.ByteString getRequisitionIdBytes(); + + /** + * + * + *
+   * Required. The title of the job, such as "Software Engineer"
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * Required. The title of the job, such as "Software Engineer"
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Required. The description of the job, which typically includes a
+   * multi-paragraph description of the company and related information.
+   * Separate fields are provided on the job object for
+   * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+   * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+   * characteristics. Use of these separate job fields is recommended.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 100,000.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Required. The description of the job, which typically includes a
+   * multi-paragraph description of the company and related information.
+   * Separate fields are provided on the job object for
+   * [responsibilities][google.cloud.talent.v4.Job.responsibilities],
+   * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job
+   * characteristics. Use of these separate job fields is recommended.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 100,000.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @return A list containing the addresses. + */ + java.util.List getAddressesList(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @return The count of addresses. + */ + int getAddressesCount(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + java.lang.String getAddresses(int index); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * Location(s) where the employer is looking to hire for this job posting.
+   * Specifying the full street address(es) of the hiring location enables
+   * better API results, especially job searches by commute time.
+   * At most 50 locations are allowed for best search performance. If a job has
+   * more locations, it is suggested to split it into multiple jobs with unique
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA'
+   * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same
+   * [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not
+   * allowed. If the original
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be
+   * preserved, a custom field should be used for storage. It is also suggested
+   * to group the locations that close to each other in the same job for better
+   * search experience.
+   * The maximum number of allowed characters is 500.
+   * 
+ * + * repeated string addresses = 6; + * + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + com.google.protobuf.ByteString getAddressesBytes(int index); + + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return Whether the applicationInfo field is set. + */ + boolean hasApplicationInfo(); + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * + * @return The applicationInfo. + */ + com.google.cloud.talent.v4.Job.ApplicationInfo getApplicationInfo(); + /** + * + * + *
+   * Job application information.
+   * 
+ * + * .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + com.google.cloud.talent.v4.Job.ApplicationInfoOrBuilder getApplicationInfoOrBuilder(); + + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the jobBenefits. + */ + java.util.List getJobBenefitsList(); + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return The count of jobBenefits. + */ + int getJobBenefitsCount(); + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the element to return. + * @return The jobBenefits at the given index. + */ + com.google.cloud.talent.v4.JobBenefit getJobBenefits(int index); + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @return A list containing the enum numeric values on the wire for jobBenefits. + */ + java.util.List getJobBenefitsValueList(); + /** + * + * + *
+   * The benefits included with the job.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobBenefits at the given index. + */ + int getJobBenefitsValue(int index); + + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return Whether the compensationInfo field is set. + */ + boolean hasCompensationInfo(); + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * + * @return The compensationInfo. + */ + com.google.cloud.talent.v4.CompensationInfo getCompensationInfo(); + /** + * + * + *
+   * Job compensation information (a.k.a. "pay rate") i.e., the compensation
+   * that will paid to the employee.
+   * 
+ * + * .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + com.google.cloud.talent.v4.CompensationInfoOrBuilder getCompensationInfoOrBuilder(); + + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + int getCustomAttributesCount(); + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + boolean containsCustomAttributes(java.lang.String key); + /** Use {@link #getCustomAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getCustomAttributes(); + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + java.util.Map + getCustomAttributesMap(); + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrDefault( + java.lang.String key, com.google.cloud.talent.v4.CustomAttribute defaultValue); + /** + * + * + *
+   * A map of fields to hold both filterable and non-filterable custom job
+   * attributes that are not covered by the provided structured fields.
+   * The keys of the map are strings up to 64 bytes and must match the
+   * pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or
+   * KEY_1_LIKE_THIS.
+   * At most 100 filterable and at most 100 unfilterable keys are supported.
+   * For filterable `string_values`, across all keys at most 200 values are
+   * allowed, with each string no more than 255 characters. For unfilterable
+   * `string_values`, the maximum total size of `string_values` across all keys
+   * is 50KB.
+   * 
+ * + * map<string, .google.cloud.talent.v4.CustomAttribute> custom_attributes = 10; + */ + com.google.cloud.talent.v4.CustomAttribute getCustomAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the degreeTypes. + */ + java.util.List getDegreeTypesList(); + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return The count of degreeTypes. + */ + int getDegreeTypesCount(); + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the element to return. + * @return The degreeTypes at the given index. + */ + com.google.cloud.talent.v4.DegreeType getDegreeTypes(int index); + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @return A list containing the enum numeric values on the wire for degreeTypes. + */ + java.util.List getDegreeTypesValueList(); + /** + * + * + *
+   * The desired education degrees for the job, such as Bachelors, Masters.
+   * 
+ * + * repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of degreeTypes at the given index. + */ + int getDegreeTypesValue(int index); + + /** + * + * + *
+   * The department or functional area within the company with the open
+   * position.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string department = 12; + * + * @return The department. + */ + java.lang.String getDepartment(); + /** + * + * + *
+   * The department or functional area within the company with the open
+   * position.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string department = 12; + * + * @return The bytes for department. + */ + com.google.protobuf.ByteString getDepartmentBytes(); + + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the employmentTypes. + */ + java.util.List getEmploymentTypesList(); + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return The count of employmentTypes. + */ + int getEmploymentTypesCount(); + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index); + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + java.util.List getEmploymentTypesValueList(); + /** + * + * + *
+   * The employment type(s) of a job, for example,
+   * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or
+   * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME].
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + int getEmploymentTypesValue(int index); + + /** + * + * + *
+   * A description of bonus, commission, and other compensation
+   * incentives associated with the job not including salary or pay.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string incentives = 14; + * + * @return The incentives. + */ + java.lang.String getIncentives(); + /** + * + * + *
+   * A description of bonus, commission, and other compensation
+   * incentives associated with the job not including salary or pay.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string incentives = 14; + * + * @return The bytes for incentives. + */ + com.google.protobuf.ByteString getIncentivesBytes(); + + /** + * + * + *
+   * The language of the posting. This field is distinct from
+   * any requirements for fluency that are associated with the job.
+   * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+   * class="external" target="_blank" }.
+   * If this field is unspecified and
+   * [Job.description][google.cloud.talent.v4.Job.description] is present,
+   * detected language code based on
+   * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+   * otherwise defaults to 'en_US'.
+   * 
+ * + * string language_code = 15; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The language of the posting. This field is distinct from
+   * any requirements for fluency that are associated with the job.
+   * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){:
+   * class="external" target="_blank" }.
+   * If this field is unspecified and
+   * [Job.description][google.cloud.talent.v4.Job.description] is present,
+   * detected language code based on
+   * [Job.description][google.cloud.talent.v4.Job.description] is assigned,
+   * otherwise defaults to 'en_US'.
+   * 
+ * + * string language_code = 15; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * The experience level associated with the job, such as "Entry Level".
+   * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The enum numeric value on the wire for jobLevel. + */ + int getJobLevelValue(); + /** + * + * + *
+   * The experience level associated with the job, such as "Entry Level".
+   * 
+ * + * .google.cloud.talent.v4.JobLevel job_level = 16; + * + * @return The jobLevel. + */ + com.google.cloud.talent.v4.JobLevel getJobLevel(); + + /** + * + * + *
+   * A promotion value of the job, as determined by the client.
+   * The value determines the sort order of the jobs returned when searching for
+   * jobs using the featured jobs search call, with higher promotional values
+   * being returned first and ties being resolved by relevance sort. Only the
+   * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH.
+   * Default value is 0, and negative values are treated as 0.
+   * 
+ * + * int32 promotion_value = 17; + * + * @return The promotionValue. + */ + int getPromotionValue(); + + /** + * + * + *
+   * A description of the qualifications required to perform the
+   * job. The use of this field is recommended
+   * as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string qualifications = 18; + * + * @return The qualifications. + */ + java.lang.String getQualifications(); + /** + * + * + *
+   * A description of the qualifications required to perform the
+   * job. The use of this field is recommended
+   * as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string qualifications = 18; + * + * @return The bytes for qualifications. + */ + com.google.protobuf.ByteString getQualificationsBytes(); + + /** + * + * + *
+   * A description of job responsibilities. The use of this field is
+   * recommended as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string responsibilities = 19; + * + * @return The responsibilities. + */ + java.lang.String getResponsibilities(); + /** + * + * + *
+   * A description of job responsibilities. The use of this field is
+   * recommended as an alternative to using the more general
+   * [description][google.cloud.talent.v4.Job.description] field.
+   * This field accepts and sanitizes HTML input, and also accepts
+   * bold, italic, ordered list, and unordered list markup tags.
+   * The maximum number of allowed characters is 10,000.
+   * 
+ * + * string responsibilities = 19; + * + * @return The bytes for responsibilities. + */ + com.google.protobuf.ByteString getResponsibilitiesBytes(); + + /** + * + * + *
+   * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+   * state, country) throughout which the job is available. If this field is
+   * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+   * query within the job region finds this job posting if an exact location
+   * match isn't specified. If this field is set to
+   * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+   * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+   * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+   * same location level as this field is strongly recommended.
+   * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The enum numeric value on the wire for postingRegion. + */ + int getPostingRegionValue(); + /** + * + * + *
+   * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example,
+   * state, country) throughout which the job is available. If this field is
+   * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search
+   * query within the job region finds this job posting if an exact location
+   * match isn't specified. If this field is set to
+   * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or
+   * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA],
+   * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the
+   * same location level as this field is strongly recommended.
+   * 
+ * + * .google.cloud.talent.v4.PostingRegion posting_region = 20; + * + * @return The postingRegion. + */ + com.google.cloud.talent.v4.PostingRegion getPostingRegion(); + + /** + * + * + *
+   * Deprecated. The job is only visible to the owner.
+   * The visibility of the job.
+   * Defaults to
+   * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+   * if not specified.
+   * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The enum numeric value on the wire for visibility. + */ + @java.lang.Deprecated + int getVisibilityValue(); + /** + * + * + *
+   * Deprecated. The job is only visible to the owner.
+   * The visibility of the job.
+   * Defaults to
+   * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY]
+   * if not specified.
+   * 
+ * + * .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * + * @return The visibility. + */ + @java.lang.Deprecated + com.google.cloud.talent.v4.Visibility getVisibility(); + + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return Whether the jobStartTime field is set. + */ + boolean hasJobStartTime(); + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + * + * @return The jobStartTime. + */ + com.google.protobuf.Timestamp getJobStartTime(); + /** + * + * + *
+   * The start timestamp of the job in UTC time zone. Typically this field
+   * is used for contracting engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_start_time = 22; + */ + com.google.protobuf.TimestampOrBuilder getJobStartTimeOrBuilder(); + + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return Whether the jobEndTime field is set. + */ + boolean hasJobEndTime(); + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + * + * @return The jobEndTime. + */ + com.google.protobuf.Timestamp getJobEndTime(); + /** + * + * + *
+   * The end timestamp of the job. Typically this field is used for contracting
+   * engagements. Invalid timestamps are ignored.
+   * 
+ * + * .google.protobuf.Timestamp job_end_time = 23; + */ + com.google.protobuf.TimestampOrBuilder getJobEndTimeOrBuilder(); + + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return Whether the postingPublishTime field is set. + */ + boolean hasPostingPublishTime(); + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + * + * @return The postingPublishTime. + */ + com.google.protobuf.Timestamp getPostingPublishTime(); + /** + * + * + *
+   * The timestamp this job posting was most recently published. The default
+   * value is the time the request arrives at the server. Invalid timestamps are
+   * ignored.
+   * 
+ * + * .google.protobuf.Timestamp posting_publish_time = 24; + */ + com.google.protobuf.TimestampOrBuilder getPostingPublishTimeOrBuilder(); + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return Whether the postingExpireTime field is set. + */ + boolean hasPostingExpireTime(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + * + * @return The postingExpireTime. + */ + com.google.protobuf.Timestamp getPostingExpireTime(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * The expiration timestamp of the job. After this timestamp, the
+   * job is marked as expired, and it no longer appears in search results. The
+   * expired job can't be listed by the
+   * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be
+   * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API
+   * or updated with the
+   * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted
+   * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An
+   * expired job can be updated and opened again by using a future expiration
+   * timestamp. Updating an expired job fails if there is another existing open
+   * job with same [company][google.cloud.talent.v4.Job.company],
+   * [language_code][google.cloud.talent.v4.Job.language_code] and
+   * [requisition_id][google.cloud.talent.v4.Job.requisition_id].
+   * The expired jobs are retained in our system for 90 days. However, the
+   * overall expired job count cannot exceed 3 times the maximum number of
+   * open jobs over previous 7 days. If this threshold is exceeded,
+   * expired jobs are cleaned out in order of earliest expire time.
+   * Expired jobs are no longer accessible after they are cleaned
+   * out.
+   * Invalid timestamps are ignored, and treated as expire time not provided.
+   * If the timestamp is before the instant request is made, the job
+   * is treated as expired immediately on creation. This kind of job can
+   * not be updated. And when creating a job with past timestamp, the
+   * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   * must be set before
+   * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The
+   * purpose of this feature is to allow other objects, such as [Application][],
+   * to refer a job that didn't exist in the system prior to becoming expired.
+   * If you want to modify a job that was expired on creation, delete it and
+   * create a new one.
+   * If this value isn't provided at the time of job creation or is invalid,
+   * the job posting expires after 30 days from the job's creation time. For
+   * example, if the job was created on 2017/01/01 13:00AM UTC with an
+   * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC.
+   * If this value isn't provided on job update, it depends on the field masks
+   * set by
+   * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask].
+   * If the field masks include
+   * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are
+   * empty meaning that every field is updated, the job posting expires after 30
+   * days from the job's last update time. Otherwise the expiration date isn't
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp posting_expire_time = 25; + */ + com.google.protobuf.TimestampOrBuilder getPostingExpireTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingCreateTime field is set. + */ + boolean hasPostingCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingCreateTime. + */ + com.google.protobuf.Timestamp getPostingCreateTime(); + /** + * + * + *
+   * Output only. The timestamp when this job posting was created.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPostingCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postingUpdateTime field is set. + */ + boolean hasPostingUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postingUpdateTime. + */ + com.google.protobuf.Timestamp getPostingUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp when this job posting was last updated.
+   * 
+ * + * + * .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getPostingUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Display name of the company listing the job.
+   * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The companyDisplayName. + */ + java.lang.String getCompanyDisplayName(); + /** + * + * + *
+   * Output only. Display name of the company listing the job.
+   * 
+ * + * string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for companyDisplayName. + */ + com.google.protobuf.ByteString getCompanyDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedInfo field is set. + */ + boolean hasDerivedInfo(); + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedInfo. + */ + com.google.cloud.talent.v4.Job.DerivedInfo getDerivedInfo(); + /** + * + * + *
+   * Output only. Derived details about the job posting.
+   * 
+ * + * + * .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.talent.v4.Job.DerivedInfoOrBuilder getDerivedInfoOrBuilder(); + + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return Whether the processingOptions field is set. + */ + boolean hasProcessingOptions(); + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * + * @return The processingOptions. + */ + com.google.cloud.talent.v4.Job.ProcessingOptions getProcessingOptions(); + /** + * + * + *
+   * Options for job processing.
+   * 
+ * + * .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + com.google.cloud.talent.v4.Job.ProcessingOptionsOrBuilder getProcessingOptionsOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobProto.java new file mode 100644 index 00000000..9056ed49 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobProto.java @@ -0,0 +1,211 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job.proto + +package com.google.cloud.talent.v4; + +public final class JobProto { + private JobProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Job_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Job_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Job_ApplicationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Job_ApplicationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Job_DerivedInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Job_DerivedInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Job_ProcessingOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Job_ProcessingOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Job_CustomAttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Job_CustomAttributesEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n google/cloud/talent/v4/job.proto\022\026goog" + + "le.cloud.talent.v4\032\034google/api/annotatio" + + "ns.proto\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032#google/clo" + + "ud/talent/v4/common.proto\032\037google/protob" + + "uf/timestamp.proto\"\365\016\n\003Job\022\014\n\004name\030\001 \001(\t" + + "\0224\n\007company\030\002 \001(\tB#\340A\002\372A\035\n\033jobs.googleap" + + "is.com/Company\022\033\n\016requisition_id\030\003 \001(\tB\003" + + "\340A\002\022\022\n\005title\030\004 \001(\tB\003\340A\002\022\030\n\013description\030\005" + + " \001(\tB\003\340A\002\022\021\n\taddresses\030\006 \003(\t\022E\n\020applicat" + + "ion_info\030\007 \001(\0132+.google.cloud.talent.v4." + + "Job.ApplicationInfo\0228\n\014job_benefits\030\010 \003(" + + "\0162\".google.cloud.talent.v4.JobBenefit\022C\n" + + "\021compensation_info\030\t \001(\0132(.google.cloud." + + "talent.v4.CompensationInfo\022L\n\021custom_att" + + "ributes\030\n \003(\01321.google.cloud.talent.v4.J" + + "ob.CustomAttributesEntry\0228\n\014degree_types" + + "\030\013 \003(\0162\".google.cloud.talent.v4.DegreeTy" + + "pe\022\022\n\ndepartment\030\014 \001(\t\022@\n\020employment_typ" + + "es\030\r \003(\0162&.google.cloud.talent.v4.Employ" + + "mentType\022\022\n\nincentives\030\016 \001(\t\022\025\n\rlanguage" + + "_code\030\017 \001(\t\0223\n\tjob_level\030\020 \001(\0162 .google." + + "cloud.talent.v4.JobLevel\022\027\n\017promotion_va" + + "lue\030\021 \001(\005\022\026\n\016qualifications\030\022 \001(\t\022\030\n\020res" + + "ponsibilities\030\023 \001(\t\022=\n\016posting_region\030\024 " + + "\001(\0162%.google.cloud.talent.v4.PostingRegi" + + "on\022:\n\nvisibility\030\025 \001(\0162\".google.cloud.ta" + + "lent.v4.VisibilityB\002\030\001\0222\n\016job_start_time" + + "\030\026 \001(\0132\032.google.protobuf.Timestamp\0220\n\014jo" + + "b_end_time\030\027 \001(\0132\032.google.protobuf.Times" + + "tamp\0228\n\024posting_publish_time\030\030 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\0227\n\023posting_expire" + + "_time\030\031 \001(\0132\032.google.protobuf.Timestamp\022" + + "<\n\023posting_create_time\030\032 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022<\n\023posting_update_" + + "time\030\033 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\022!\n\024company_display_name\030\034 \001(\tB\003\340A\003\022B" + + "\n\014derived_info\030\035 \001(\0132\'.google.cloud.tale" + + "nt.v4.Job.DerivedInfoB\003\340A\003\022I\n\022processing" + + "_options\030\036 \001(\0132-.google.cloud.talent.v4." + + "Job.ProcessingOptions\032D\n\017ApplicationInfo" + + "\022\016\n\006emails\030\001 \003(\t\022\023\n\013instruction\030\002 \001(\t\022\014\n" + + "\004uris\030\003 \003(\t\032\177\n\013DerivedInfo\0223\n\tlocations\030" + + "\001 \003(\0132 .google.cloud.talent.v4.Location\022" + + ";\n\016job_categories\030\003 \003(\0162#.google.cloud.t" + + "alent.v4.JobCategory\032\203\001\n\021ProcessingOptio" + + "ns\022)\n!disable_street_address_resolution\030" + + "\001 \001(\010\022C\n\021html_sanitization\030\002 \001(\0162(.googl" + + "e.cloud.talent.v4.HtmlSanitization\032`\n\025Cu" + + "stomAttributesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005valu" + + "e\030\002 \001(\0132\'.google.cloud.talent.v4.CustomA" + + "ttribute:\0028\001:L\352AI\n\027jobs.googleapis.com/J" + + "ob\022.projects/{project}/tenants/{tenant}/" + + "jobs/{job}Bl\n\032com.google.cloud.talent.v4" + + "B\010JobProtoP\001Z + * The query required to perform a search query. + * + * + * Protobuf type {@code google.cloud.talent.v4.JobQuery} + */ +public final class JobQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.JobQuery) + JobQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobQuery.newBuilder() to construct. + private JobQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JobQuery() { + query_ = ""; + queryLanguageCode_ = ""; + companies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + locationFilters_ = java.util.Collections.emptyList(); + jobCategories_ = java.util.Collections.emptyList(); + companyDisplayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + customAttributeFilter_ = ""; + employmentTypes_ = java.util.Collections.emptyList(); + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + excludedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JobQuery(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private JobQuery( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + companies_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + companies_.add(s); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + locationFilters_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + locationFilters_.add( + input.readMessage( + com.google.cloud.talent.v4.LocationFilter.parser(), extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + jobCategories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + jobCategories_.add(rawValue); + break; + } + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + jobCategories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + jobCategories_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 42: + { + com.google.cloud.talent.v4.CommuteFilter.Builder subBuilder = null; + if (commuteFilter_ != null) { + subBuilder = commuteFilter_.toBuilder(); + } + commuteFilter_ = + input.readMessage( + com.google.cloud.talent.v4.CommuteFilter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commuteFilter_); + commuteFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + companyDisplayNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + companyDisplayNames_.add(s); + break; + } + case 58: + { + com.google.cloud.talent.v4.CompensationFilter.Builder subBuilder = null; + if (compensationFilter_ != null) { + subBuilder = compensationFilter_.toBuilder(); + } + compensationFilter_ = + input.readMessage( + com.google.cloud.talent.v4.CompensationFilter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(compensationFilter_); + compensationFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + customAttributeFilter_ = s; + break; + } + case 72: + { + disableSpellCheck_ = input.readBool(); + break; + } + case 80: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + employmentTypes_.add(rawValue); + break; + } + case 82: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + employmentTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + languageCodes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + languageCodes_.add(s); + break; + } + case 98: + { + com.google.cloud.talent.v4.TimestampRange.Builder subBuilder = null; + if (publishTimeRange_ != null) { + subBuilder = publishTimeRange_.toBuilder(); + } + publishTimeRange_ = + input.readMessage( + com.google.cloud.talent.v4.TimestampRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(publishTimeRange_); + publishTimeRange_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + excludedJobs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000040; + } + excludedJobs_.add(s); + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + queryLanguageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + companies_ = companies_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + locationFilters_ = java.util.Collections.unmodifiableList(locationFilters_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + jobCategories_ = java.util.Collections.unmodifiableList(jobCategories_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + companyDisplayNames_ = companyDisplayNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = java.util.Collections.unmodifiableList(employmentTypes_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + languageCodes_ = languageCodes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000040) != 0)) { + excludedJobs_ = excludedJobs_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_JobQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_JobQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobQuery.class, + com.google.cloud.talent.v4.JobQuery.Builder.class); + } + + public static final int QUERY_FIELD_NUMBER = 1; + private volatile java.lang.Object query_; + /** + * + * + *
+   * The query string that matches against the job title, description, and
+   * location fields.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 1; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * The query string that matches against the job title, description, and
+   * location fields.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 1; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_LANGUAGE_CODE_FIELD_NUMBER = 14; + private volatile java.lang.Object queryLanguageCode_; + /** + * + * + *
+   * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+   * example, "en-US". This field helps to better interpret the query.
+   * If a value isn't specified, the query language code is automatically
+   * detected, which may not be accurate.
+   * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * 
+ * + * string query_language_code = 14; + * + * @return The queryLanguageCode. + */ + @java.lang.Override + public java.lang.String getQueryLanguageCode() { + java.lang.Object ref = queryLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+   * example, "en-US". This field helps to better interpret the query.
+   * If a value isn't specified, the query language code is automatically
+   * detected, which may not be accurate.
+   * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * 
+ * + * string query_language_code = 14; + * + * @return The bytes for queryLanguageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryLanguageCodeBytes() { + java.lang.Object ref = queryLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPANIES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList companies_; + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @return A list containing the companies. + */ + public com.google.protobuf.ProtocolStringList getCompaniesList() { + return companies_; + } + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @return The count of companies. + */ + public int getCompaniesCount() { + return companies_.size(); + } + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @param index The index of the element to return. + * @return The companies at the given index. + */ + public java.lang.String getCompanies(int index) { + return companies_.get(index); + } + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the companies at the given index. + */ + public com.google.protobuf.ByteString getCompaniesBytes(int index) { + return companies_.getByteString(index); + } + + public static final int LOCATION_FILTERS_FIELD_NUMBER = 3; + private java.util.List locationFilters_; + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + @java.lang.Override + public java.util.List getLocationFiltersList() { + return locationFilters_; + } + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + @java.lang.Override + public java.util.List + getLocationFiltersOrBuilderList() { + return locationFilters_; + } + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + @java.lang.Override + public int getLocationFiltersCount() { + return locationFilters_.size(); + } + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter getLocationFilters(int index) { + return locationFilters_.get(index); + } + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilterOrBuilder getLocationFiltersOrBuilder(int index) { + return locationFilters_.get(index); + } + + public static final int JOB_CATEGORIES_FIELD_NUMBER = 4; + private java.util.List jobCategories_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory> + jobCategories_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>() { + public com.google.cloud.talent.v4.JobCategory convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobCategory result = + com.google.cloud.talent.v4.JobCategory.valueOf(from); + return result == null ? com.google.cloud.talent.v4.JobCategory.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the jobCategories. + */ + @java.lang.Override + public java.util.List getJobCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>( + jobCategories_, jobCategories_converter_); + } + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return The count of jobCategories. + */ + @java.lang.Override + public int getJobCategoriesCount() { + return jobCategories_.size(); + } + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobCategory getJobCategories(int index) { + return jobCategories_converter_.convert(jobCategories_.get(index)); + } + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + @java.lang.Override + public java.util.List getJobCategoriesValueList() { + return jobCategories_; + } + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + @java.lang.Override + public int getJobCategoriesValue(int index) { + return jobCategories_.get(index); + } + + private int jobCategoriesMemoizedSerializedSize; + + public static final int COMMUTE_FILTER_FIELD_NUMBER = 5; + private com.google.cloud.talent.v4.CommuteFilter commuteFilter_; + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return Whether the commuteFilter field is set. + */ + @java.lang.Override + public boolean hasCommuteFilter() { + return commuteFilter_ != null; + } + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return The commuteFilter. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilter getCommuteFilter() { + return commuteFilter_ == null + ? com.google.cloud.talent.v4.CommuteFilter.getDefaultInstance() + : commuteFilter_; + } + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CommuteFilterOrBuilder getCommuteFilterOrBuilder() { + return getCommuteFilter(); + } + + public static final int COMPANY_DISPLAY_NAMES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList companyDisplayNames_; + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @return A list containing the companyDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getCompanyDisplayNamesList() { + return companyDisplayNames_; + } + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @return The count of companyDisplayNames. + */ + public int getCompanyDisplayNamesCount() { + return companyDisplayNames_.size(); + } + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the element to return. + * @return The companyDisplayNames at the given index. + */ + public java.lang.String getCompanyDisplayNames(int index) { + return companyDisplayNames_.get(index); + } + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the value to return. + * @return The bytes of the companyDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getCompanyDisplayNamesBytes(int index) { + return companyDisplayNames_.getByteString(index); + } + + public static final int COMPENSATION_FILTER_FIELD_NUMBER = 7; + private com.google.cloud.talent.v4.CompensationFilter compensationFilter_; + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return Whether the compensationFilter field is set. + */ + @java.lang.Override + public boolean hasCompensationFilter() { + return compensationFilter_ != null; + } + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return The compensationFilter. + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilter getCompensationFilter() { + return compensationFilter_ == null + ? com.google.cloud.talent.v4.CompensationFilter.getDefaultInstance() + : compensationFilter_; + } + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompensationFilterOrBuilder getCompensationFilterOrBuilder() { + return getCompensationFilter(); + } + + public static final int CUSTOM_ATTRIBUTE_FILTER_FIELD_NUMBER = 8; + private volatile java.lang.Object customAttributeFilter_; + /** + * + * + *
+   * This filter specifies a structured syntax to match against the
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+   * marked as `filterable`.
+   * The syntax for this expression is a subset of SQL syntax.
+   * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+   * left of the operator is a custom field key and the right of the operator
+   * is a number or a quoted string. You must escape backslash (\\) and
+   * quote (\") characters.
+   * Supported functions are `LOWER([field_name])` to
+   * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+   * existence of a key.
+   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+   * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+   * comparisons or functions are allowed in the expression. The expression
+   * must be < 6000 bytes in length.
+   * Sample Query:
+   * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+   * driving_years > 10`
+   * 
+ * + * string custom_attribute_filter = 8; + * + * @return The customAttributeFilter. + */ + @java.lang.Override + public java.lang.String getCustomAttributeFilter() { + java.lang.Object ref = customAttributeFilter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customAttributeFilter_ = s; + return s; + } + } + /** + * + * + *
+   * This filter specifies a structured syntax to match against the
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+   * marked as `filterable`.
+   * The syntax for this expression is a subset of SQL syntax.
+   * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+   * left of the operator is a custom field key and the right of the operator
+   * is a number or a quoted string. You must escape backslash (\\) and
+   * quote (\") characters.
+   * Supported functions are `LOWER([field_name])` to
+   * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+   * existence of a key.
+   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+   * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+   * comparisons or functions are allowed in the expression. The expression
+   * must be < 6000 bytes in length.
+   * Sample Query:
+   * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+   * driving_years > 10`
+   * 
+ * + * string custom_attribute_filter = 8; + * + * @return The bytes for customAttributeFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomAttributeFilterBytes() { + java.lang.Object ref = customAttributeFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customAttributeFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLE_SPELL_CHECK_FIELD_NUMBER = 9; + private boolean disableSpellCheck_; + /** + * + * + *
+   * This flag controls the spell-check feature. If false, the
+   * service attempts to correct a misspelled query,
+   * for example, "enginee" is corrected to "engineer".
+   * Defaults to false: a spell check is performed.
+   * 
+ * + * bool disable_spell_check = 9; + * + * @return The disableSpellCheck. + */ + @java.lang.Override + public boolean getDisableSpellCheck() { + return disableSpellCheck_; + } + + public static final int EMPLOYMENT_TYPES_FIELD_NUMBER = 10; + private java.util.List employmentTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType> + employmentTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>() { + public com.google.cloud.talent.v4.EmploymentType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.EmploymentType result = + com.google.cloud.talent.v4.EmploymentType.valueOf(from); + return result == null + ? com.google.cloud.talent.v4.EmploymentType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the employmentTypes. + */ + @java.lang.Override + public java.util.List getEmploymentTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>( + employmentTypes_, employmentTypes_converter_); + } + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return The count of employmentTypes. + */ + @java.lang.Override + public int getEmploymentTypesCount() { + return employmentTypes_.size(); + } + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index) { + return employmentTypes_converter_.convert(employmentTypes_.get(index)); + } + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + @java.lang.Override + public java.util.List getEmploymentTypesValueList() { + return employmentTypes_; + } + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + @java.lang.Override + public int getEmploymentTypesValue(int index) { + return employmentTypes_.get(index); + } + + private int employmentTypesMemoizedSerializedSize; + + public static final int LANGUAGE_CODES_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList languageCodes_; + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @return A list containing the languageCodes. + */ + public com.google.protobuf.ProtocolStringList getLanguageCodesList() { + return languageCodes_; + } + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @return The count of languageCodes. + */ + public int getLanguageCodesCount() { + return languageCodes_.size(); + } + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + public java.lang.String getLanguageCodes(int index) { + return languageCodes_.get(index); + } + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { + return languageCodes_.getByteString(index); + } + + public static final int PUBLISH_TIME_RANGE_FIELD_NUMBER = 12; + private com.google.cloud.talent.v4.TimestampRange publishTimeRange_; + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return Whether the publishTimeRange field is set. + */ + @java.lang.Override + public boolean hasPublishTimeRange() { + return publishTimeRange_ != null; + } + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return The publishTimeRange. + */ + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRange getPublishTimeRange() { + return publishTimeRange_ == null + ? com.google.cloud.talent.v4.TimestampRange.getDefaultInstance() + : publishTimeRange_; + } + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRangeOrBuilder getPublishTimeRangeOrBuilder() { + return getPublishTimeRange(); + } + + public static final int EXCLUDED_JOBS_FIELD_NUMBER = 13; + private com.google.protobuf.LazyStringList excludedJobs_; + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @return A list containing the excludedJobs. + */ + public com.google.protobuf.ProtocolStringList getExcludedJobsList() { + return excludedJobs_; + } + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @return The count of excludedJobs. + */ + public int getExcludedJobsCount() { + return excludedJobs_.size(); + } + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the element to return. + * @return The excludedJobs at the given index. + */ + public java.lang.String getExcludedJobs(int index) { + return excludedJobs_.get(index); + } + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the value to return. + * @return The bytes of the excludedJobs at the given index. + */ + public com.google.protobuf.ByteString getExcludedJobsBytes(int index) { + return excludedJobs_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_); + } + for (int i = 0; i < companies_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, companies_.getRaw(i)); + } + for (int i = 0; i < locationFilters_.size(); i++) { + output.writeMessage(3, locationFilters_.get(i)); + } + if (getJobCategoriesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(jobCategoriesMemoizedSerializedSize); + } + for (int i = 0; i < jobCategories_.size(); i++) { + output.writeEnumNoTag(jobCategories_.get(i)); + } + if (commuteFilter_ != null) { + output.writeMessage(5, getCommuteFilter()); + } + for (int i = 0; i < companyDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, companyDisplayNames_.getRaw(i)); + } + if (compensationFilter_ != null) { + output.writeMessage(7, getCompensationFilter()); + } + if (!getCustomAttributeFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, customAttributeFilter_); + } + if (disableSpellCheck_ != false) { + output.writeBool(9, disableSpellCheck_); + } + if (getEmploymentTypesList().size() > 0) { + output.writeUInt32NoTag(82); + output.writeUInt32NoTag(employmentTypesMemoizedSerializedSize); + } + for (int i = 0; i < employmentTypes_.size(); i++) { + output.writeEnumNoTag(employmentTypes_.get(i)); + } + for (int i = 0; i < languageCodes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, languageCodes_.getRaw(i)); + } + if (publishTimeRange_ != null) { + output.writeMessage(12, getPublishTimeRange()); + } + for (int i = 0; i < excludedJobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, excludedJobs_.getRaw(i)); + } + if (!getQueryLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, queryLanguageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_); + } + { + int dataSize = 0; + for (int i = 0; i < companies_.size(); i++) { + dataSize += computeStringSizeNoTag(companies_.getRaw(i)); + } + size += dataSize; + size += 1 * getCompaniesList().size(); + } + for (int i = 0; i < locationFilters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, locationFilters_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < jobCategories_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(jobCategories_.get(i)); + } + size += dataSize; + if (!getJobCategoriesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + jobCategoriesMemoizedSerializedSize = dataSize; + } + if (commuteFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCommuteFilter()); + } + { + int dataSize = 0; + for (int i = 0; i < companyDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(companyDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getCompanyDisplayNamesList().size(); + } + if (compensationFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCompensationFilter()); + } + if (!getCustomAttributeFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, customAttributeFilter_); + } + if (disableSpellCheck_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, disableSpellCheck_); + } + { + int dataSize = 0; + for (int i = 0; i < employmentTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(employmentTypes_.get(i)); + } + size += dataSize; + if (!getEmploymentTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + employmentTypesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < languageCodes_.size(); i++) { + dataSize += computeStringSizeNoTag(languageCodes_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageCodesList().size(); + } + if (publishTimeRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getPublishTimeRange()); + } + { + int dataSize = 0; + for (int i = 0; i < excludedJobs_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedJobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedJobsList().size(); + } + if (!getQueryLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, queryLanguageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.JobQuery)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.JobQuery other = (com.google.cloud.talent.v4.JobQuery) obj; + + if (!getQuery().equals(other.getQuery())) return false; + if (!getQueryLanguageCode().equals(other.getQueryLanguageCode())) return false; + if (!getCompaniesList().equals(other.getCompaniesList())) return false; + if (!getLocationFiltersList().equals(other.getLocationFiltersList())) return false; + if (!jobCategories_.equals(other.jobCategories_)) return false; + if (hasCommuteFilter() != other.hasCommuteFilter()) return false; + if (hasCommuteFilter()) { + if (!getCommuteFilter().equals(other.getCommuteFilter())) return false; + } + if (!getCompanyDisplayNamesList().equals(other.getCompanyDisplayNamesList())) return false; + if (hasCompensationFilter() != other.hasCompensationFilter()) return false; + if (hasCompensationFilter()) { + if (!getCompensationFilter().equals(other.getCompensationFilter())) return false; + } + if (!getCustomAttributeFilter().equals(other.getCustomAttributeFilter())) return false; + if (getDisableSpellCheck() != other.getDisableSpellCheck()) return false; + if (!employmentTypes_.equals(other.employmentTypes_)) return false; + if (!getLanguageCodesList().equals(other.getLanguageCodesList())) return false; + if (hasPublishTimeRange() != other.hasPublishTimeRange()) return false; + if (hasPublishTimeRange()) { + if (!getPublishTimeRange().equals(other.getPublishTimeRange())) return false; + } + if (!getExcludedJobsList().equals(other.getExcludedJobsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + QUERY_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getQueryLanguageCode().hashCode(); + if (getCompaniesCount() > 0) { + hash = (37 * hash) + COMPANIES_FIELD_NUMBER; + hash = (53 * hash) + getCompaniesList().hashCode(); + } + if (getLocationFiltersCount() > 0) { + hash = (37 * hash) + LOCATION_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getLocationFiltersList().hashCode(); + } + if (getJobCategoriesCount() > 0) { + hash = (37 * hash) + JOB_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + jobCategories_.hashCode(); + } + if (hasCommuteFilter()) { + hash = (37 * hash) + COMMUTE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getCommuteFilter().hashCode(); + } + if (getCompanyDisplayNamesCount() > 0) { + hash = (37 * hash) + COMPANY_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getCompanyDisplayNamesList().hashCode(); + } + if (hasCompensationFilter()) { + hash = (37 * hash) + COMPENSATION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getCompensationFilter().hashCode(); + } + hash = (37 * hash) + CUSTOM_ATTRIBUTE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getCustomAttributeFilter().hashCode(); + hash = (37 * hash) + DISABLE_SPELL_CHECK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableSpellCheck()); + if (getEmploymentTypesCount() > 0) { + hash = (37 * hash) + EMPLOYMENT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + employmentTypes_.hashCode(); + } + if (getLanguageCodesCount() > 0) { + hash = (37 * hash) + LANGUAGE_CODES_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCodesList().hashCode(); + } + if (hasPublishTimeRange()) { + hash = (37 * hash) + PUBLISH_TIME_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getPublishTimeRange().hashCode(); + } + if (getExcludedJobsCount() > 0) { + hash = (37 * hash) + EXCLUDED_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedJobsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobQuery parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.JobQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The query required to perform a search query.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.JobQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.JobQuery) + com.google.cloud.talent.v4.JobQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_JobQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_JobQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobQuery.class, + com.google.cloud.talent.v4.JobQuery.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.JobQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationFiltersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + query_ = ""; + + queryLanguageCode_ = ""; + + companies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (locationFiltersBuilder_ == null) { + locationFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + locationFiltersBuilder_.clear(); + } + jobCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + if (commuteFilterBuilder_ == null) { + commuteFilter_ = null; + } else { + commuteFilter_ = null; + commuteFilterBuilder_ = null; + } + companyDisplayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (compensationFilterBuilder_ == null) { + compensationFilter_ = null; + } else { + compensationFilter_ = null; + compensationFilterBuilder_ = null; + } + customAttributeFilter_ = ""; + + disableSpellCheck_ = false; + + employmentTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + if (publishTimeRangeBuilder_ == null) { + publishTimeRange_ = null; + } else { + publishTimeRange_ = null; + publishTimeRangeBuilder_ = null; + } + excludedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_JobQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobQuery getDefaultInstanceForType() { + return com.google.cloud.talent.v4.JobQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobQuery build() { + com.google.cloud.talent.v4.JobQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobQuery buildPartial() { + com.google.cloud.talent.v4.JobQuery result = new com.google.cloud.talent.v4.JobQuery(this); + int from_bitField0_ = bitField0_; + result.query_ = query_; + result.queryLanguageCode_ = queryLanguageCode_; + if (((bitField0_ & 0x00000001) != 0)) { + companies_ = companies_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.companies_ = companies_; + if (locationFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + locationFilters_ = java.util.Collections.unmodifiableList(locationFilters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.locationFilters_ = locationFilters_; + } else { + result.locationFilters_ = locationFiltersBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + jobCategories_ = java.util.Collections.unmodifiableList(jobCategories_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.jobCategories_ = jobCategories_; + if (commuteFilterBuilder_ == null) { + result.commuteFilter_ = commuteFilter_; + } else { + result.commuteFilter_ = commuteFilterBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { + companyDisplayNames_ = companyDisplayNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.companyDisplayNames_ = companyDisplayNames_; + if (compensationFilterBuilder_ == null) { + result.compensationFilter_ = compensationFilter_; + } else { + result.compensationFilter_ = compensationFilterBuilder_.build(); + } + result.customAttributeFilter_ = customAttributeFilter_; + result.disableSpellCheck_ = disableSpellCheck_; + if (((bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = java.util.Collections.unmodifiableList(employmentTypes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.employmentTypes_ = employmentTypes_; + if (((bitField0_ & 0x00000020) != 0)) { + languageCodes_ = languageCodes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.languageCodes_ = languageCodes_; + if (publishTimeRangeBuilder_ == null) { + result.publishTimeRange_ = publishTimeRange_; + } else { + result.publishTimeRange_ = publishTimeRangeBuilder_.build(); + } + if (((bitField0_ & 0x00000040) != 0)) { + excludedJobs_ = excludedJobs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.excludedJobs_ = excludedJobs_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.JobQuery) { + return mergeFrom((com.google.cloud.talent.v4.JobQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.JobQuery other) { + if (other == com.google.cloud.talent.v4.JobQuery.getDefaultInstance()) return this; + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (!other.getQueryLanguageCode().isEmpty()) { + queryLanguageCode_ = other.queryLanguageCode_; + onChanged(); + } + if (!other.companies_.isEmpty()) { + if (companies_.isEmpty()) { + companies_ = other.companies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCompaniesIsMutable(); + companies_.addAll(other.companies_); + } + onChanged(); + } + if (locationFiltersBuilder_ == null) { + if (!other.locationFilters_.isEmpty()) { + if (locationFilters_.isEmpty()) { + locationFilters_ = other.locationFilters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLocationFiltersIsMutable(); + locationFilters_.addAll(other.locationFilters_); + } + onChanged(); + } + } else { + if (!other.locationFilters_.isEmpty()) { + if (locationFiltersBuilder_.isEmpty()) { + locationFiltersBuilder_.dispose(); + locationFiltersBuilder_ = null; + locationFilters_ = other.locationFilters_; + bitField0_ = (bitField0_ & ~0x00000002); + locationFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLocationFiltersFieldBuilder() + : null; + } else { + locationFiltersBuilder_.addAllMessages(other.locationFilters_); + } + } + } + if (!other.jobCategories_.isEmpty()) { + if (jobCategories_.isEmpty()) { + jobCategories_ = other.jobCategories_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureJobCategoriesIsMutable(); + jobCategories_.addAll(other.jobCategories_); + } + onChanged(); + } + if (other.hasCommuteFilter()) { + mergeCommuteFilter(other.getCommuteFilter()); + } + if (!other.companyDisplayNames_.isEmpty()) { + if (companyDisplayNames_.isEmpty()) { + companyDisplayNames_ = other.companyDisplayNames_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCompanyDisplayNamesIsMutable(); + companyDisplayNames_.addAll(other.companyDisplayNames_); + } + onChanged(); + } + if (other.hasCompensationFilter()) { + mergeCompensationFilter(other.getCompensationFilter()); + } + if (!other.getCustomAttributeFilter().isEmpty()) { + customAttributeFilter_ = other.customAttributeFilter_; + onChanged(); + } + if (other.getDisableSpellCheck() != false) { + setDisableSpellCheck(other.getDisableSpellCheck()); + } + if (!other.employmentTypes_.isEmpty()) { + if (employmentTypes_.isEmpty()) { + employmentTypes_ = other.employmentTypes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureEmploymentTypesIsMutable(); + employmentTypes_.addAll(other.employmentTypes_); + } + onChanged(); + } + if (!other.languageCodes_.isEmpty()) { + if (languageCodes_.isEmpty()) { + languageCodes_ = other.languageCodes_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureLanguageCodesIsMutable(); + languageCodes_.addAll(other.languageCodes_); + } + onChanged(); + } + if (other.hasPublishTimeRange()) { + mergePublishTimeRange(other.getPublishTimeRange()); + } + if (!other.excludedJobs_.isEmpty()) { + if (excludedJobs_.isEmpty()) { + excludedJobs_ = other.excludedJobs_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureExcludedJobsIsMutable(); + excludedJobs_.addAll(other.excludedJobs_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.JobQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.JobQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * The query string that matches against the job title, description, and
+     * location fields.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 1; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The query string that matches against the job title, description, and
+     * location fields.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 1; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The query string that matches against the job title, description, and
+     * location fields.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 1; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The query string that matches against the job title, description, and
+     * location fields.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 1; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * The query string that matches against the job title, description, and
+     * location fields.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string query = 1; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private java.lang.Object queryLanguageCode_ = ""; + /** + * + * + *
+     * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+     * example, "en-US". This field helps to better interpret the query.
+     * If a value isn't specified, the query language code is automatically
+     * detected, which may not be accurate.
+     * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * 
+ * + * string query_language_code = 14; + * + * @return The queryLanguageCode. + */ + public java.lang.String getQueryLanguageCode() { + java.lang.Object ref = queryLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+     * example, "en-US". This field helps to better interpret the query.
+     * If a value isn't specified, the query language code is automatically
+     * detected, which may not be accurate.
+     * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * 
+ * + * string query_language_code = 14; + * + * @return The bytes for queryLanguageCode. + */ + public com.google.protobuf.ByteString getQueryLanguageCodeBytes() { + java.lang.Object ref = queryLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+     * example, "en-US". This field helps to better interpret the query.
+     * If a value isn't specified, the query language code is automatically
+     * detected, which may not be accurate.
+     * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * 
+ * + * string query_language_code = 14; + * + * @param value The queryLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setQueryLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + queryLanguageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+     * example, "en-US". This field helps to better interpret the query.
+     * If a value isn't specified, the query language code is automatically
+     * detected, which may not be accurate.
+     * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * 
+ * + * string query_language_code = 14; + * + * @return This builder for chaining. + */ + public Builder clearQueryLanguageCode() { + + queryLanguageCode_ = getDefaultInstance().getQueryLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+     * example, "en-US". This field helps to better interpret the query.
+     * If a value isn't specified, the query language code is automatically
+     * detected, which may not be accurate.
+     * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * 
+ * + * string query_language_code = 14; + * + * @param value The bytes for queryLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setQueryLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + queryLanguageCode_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList companies_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCompaniesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + companies_ = new com.google.protobuf.LazyStringArrayList(companies_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @return A list containing the companies. + */ + public com.google.protobuf.ProtocolStringList getCompaniesList() { + return companies_.getUnmodifiableView(); + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @return The count of companies. + */ + public int getCompaniesCount() { + return companies_.size(); + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param index The index of the element to return. + * @return The companies at the given index. + */ + public java.lang.String getCompanies(int index) { + return companies_.get(index); + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the companies at the given index. + */ + public com.google.protobuf.ByteString getCompaniesBytes(int index) { + return companies_.getByteString(index); + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param index The index to set the value at. + * @param value The companies to set. + * @return This builder for chaining. + */ + public Builder setCompanies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompaniesIsMutable(); + companies_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param value The companies to add. + * @return This builder for chaining. + */ + public Builder addCompanies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompaniesIsMutable(); + companies_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param values The companies to add. + * @return This builder for chaining. + */ + public Builder addAllCompanies(java.lang.Iterable values) { + ensureCompaniesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, companies_); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @return This builder for chaining. + */ + public Builder clearCompanies() { + companies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the company entities to search against.
+     * If a value isn't specified, jobs are searched for against all
+     * companies.
+     * If multiple values are specified, jobs are searched against the
+     * companies specified.
+     * The format is
+     * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+     * example, "projects/foo/tenants/bar/companies/baz".
+     * At most 20 company filters are allowed.
+     * 
+ * + * repeated string companies = 2; + * + * @param value The bytes of the companies to add. + * @return This builder for chaining. + */ + public Builder addCompaniesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCompaniesIsMutable(); + companies_.add(value); + onChanged(); + return this; + } + + private java.util.List locationFilters_ = + java.util.Collections.emptyList(); + + private void ensureLocationFiltersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + locationFilters_ = + new java.util.ArrayList(locationFilters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.LocationFilter, + com.google.cloud.talent.v4.LocationFilter.Builder, + com.google.cloud.talent.v4.LocationFilterOrBuilder> + locationFiltersBuilder_; + + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public java.util.List getLocationFiltersList() { + if (locationFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(locationFilters_); + } else { + return locationFiltersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public int getLocationFiltersCount() { + if (locationFiltersBuilder_ == null) { + return locationFilters_.size(); + } else { + return locationFiltersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public com.google.cloud.talent.v4.LocationFilter getLocationFilters(int index) { + if (locationFiltersBuilder_ == null) { + return locationFilters_.get(index); + } else { + return locationFiltersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder setLocationFilters(int index, com.google.cloud.talent.v4.LocationFilter value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.set(index, value); + onChanged(); + } else { + locationFiltersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder setLocationFilters( + int index, com.google.cloud.talent.v4.LocationFilter.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder addLocationFilters(com.google.cloud.talent.v4.LocationFilter value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.add(value); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder addLocationFilters(int index, com.google.cloud.talent.v4.LocationFilter value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.add(index, value); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder addLocationFilters( + com.google.cloud.talent.v4.LocationFilter.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.add(builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder addLocationFilters( + int index, com.google.cloud.talent.v4.LocationFilter.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder addAllLocationFilters( + java.lang.Iterable values) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locationFilters_); + onChanged(); + } else { + locationFiltersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder clearLocationFilters() { + if (locationFiltersBuilder_ == null) { + locationFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + locationFiltersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public Builder removeLocationFilters(int index) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.remove(index); + onChanged(); + } else { + locationFiltersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public com.google.cloud.talent.v4.LocationFilter.Builder getLocationFiltersBuilder(int index) { + return getLocationFiltersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public com.google.cloud.talent.v4.LocationFilterOrBuilder getLocationFiltersOrBuilder( + int index) { + if (locationFiltersBuilder_ == null) { + return locationFilters_.get(index); + } else { + return locationFiltersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public java.util.List + getLocationFiltersOrBuilderList() { + if (locationFiltersBuilder_ != null) { + return locationFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locationFilters_); + } + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public com.google.cloud.talent.v4.LocationFilter.Builder addLocationFiltersBuilder() { + return getLocationFiltersFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.LocationFilter.getDefaultInstance()); + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public com.google.cloud.talent.v4.LocationFilter.Builder addLocationFiltersBuilder(int index) { + return getLocationFiltersFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.LocationFilter.getDefaultInstance()); + } + /** + * + * + *
+     * The location filter specifies geo-regions containing the jobs to
+     * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+     * for more information.
+     * If a location value isn't specified, jobs fitting the other search
+     * criteria are retrieved regardless of where they're located.
+     * If multiple values are specified, jobs are retrieved from any of the
+     * specified locations. If different values are specified for the
+     * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+     * parameter, the maximum provided distance is used for all locations.
+     * At most 5 location filters are allowed.
+     * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + public java.util.List + getLocationFiltersBuilderList() { + return getLocationFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.LocationFilter, + com.google.cloud.talent.v4.LocationFilter.Builder, + com.google.cloud.talent.v4.LocationFilterOrBuilder> + getLocationFiltersFieldBuilder() { + if (locationFiltersBuilder_ == null) { + locationFiltersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.LocationFilter, + com.google.cloud.talent.v4.LocationFilter.Builder, + com.google.cloud.talent.v4.LocationFilterOrBuilder>( + locationFilters_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + locationFilters_ = null; + } + return locationFiltersBuilder_; + } + + private java.util.List jobCategories_ = java.util.Collections.emptyList(); + + private void ensureJobCategoriesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + jobCategories_ = new java.util.ArrayList(jobCategories_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the jobCategories. + */ + public java.util.List getJobCategoriesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.JobCategory>( + jobCategories_, jobCategories_converter_); + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return The count of jobCategories. + */ + public int getJobCategoriesCount() { + return jobCategories_.size(); + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + public com.google.cloud.talent.v4.JobCategory getJobCategories(int index) { + return jobCategories_converter_.convert(jobCategories_.get(index)); + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index to set the value at. + * @param value The jobCategories to set. + * @return This builder for chaining. + */ + public Builder setJobCategories(int index, com.google.cloud.talent.v4.JobCategory value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobCategoriesIsMutable(); + jobCategories_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param value The jobCategories to add. + * @return This builder for chaining. + */ + public Builder addJobCategories(com.google.cloud.talent.v4.JobCategory value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobCategoriesIsMutable(); + jobCategories_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param values The jobCategories to add. + * @return This builder for chaining. + */ + public Builder addAllJobCategories( + java.lang.Iterable values) { + ensureJobCategoriesIsMutable(); + for (com.google.cloud.talent.v4.JobCategory value : values) { + jobCategories_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return This builder for chaining. + */ + public Builder clearJobCategories() { + jobCategories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + public java.util.List getJobCategoriesValueList() { + return java.util.Collections.unmodifiableList(jobCategories_); + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + public int getJobCategoriesValue(int index) { + return jobCategories_.get(index); + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + * @return This builder for chaining. + */ + public Builder setJobCategoriesValue(int index, int value) { + ensureJobCategoriesIsMutable(); + jobCategories_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param value The enum numeric value on the wire for jobCategories to add. + * @return This builder for chaining. + */ + public Builder addJobCategoriesValue(int value) { + ensureJobCategoriesIsMutable(); + jobCategories_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The category filter specifies the categories of jobs to search against.
+     * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+     * If a value isn't specified, jobs from any category are searched against.
+     * If multiple values are specified, jobs from any of the specified
+     * categories are searched against.
+     * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param values The enum numeric values on the wire for jobCategories to add. + * @return This builder for chaining. + */ + public Builder addAllJobCategoriesValue(java.lang.Iterable values) { + ensureJobCategoriesIsMutable(); + for (int value : values) { + jobCategories_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.CommuteFilter commuteFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CommuteFilter, + com.google.cloud.talent.v4.CommuteFilter.Builder, + com.google.cloud.talent.v4.CommuteFilterOrBuilder> + commuteFilterBuilder_; + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return Whether the commuteFilter field is set. + */ + public boolean hasCommuteFilter() { + return commuteFilterBuilder_ != null || commuteFilter_ != null; + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return The commuteFilter. + */ + public com.google.cloud.talent.v4.CommuteFilter getCommuteFilter() { + if (commuteFilterBuilder_ == null) { + return commuteFilter_ == null + ? com.google.cloud.talent.v4.CommuteFilter.getDefaultInstance() + : commuteFilter_; + } else { + return commuteFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public Builder setCommuteFilter(com.google.cloud.talent.v4.CommuteFilter value) { + if (commuteFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commuteFilter_ = value; + onChanged(); + } else { + commuteFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public Builder setCommuteFilter( + com.google.cloud.talent.v4.CommuteFilter.Builder builderForValue) { + if (commuteFilterBuilder_ == null) { + commuteFilter_ = builderForValue.build(); + onChanged(); + } else { + commuteFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public Builder mergeCommuteFilter(com.google.cloud.talent.v4.CommuteFilter value) { + if (commuteFilterBuilder_ == null) { + if (commuteFilter_ != null) { + commuteFilter_ = + com.google.cloud.talent.v4.CommuteFilter.newBuilder(commuteFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + commuteFilter_ = value; + } + onChanged(); + } else { + commuteFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public Builder clearCommuteFilter() { + if (commuteFilterBuilder_ == null) { + commuteFilter_ = null; + onChanged(); + } else { + commuteFilter_ = null; + commuteFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public com.google.cloud.talent.v4.CommuteFilter.Builder getCommuteFilterBuilder() { + + onChanged(); + return getCommuteFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + public com.google.cloud.talent.v4.CommuteFilterOrBuilder getCommuteFilterOrBuilder() { + if (commuteFilterBuilder_ != null) { + return commuteFilterBuilder_.getMessageOrBuilder(); + } else { + return commuteFilter_ == null + ? com.google.cloud.talent.v4.CommuteFilter.getDefaultInstance() + : commuteFilter_; + } + } + /** + * + * + *
+     * Allows filtering jobs by commute time with different travel methods (for
+     *  example, driving or public transit).
+     * Note: This only works when you specify a
+     * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+     * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+     * ignored.
+     *  Currently we don't support sorting by commute time.
+     * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CommuteFilter, + com.google.cloud.talent.v4.CommuteFilter.Builder, + com.google.cloud.talent.v4.CommuteFilterOrBuilder> + getCommuteFilterFieldBuilder() { + if (commuteFilterBuilder_ == null) { + commuteFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CommuteFilter, + com.google.cloud.talent.v4.CommuteFilter.Builder, + com.google.cloud.talent.v4.CommuteFilterOrBuilder>( + getCommuteFilter(), getParentForChildren(), isClean()); + commuteFilter_ = null; + } + return commuteFilterBuilder_; + } + + private com.google.protobuf.LazyStringList companyDisplayNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCompanyDisplayNamesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + companyDisplayNames_ = new com.google.protobuf.LazyStringArrayList(companyDisplayNames_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @return A list containing the companyDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getCompanyDisplayNamesList() { + return companyDisplayNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @return The count of companyDisplayNames. + */ + public int getCompanyDisplayNamesCount() { + return companyDisplayNames_.size(); + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the element to return. + * @return The companyDisplayNames at the given index. + */ + public java.lang.String getCompanyDisplayNames(int index) { + return companyDisplayNames_.get(index); + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the value to return. + * @return The bytes of the companyDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getCompanyDisplayNamesBytes(int index) { + return companyDisplayNames_.getByteString(index); + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index to set the value at. + * @param value The companyDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setCompanyDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompanyDisplayNamesIsMutable(); + companyDisplayNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param value The companyDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addCompanyDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompanyDisplayNamesIsMutable(); + companyDisplayNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param values The companyDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllCompanyDisplayNames(java.lang.Iterable values) { + ensureCompanyDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, companyDisplayNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @return This builder for chaining. + */ + public Builder clearCompanyDisplayNames() { + companyDisplayNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the exact company
+     * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+     * jobs to search against.
+     * If a value isn't specified, jobs within the search results are
+     * associated with any company.
+     * If multiple values are specified, jobs within the search results may be
+     * associated with any of the specified companies.
+     * At most 20 company display name filters are allowed.
+     * 
+ * + * repeated string company_display_names = 6; + * + * @param value The bytes of the companyDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addCompanyDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCompanyDisplayNamesIsMutable(); + companyDisplayNames_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.CompensationFilter compensationFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationFilter, + com.google.cloud.talent.v4.CompensationFilter.Builder, + com.google.cloud.talent.v4.CompensationFilterOrBuilder> + compensationFilterBuilder_; + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return Whether the compensationFilter field is set. + */ + public boolean hasCompensationFilter() { + return compensationFilterBuilder_ != null || compensationFilter_ != null; + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return The compensationFilter. + */ + public com.google.cloud.talent.v4.CompensationFilter getCompensationFilter() { + if (compensationFilterBuilder_ == null) { + return compensationFilter_ == null + ? com.google.cloud.talent.v4.CompensationFilter.getDefaultInstance() + : compensationFilter_; + } else { + return compensationFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public Builder setCompensationFilter(com.google.cloud.talent.v4.CompensationFilter value) { + if (compensationFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + compensationFilter_ = value; + onChanged(); + } else { + compensationFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public Builder setCompensationFilter( + com.google.cloud.talent.v4.CompensationFilter.Builder builderForValue) { + if (compensationFilterBuilder_ == null) { + compensationFilter_ = builderForValue.build(); + onChanged(); + } else { + compensationFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public Builder mergeCompensationFilter(com.google.cloud.talent.v4.CompensationFilter value) { + if (compensationFilterBuilder_ == null) { + if (compensationFilter_ != null) { + compensationFilter_ = + com.google.cloud.talent.v4.CompensationFilter.newBuilder(compensationFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + compensationFilter_ = value; + } + onChanged(); + } else { + compensationFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public Builder clearCompensationFilter() { + if (compensationFilterBuilder_ == null) { + compensationFilter_ = null; + onChanged(); + } else { + compensationFilter_ = null; + compensationFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public com.google.cloud.talent.v4.CompensationFilter.Builder getCompensationFilterBuilder() { + + onChanged(); + return getCompensationFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + public com.google.cloud.talent.v4.CompensationFilterOrBuilder getCompensationFilterOrBuilder() { + if (compensationFilterBuilder_ != null) { + return compensationFilterBuilder_.getMessageOrBuilder(); + } else { + return compensationFilter_ == null + ? com.google.cloud.talent.v4.CompensationFilter.getDefaultInstance() + : compensationFilter_; + } + } + /** + * + * + *
+     * This search filter is applied only to
+     * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+     * example, if the filter is specified as "Hourly job with per-hour
+     * compensation > $15", only jobs meeting these criteria are searched. If a
+     * filter isn't defined, all open jobs are searched.
+     * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationFilter, + com.google.cloud.talent.v4.CompensationFilter.Builder, + com.google.cloud.talent.v4.CompensationFilterOrBuilder> + getCompensationFilterFieldBuilder() { + if (compensationFilterBuilder_ == null) { + compensationFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.CompensationFilter, + com.google.cloud.talent.v4.CompensationFilter.Builder, + com.google.cloud.talent.v4.CompensationFilterOrBuilder>( + getCompensationFilter(), getParentForChildren(), isClean()); + compensationFilter_ = null; + } + return compensationFilterBuilder_; + } + + private java.lang.Object customAttributeFilter_ = ""; + /** + * + * + *
+     * This filter specifies a structured syntax to match against the
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+     * marked as `filterable`.
+     * The syntax for this expression is a subset of SQL syntax.
+     * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+     * left of the operator is a custom field key and the right of the operator
+     * is a number or a quoted string. You must escape backslash (\\) and
+     * quote (\") characters.
+     * Supported functions are `LOWER([field_name])` to
+     * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+     * existence of a key.
+     * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+     * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+     * comparisons or functions are allowed in the expression. The expression
+     * must be < 6000 bytes in length.
+     * Sample Query:
+     * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+     * driving_years > 10`
+     * 
+ * + * string custom_attribute_filter = 8; + * + * @return The customAttributeFilter. + */ + public java.lang.String getCustomAttributeFilter() { + java.lang.Object ref = customAttributeFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customAttributeFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This filter specifies a structured syntax to match against the
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+     * marked as `filterable`.
+     * The syntax for this expression is a subset of SQL syntax.
+     * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+     * left of the operator is a custom field key and the right of the operator
+     * is a number or a quoted string. You must escape backslash (\\) and
+     * quote (\") characters.
+     * Supported functions are `LOWER([field_name])` to
+     * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+     * existence of a key.
+     * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+     * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+     * comparisons or functions are allowed in the expression. The expression
+     * must be < 6000 bytes in length.
+     * Sample Query:
+     * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+     * driving_years > 10`
+     * 
+ * + * string custom_attribute_filter = 8; + * + * @return The bytes for customAttributeFilter. + */ + public com.google.protobuf.ByteString getCustomAttributeFilterBytes() { + java.lang.Object ref = customAttributeFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customAttributeFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This filter specifies a structured syntax to match against the
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+     * marked as `filterable`.
+     * The syntax for this expression is a subset of SQL syntax.
+     * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+     * left of the operator is a custom field key and the right of the operator
+     * is a number or a quoted string. You must escape backslash (\\) and
+     * quote (\") characters.
+     * Supported functions are `LOWER([field_name])` to
+     * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+     * existence of a key.
+     * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+     * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+     * comparisons or functions are allowed in the expression. The expression
+     * must be < 6000 bytes in length.
+     * Sample Query:
+     * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+     * driving_years > 10`
+     * 
+ * + * string custom_attribute_filter = 8; + * + * @param value The customAttributeFilter to set. + * @return This builder for chaining. + */ + public Builder setCustomAttributeFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customAttributeFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a structured syntax to match against the
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+     * marked as `filterable`.
+     * The syntax for this expression is a subset of SQL syntax.
+     * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+     * left of the operator is a custom field key and the right of the operator
+     * is a number or a quoted string. You must escape backslash (\\) and
+     * quote (\") characters.
+     * Supported functions are `LOWER([field_name])` to
+     * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+     * existence of a key.
+     * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+     * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+     * comparisons or functions are allowed in the expression. The expression
+     * must be < 6000 bytes in length.
+     * Sample Query:
+     * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+     * driving_years > 10`
+     * 
+ * + * string custom_attribute_filter = 8; + * + * @return This builder for chaining. + */ + public Builder clearCustomAttributeFilter() { + + customAttributeFilter_ = getDefaultInstance().getCustomAttributeFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a structured syntax to match against the
+     * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+     * marked as `filterable`.
+     * The syntax for this expression is a subset of SQL syntax.
+     * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+     * left of the operator is a custom field key and the right of the operator
+     * is a number or a quoted string. You must escape backslash (\\) and
+     * quote (\") characters.
+     * Supported functions are `LOWER([field_name])` to
+     * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+     * existence of a key.
+     * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+     * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+     * comparisons or functions are allowed in the expression. The expression
+     * must be < 6000 bytes in length.
+     * Sample Query:
+     * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+     * driving_years > 10`
+     * 
+ * + * string custom_attribute_filter = 8; + * + * @param value The bytes for customAttributeFilter to set. + * @return This builder for chaining. + */ + public Builder setCustomAttributeFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customAttributeFilter_ = value; + onChanged(); + return this; + } + + private boolean disableSpellCheck_; + /** + * + * + *
+     * This flag controls the spell-check feature. If false, the
+     * service attempts to correct a misspelled query,
+     * for example, "enginee" is corrected to "engineer".
+     * Defaults to false: a spell check is performed.
+     * 
+ * + * bool disable_spell_check = 9; + * + * @return The disableSpellCheck. + */ + @java.lang.Override + public boolean getDisableSpellCheck() { + return disableSpellCheck_; + } + /** + * + * + *
+     * This flag controls the spell-check feature. If false, the
+     * service attempts to correct a misspelled query,
+     * for example, "enginee" is corrected to "engineer".
+     * Defaults to false: a spell check is performed.
+     * 
+ * + * bool disable_spell_check = 9; + * + * @param value The disableSpellCheck to set. + * @return This builder for chaining. + */ + public Builder setDisableSpellCheck(boolean value) { + + disableSpellCheck_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This flag controls the spell-check feature. If false, the
+     * service attempts to correct a misspelled query,
+     * for example, "enginee" is corrected to "engineer".
+     * Defaults to false: a spell check is performed.
+     * 
+ * + * bool disable_spell_check = 9; + * + * @return This builder for chaining. + */ + public Builder clearDisableSpellCheck() { + + disableSpellCheck_ = false; + onChanged(); + return this; + } + + private java.util.List employmentTypes_ = java.util.Collections.emptyList(); + + private void ensureEmploymentTypesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + employmentTypes_ = new java.util.ArrayList(employmentTypes_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the employmentTypes. + */ + public java.util.List getEmploymentTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.talent.v4.EmploymentType>( + employmentTypes_, employmentTypes_converter_); + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return The count of employmentTypes. + */ + public int getEmploymentTypesCount() { + return employmentTypes_.size(); + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + public com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index) { + return employmentTypes_converter_.convert(employmentTypes_.get(index)); + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index to set the value at. + * @param value The employmentTypes to set. + * @return This builder for chaining. + */ + public Builder setEmploymentTypes(int index, com.google.cloud.talent.v4.EmploymentType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmploymentTypesIsMutable(); + employmentTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param value The employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addEmploymentTypes(com.google.cloud.talent.v4.EmploymentType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmploymentTypesIsMutable(); + employmentTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param values The employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEmploymentTypes( + java.lang.Iterable values) { + ensureEmploymentTypesIsMutable(); + for (com.google.cloud.talent.v4.EmploymentType value : values) { + employmentTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return This builder for chaining. + */ + public Builder clearEmploymentTypes() { + employmentTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + public java.util.List getEmploymentTypesValueList() { + return java.util.Collections.unmodifiableList(employmentTypes_); + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + public int getEmploymentTypesValue(int index) { + return employmentTypes_.get(index); + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + * @return This builder for chaining. + */ + public Builder setEmploymentTypesValue(int index, int value) { + ensureEmploymentTypesIsMutable(); + employmentTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param value The enum numeric value on the wire for employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addEmploymentTypesValue(int value) { + ensureEmploymentTypesIsMutable(); + employmentTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The employment type filter specifies the employment type of jobs to
+     * search against, such as
+     * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+     * If a value isn't specified, jobs in the search results includes any
+     * employment type.
+     * If multiple values are specified, jobs in the search results include
+     * any of the specified employment types.
+     * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param values The enum numeric values on the wire for employmentTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEmploymentTypesValue(java.lang.Iterable values) { + ensureEmploymentTypesIsMutable(); + for (int value : values) { + employmentTypes_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList languageCodes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLanguageCodesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + languageCodes_ = new com.google.protobuf.LazyStringArrayList(languageCodes_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @return A list containing the languageCodes. + */ + public com.google.protobuf.ProtocolStringList getLanguageCodesList() { + return languageCodes_.getUnmodifiableView(); + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @return The count of languageCodes. + */ + public int getLanguageCodesCount() { + return languageCodes_.size(); + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + public java.lang.String getLanguageCodes(int index) { + return languageCodes_.get(index); + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { + return languageCodes_.getByteString(index); + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param index The index to set the value at. + * @param value The languageCodes to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageCodesIsMutable(); + languageCodes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param value The languageCodes to add. + * @return This builder for chaining. + */ + public Builder addLanguageCodes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageCodesIsMutable(); + languageCodes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param values The languageCodes to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageCodes(java.lang.Iterable values) { + ensureLanguageCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, languageCodes_); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCodes() { + languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies the locale of jobs to search against,
+     * for example, "en-US".
+     * If a value isn't specified, the search results can contain jobs in any
+     * locale.
+     * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+     * At most 10 language code filters are allowed.
+     * 
+ * + * repeated string language_codes = 11; + * + * @param value The bytes of the languageCodes to add. + * @return This builder for chaining. + */ + public Builder addLanguageCodesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageCodesIsMutable(); + languageCodes_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.TimestampRange publishTimeRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.TimestampRange, + com.google.cloud.talent.v4.TimestampRange.Builder, + com.google.cloud.talent.v4.TimestampRangeOrBuilder> + publishTimeRangeBuilder_; + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return Whether the publishTimeRange field is set. + */ + public boolean hasPublishTimeRange() { + return publishTimeRangeBuilder_ != null || publishTimeRange_ != null; + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return The publishTimeRange. + */ + public com.google.cloud.talent.v4.TimestampRange getPublishTimeRange() { + if (publishTimeRangeBuilder_ == null) { + return publishTimeRange_ == null + ? com.google.cloud.talent.v4.TimestampRange.getDefaultInstance() + : publishTimeRange_; + } else { + return publishTimeRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public Builder setPublishTimeRange(com.google.cloud.talent.v4.TimestampRange value) { + if (publishTimeRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publishTimeRange_ = value; + onChanged(); + } else { + publishTimeRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public Builder setPublishTimeRange( + com.google.cloud.talent.v4.TimestampRange.Builder builderForValue) { + if (publishTimeRangeBuilder_ == null) { + publishTimeRange_ = builderForValue.build(); + onChanged(); + } else { + publishTimeRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public Builder mergePublishTimeRange(com.google.cloud.talent.v4.TimestampRange value) { + if (publishTimeRangeBuilder_ == null) { + if (publishTimeRange_ != null) { + publishTimeRange_ = + com.google.cloud.talent.v4.TimestampRange.newBuilder(publishTimeRange_) + .mergeFrom(value) + .buildPartial(); + } else { + publishTimeRange_ = value; + } + onChanged(); + } else { + publishTimeRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public Builder clearPublishTimeRange() { + if (publishTimeRangeBuilder_ == null) { + publishTimeRange_ = null; + onChanged(); + } else { + publishTimeRange_ = null; + publishTimeRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public com.google.cloud.talent.v4.TimestampRange.Builder getPublishTimeRangeBuilder() { + + onChanged(); + return getPublishTimeRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + public com.google.cloud.talent.v4.TimestampRangeOrBuilder getPublishTimeRangeOrBuilder() { + if (publishTimeRangeBuilder_ != null) { + return publishTimeRangeBuilder_.getMessageOrBuilder(); + } else { + return publishTimeRange_ == null + ? com.google.cloud.talent.v4.TimestampRange.getDefaultInstance() + : publishTimeRange_; + } + } + /** + * + * + *
+     * Jobs published within a range specified by this filter are searched
+     * against.
+     * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.TimestampRange, + com.google.cloud.talent.v4.TimestampRange.Builder, + com.google.cloud.talent.v4.TimestampRangeOrBuilder> + getPublishTimeRangeFieldBuilder() { + if (publishTimeRangeBuilder_ == null) { + publishTimeRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.TimestampRange, + com.google.cloud.talent.v4.TimestampRange.Builder, + com.google.cloud.talent.v4.TimestampRangeOrBuilder>( + getPublishTimeRange(), getParentForChildren(), isClean()); + publishTimeRange_ = null; + } + return publishTimeRangeBuilder_; + } + + private com.google.protobuf.LazyStringList excludedJobs_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludedJobsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + excludedJobs_ = new com.google.protobuf.LazyStringArrayList(excludedJobs_); + bitField0_ |= 0x00000040; + } + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @return A list containing the excludedJobs. + */ + public com.google.protobuf.ProtocolStringList getExcludedJobsList() { + return excludedJobs_.getUnmodifiableView(); + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @return The count of excludedJobs. + */ + public int getExcludedJobsCount() { + return excludedJobs_.size(); + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the element to return. + * @return The excludedJobs at the given index. + */ + public java.lang.String getExcludedJobs(int index) { + return excludedJobs_.get(index); + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the value to return. + * @return The bytes of the excludedJobs at the given index. + */ + public com.google.protobuf.ByteString getExcludedJobsBytes(int index) { + return excludedJobs_.getByteString(index); + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index to set the value at. + * @param value The excludedJobs to set. + * @return This builder for chaining. + */ + public Builder setExcludedJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedJobsIsMutable(); + excludedJobs_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param value The excludedJobs to add. + * @return This builder for chaining. + */ + public Builder addExcludedJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedJobsIsMutable(); + excludedJobs_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param values The excludedJobs to add. + * @return This builder for chaining. + */ + public Builder addAllExcludedJobs(java.lang.Iterable values) { + ensureExcludedJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedJobs_); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @return This builder for chaining. + */ + public Builder clearExcludedJobs() { + excludedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * This filter specifies a list of job names to be excluded during search.
+     * At most 400 excluded job names are allowed.
+     * 
+ * + * repeated string excluded_jobs = 13; + * + * @param value The bytes of the excludedJobs to add. + * @return This builder for chaining. + */ + public Builder addExcludedJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludedJobsIsMutable(); + excludedJobs_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.JobQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.JobQuery) + private static final com.google.cloud.talent.v4.JobQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.JobQuery(); + } + + public static com.google.cloud.talent.v4.JobQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobQuery(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobQueryOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobQueryOrBuilder.java new file mode 100644 index 00000000..198bab1c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobQueryOrBuilder.java @@ -0,0 +1,873 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +public interface JobQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.JobQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The query string that matches against the job title, description, and
+   * location fields.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 1; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * The query string that matches against the job title, description, and
+   * location fields.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string query = 1; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+   * example, "en-US". This field helps to better interpret the query.
+   * If a value isn't specified, the query language code is automatically
+   * detected, which may not be accurate.
+   * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * 
+ * + * string query_language_code = 14; + * + * @return The queryLanguageCode. + */ + java.lang.String getQueryLanguageCode(); + /** + * + * + *
+   * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For
+   * example, "en-US". This field helps to better interpret the query.
+   * If a value isn't specified, the query language code is automatically
+   * detected, which may not be accurate.
+   * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * 
+ * + * string query_language_code = 14; + * + * @return The bytes for queryLanguageCode. + */ + com.google.protobuf.ByteString getQueryLanguageCodeBytes(); + + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @return A list containing the companies. + */ + java.util.List getCompaniesList(); + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @return The count of companies. + */ + int getCompaniesCount(); + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @param index The index of the element to return. + * @return The companies at the given index. + */ + java.lang.String getCompanies(int index); + /** + * + * + *
+   * This filter specifies the company entities to search against.
+   * If a value isn't specified, jobs are searched for against all
+   * companies.
+   * If multiple values are specified, jobs are searched against the
+   * companies specified.
+   * The format is
+   * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For
+   * example, "projects/foo/tenants/bar/companies/baz".
+   * At most 20 company filters are allowed.
+   * 
+ * + * repeated string companies = 2; + * + * @param index The index of the value to return. + * @return The bytes of the companies at the given index. + */ + com.google.protobuf.ByteString getCompaniesBytes(int index); + + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + java.util.List getLocationFiltersList(); + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + com.google.cloud.talent.v4.LocationFilter getLocationFilters(int index); + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + int getLocationFiltersCount(); + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + java.util.List + getLocationFiltersOrBuilderList(); + /** + * + * + *
+   * The location filter specifies geo-regions containing the jobs to
+   * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter]
+   * for more information.
+   * If a location value isn't specified, jobs fitting the other search
+   * criteria are retrieved regardless of where they're located.
+   * If multiple values are specified, jobs are retrieved from any of the
+   * specified locations. If different values are specified for the
+   * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles]
+   * parameter, the maximum provided distance is used for all locations.
+   * At most 5 location filters are allowed.
+   * 
+ * + * repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + com.google.cloud.talent.v4.LocationFilterOrBuilder getLocationFiltersOrBuilder(int index); + + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the jobCategories. + */ + java.util.List getJobCategoriesList(); + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return The count of jobCategories. + */ + int getJobCategoriesCount(); + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the element to return. + * @return The jobCategories at the given index. + */ + com.google.cloud.talent.v4.JobCategory getJobCategories(int index); + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @return A list containing the enum numeric values on the wire for jobCategories. + */ + java.util.List getJobCategoriesValueList(); + /** + * + * + *
+   * The category filter specifies the categories of jobs to search against.
+   * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information.
+   * If a value isn't specified, jobs from any category are searched against.
+   * If multiple values are specified, jobs from any of the specified
+   * categories are searched against.
+   * 
+ * + * repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of jobCategories at the given index. + */ + int getJobCategoriesValue(int index); + + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return Whether the commuteFilter field is set. + */ + boolean hasCommuteFilter(); + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * + * @return The commuteFilter. + */ + com.google.cloud.talent.v4.CommuteFilter getCommuteFilter(); + /** + * + * + *
+   * Allows filtering jobs by commute time with different travel methods (for
+   *  example, driving or public transit).
+   * Note: This only works when you specify a
+   * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case,
+   * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is
+   * ignored.
+   *  Currently we don't support sorting by commute time.
+   * 
+ * + * .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + com.google.cloud.talent.v4.CommuteFilterOrBuilder getCommuteFilterOrBuilder(); + + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @return A list containing the companyDisplayNames. + */ + java.util.List getCompanyDisplayNamesList(); + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @return The count of companyDisplayNames. + */ + int getCompanyDisplayNamesCount(); + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the element to return. + * @return The companyDisplayNames at the given index. + */ + java.lang.String getCompanyDisplayNames(int index); + /** + * + * + *
+   * This filter specifies the exact company
+   * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the
+   * jobs to search against.
+   * If a value isn't specified, jobs within the search results are
+   * associated with any company.
+   * If multiple values are specified, jobs within the search results may be
+   * associated with any of the specified companies.
+   * At most 20 company display name filters are allowed.
+   * 
+ * + * repeated string company_display_names = 6; + * + * @param index The index of the value to return. + * @return The bytes of the companyDisplayNames at the given index. + */ + com.google.protobuf.ByteString getCompanyDisplayNamesBytes(int index); + + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return Whether the compensationFilter field is set. + */ + boolean hasCompensationFilter(); + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * + * @return The compensationFilter. + */ + com.google.cloud.talent.v4.CompensationFilter getCompensationFilter(); + /** + * + * + *
+   * This search filter is applied only to
+   * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For
+   * example, if the filter is specified as "Hourly job with per-hour
+   * compensation > $15", only jobs meeting these criteria are searched. If a
+   * filter isn't defined, all open jobs are searched.
+   * 
+ * + * .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + com.google.cloud.talent.v4.CompensationFilterOrBuilder getCompensationFilterOrBuilder(); + + /** + * + * + *
+   * This filter specifies a structured syntax to match against the
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+   * marked as `filterable`.
+   * The syntax for this expression is a subset of SQL syntax.
+   * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+   * left of the operator is a custom field key and the right of the operator
+   * is a number or a quoted string. You must escape backslash (\\) and
+   * quote (\") characters.
+   * Supported functions are `LOWER([field_name])` to
+   * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+   * existence of a key.
+   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+   * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+   * comparisons or functions are allowed in the expression. The expression
+   * must be < 6000 bytes in length.
+   * Sample Query:
+   * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+   * driving_years > 10`
+   * 
+ * + * string custom_attribute_filter = 8; + * + * @return The customAttributeFilter. + */ + java.lang.String getCustomAttributeFilter(); + /** + * + * + *
+   * This filter specifies a structured syntax to match against the
+   * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
+   * marked as `filterable`.
+   * The syntax for this expression is a subset of SQL syntax.
+   * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the
+   * left of the operator is a custom field key and the right of the operator
+   * is a number or a quoted string. You must escape backslash (\\) and
+   * quote (\") characters.
+   * Supported functions are `LOWER([field_name])` to
+   * perform a case insensitive match and `EMPTY([field_name])` to filter on the
+   * existence of a key.
+   * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
+   * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
+   * comparisons or functions are allowed in the expression. The expression
+   * must be < 6000 bytes in length.
+   * Sample Query:
+   * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
+   * driving_years > 10`
+   * 
+ * + * string custom_attribute_filter = 8; + * + * @return The bytes for customAttributeFilter. + */ + com.google.protobuf.ByteString getCustomAttributeFilterBytes(); + + /** + * + * + *
+   * This flag controls the spell-check feature. If false, the
+   * service attempts to correct a misspelled query,
+   * for example, "enginee" is corrected to "engineer".
+   * Defaults to false: a spell check is performed.
+   * 
+ * + * bool disable_spell_check = 9; + * + * @return The disableSpellCheck. + */ + boolean getDisableSpellCheck(); + + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the employmentTypes. + */ + java.util.List getEmploymentTypesList(); + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return The count of employmentTypes. + */ + int getEmploymentTypesCount(); + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the element to return. + * @return The employmentTypes at the given index. + */ + com.google.cloud.talent.v4.EmploymentType getEmploymentTypes(int index); + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @return A list containing the enum numeric values on the wire for employmentTypes. + */ + java.util.List getEmploymentTypesValueList(); + /** + * + * + *
+   * The employment type filter specifies the employment type of jobs to
+   * search against, such as
+   * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME].
+   * If a value isn't specified, jobs in the search results includes any
+   * employment type.
+   * If multiple values are specified, jobs in the search results include
+   * any of the specified employment types.
+   * 
+ * + * repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of employmentTypes at the given index. + */ + int getEmploymentTypesValue(int index); + + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @return A list containing the languageCodes. + */ + java.util.List getLanguageCodesList(); + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @return The count of languageCodes. + */ + int getLanguageCodesCount(); + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the element to return. + * @return The languageCodes at the given index. + */ + java.lang.String getLanguageCodes(int index); + /** + * + * + *
+   * This filter specifies the locale of jobs to search against,
+   * for example, "en-US".
+   * If a value isn't specified, the search results can contain jobs in any
+   * locale.
+   * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn".
+   * For more information, see
+   * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
+   * At most 10 language code filters are allowed.
+   * 
+ * + * repeated string language_codes = 11; + * + * @param index The index of the value to return. + * @return The bytes of the languageCodes at the given index. + */ + com.google.protobuf.ByteString getLanguageCodesBytes(int index); + + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return Whether the publishTimeRange field is set. + */ + boolean hasPublishTimeRange(); + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * + * @return The publishTimeRange. + */ + com.google.cloud.talent.v4.TimestampRange getPublishTimeRange(); + /** + * + * + *
+   * Jobs published within a range specified by this filter are searched
+   * against.
+   * 
+ * + * .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + com.google.cloud.talent.v4.TimestampRangeOrBuilder getPublishTimeRangeOrBuilder(); + + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @return A list containing the excludedJobs. + */ + java.util.List getExcludedJobsList(); + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @return The count of excludedJobs. + */ + int getExcludedJobsCount(); + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the element to return. + * @return The excludedJobs at the given index. + */ + java.lang.String getExcludedJobs(int index); + /** + * + * + *
+   * This filter specifies a list of job names to be excluded during search.
+   * At most 400 excluded job names are allowed.
+   * 
+ * + * repeated string excluded_jobs = 13; + * + * @param index The index of the value to return. + * @return The bytes of the excludedJobs at the given index. + */ + com.google.protobuf.ByteString getExcludedJobsBytes(int index); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResult.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResult.java new file mode 100644 index 00000000..9d158216 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResult.java @@ -0,0 +1,1026 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Mutation result of a job from a batch operation.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.JobResult} + */ +public final class JobResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.JobResult) + JobResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobResult.newBuilder() to construct. + private JobResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JobResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JobResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private JobResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Job.Builder subBuilder = null; + if (job_ != null) { + subBuilder = job_.toBuilder(); + } + job_ = input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(job_); + job_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_JobResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_JobResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobResult.class, + com.google.cloud.talent.v4.JobResult.Builder.class); + } + + public static final int JOB_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Job job_; + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + @java.lang.Override + public boolean hasJob() { + return job_ != null; + } + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJob() { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + return getJob(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (job_ != null) { + output.writeMessage(1, getJob()); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (job_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getJob()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.JobResult)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.JobResult other = (com.google.cloud.talent.v4.JobResult) obj; + + if (hasJob() != other.hasJob()) return false; + if (hasJob()) { + if (!getJob().equals(other.getJob())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJob()) { + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJob().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.JobResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.JobResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.JobResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Mutation result of a job from a batch operation.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.JobResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.JobResult) + com.google.cloud.talent.v4.JobResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_JobResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_JobResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.JobResult.class, + com.google.cloud.talent.v4.JobResult.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.JobResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobBuilder_ == null) { + job_ = null; + } else { + job_ = null; + jobBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_JobResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobResult getDefaultInstanceForType() { + return com.google.cloud.talent.v4.JobResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobResult build() { + com.google.cloud.talent.v4.JobResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobResult buildPartial() { + com.google.cloud.talent.v4.JobResult result = new com.google.cloud.talent.v4.JobResult(this); + if (jobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = jobBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.JobResult) { + return mergeFrom((com.google.cloud.talent.v4.JobResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.JobResult other) { + if (other == com.google.cloud.talent.v4.JobResult.getDefaultInstance()) return this; + if (other.hasJob()) { + mergeJob(other.getJob()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.JobResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.JobResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Job job_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobBuilder_; + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + public boolean hasJob() { + return jobBuilder_ != null || job_ != null; + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + public com.google.cloud.talent.v4.Job getJob() { + if (jobBuilder_ == null) { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } else { + return jobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder setJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + jobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder setJob(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + jobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder mergeJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (job_ != null) { + job_ = com.google.cloud.talent.v4.Job.newBuilder(job_).mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + jobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder clearJob() { + if (jobBuilder_ == null) { + job_ = null; + onChanged(); + } else { + job_ = null; + jobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public com.google.cloud.talent.v4.Job.Builder getJobBuilder() { + + onChanged(); + return getJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + if (jobBuilder_ != null) { + return jobBuilder_.getMessageOrBuilder(); + } else { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + } + /** + * + * + *
+     * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+     * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+     * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+     * detailed information of the created/updated job.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobFieldBuilder() { + if (jobBuilder_ == null) { + jobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + getJob(), getParentForChildren(), isClean()); + job_ = null; + } + return jobBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * The status of the job processed. This field is populated if the
+     * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.JobResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.JobResult) + private static final com.google.cloud.talent.v4.JobResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.JobResult(); + } + + public static com.google.cloud.talent.v4.JobResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.JobResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResultOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResultOrBuilder.java new file mode 100644 index 00000000..dd01c090 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResultOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface JobResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.JobResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + boolean hasJob(); + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + com.google.cloud.talent.v4.Job getJob(); + /** + * + * + *
+   * Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name],
+   * [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code]
+   * and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve
+   * detailed information of the created/updated job.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder(); + + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * The status of the job processed. This field is populated if the
+   * processing of the [job][google.cloud.talent.v4.JobResult.job] fails.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceProto.java new file mode 100644 index 00000000..c127bad6 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceProto.java @@ -0,0 +1,479 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public final class JobServiceProto { + private JobServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_CreateJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_CreateJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_GetJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_GetJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_UpdateJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_UpdateJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_DeleteJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_DeleteJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_ListJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_ListJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_ListJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_ListJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SearchJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SearchJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SearchJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SearchJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchCreateJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchUpdateJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchDeleteJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_JobResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_JobResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchCreateJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchUpdateJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_BatchDeleteJobsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/talent/v4/job_service.pro" + + "to\022\026google.cloud.talent.v4\032\034google/api/a" + + "nnotations.proto\032\027google/api/client.prot" + + "o\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032#google/cloud/tale" + + "nt/v4/common.proto\032$google/cloud/talent/" + + "v4/filters.proto\032&google/cloud/talent/v4" + + "/histogram.proto\032 google/cloud/talent/v4" + + "/job.proto\032#google/longrunning/operation" + + "s.proto\032\031google/protobuf/any.proto\032\036goog" + + "le/protobuf/duration.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\032\027google/rpc/status.proto\"r\n\020Cr" + + "eateJobRequest\022/\n\006parent\030\001 \001(\tB\037\340A\002\372A\031\022\027" + + "jobs.googleapis.com/Job\022-\n\003job\030\002 \001(\0132\033.g" + + "oogle.cloud.talent.v4.JobB\003\340A\002\">\n\rGetJob" + + "Request\022-\n\004name\030\001 \001(\tB\037\340A\002\372A\031\n\027jobs.goog" + + "leapis.com/Job\"r\n\020UpdateJobRequest\022-\n\003jo" + + "b\030\001 \001(\0132\033.google.cloud.talent.v4.JobB\003\340A" + + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + + ".FieldMask\"A\n\020DeleteJobRequest\022-\n\004name\030\001" + + " \001(\tB\037\340A\002\372A\031\n\027jobs.googleapis.com/Job\"\261\001" + + "\n\017ListJobsRequest\022/\n\006parent\030\001 \001(\tB\037\340A\002\372A" + + "\031\022\027jobs.googleapis.com/Job\022\023\n\006filter\030\002 \001" + + "(\tB\003\340A\002\022\022\n\npage_token\030\003 \001(\t\022\021\n\tpage_size" + + "\030\004 \001(\005\0221\n\010job_view\030\005 \001(\0162\037.google.cloud." + + "talent.v4.JobView\"\222\001\n\020ListJobsResponse\022)" + + "\n\004jobs\030\001 \003(\0132\033.google.cloud.talent.v4.Jo" + + "b\022\027\n\017next_page_token\030\002 \001(\t\022:\n\010metadata\030\003" + + " \001(\0132(.google.cloud.talent.v4.ResponseMe" + + "tadata\"\207\t\n\021SearchJobsRequest\022/\n\006parent\030\001" + + " \001(\tB\037\340A\002\372A\031\022\027jobs.googleapis.com/Job\022I\n" + + "\013search_mode\030\002 \001(\01624.google.cloud.talent" + + ".v4.SearchJobsRequest.SearchMode\022F\n\020requ" + + "est_metadata\030\003 \001(\0132\'.google.cloud.talent" + + ".v4.RequestMetadataB\003\340A\002\0223\n\tjob_query\030\004 " + + "\001(\0132 .google.cloud.talent.v4.JobQuery\022\031\n" + + "\021enable_broadening\030\005 \001(\010\022A\n\021histogram_qu" + + "eries\030\007 \003(\0132&.google.cloud.talent.v4.His" + + "togramQuery\0221\n\010job_view\030\010 \001(\0162\037.google.c" + + "loud.talent.v4.JobView\022\016\n\006offset\030\t \001(\005\022\025" + + "\n\rmax_page_size\030\n \001(\005\022\022\n\npage_token\030\013 \001(" + + "\t\022\020\n\010order_by\030\014 \001(\t\022]\n\025diversification_l" + + "evel\030\r \001(\0162>.google.cloud.talent.v4.Sear" + + "chJobsRequest.DiversificationLevel\022X\n\023cu" + + "stom_ranking_info\030\016 \001(\0132;.google.cloud.t" + + "alent.v4.SearchJobsRequest.CustomRanking" + + "Info\022\035\n\025disable_keyword_match\030\020 \001(\010\032\225\002\n\021" + + "CustomRankingInfo\022j\n\020importance_level\030\001 " + + "\001(\0162K.google.cloud.talent.v4.SearchJobsR" + + "equest.CustomRankingInfo.ImportanceLevel" + + "B\003\340A\002\022\037\n\022ranking_expression\030\002 \001(\tB\003\340A\002\"s" + + "\n\017ImportanceLevel\022 \n\034IMPORTANCE_LEVEL_UN" + + "SPECIFIED\020\000\022\010\n\004NONE\020\001\022\007\n\003LOW\020\002\022\010\n\004MILD\020\003" + + "\022\n\n\006MEDIUM\020\004\022\010\n\004HIGH\020\005\022\013\n\007EXTREME\020\006\"R\n\nS" + + "earchMode\022\033\n\027SEARCH_MODE_UNSPECIFIED\020\000\022\016" + + "\n\nJOB_SEARCH\020\001\022\027\n\023FEATURED_JOB_SEARCH\020\002\"" + + "W\n\024DiversificationLevel\022%\n!DIVERSIFICATI" + + "ON_LEVEL_UNSPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\n\n\006" + + "SIMPLE\020\002\"\221\006\n\022SearchJobsResponse\022M\n\rmatch" + + "ing_jobs\030\001 \003(\01326.google.cloud.talent.v4." + + "SearchJobsResponse.MatchingJob\022M\n\027histog" + + "ram_query_results\030\002 \003(\0132,.google.cloud.t" + + "alent.v4.HistogramQueryResult\022\027\n\017next_pa" + + "ge_token\030\003 \001(\t\022:\n\020location_filters\030\004 \003(\013" + + "2 .google.cloud.talent.v4.Location\022\022\n\nto" + + "tal_size\030\006 \001(\005\022:\n\010metadata\030\007 \001(\0132(.googl" + + "e.cloud.talent.v4.ResponseMetadata\022\"\n\032br" + + "oadened_query_jobs_count\030\010 \001(\005\022D\n\020spell_" + + "correction\030\t \001(\0132*.google.cloud.talent.v" + + "4.SpellingCorrection\032\322\001\n\013MatchingJob\022(\n\003" + + "job\030\001 \001(\0132\033.google.cloud.talent.v4.Job\022\023" + + "\n\013job_summary\030\002 \001(\t\022\031\n\021job_title_snippet" + + "\030\003 \001(\t\022\033\n\023search_text_snippet\030\004 \001(\t\022L\n\014c" + + "ommute_info\030\005 \001(\01326.google.cloud.talent." + + "v4.SearchJobsResponse.CommuteInfo\032y\n\013Com" + + "muteInfo\0226\n\014job_location\030\001 \001(\0132 .google." + + "cloud.talent.v4.Location\0222\n\017travel_durat" + + "ion\030\002 \001(\0132\031.google.protobuf.Duration\"y\n\026" + + "BatchCreateJobsRequest\022/\n\006parent\030\001 \001(\tB\037" + + "\340A\002\372A\031\022\027jobs.googleapis.com/Job\022.\n\004jobs\030" + + "\002 \003(\0132\033.google.cloud.talent.v4.JobB\003\340A\002\"" + + "\252\001\n\026BatchUpdateJobsRequest\022/\n\006parent\030\001 \001" + + "(\tB\037\340A\002\372A\031\022\027jobs.googleapis.com/Job\022.\n\004j" + + "obs\030\002 \003(\0132\033.google.cloud.talent.v4.JobB\003" + + "\340A\002\022/\n\013update_mask\030\003 \001(\0132\032.google.protob" + + "uf.FieldMask\"y\n\026BatchDeleteJobsRequest\0222" + + "\n\006parent\030\001 \001(\tB\"\340A\002\372A\034\n\032jobs.googleapis." + + "com/Tenant\022+\n\005names\030\002 \003(\tB\034\372A\031\n\027jobs.goo" + + "gleapis.com/Job\"Y\n\tJobResult\022(\n\003job\030\001 \001(" + + "\0132\033.google.cloud.talent.v4.Job\022\"\n\006status" + + "\030\002 \001(\0132\022.google.rpc.Status\"Q\n\027BatchCreat" + + "eJobsResponse\0226\n\013job_results\030\001 \003(\0132!.goo" + + "gle.cloud.talent.v4.JobResult\"Q\n\027BatchUp" + + "dateJobsResponse\0226\n\013job_results\030\001 \003(\0132!." + + "google.cloud.talent.v4.JobResult\"Q\n\027Batc" + + "hDeleteJobsResponse\0226\n\013job_results\030\001 \003(\013" + + "2!.google.cloud.talent.v4.JobResult*v\n\007J" + + "obView\022\030\n\024JOB_VIEW_UNSPECIFIED\020\000\022\024\n\020JOB_" + + "VIEW_ID_ONLY\020\001\022\024\n\020JOB_VIEW_MINIMAL\020\002\022\022\n\016" + + "JOB_VIEW_SMALL\020\003\022\021\n\rJOB_VIEW_FULL\020\0042\334\016\n\n" + + "JobService\022\224\001\n\tCreateJob\022(.google.cloud." + + "talent.v4.CreateJobRequest\032\033.google.clou" + + "d.talent.v4.Job\"@\202\323\344\223\002-\"&/v4/{parent=pro" + + "jects/*/tenants/*}/jobs:\003job\332A\nparent,jo" + + "b\022\341\001\n\017BatchCreateJobs\022..google.cloud.tal" + + "ent.v4.BatchCreateJobsRequest\032\035.google.l" + + "ongrunning.Operation\"\177\202\323\344\223\0027\"2/v4/{paren" + + "t=projects/*/tenants/*}/jobs:batchCreate" + + ":\001*\332A\013parent,jobs\312A1\n\027BatchCreateJobsRes" + + "ponse\022\026BatchOperationMetadata\022\203\001\n\006GetJob" + + "\022%.google.cloud.talent.v4.GetJobRequest\032" + + "\033.google.cloud.talent.v4.Job\"5\202\323\344\223\002(\022&/v" + + "4/{name=projects/*/tenants/*/jobs/*}\332A\004n" + + "ame\022\235\001\n\tUpdateJob\022(.google.cloud.talent." + + "v4.UpdateJobRequest\032\033.google.cloud.talen" + + "t.v4.Job\"I\202\323\344\223\00212*/v4/{job.name=projects" + + "/*/tenants/*/jobs/*}:\003job\332A\017job,update_m" + + "ask\022\341\001\n\017BatchUpdateJobs\022..google.cloud.t" + + "alent.v4.BatchUpdateJobsRequest\032\035.google" + + ".longrunning.Operation\"\177\202\323\344\223\0027\"2/v4/{par" + + "ent=projects/*/tenants/*}/jobs:batchUpda" + + "te:\001*\332A\013parent,jobs\312A1\n\027BatchUpdateJobsR" + + "esponse\022\026BatchOperationMetadata\022\204\001\n\tDele" + + "teJob\022(.google.cloud.talent.v4.DeleteJob" + + "Request\032\026.google.protobuf.Empty\"5\202\323\344\223\002(*" + + "&/v4/{name=projects/*/tenants/*/jobs/*}\332" + + "A\004name\022\343\001\n\017BatchDeleteJobs\022..google.clou" + + "d.talent.v4.BatchDeleteJobsRequest\032\035.goo" + + "gle.longrunning.Operation\"\200\001\202\323\344\223\0027\"2/v4/" + + "{parent=projects/*/tenants/*}/jobs:batch" + + "Delete:\001*\332A\014parent,names\312A1\n\027BatchDelete" + + "JobsResponse\022\026BatchOperationMetadata\022\235\001\n" + + "\010ListJobs\022\'.google.cloud.talent.v4.ListJ" + + "obsRequest\032(.google.cloud.talent.v4.List" + + "JobsResponse\">\202\323\344\223\002(\022&/v4/{parent=projec" + + "ts/*/tenants/*}/jobs\332A\rparent,filter\022\235\001\n" + + "\nSearchJobs\022).google.cloud.talent.v4.Sea" + + "rchJobsRequest\032*.google.cloud.talent.v4." + + "SearchJobsResponse\"8\202\323\344\223\0022\"-/v4/{parent=" + + "projects/*/tenants/*}/jobs:search:\001*\022\255\001\n" + + "\022SearchJobsForAlert\022).google.cloud.talen" + + "t.v4.SearchJobsRequest\032*.google.cloud.ta" + + "lent.v4.SearchJobsResponse\"@\202\323\344\223\002:\"5/v4/" + + "{parent=projects/*/tenants/*}/jobs:searc" + + "hForAlert:\001*\032l\312A\023jobs.googleapis.com\322ASh" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tform,https://www.googleapis.com/auth/jo" + + "bsBs\n\032com.google.cloud.talent.v4B\017JobSer" + + "viceProtoP\001Z + * An enum that specifies the job attributes that are returned in the + * [MatchingJob.job][google.cloud.talent.v4.SearchJobsResponse.MatchingJob.job] or + * [ListJobsResponse.jobs][google.cloud.talent.v4.ListJobsResponse.jobs] fields. + * + * + * Protobuf enum {@code google.cloud.talent.v4.JobView} + */ +public enum JobView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value.
+   * 
+ * + * JOB_VIEW_UNSPECIFIED = 0; + */ + JOB_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * A ID only view of job, with following attributes:
+   * [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.language_code][google.cloud.talent.v4.Job.language_code].
+   * 
+ * + * JOB_VIEW_ID_ONLY = 1; + */ + JOB_VIEW_ID_ONLY(1), + /** + * + * + *
+   * A minimal view of the job, with the following attributes:
+   * [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4.Job.language_code].
+   * 
+ * + * JOB_VIEW_MINIMAL = 2; + */ + JOB_VIEW_MINIMAL(2), + /** + * + * + *
+   * A small view of the job, with the following attributes in the search
+   * results: [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4.Job.visibility],
+   * [Job.language_code][google.cloud.talent.v4.Job.language_code], [Job.description][google.cloud.talent.v4.Job.description].
+   * 
+ * + * JOB_VIEW_SMALL = 3; + */ + JOB_VIEW_SMALL(3), + /** + * + * + *
+   * All available attributes are included in the search results.
+   * 
+ * + * JOB_VIEW_FULL = 4; + */ + JOB_VIEW_FULL(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value.
+   * 
+ * + * JOB_VIEW_UNSPECIFIED = 0; + */ + public static final int JOB_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * A ID only view of job, with following attributes:
+   * [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.language_code][google.cloud.talent.v4.Job.language_code].
+   * 
+ * + * JOB_VIEW_ID_ONLY = 1; + */ + public static final int JOB_VIEW_ID_ONLY_VALUE = 1; + /** + * + * + *
+   * A minimal view of the job, with the following attributes:
+   * [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4.Job.language_code].
+   * 
+ * + * JOB_VIEW_MINIMAL = 2; + */ + public static final int JOB_VIEW_MINIMAL_VALUE = 2; + /** + * + * + *
+   * A small view of the job, with the following attributes in the search
+   * results: [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4.Job.visibility],
+   * [Job.language_code][google.cloud.talent.v4.Job.language_code], [Job.description][google.cloud.talent.v4.Job.description].
+   * 
+ * + * JOB_VIEW_SMALL = 3; + */ + public static final int JOB_VIEW_SMALL_VALUE = 3; + /** + * + * + *
+   * All available attributes are included in the search results.
+   * 
+ * + * JOB_VIEW_FULL = 4; + */ + public static final int JOB_VIEW_FULL_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobView forNumber(int value) { + switch (value) { + case 0: + return JOB_VIEW_UNSPECIFIED; + case 1: + return JOB_VIEW_ID_ONLY; + case 2: + return JOB_VIEW_MINIMAL; + case 3: + return JOB_VIEW_SMALL; + case 4: + return JOB_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobView findValueByNumber(int number) { + return JobView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final JobView[] VALUES = values(); + + public static JobView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.JobView) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequest.java new file mode 100644 index 00000000..7d416cd3 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequest.java @@ -0,0 +1,1042 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * List companies for which the client has ACL visibility.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListCompaniesRequest} + */ +public final class ListCompaniesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListCompaniesRequest) + ListCompaniesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCompaniesRequest.newBuilder() to construct. + private ListCompaniesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCompaniesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCompaniesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCompaniesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 32: + { + requireOpenJobs_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListCompaniesRequest.class, + com.google.cloud.talent.v4.ListCompaniesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The maximum number of companies to be returned, at most 100.
+   * Default is 100 if a non-positive number is provided.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int REQUIRE_OPEN_JOBS_FIELD_NUMBER = 4; + private boolean requireOpenJobs_; + /** + * + * + *
+   * Set to true if the companies requested must have open jobs.
+   * Defaults to false.
+   * If true, at most
+   * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of
+   * companies are fetched, among which only those with open jobs are returned.
+   * 
+ * + * bool require_open_jobs = 4; + * + * @return The requireOpenJobs. + */ + @java.lang.Override + public boolean getRequireOpenJobs() { + return requireOpenJobs_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (requireOpenJobs_ != false) { + output.writeBool(4, requireOpenJobs_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (requireOpenJobs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, requireOpenJobs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListCompaniesRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListCompaniesRequest other = + (com.google.cloud.talent.v4.ListCompaniesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (getRequireOpenJobs() != other.getRequireOpenJobs()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + REQUIRE_OPEN_JOBS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequireOpenJobs()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListCompaniesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List companies for which the client has ACL visibility.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListCompaniesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListCompaniesRequest) + com.google.cloud.talent.v4.ListCompaniesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListCompaniesRequest.class, + com.google.cloud.talent.v4.ListCompaniesRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListCompaniesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + requireOpenJobs_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListCompaniesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesRequest build() { + com.google.cloud.talent.v4.ListCompaniesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesRequest buildPartial() { + com.google.cloud.talent.v4.ListCompaniesRequest result = + new com.google.cloud.talent.v4.ListCompaniesRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.requireOpenJobs_ = requireOpenJobs_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListCompaniesRequest) { + return mergeFrom((com.google.cloud.talent.v4.ListCompaniesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListCompaniesRequest other) { + if (other == com.google.cloud.talent.v4.ListCompaniesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (other.getRequireOpenJobs() != false) { + setRequireOpenJobs(other.getRequireOpenJobs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListCompaniesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListCompaniesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the tenant under which the company is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of companies to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of companies to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of companies to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private boolean requireOpenJobs_; + /** + * + * + *
+     * Set to true if the companies requested must have open jobs.
+     * Defaults to false.
+     * If true, at most
+     * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of
+     * companies are fetched, among which only those with open jobs are returned.
+     * 
+ * + * bool require_open_jobs = 4; + * + * @return The requireOpenJobs. + */ + @java.lang.Override + public boolean getRequireOpenJobs() { + return requireOpenJobs_; + } + /** + * + * + *
+     * Set to true if the companies requested must have open jobs.
+     * Defaults to false.
+     * If true, at most
+     * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of
+     * companies are fetched, among which only those with open jobs are returned.
+     * 
+ * + * bool require_open_jobs = 4; + * + * @param value The requireOpenJobs to set. + * @return This builder for chaining. + */ + public Builder setRequireOpenJobs(boolean value) { + + requireOpenJobs_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Set to true if the companies requested must have open jobs.
+     * Defaults to false.
+     * If true, at most
+     * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of
+     * companies are fetched, among which only those with open jobs are returned.
+     * 
+ * + * bool require_open_jobs = 4; + * + * @return This builder for chaining. + */ + public Builder clearRequireOpenJobs() { + + requireOpenJobs_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListCompaniesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListCompaniesRequest) + private static final com.google.cloud.talent.v4.ListCompaniesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListCompaniesRequest(); + } + + public static com.google.cloud.talent.v4.ListCompaniesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCompaniesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCompaniesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequestOrBuilder.java new file mode 100644 index 00000000..c8771fde --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface ListCompaniesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListCompaniesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the tenant under which the company is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The maximum number of companies to be returned, at most 100.
+   * Default is 100 if a non-positive number is provided.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Set to true if the companies requested must have open jobs.
+   * Defaults to false.
+   * If true, at most
+   * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of
+   * companies are fetched, among which only those with open jobs are returned.
+   * 
+ * + * bool require_open_jobs = 4; + * + * @return The requireOpenJobs. + */ + boolean getRequireOpenJobs(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponse.java new file mode 100644 index 00000000..39607d5f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponse.java @@ -0,0 +1,1416 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The List companies response object.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListCompaniesResponse} + */ +public final class ListCompaniesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListCompaniesResponse) + ListCompaniesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCompaniesResponse.newBuilder() to construct. + private ListCompaniesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCompaniesResponse() { + companies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCompaniesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCompaniesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + companies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + companies_.add( + input.readMessage( + com.google.cloud.talent.v4.Company.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + com.google.cloud.talent.v4.ResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.talent.v4.ResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + companies_ = java.util.Collections.unmodifiableList(companies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListCompaniesResponse.class, + com.google.cloud.talent.v4.ListCompaniesResponse.Builder.class); + } + + public static final int COMPANIES_FIELD_NUMBER = 1; + private java.util.List companies_; + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + @java.lang.Override + public java.util.List getCompaniesList() { + return companies_; + } + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + @java.lang.Override + public java.util.List + getCompaniesOrBuilderList() { + return companies_; + } + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + @java.lang.Override + public int getCompaniesCount() { + return companies_.size(); + } + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Company getCompanies(int index) { + return companies_.get(index); + } + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompanyOrBuilder getCompaniesOrBuilder(int index) { + return companies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < companies_.size(); i++) { + output.writeMessage(1, companies_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < companies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, companies_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListCompaniesResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListCompaniesResponse other = + (com.google.cloud.talent.v4.ListCompaniesResponse) obj; + + if (!getCompaniesList().equals(other.getCompaniesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCompaniesCount() > 0) { + hash = (37 * hash) + COMPANIES_FIELD_NUMBER; + hash = (53 * hash) + getCompaniesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListCompaniesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The List companies response object.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListCompaniesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListCompaniesResponse) + com.google.cloud.talent.v4.ListCompaniesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListCompaniesResponse.class, + com.google.cloud.talent.v4.ListCompaniesResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListCompaniesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCompaniesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (companiesBuilder_ == null) { + companies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + companiesBuilder_.clear(); + } + nextPageToken_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_ListCompaniesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListCompaniesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesResponse build() { + com.google.cloud.talent.v4.ListCompaniesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesResponse buildPartial() { + com.google.cloud.talent.v4.ListCompaniesResponse result = + new com.google.cloud.talent.v4.ListCompaniesResponse(this); + int from_bitField0_ = bitField0_; + if (companiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + companies_ = java.util.Collections.unmodifiableList(companies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.companies_ = companies_; + } else { + result.companies_ = companiesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListCompaniesResponse) { + return mergeFrom((com.google.cloud.talent.v4.ListCompaniesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListCompaniesResponse other) { + if (other == com.google.cloud.talent.v4.ListCompaniesResponse.getDefaultInstance()) + return this; + if (companiesBuilder_ == null) { + if (!other.companies_.isEmpty()) { + if (companies_.isEmpty()) { + companies_ = other.companies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCompaniesIsMutable(); + companies_.addAll(other.companies_); + } + onChanged(); + } + } else { + if (!other.companies_.isEmpty()) { + if (companiesBuilder_.isEmpty()) { + companiesBuilder_.dispose(); + companiesBuilder_ = null; + companies_ = other.companies_; + bitField0_ = (bitField0_ & ~0x00000001); + companiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCompaniesFieldBuilder() + : null; + } else { + companiesBuilder_.addAllMessages(other.companies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListCompaniesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListCompaniesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List companies_ = + java.util.Collections.emptyList(); + + private void ensureCompaniesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + companies_ = new java.util.ArrayList(companies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + companiesBuilder_; + + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public java.util.List getCompaniesList() { + if (companiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(companies_); + } else { + return companiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public int getCompaniesCount() { + if (companiesBuilder_ == null) { + return companies_.size(); + } else { + return companiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public com.google.cloud.talent.v4.Company getCompanies(int index) { + if (companiesBuilder_ == null) { + return companies_.get(index); + } else { + return companiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder setCompanies(int index, com.google.cloud.talent.v4.Company value) { + if (companiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompaniesIsMutable(); + companies_.set(index, value); + onChanged(); + } else { + companiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder setCompanies( + int index, com.google.cloud.talent.v4.Company.Builder builderForValue) { + if (companiesBuilder_ == null) { + ensureCompaniesIsMutable(); + companies_.set(index, builderForValue.build()); + onChanged(); + } else { + companiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder addCompanies(com.google.cloud.talent.v4.Company value) { + if (companiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompaniesIsMutable(); + companies_.add(value); + onChanged(); + } else { + companiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder addCompanies(int index, com.google.cloud.talent.v4.Company value) { + if (companiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompaniesIsMutable(); + companies_.add(index, value); + onChanged(); + } else { + companiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder addCompanies(com.google.cloud.talent.v4.Company.Builder builderForValue) { + if (companiesBuilder_ == null) { + ensureCompaniesIsMutable(); + companies_.add(builderForValue.build()); + onChanged(); + } else { + companiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder addCompanies( + int index, com.google.cloud.talent.v4.Company.Builder builderForValue) { + if (companiesBuilder_ == null) { + ensureCompaniesIsMutable(); + companies_.add(index, builderForValue.build()); + onChanged(); + } else { + companiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder addAllCompanies( + java.lang.Iterable values) { + if (companiesBuilder_ == null) { + ensureCompaniesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, companies_); + onChanged(); + } else { + companiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder clearCompanies() { + if (companiesBuilder_ == null) { + companies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + companiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public Builder removeCompanies(int index) { + if (companiesBuilder_ == null) { + ensureCompaniesIsMutable(); + companies_.remove(index); + onChanged(); + } else { + companiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public com.google.cloud.talent.v4.Company.Builder getCompaniesBuilder(int index) { + return getCompaniesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public com.google.cloud.talent.v4.CompanyOrBuilder getCompaniesOrBuilder(int index) { + if (companiesBuilder_ == null) { + return companies_.get(index); + } else { + return companiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public java.util.List + getCompaniesOrBuilderList() { + if (companiesBuilder_ != null) { + return companiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(companies_); + } + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public com.google.cloud.talent.v4.Company.Builder addCompaniesBuilder() { + return getCompaniesFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.Company.getDefaultInstance()); + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public com.google.cloud.talent.v4.Company.Builder addCompaniesBuilder(int index) { + return getCompaniesFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Company.getDefaultInstance()); + } + /** + * + * + *
+     * Companies for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + public java.util.List getCompaniesBuilderList() { + return getCompaniesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + getCompaniesFieldBuilder() { + if (companiesBuilder_ == null) { + companiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder>( + companies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + companies_ = null; + } + return companiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata( + com.google.cloud.talent.v4.ResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder mergeMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.talent.v4.ResponseMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListCompaniesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListCompaniesResponse) + private static final com.google.cloud.talent.v4.ListCompaniesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListCompaniesResponse(); + } + + public static com.google.cloud.talent.v4.ListCompaniesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCompaniesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCompaniesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListCompaniesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponseOrBuilder.java new file mode 100644 index 00000000..6abbb5f8 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponseOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface ListCompaniesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListCompaniesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + java.util.List getCompaniesList(); + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + com.google.cloud.talent.v4.Company getCompanies(int index); + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + int getCompaniesCount(); + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + java.util.List getCompaniesOrBuilderList(); + /** + * + * + *
+   * Companies for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Company companies = 1; + */ + com.google.cloud.talent.v4.CompanyOrBuilder getCompaniesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + com.google.cloud.talent.v4.ResponseMetadata getMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequest.java new file mode 100644 index 00000000..7f22de40 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * List jobs request.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListJobsRequest} + */ +public final class ListJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListJobsRequest) + ListJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListJobsRequest.newBuilder() to construct. + private ListJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + jobView_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + jobView_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListJobsRequest.class, + com.google.cloud.talent.v4.ListJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Required. The filter string specifies the jobs to be enumerated.
+   * Supported operator: =, AND
+   * The fields eligible for filtering are:
+   * * `companyName` (Required)
+   * * `requisitionId`
+   * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+   * OPEN if no value is specified.
+   * Sample Query:
+   * * companyName = "projects/foo/tenants/bar/companies/baz"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * requisitionId = "req-1"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * status = "EXPIRED"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The filter string specifies the jobs to be enumerated.
+   * Supported operator: =, AND
+   * The fields eligible for filtering are:
+   * * `companyName` (Required)
+   * * `requisitionId`
+   * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+   * OPEN if no value is specified.
+   * Sample Query:
+   * * companyName = "projects/foo/tenants/bar/companies/baz"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * requisitionId = "req-1"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * status = "EXPIRED"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The starting point of a query result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The starting point of a query result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * The maximum number of jobs to be returned per page of results.
+   * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+   * page size is 1000. Otherwise, the maximum allowed page size is 100.
+   * Default is 100 if empty or a number < 1 is specified.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int JOB_VIEW_FIELD_NUMBER = 5; + private int jobView_; + /** + * + * + *
+   * The desired job attributes returned for jobs in the
+   * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+   * specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The enum numeric value on the wire for jobView. + */ + @java.lang.Override + public int getJobViewValue() { + return jobView_; + } + /** + * + * + *
+   * The desired job attributes returned for jobs in the
+   * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+   * specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The jobView. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobView getJobView() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobView result = + com.google.cloud.talent.v4.JobView.valueOf(jobView_); + return result == null ? com.google.cloud.talent.v4.JobView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (jobView_ != com.google.cloud.talent.v4.JobView.JOB_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(5, jobView_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (jobView_ != com.google.cloud.talent.v4.JobView.JOB_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, jobView_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListJobsRequest other = + (com.google.cloud.talent.v4.ListJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (jobView_ != other.jobView_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + JOB_VIEW_FIELD_NUMBER; + hash = (53 * hash) + jobView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List jobs request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListJobsRequest) + com.google.cloud.talent.v4.ListJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListJobsRequest.class, + com.google.cloud.talent.v4.ListJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + jobView_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsRequest build() { + com.google.cloud.talent.v4.ListJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsRequest buildPartial() { + com.google.cloud.talent.v4.ListJobsRequest result = + new com.google.cloud.talent.v4.ListJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.jobView_ = jobView_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListJobsRequest) { + return mergeFrom((com.google.cloud.talent.v4.ListJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListJobsRequest other) { + if (other == com.google.cloud.talent.v4.ListJobsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (other.jobView_ != 0) { + setJobViewValue(other.getJobViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant under which the job is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. The filter string specifies the jobs to be enumerated.
+     * Supported operator: =, AND
+     * The fields eligible for filtering are:
+     * * `companyName` (Required)
+     * * `requisitionId`
+     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+     * OPEN if no value is specified.
+     * Sample Query:
+     * * companyName = "projects/foo/tenants/bar/companies/baz"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * requisitionId = "req-1"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * status = "EXPIRED"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The filter string specifies the jobs to be enumerated.
+     * Supported operator: =, AND
+     * The fields eligible for filtering are:
+     * * `companyName` (Required)
+     * * `requisitionId`
+     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+     * OPEN if no value is specified.
+     * Sample Query:
+     * * companyName = "projects/foo/tenants/bar/companies/baz"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * requisitionId = "req-1"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * status = "EXPIRED"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The filter string specifies the jobs to be enumerated.
+     * Supported operator: =, AND
+     * The fields eligible for filtering are:
+     * * `companyName` (Required)
+     * * `requisitionId`
+     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+     * OPEN if no value is specified.
+     * Sample Query:
+     * * companyName = "projects/foo/tenants/bar/companies/baz"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * requisitionId = "req-1"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * status = "EXPIRED"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string specifies the jobs to be enumerated.
+     * Supported operator: =, AND
+     * The fields eligible for filtering are:
+     * * `companyName` (Required)
+     * * `requisitionId`
+     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+     * OPEN if no value is specified.
+     * Sample Query:
+     * * companyName = "projects/foo/tenants/bar/companies/baz"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * requisitionId = "req-1"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * status = "EXPIRED"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string specifies the jobs to be enumerated.
+     * Supported operator: =, AND
+     * The fields eligible for filtering are:
+     * * `companyName` (Required)
+     * * `requisitionId`
+     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+     * OPEN if no value is specified.
+     * Sample Query:
+     * * companyName = "projects/foo/tenants/bar/companies/baz"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * requisitionId = "req-1"
+     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+     * status = "EXPIRED"
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The starting point of a query result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The starting point of a query result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The starting point of a query result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The starting point of a query result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The starting point of a query result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of jobs to be returned per page of results.
+     * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+     * page size is 1000. Otherwise, the maximum allowed page size is 100.
+     * Default is 100 if empty or a number < 1 is specified.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of jobs to be returned per page of results.
+     * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+     * page size is 1000. Otherwise, the maximum allowed page size is 100.
+     * Default is 100 if empty or a number < 1 is specified.
+     * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of jobs to be returned per page of results.
+     * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+     * page size is 1000. Otherwise, the maximum allowed page size is 100.
+     * Default is 100 if empty or a number < 1 is specified.
+     * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private int jobView_ = 0; + /** + * + * + *
+     * The desired job attributes returned for jobs in the
+     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+     * specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The enum numeric value on the wire for jobView. + */ + @java.lang.Override + public int getJobViewValue() { + return jobView_; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the
+     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+     * specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @param value The enum numeric value on the wire for jobView to set. + * @return This builder for chaining. + */ + public Builder setJobViewValue(int value) { + + jobView_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the
+     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+     * specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The jobView. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobView getJobView() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobView result = + com.google.cloud.talent.v4.JobView.valueOf(jobView_); + return result == null ? com.google.cloud.talent.v4.JobView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the
+     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+     * specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @param value The jobView to set. + * @return This builder for chaining. + */ + public Builder setJobView(com.google.cloud.talent.v4.JobView value) { + if (value == null) { + throw new NullPointerException(); + } + + jobView_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the
+     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+     * specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return This builder for chaining. + */ + public Builder clearJobView() { + + jobView_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListJobsRequest) + private static final com.google.cloud.talent.v4.ListJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListJobsRequest(); + } + + public static com.google.cloud.talent.v4.ListJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequestOrBuilder.java new file mode 100644 index 00000000..8c5ba727 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface ListJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant under which the job is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The filter string specifies the jobs to be enumerated.
+   * Supported operator: =, AND
+   * The fields eligible for filtering are:
+   * * `companyName` (Required)
+   * * `requisitionId`
+   * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+   * OPEN if no value is specified.
+   * Sample Query:
+   * * companyName = "projects/foo/tenants/bar/companies/baz"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * requisitionId = "req-1"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * status = "EXPIRED"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. The filter string specifies the jobs to be enumerated.
+   * Supported operator: =, AND
+   * The fields eligible for filtering are:
+   * * `companyName` (Required)
+   * * `requisitionId`
+   * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
+   * OPEN if no value is specified.
+   * Sample Query:
+   * * companyName = "projects/foo/tenants/bar/companies/baz"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * requisitionId = "req-1"
+   * * companyName = "projects/foo/tenants/bar/companies/baz" AND
+   * status = "EXPIRED"
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The starting point of a query result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The starting point of a query result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The maximum number of jobs to be returned per page of results.
+   * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
+   * page size is 1000. Otherwise, the maximum allowed page size is 100.
+   * Default is 100 if empty or a number < 1 is specified.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The desired job attributes returned for jobs in the
+   * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+   * specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The enum numeric value on the wire for jobView. + */ + int getJobViewValue(); + /** + * + * + *
+   * The desired job attributes returned for jobs in the
+   * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is
+   * specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 5; + * + * @return The jobView. + */ + com.google.cloud.talent.v4.JobView getJobView(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponse.java new file mode 100644 index 00000000..adc3d074 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponse.java @@ -0,0 +1,1455 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * List jobs response.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListJobsResponse} + */ +public final class ListJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListJobsResponse) + ListJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListJobsResponse.newBuilder() to construct. + private ListJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListJobsResponse() { + jobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add( + input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + com.google.cloud.talent.v4.ResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.talent.v4.ResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListJobsResponse.class, + com.google.cloud.talent.v4.ListJobsResponse.Builder.class); + } + + public static final int JOBS_FIELD_NUMBER = 1; + private java.util.List jobs_; + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + @java.lang.Override + public java.util.List getJobsList() { + return jobs_; + } + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + @java.lang.Override + public java.util.List getJobsOrBuilderList() { + return jobs_; + } + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + @java.lang.Override + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + return jobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < jobs_.size(); i++) { + output.writeMessage(1, jobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListJobsResponse other = + (com.google.cloud.talent.v4.ListJobsResponse) obj; + + if (!getJobsList().equals(other.getJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List jobs response.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListJobsResponse) + com.google.cloud.talent.v4.ListJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListJobsResponse.class, + com.google.cloud.talent.v4.ListJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobsBuilder_.clear(); + } + nextPageToken_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_ListJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsResponse build() { + com.google.cloud.talent.v4.ListJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsResponse buildPartial() { + com.google.cloud.talent.v4.ListJobsResponse result = + new com.google.cloud.talent.v4.ListJobsResponse(this); + int from_bitField0_ = bitField0_; + if (jobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + } else { + result.jobs_ = jobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListJobsResponse) { + return mergeFrom((com.google.cloud.talent.v4.ListJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListJobsResponse other) { + if (other == com.google.cloud.talent.v4.ListJobsResponse.getDefaultInstance()) return this; + if (jobsBuilder_ == null) { + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + } else { + if (!other.jobs_.isEmpty()) { + if (jobsBuilder_.isEmpty()) { + jobsBuilder_.dispose(); + jobsBuilder_ = null; + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + jobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobsFieldBuilder() + : null; + } else { + jobsBuilder_.addAllMessages(other.jobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List jobs_ = + java.util.Collections.emptyList(); + + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobsBuilder_; + + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public java.util.List getJobsList() { + if (jobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobs_); + } else { + return jobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public int getJobsCount() { + if (jobsBuilder_ == null) { + return jobs_.size(); + } else { + return jobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public com.google.cloud.talent.v4.Job getJobs(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + } else { + jobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder setJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.set(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder addJobs(com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + } else { + jobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(index, value); + onChanged(); + } else { + jobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder addJobs(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder addJobs(int index, com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder addAllJobs(java.lang.Iterable values) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); + onChanged(); + } else { + jobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder clearJobs() { + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public Builder removeJobs(int index) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.remove(index); + onChanged(); + } else { + jobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public com.google.cloud.talent.v4.Job.Builder getJobsBuilder(int index) { + return getJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public java.util.List + getJobsOrBuilderList() { + if (jobsBuilder_ != null) { + return jobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobs_); + } + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder() { + return getJobsFieldBuilder().addBuilder(com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public com.google.cloud.talent.v4.Job.Builder addJobsBuilder(int index) { + return getJobsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Job.getDefaultInstance()); + } + /** + * + * + *
+     * The Jobs for a given company.
+     * The maximum number of items returned is based on the limit field
+     * provided in the request.
+     * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + public java.util.List getJobsBuilderList() { + return getJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobsFieldBuilder() { + if (jobsBuilder_ == null) { + jobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + jobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobs_ = null; + } + return jobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata( + com.google.cloud.talent.v4.ResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder mergeMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.talent.v4.ResponseMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListJobsResponse) + private static final com.google.cloud.talent.v4.ListJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListJobsResponse(); + } + + public static com.google.cloud.talent.v4.ListJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponseOrBuilder.java new file mode 100644 index 00000000..e352eb1e --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponseOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface ListJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + java.util.List getJobsList(); + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + com.google.cloud.talent.v4.Job getJobs(int index); + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + int getJobsCount(); + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + java.util.List getJobsOrBuilderList(); + /** + * + * + *
+   * The Jobs for a given company.
+   * The maximum number of items returned is based on the limit field
+   * provided in the request.
+   * 
+ * + * repeated .google.cloud.talent.v4.Job jobs = 1; + */ + com.google.cloud.talent.v4.JobOrBuilder getJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + com.google.cloud.talent.v4.ResponseMetadata getMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequest.java new file mode 100644 index 00000000..650af788 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequest.java @@ -0,0 +1,935 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * List tenants for which the client has ACL visibility.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListTenantsRequest} + */ +public final class ListTenantsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListTenantsRequest) + ListTenantsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTenantsRequest.newBuilder() to construct. + private ListTenantsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTenantsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTenantsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTenantsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListTenantsRequest.class, + com.google.cloud.talent.v4.ListTenantsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The maximum number of tenants to be returned, at most 100.
+   * Default is 100 if a non-positive number is provided.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListTenantsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListTenantsRequest other = + (com.google.cloud.talent.v4.ListTenantsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListTenantsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List tenants for which the client has ACL visibility.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListTenantsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListTenantsRequest) + com.google.cloud.talent.v4.ListTenantsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListTenantsRequest.class, + com.google.cloud.talent.v4.ListTenantsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListTenantsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListTenantsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsRequest build() { + com.google.cloud.talent.v4.ListTenantsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsRequest buildPartial() { + com.google.cloud.talent.v4.ListTenantsRequest result = + new com.google.cloud.talent.v4.ListTenantsRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListTenantsRequest) { + return mergeFrom((com.google.cloud.talent.v4.ListTenantsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListTenantsRequest other) { + if (other == com.google.cloud.talent.v4.ListTenantsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListTenantsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListTenantsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the project under which the tenant is created.
+     * The format is "projects/{project_id}", for example,
+     * "projects/foo".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The starting indicator from which to return results.
+     * 
+ * + * string page_token = 2; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of tenants to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of tenants to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of tenants to be returned, at most 100.
+     * Default is 100 if a non-positive number is provided.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListTenantsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListTenantsRequest) + private static final com.google.cloud.talent.v4.ListTenantsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListTenantsRequest(); + } + + public static com.google.cloud.talent.v4.ListTenantsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTenantsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTenantsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequestOrBuilder.java new file mode 100644 index 00000000..b0e0d61f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface ListTenantsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListTenantsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the project under which the tenant is created.
+   * The format is "projects/{project_id}", for example,
+   * "projects/foo".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The starting indicator from which to return results.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The maximum number of tenants to be returned, at most 100.
+   * Default is 100 if a non-positive number is provided.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponse.java new file mode 100644 index 00000000..bd5c1229 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponse.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The List tenants response object.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListTenantsResponse} + */ +public final class ListTenantsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ListTenantsResponse) + ListTenantsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTenantsResponse.newBuilder() to construct. + private ListTenantsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTenantsResponse() { + tenants_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTenantsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTenantsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tenants_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tenants_.add( + input.readMessage(com.google.cloud.talent.v4.Tenant.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + com.google.cloud.talent.v4.ResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.talent.v4.ResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tenants_ = java.util.Collections.unmodifiableList(tenants_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListTenantsResponse.class, + com.google.cloud.talent.v4.ListTenantsResponse.Builder.class); + } + + public static final int TENANTS_FIELD_NUMBER = 1; + private java.util.List tenants_; + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + @java.lang.Override + public java.util.List getTenantsList() { + return tenants_; + } + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + @java.lang.Override + public java.util.List + getTenantsOrBuilderList() { + return tenants_; + } + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + @java.lang.Override + public int getTenantsCount() { + return tenants_.size(); + } + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Tenant getTenants(int index) { + return tenants_.get(index); + } + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.TenantOrBuilder getTenantsOrBuilder(int index) { + return tenants_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tenants_.size(); i++) { + output.writeMessage(1, tenants_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tenants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tenants_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ListTenantsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ListTenantsResponse other = + (com.google.cloud.talent.v4.ListTenantsResponse) obj; + + if (!getTenantsList().equals(other.getTenantsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTenantsCount() > 0) { + hash = (37 * hash) + TENANTS_FIELD_NUMBER; + hash = (53 * hash) + getTenantsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ListTenantsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The List tenants response object.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ListTenantsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ListTenantsResponse) + com.google.cloud.talent.v4.ListTenantsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ListTenantsResponse.class, + com.google.cloud.talent.v4.ListTenantsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ListTenantsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTenantsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (tenantsBuilder_ == null) { + tenants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tenantsBuilder_.clear(); + } + nextPageToken_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_ListTenantsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ListTenantsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsResponse build() { + com.google.cloud.talent.v4.ListTenantsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsResponse buildPartial() { + com.google.cloud.talent.v4.ListTenantsResponse result = + new com.google.cloud.talent.v4.ListTenantsResponse(this); + int from_bitField0_ = bitField0_; + if (tenantsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tenants_ = java.util.Collections.unmodifiableList(tenants_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tenants_ = tenants_; + } else { + result.tenants_ = tenantsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ListTenantsResponse) { + return mergeFrom((com.google.cloud.talent.v4.ListTenantsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ListTenantsResponse other) { + if (other == com.google.cloud.talent.v4.ListTenantsResponse.getDefaultInstance()) return this; + if (tenantsBuilder_ == null) { + if (!other.tenants_.isEmpty()) { + if (tenants_.isEmpty()) { + tenants_ = other.tenants_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTenantsIsMutable(); + tenants_.addAll(other.tenants_); + } + onChanged(); + } + } else { + if (!other.tenants_.isEmpty()) { + if (tenantsBuilder_.isEmpty()) { + tenantsBuilder_.dispose(); + tenantsBuilder_ = null; + tenants_ = other.tenants_; + bitField0_ = (bitField0_ & ~0x00000001); + tenantsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTenantsFieldBuilder() + : null; + } else { + tenantsBuilder_.addAllMessages(other.tenants_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ListTenantsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ListTenantsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List tenants_ = + java.util.Collections.emptyList(); + + private void ensureTenantsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tenants_ = new java.util.ArrayList(tenants_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + tenantsBuilder_; + + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public java.util.List getTenantsList() { + if (tenantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tenants_); + } else { + return tenantsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public int getTenantsCount() { + if (tenantsBuilder_ == null) { + return tenants_.size(); + } else { + return tenantsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public com.google.cloud.talent.v4.Tenant getTenants(int index) { + if (tenantsBuilder_ == null) { + return tenants_.get(index); + } else { + return tenantsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder setTenants(int index, com.google.cloud.talent.v4.Tenant value) { + if (tenantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTenantsIsMutable(); + tenants_.set(index, value); + onChanged(); + } else { + tenantsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder setTenants( + int index, com.google.cloud.talent.v4.Tenant.Builder builderForValue) { + if (tenantsBuilder_ == null) { + ensureTenantsIsMutable(); + tenants_.set(index, builderForValue.build()); + onChanged(); + } else { + tenantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder addTenants(com.google.cloud.talent.v4.Tenant value) { + if (tenantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTenantsIsMutable(); + tenants_.add(value); + onChanged(); + } else { + tenantsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder addTenants(int index, com.google.cloud.talent.v4.Tenant value) { + if (tenantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTenantsIsMutable(); + tenants_.add(index, value); + onChanged(); + } else { + tenantsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder addTenants(com.google.cloud.talent.v4.Tenant.Builder builderForValue) { + if (tenantsBuilder_ == null) { + ensureTenantsIsMutable(); + tenants_.add(builderForValue.build()); + onChanged(); + } else { + tenantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder addTenants( + int index, com.google.cloud.talent.v4.Tenant.Builder builderForValue) { + if (tenantsBuilder_ == null) { + ensureTenantsIsMutable(); + tenants_.add(index, builderForValue.build()); + onChanged(); + } else { + tenantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder addAllTenants( + java.lang.Iterable values) { + if (tenantsBuilder_ == null) { + ensureTenantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tenants_); + onChanged(); + } else { + tenantsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder clearTenants() { + if (tenantsBuilder_ == null) { + tenants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tenantsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public Builder removeTenants(int index) { + if (tenantsBuilder_ == null) { + ensureTenantsIsMutable(); + tenants_.remove(index); + onChanged(); + } else { + tenantsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public com.google.cloud.talent.v4.Tenant.Builder getTenantsBuilder(int index) { + return getTenantsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public com.google.cloud.talent.v4.TenantOrBuilder getTenantsOrBuilder(int index) { + if (tenantsBuilder_ == null) { + return tenants_.get(index); + } else { + return tenantsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public java.util.List + getTenantsOrBuilderList() { + if (tenantsBuilder_ != null) { + return tenantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tenants_); + } + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public com.google.cloud.talent.v4.Tenant.Builder addTenantsBuilder() { + return getTenantsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.Tenant.getDefaultInstance()); + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public com.google.cloud.talent.v4.Tenant.Builder addTenantsBuilder(int index) { + return getTenantsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Tenant.getDefaultInstance()); + } + /** + * + * + *
+     * Tenants for the current client.
+     * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + public java.util.List getTenantsBuilderList() { + return getTenantsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + getTenantsFieldBuilder() { + if (tenantsBuilder_ == null) { + tenantsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder>( + tenants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tenants_ = null; + } + return tenantsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder setMetadata( + com.google.cloud.talent.v4.ResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder mergeMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.talent.v4.ResponseMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ListTenantsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ListTenantsResponse) + private static final com.google.cloud.talent.v4.ListTenantsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ListTenantsResponse(); + } + + public static com.google.cloud.talent.v4.ListTenantsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTenantsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTenantsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ListTenantsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponseOrBuilder.java new file mode 100644 index 00000000..0cc6d727 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponseOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface ListTenantsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ListTenantsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + java.util.List getTenantsList(); + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + com.google.cloud.talent.v4.Tenant getTenants(int index); + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + int getTenantsCount(); + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + java.util.List getTenantsOrBuilderList(); + /** + * + * + *
+   * Tenants for the current client.
+   * 
+ * + * repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + com.google.cloud.talent.v4.TenantOrBuilder getTenantsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * + * @return The metadata. + */ + com.google.cloud.talent.v4.ResponseMetadata getMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Location.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Location.java new file mode 100644 index 00000000..acc89f2f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Location.java @@ -0,0 +1,1665 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * A resource that represents a location with full geographic information.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Location} + */ +public final class Location extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Location) + LocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Location() { + locationType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Location( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + locationType_ = rawValue; + break; + } + case 18: + { + com.google.type.PostalAddress.Builder subBuilder = null; + if (postalAddress_ != null) { + subBuilder = postalAddress_.toBuilder(); + } + postalAddress_ = + input.readMessage(com.google.type.PostalAddress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(postalAddress_); + postalAddress_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + case 33: + { + radiusMiles_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Location.class, + com.google.cloud.talent.v4.Location.Builder.class); + } + + /** + * + * + *
+   * An enum which represents the type of a location.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.Location.LocationType} + */ + public enum LocationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value if the type isn't specified.
+     * 
+ * + * LOCATION_TYPE_UNSPECIFIED = 0; + */ + LOCATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A country level location.
+     * 
+ * + * COUNTRY = 1; + */ + COUNTRY(1), + /** + * + * + *
+     * A state or equivalent level location.
+     * 
+ * + * ADMINISTRATIVE_AREA = 2; + */ + ADMINISTRATIVE_AREA(2), + /** + * + * + *
+     * A county or equivalent level location.
+     * 
+ * + * SUB_ADMINISTRATIVE_AREA = 3; + */ + SUB_ADMINISTRATIVE_AREA(3), + /** + * + * + *
+     * A city or equivalent level location.
+     * 
+ * + * LOCALITY = 4; + */ + LOCALITY(4), + /** + * + * + *
+     * A postal code level location.
+     * 
+ * + * POSTAL_CODE = 5; + */ + POSTAL_CODE(5), + /** + * + * + *
+     * A sublocality is a subdivision of a locality, for example a city borough,
+     * ward, or arrondissement. Sublocalities are usually recognized by a local
+     * political authority. For example, Manhattan and Brooklyn are recognized
+     * as boroughs by the City of New York, and are therefore modeled as
+     * sublocalities.
+     * 
+ * + * SUB_LOCALITY = 6; + */ + SUB_LOCALITY(6), + /** + * + * + *
+     * A district or equivalent level location.
+     * 
+ * + * SUB_LOCALITY_1 = 7; + */ + SUB_LOCALITY_1(7), + /** + * + * + *
+     * A smaller district or equivalent level display.
+     * 
+ * + * SUB_LOCALITY_2 = 8; + */ + SUB_LOCALITY_2(8), + /** + * + * + *
+     * A neighborhood level location.
+     * 
+ * + * NEIGHBORHOOD = 9; + */ + NEIGHBORHOOD(9), + /** + * + * + *
+     * A street address level location.
+     * 
+ * + * STREET_ADDRESS = 10; + */ + STREET_ADDRESS(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value if the type isn't specified.
+     * 
+ * + * LOCATION_TYPE_UNSPECIFIED = 0; + */ + public static final int LOCATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A country level location.
+     * 
+ * + * COUNTRY = 1; + */ + public static final int COUNTRY_VALUE = 1; + /** + * + * + *
+     * A state or equivalent level location.
+     * 
+ * + * ADMINISTRATIVE_AREA = 2; + */ + public static final int ADMINISTRATIVE_AREA_VALUE = 2; + /** + * + * + *
+     * A county or equivalent level location.
+     * 
+ * + * SUB_ADMINISTRATIVE_AREA = 3; + */ + public static final int SUB_ADMINISTRATIVE_AREA_VALUE = 3; + /** + * + * + *
+     * A city or equivalent level location.
+     * 
+ * + * LOCALITY = 4; + */ + public static final int LOCALITY_VALUE = 4; + /** + * + * + *
+     * A postal code level location.
+     * 
+ * + * POSTAL_CODE = 5; + */ + public static final int POSTAL_CODE_VALUE = 5; + /** + * + * + *
+     * A sublocality is a subdivision of a locality, for example a city borough,
+     * ward, or arrondissement. Sublocalities are usually recognized by a local
+     * political authority. For example, Manhattan and Brooklyn are recognized
+     * as boroughs by the City of New York, and are therefore modeled as
+     * sublocalities.
+     * 
+ * + * SUB_LOCALITY = 6; + */ + public static final int SUB_LOCALITY_VALUE = 6; + /** + * + * + *
+     * A district or equivalent level location.
+     * 
+ * + * SUB_LOCALITY_1 = 7; + */ + public static final int SUB_LOCALITY_1_VALUE = 7; + /** + * + * + *
+     * A smaller district or equivalent level display.
+     * 
+ * + * SUB_LOCALITY_2 = 8; + */ + public static final int SUB_LOCALITY_2_VALUE = 8; + /** + * + * + *
+     * A neighborhood level location.
+     * 
+ * + * NEIGHBORHOOD = 9; + */ + public static final int NEIGHBORHOOD_VALUE = 9; + /** + * + * + *
+     * A street address level location.
+     * 
+ * + * STREET_ADDRESS = 10; + */ + public static final int STREET_ADDRESS_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LocationType forNumber(int value) { + switch (value) { + case 0: + return LOCATION_TYPE_UNSPECIFIED; + case 1: + return COUNTRY; + case 2: + return ADMINISTRATIVE_AREA; + case 3: + return SUB_ADMINISTRATIVE_AREA; + case 4: + return LOCALITY; + case 5: + return POSTAL_CODE; + case 6: + return SUB_LOCALITY; + case 7: + return SUB_LOCALITY_1; + case 8: + return SUB_LOCALITY_2; + case 9: + return NEIGHBORHOOD; + case 10: + return STREET_ADDRESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LocationType findValueByNumber(int number) { + return LocationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.Location.getDescriptor().getEnumTypes().get(0); + } + + private static final LocationType[] VALUES = values(); + + public static LocationType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LocationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.Location.LocationType) + } + + public static final int LOCATION_TYPE_FIELD_NUMBER = 1; + private int locationType_; + /** + * + * + *
+   * The type of a location, which corresponds to the address lines field of
+   * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+   * "Downtown, Atlanta, GA, USA" has a type of
+   * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+   * and "Kansas City, KS, USA" has a type of
+   * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+   * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The enum numeric value on the wire for locationType. + */ + @java.lang.Override + public int getLocationTypeValue() { + return locationType_; + } + /** + * + * + *
+   * The type of a location, which corresponds to the address lines field of
+   * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+   * "Downtown, Atlanta, GA, USA" has a type of
+   * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+   * and "Kansas City, KS, USA" has a type of
+   * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+   * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The locationType. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location.LocationType getLocationType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.Location.LocationType result = + com.google.cloud.talent.v4.Location.LocationType.valueOf(locationType_); + return result == null ? com.google.cloud.talent.v4.Location.LocationType.UNRECOGNIZED : result; + } + + public static final int POSTAL_ADDRESS_FIELD_NUMBER = 2; + private com.google.type.PostalAddress postalAddress_; + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return Whether the postalAddress field is set. + */ + @java.lang.Override + public boolean hasPostalAddress() { + return postalAddress_ != null; + } + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return The postalAddress. + */ + @java.lang.Override + public com.google.type.PostalAddress getPostalAddress() { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + return getPostalAddress(); + } + + public static final int LAT_LNG_FIELD_NUMBER = 3; + private com.google.type.LatLng latLng_; + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + public static final int RADIUS_MILES_FIELD_NUMBER = 4; + private double radiusMiles_; + /** + * + * + *
+   * Radius in miles of the job location. This value is derived from the
+   * location bounding box in which a circle with the specified radius
+   * centered from [google.type.LatLng][google.type.LatLng] covers the area
+   * associated with the job location. For example, currently, "Mountain View,
+   * CA, USA" has a radius of 6.17 miles.
+   * 
+ * + * double radius_miles = 4; + * + * @return The radiusMiles. + */ + @java.lang.Override + public double getRadiusMiles() { + return radiusMiles_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (locationType_ + != com.google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, locationType_); + } + if (postalAddress_ != null) { + output.writeMessage(2, getPostalAddress()); + } + if (latLng_ != null) { + output.writeMessage(3, getLatLng()); + } + if (radiusMiles_ != 0D) { + output.writeDouble(4, radiusMiles_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationType_ + != com.google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, locationType_); + } + if (postalAddress_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPostalAddress()); + } + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatLng()); + } + if (radiusMiles_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, radiusMiles_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Location)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Location other = (com.google.cloud.talent.v4.Location) obj; + + if (locationType_ != other.locationType_) return false; + if (hasPostalAddress() != other.hasPostalAddress()) return false; + if (hasPostalAddress()) { + if (!getPostalAddress().equals(other.getPostalAddress())) return false; + } + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng().equals(other.getLatLng())) return false; + } + if (java.lang.Double.doubleToLongBits(getRadiusMiles()) + != java.lang.Double.doubleToLongBits(other.getRadiusMiles())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + locationType_; + if (hasPostalAddress()) { + hash = (37 * hash) + POSTAL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPostalAddress().hashCode(); + } + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (37 * hash) + RADIUS_MILES_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRadiusMiles())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Location parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Location parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Location parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that represents a location with full geographic information.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Location} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Location) + com.google.cloud.talent.v4.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Location.class, + com.google.cloud.talent.v4.Location.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Location.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + locationType_ = 0; + + if (postalAddressBuilder_ == null) { + postalAddress_ = null; + } else { + postalAddress_ = null; + postalAddressBuilder_ = null; + } + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + radiusMiles_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_Location_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Location getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Location.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Location build() { + com.google.cloud.talent.v4.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Location buildPartial() { + com.google.cloud.talent.v4.Location result = new com.google.cloud.talent.v4.Location(this); + result.locationType_ = locationType_; + if (postalAddressBuilder_ == null) { + result.postalAddress_ = postalAddress_; + } else { + result.postalAddress_ = postalAddressBuilder_.build(); + } + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + result.radiusMiles_ = radiusMiles_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Location) { + return mergeFrom((com.google.cloud.talent.v4.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Location other) { + if (other == com.google.cloud.talent.v4.Location.getDefaultInstance()) return this; + if (other.locationType_ != 0) { + setLocationTypeValue(other.getLocationTypeValue()); + } + if (other.hasPostalAddress()) { + mergePostalAddress(other.getPostalAddress()); + } + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + if (other.getRadiusMiles() != 0D) { + setRadiusMiles(other.getRadiusMiles()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Location parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int locationType_ = 0; + /** + * + * + *
+     * The type of a location, which corresponds to the address lines field of
+     * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+     * "Downtown, Atlanta, GA, USA" has a type of
+     * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+     * and "Kansas City, KS, USA" has a type of
+     * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+     * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The enum numeric value on the wire for locationType. + */ + @java.lang.Override + public int getLocationTypeValue() { + return locationType_; + } + /** + * + * + *
+     * The type of a location, which corresponds to the address lines field of
+     * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+     * "Downtown, Atlanta, GA, USA" has a type of
+     * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+     * and "Kansas City, KS, USA" has a type of
+     * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+     * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @param value The enum numeric value on the wire for locationType to set. + * @return This builder for chaining. + */ + public Builder setLocationTypeValue(int value) { + + locationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of a location, which corresponds to the address lines field of
+     * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+     * "Downtown, Atlanta, GA, USA" has a type of
+     * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+     * and "Kansas City, KS, USA" has a type of
+     * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+     * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The locationType. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location.LocationType getLocationType() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.Location.LocationType result = + com.google.cloud.talent.v4.Location.LocationType.valueOf(locationType_); + return result == null + ? com.google.cloud.talent.v4.Location.LocationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of a location, which corresponds to the address lines field of
+     * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+     * "Downtown, Atlanta, GA, USA" has a type of
+     * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+     * and "Kansas City, KS, USA" has a type of
+     * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+     * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @param value The locationType to set. + * @return This builder for chaining. + */ + public Builder setLocationType(com.google.cloud.talent.v4.Location.LocationType value) { + if (value == null) { + throw new NullPointerException(); + } + + locationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of a location, which corresponds to the address lines field of
+     * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+     * "Downtown, Atlanta, GA, USA" has a type of
+     * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+     * and "Kansas City, KS, USA" has a type of
+     * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+     * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocationType() { + + locationType_ = 0; + onChanged(); + return this; + } + + private com.google.type.PostalAddress postalAddress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + postalAddressBuilder_; + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return Whether the postalAddress field is set. + */ + public boolean hasPostalAddress() { + return postalAddressBuilder_ != null || postalAddress_ != null; + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return The postalAddress. + */ + public com.google.type.PostalAddress getPostalAddress() { + if (postalAddressBuilder_ == null) { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } else { + return postalAddressBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public Builder setPostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postalAddress_ = value; + onChanged(); + } else { + postalAddressBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public Builder setPostalAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (postalAddressBuilder_ == null) { + postalAddress_ = builderForValue.build(); + onChanged(); + } else { + postalAddressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public Builder mergePostalAddress(com.google.type.PostalAddress value) { + if (postalAddressBuilder_ == null) { + if (postalAddress_ != null) { + postalAddress_ = + com.google.type.PostalAddress.newBuilder(postalAddress_) + .mergeFrom(value) + .buildPartial(); + } else { + postalAddress_ = value; + } + onChanged(); + } else { + postalAddressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public Builder clearPostalAddress() { + if (postalAddressBuilder_ == null) { + postalAddress_ = null; + onChanged(); + } else { + postalAddress_ = null; + postalAddressBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public com.google.type.PostalAddress.Builder getPostalAddressBuilder() { + + onChanged(); + return getPostalAddressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { + if (postalAddressBuilder_ != null) { + return postalAddressBuilder_.getMessageOrBuilder(); + } else { + return postalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : postalAddress_; + } + } + /** + * + * + *
+     * Postal address of the location that includes human readable information,
+     * such as postal delivery and payments addresses. Given a postal address,
+     * a postal service can deliver items to a premises, P.O. Box, or other
+     * delivery location.
+     * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + getPostalAddressFieldBuilder() { + if (postalAddressBuilder_ == null) { + postalAddressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + getPostalAddress(), getParentForChildren(), isClean()); + postalAddress_ = null; + } + return postalAddressBuilder_; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + latLngBuilder_; + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + * + * + *
+     * An object representing a latitude/longitude pair.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLatLng(), getParentForChildren(), isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + + private double radiusMiles_; + /** + * + * + *
+     * Radius in miles of the job location. This value is derived from the
+     * location bounding box in which a circle with the specified radius
+     * centered from [google.type.LatLng][google.type.LatLng] covers the area
+     * associated with the job location. For example, currently, "Mountain View,
+     * CA, USA" has a radius of 6.17 miles.
+     * 
+ * + * double radius_miles = 4; + * + * @return The radiusMiles. + */ + @java.lang.Override + public double getRadiusMiles() { + return radiusMiles_; + } + /** + * + * + *
+     * Radius in miles of the job location. This value is derived from the
+     * location bounding box in which a circle with the specified radius
+     * centered from [google.type.LatLng][google.type.LatLng] covers the area
+     * associated with the job location. For example, currently, "Mountain View,
+     * CA, USA" has a radius of 6.17 miles.
+     * 
+ * + * double radius_miles = 4; + * + * @param value The radiusMiles to set. + * @return This builder for chaining. + */ + public Builder setRadiusMiles(double value) { + + radiusMiles_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Radius in miles of the job location. This value is derived from the
+     * location bounding box in which a circle with the specified radius
+     * centered from [google.type.LatLng][google.type.LatLng] covers the area
+     * associated with the job location. For example, currently, "Mountain View,
+     * CA, USA" has a radius of 6.17 miles.
+     * 
+ * + * double radius_miles = 4; + * + * @return This builder for chaining. + */ + public Builder clearRadiusMiles() { + + radiusMiles_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Location) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Location) + private static final com.google.cloud.talent.v4.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Location(); + } + + public static com.google.cloud.talent.v4.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Location(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilter.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilter.java new file mode 100644 index 00000000..ab6cfd27 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilter.java @@ -0,0 +1,1707 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Geographic region of the search.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.LocationFilter} + */ +public final class LocationFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.LocationFilter) + LocationFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationFilter.newBuilder() to construct. + private LocationFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationFilter() { + address_ = ""; + regionCode_ = ""; + telecommutePreference_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LocationFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + address_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + case 26: + { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + case 33: + { + distanceInMiles_ = input.readDouble(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + telecommutePreference_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_LocationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_LocationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.LocationFilter.class, + com.google.cloud.talent.v4.LocationFilter.Builder.class); + } + + /** + * + * + *
+   * Specify whether to include telecommute jobs.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.LocationFilter.TelecommutePreference} + */ + public enum TelecommutePreference implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value if the telecommute preference isn't specified.
+     * 
+ * + * TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + */ + TELECOMMUTE_PREFERENCE_UNSPECIFIED(0), + /** + * + * + *
+     * Exclude telecommute jobs.
+     * 
+ * + * TELECOMMUTE_EXCLUDED = 1; + */ + TELECOMMUTE_EXCLUDED(1), + /** + * + * + *
+     * Allow telecommute jobs.
+     * 
+ * + * TELECOMMUTE_ALLOWED = 2; + */ + TELECOMMUTE_ALLOWED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value if the telecommute preference isn't specified.
+     * 
+ * + * TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + */ + public static final int TELECOMMUTE_PREFERENCE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Exclude telecommute jobs.
+     * 
+ * + * TELECOMMUTE_EXCLUDED = 1; + */ + public static final int TELECOMMUTE_EXCLUDED_VALUE = 1; + /** + * + * + *
+     * Allow telecommute jobs.
+     * 
+ * + * TELECOMMUTE_ALLOWED = 2; + */ + public static final int TELECOMMUTE_ALLOWED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TelecommutePreference valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TelecommutePreference forNumber(int value) { + switch (value) { + case 0: + return TELECOMMUTE_PREFERENCE_UNSPECIFIED; + case 1: + return TELECOMMUTE_EXCLUDED; + case 2: + return TELECOMMUTE_ALLOWED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TelecommutePreference findValueByNumber(int number) { + return TelecommutePreference.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.LocationFilter.getDescriptor().getEnumTypes().get(0); + } + + private static final TelecommutePreference[] VALUES = values(); + + public static TelecommutePreference valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TelecommutePreference(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.LocationFilter.TelecommutePreference) + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + * + * + *
+   * The address name, such as "Mountain View" or "Bay Area".
+   * 
+ * + * string address = 1; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * The address name, such as "Mountain View" or "Bay Area".
+   * 
+ * + * string address = 1; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object regionCode_; + /** + * + * + *
+   * CLDR region code of the country/region of the address. This is used
+   * to address ambiguity of the user-input location, for example, "Liverpool"
+   * against "Liverpool, NY, US" or "Liverpool, UK".
+   * Set this field to bias location resolution toward a specific country
+   * or territory. If this field is not set, application behavior is biased
+   * toward the United States by default.
+   * See
+   * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+   * for details. Example: "CH" for Switzerland.
+   * 
+ * + * string region_code = 2; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * CLDR region code of the country/region of the address. This is used
+   * to address ambiguity of the user-input location, for example, "Liverpool"
+   * against "Liverpool, NY, US" or "Liverpool, UK".
+   * Set this field to bias location resolution toward a specific country
+   * or territory. If this field is not set, application behavior is biased
+   * toward the United States by default.
+   * See
+   * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+   * for details. Example: "CH" for Switzerland.
+   * 
+ * + * string region_code = 2; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAT_LNG_FIELD_NUMBER = 3; + private com.google.type.LatLng latLng_; + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + public static final int DISTANCE_IN_MILES_FIELD_NUMBER = 4; + private double distanceInMiles_; + /** + * + * + *
+   * The distance_in_miles is applied when the location being searched for is
+   * identified as a city or smaller. This field is ignored if the location
+   * being searched for is a state or larger.
+   * 
+ * + * double distance_in_miles = 4; + * + * @return The distanceInMiles. + */ + @java.lang.Override + public double getDistanceInMiles() { + return distanceInMiles_; + } + + public static final int TELECOMMUTE_PREFERENCE_FIELD_NUMBER = 5; + private int telecommutePreference_; + /** + * + * + *
+   * Allows the client to return jobs without a
+   * set location, specifically, telecommuting jobs (telecommuting is considered
+   * by the service as a special location.
+   * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+   * if a job permits telecommuting. If this field is set to
+   * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+   * telecommuting jobs are searched, and
+   * [address][google.cloud.talent.v4.LocationFilter.address] and
+   * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+   * not set or set to
+   * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+   * telecommute job are not searched.
+   * This filter can be used by itself to search exclusively for telecommuting
+   * jobs, or it can be combined with another location
+   * filter to search for a combination of job locations,
+   * such as "Mountain View" or "telecommuting" jobs. However, when used in
+   * combination with other location filters, telecommuting jobs can be
+   * treated as less relevant than other jobs in the search response.
+   * This field is only used for job search requests.
+   * 
+ * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The enum numeric value on the wire for telecommutePreference. + */ + @java.lang.Override + public int getTelecommutePreferenceValue() { + return telecommutePreference_; + } + /** + * + * + *
+   * Allows the client to return jobs without a
+   * set location, specifically, telecommuting jobs (telecommuting is considered
+   * by the service as a special location.
+   * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+   * if a job permits telecommuting. If this field is set to
+   * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+   * telecommuting jobs are searched, and
+   * [address][google.cloud.talent.v4.LocationFilter.address] and
+   * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+   * not set or set to
+   * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+   * telecommute job are not searched.
+   * This filter can be used by itself to search exclusively for telecommuting
+   * jobs, or it can be combined with another location
+   * filter to search for a combination of job locations,
+   * such as "Mountain View" or "telecommuting" jobs. However, when used in
+   * combination with other location filters, telecommuting jobs can be
+   * treated as less relevant than other jobs in the search response.
+   * This field is only used for job search requests.
+   * 
+ * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The telecommutePreference. + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter.TelecommutePreference + getTelecommutePreference() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference result = + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference.valueOf( + telecommutePreference_); + return result == null + ? com.google.cloud.talent.v4.LocationFilter.TelecommutePreference.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!getRegionCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); + } + if (latLng_ != null) { + output.writeMessage(3, getLatLng()); + } + if (distanceInMiles_ != 0D) { + output.writeDouble(4, distanceInMiles_); + } + if (telecommutePreference_ + != com.google.cloud.talent.v4.LocationFilter.TelecommutePreference + .TELECOMMUTE_PREFERENCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, telecommutePreference_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!getRegionCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); + } + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatLng()); + } + if (distanceInMiles_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, distanceInMiles_); + } + if (telecommutePreference_ + != com.google.cloud.talent.v4.LocationFilter.TelecommutePreference + .TELECOMMUTE_PREFERENCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, telecommutePreference_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.LocationFilter)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.LocationFilter other = + (com.google.cloud.talent.v4.LocationFilter) obj; + + if (!getAddress().equals(other.getAddress())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng().equals(other.getLatLng())) return false; + } + if (java.lang.Double.doubleToLongBits(getDistanceInMiles()) + != java.lang.Double.doubleToLongBits(other.getDistanceInMiles())) return false; + if (telecommutePreference_ != other.telecommutePreference_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (37 * hash) + DISTANCE_IN_MILES_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDistanceInMiles())); + hash = (37 * hash) + TELECOMMUTE_PREFERENCE_FIELD_NUMBER; + hash = (53 * hash) + telecommutePreference_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.LocationFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.LocationFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.LocationFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.LocationFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Geographic region of the search.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.LocationFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.LocationFilter) + com.google.cloud.talent.v4.LocationFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_LocationFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_LocationFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.LocationFilter.class, + com.google.cloud.talent.v4.LocationFilter.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.LocationFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + regionCode_ = ""; + + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + distanceInMiles_ = 0D; + + telecommutePreference_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.FiltersProto + .internal_static_google_cloud_talent_v4_LocationFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter getDefaultInstanceForType() { + return com.google.cloud.talent.v4.LocationFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter build() { + com.google.cloud.talent.v4.LocationFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter buildPartial() { + com.google.cloud.talent.v4.LocationFilter result = + new com.google.cloud.talent.v4.LocationFilter(this); + result.address_ = address_; + result.regionCode_ = regionCode_; + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + result.distanceInMiles_ = distanceInMiles_; + result.telecommutePreference_ = telecommutePreference_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.LocationFilter) { + return mergeFrom((com.google.cloud.talent.v4.LocationFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.LocationFilter other) { + if (other == com.google.cloud.talent.v4.LocationFilter.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + onChanged(); + } + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + if (other.getDistanceInMiles() != 0D) { + setDistanceInMiles(other.getDistanceInMiles()); + } + if (other.telecommutePreference_ != 0) { + setTelecommutePreferenceValue(other.getTelecommutePreferenceValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.LocationFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.LocationFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * The address name, such as "Mountain View" or "Bay Area".
+     * 
+ * + * string address = 1; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The address name, such as "Mountain View" or "Bay Area".
+     * 
+ * + * string address = 1; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The address name, such as "Mountain View" or "Bay Area".
+     * 
+ * + * string address = 1; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The address name, such as "Mountain View" or "Bay Area".
+     * 
+ * + * string address = 1; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The address name, such as "Mountain View" or "Bay Area".
+     * 
+ * + * string address = 1; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * CLDR region code of the country/region of the address. This is used
+     * to address ambiguity of the user-input location, for example, "Liverpool"
+     * against "Liverpool, NY, US" or "Liverpool, UK".
+     * Set this field to bias location resolution toward a specific country
+     * or territory. If this field is not set, application behavior is biased
+     * toward the United States by default.
+     * See
+     * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+     * for details. Example: "CH" for Switzerland.
+     * 
+ * + * string region_code = 2; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CLDR region code of the country/region of the address. This is used
+     * to address ambiguity of the user-input location, for example, "Liverpool"
+     * against "Liverpool, NY, US" or "Liverpool, UK".
+     * Set this field to bias location resolution toward a specific country
+     * or territory. If this field is not set, application behavior is biased
+     * toward the United States by default.
+     * See
+     * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+     * for details. Example: "CH" for Switzerland.
+     * 
+ * + * string region_code = 2; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CLDR region code of the country/region of the address. This is used
+     * to address ambiguity of the user-input location, for example, "Liverpool"
+     * against "Liverpool, NY, US" or "Liverpool, UK".
+     * Set this field to bias location resolution toward a specific country
+     * or territory. If this field is not set, application behavior is biased
+     * toward the United States by default.
+     * See
+     * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+     * for details. Example: "CH" for Switzerland.
+     * 
+ * + * string region_code = 2; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * CLDR region code of the country/region of the address. This is used
+     * to address ambiguity of the user-input location, for example, "Liverpool"
+     * against "Liverpool, NY, US" or "Liverpool, UK".
+     * Set this field to bias location resolution toward a specific country
+     * or territory. If this field is not set, application behavior is biased
+     * toward the United States by default.
+     * See
+     * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+     * for details. Example: "CH" for Switzerland.
+     * 
+ * + * string region_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * CLDR region code of the country/region of the address. This is used
+     * to address ambiguity of the user-input location, for example, "Liverpool"
+     * against "Liverpool, NY, US" or "Liverpool, UK".
+     * Set this field to bias location resolution toward a specific country
+     * or territory. If this field is not set, application behavior is biased
+     * toward the United States by default.
+     * See
+     * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+     * for details. Example: "CH" for Switzerland.
+     * 
+ * + * string region_code = 2; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = value; + onChanged(); + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + latLngBuilder_; + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + * + * + *
+     * The latitude and longitude of the geographic center to search from. This
+     * field is ignored if `address` is provided.
+     * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLatLng(), getParentForChildren(), isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + + private double distanceInMiles_; + /** + * + * + *
+     * The distance_in_miles is applied when the location being searched for is
+     * identified as a city or smaller. This field is ignored if the location
+     * being searched for is a state or larger.
+     * 
+ * + * double distance_in_miles = 4; + * + * @return The distanceInMiles. + */ + @java.lang.Override + public double getDistanceInMiles() { + return distanceInMiles_; + } + /** + * + * + *
+     * The distance_in_miles is applied when the location being searched for is
+     * identified as a city or smaller. This field is ignored if the location
+     * being searched for is a state or larger.
+     * 
+ * + * double distance_in_miles = 4; + * + * @param value The distanceInMiles to set. + * @return This builder for chaining. + */ + public Builder setDistanceInMiles(double value) { + + distanceInMiles_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The distance_in_miles is applied when the location being searched for is
+     * identified as a city or smaller. This field is ignored if the location
+     * being searched for is a state or larger.
+     * 
+ * + * double distance_in_miles = 4; + * + * @return This builder for chaining. + */ + public Builder clearDistanceInMiles() { + + distanceInMiles_ = 0D; + onChanged(); + return this; + } + + private int telecommutePreference_ = 0; + /** + * + * + *
+     * Allows the client to return jobs without a
+     * set location, specifically, telecommuting jobs (telecommuting is considered
+     * by the service as a special location.
+     * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+     * if a job permits telecommuting. If this field is set to
+     * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+     * telecommuting jobs are searched, and
+     * [address][google.cloud.talent.v4.LocationFilter.address] and
+     * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+     * not set or set to
+     * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+     * telecommute job are not searched.
+     * This filter can be used by itself to search exclusively for telecommuting
+     * jobs, or it can be combined with another location
+     * filter to search for a combination of job locations,
+     * such as "Mountain View" or "telecommuting" jobs. However, when used in
+     * combination with other location filters, telecommuting jobs can be
+     * treated as less relevant than other jobs in the search response.
+     * This field is only used for job search requests.
+     * 
+ * + * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The enum numeric value on the wire for telecommutePreference. + */ + @java.lang.Override + public int getTelecommutePreferenceValue() { + return telecommutePreference_; + } + /** + * + * + *
+     * Allows the client to return jobs without a
+     * set location, specifically, telecommuting jobs (telecommuting is considered
+     * by the service as a special location.
+     * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+     * if a job permits telecommuting. If this field is set to
+     * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+     * telecommuting jobs are searched, and
+     * [address][google.cloud.talent.v4.LocationFilter.address] and
+     * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+     * not set or set to
+     * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+     * telecommute job are not searched.
+     * This filter can be used by itself to search exclusively for telecommuting
+     * jobs, or it can be combined with another location
+     * filter to search for a combination of job locations,
+     * such as "Mountain View" or "telecommuting" jobs. However, when used in
+     * combination with other location filters, telecommuting jobs can be
+     * treated as less relevant than other jobs in the search response.
+     * This field is only used for job search requests.
+     * 
+ * + * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @param value The enum numeric value on the wire for telecommutePreference to set. + * @return This builder for chaining. + */ + public Builder setTelecommutePreferenceValue(int value) { + + telecommutePreference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Allows the client to return jobs without a
+     * set location, specifically, telecommuting jobs (telecommuting is considered
+     * by the service as a special location.
+     * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+     * if a job permits telecommuting. If this field is set to
+     * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+     * telecommuting jobs are searched, and
+     * [address][google.cloud.talent.v4.LocationFilter.address] and
+     * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+     * not set or set to
+     * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+     * telecommute job are not searched.
+     * This filter can be used by itself to search exclusively for telecommuting
+     * jobs, or it can be combined with another location
+     * filter to search for a combination of job locations,
+     * such as "Mountain View" or "telecommuting" jobs. However, when used in
+     * combination with other location filters, telecommuting jobs can be
+     * treated as less relevant than other jobs in the search response.
+     * This field is only used for job search requests.
+     * 
+ * + * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The telecommutePreference. + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter.TelecommutePreference + getTelecommutePreference() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference result = + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference.valueOf( + telecommutePreference_); + return result == null + ? com.google.cloud.talent.v4.LocationFilter.TelecommutePreference.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Allows the client to return jobs without a
+     * set location, specifically, telecommuting jobs (telecommuting is considered
+     * by the service as a special location.
+     * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+     * if a job permits telecommuting. If this field is set to
+     * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+     * telecommuting jobs are searched, and
+     * [address][google.cloud.talent.v4.LocationFilter.address] and
+     * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+     * not set or set to
+     * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+     * telecommute job are not searched.
+     * This filter can be used by itself to search exclusively for telecommuting
+     * jobs, or it can be combined with another location
+     * filter to search for a combination of job locations,
+     * such as "Mountain View" or "telecommuting" jobs. However, when used in
+     * combination with other location filters, telecommuting jobs can be
+     * treated as less relevant than other jobs in the search response.
+     * This field is only used for job search requests.
+     * 
+ * + * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @param value The telecommutePreference to set. + * @return This builder for chaining. + */ + public Builder setTelecommutePreference( + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference value) { + if (value == null) { + throw new NullPointerException(); + } + + telecommutePreference_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Allows the client to return jobs without a
+     * set location, specifically, telecommuting jobs (telecommuting is considered
+     * by the service as a special location.
+     * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+     * if a job permits telecommuting. If this field is set to
+     * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+     * telecommuting jobs are searched, and
+     * [address][google.cloud.talent.v4.LocationFilter.address] and
+     * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+     * not set or set to
+     * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+     * telecommute job are not searched.
+     * This filter can be used by itself to search exclusively for telecommuting
+     * jobs, or it can be combined with another location
+     * filter to search for a combination of job locations,
+     * such as "Mountain View" or "telecommuting" jobs. However, when used in
+     * combination with other location filters, telecommuting jobs can be
+     * treated as less relevant than other jobs in the search response.
+     * This field is only used for job search requests.
+     * 
+ * + * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearTelecommutePreference() { + + telecommutePreference_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.LocationFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.LocationFilter) + private static final com.google.cloud.talent.v4.LocationFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.LocationFilter(); + } + + public static com.google.cloud.talent.v4.LocationFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.LocationFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilterOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilterOrBuilder.java new file mode 100644 index 00000000..69c66fc4 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilterOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/filters.proto + +package com.google.cloud.talent.v4; + +public interface LocationFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.LocationFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The address name, such as "Mountain View" or "Bay Area".
+   * 
+ * + * string address = 1; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * The address name, such as "Mountain View" or "Bay Area".
+   * 
+ * + * string address = 1; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * CLDR region code of the country/region of the address. This is used
+   * to address ambiguity of the user-input location, for example, "Liverpool"
+   * against "Liverpool, NY, US" or "Liverpool, UK".
+   * Set this field to bias location resolution toward a specific country
+   * or territory. If this field is not set, application behavior is biased
+   * toward the United States by default.
+   * See
+   * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+   * for details. Example: "CH" for Switzerland.
+   * 
+ * + * string region_code = 2; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * CLDR region code of the country/region of the address. This is used
+   * to address ambiguity of the user-input location, for example, "Liverpool"
+   * against "Liverpool, NY, US" or "Liverpool, UK".
+   * Set this field to bias location resolution toward a specific country
+   * or territory. If this field is not set, application behavior is biased
+   * toward the United States by default.
+   * See
+   * https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
+   * for details. Example: "CH" for Switzerland.
+   * 
+ * + * string region_code = 2; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + * + * + *
+   * The latitude and longitude of the geographic center to search from. This
+   * field is ignored if `address` is provided.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); + + /** + * + * + *
+   * The distance_in_miles is applied when the location being searched for is
+   * identified as a city or smaller. This field is ignored if the location
+   * being searched for is a state or larger.
+   * 
+ * + * double distance_in_miles = 4; + * + * @return The distanceInMiles. + */ + double getDistanceInMiles(); + + /** + * + * + *
+   * Allows the client to return jobs without a
+   * set location, specifically, telecommuting jobs (telecommuting is considered
+   * by the service as a special location.
+   * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+   * if a job permits telecommuting. If this field is set to
+   * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+   * telecommuting jobs are searched, and
+   * [address][google.cloud.talent.v4.LocationFilter.address] and
+   * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+   * not set or set to
+   * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+   * telecommute job are not searched.
+   * This filter can be used by itself to search exclusively for telecommuting
+   * jobs, or it can be combined with another location
+   * filter to search for a combination of job locations,
+   * such as "Mountain View" or "telecommuting" jobs. However, when used in
+   * combination with other location filters, telecommuting jobs can be
+   * treated as less relevant than other jobs in the search response.
+   * This field is only used for job search requests.
+   * 
+ * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The enum numeric value on the wire for telecommutePreference. + */ + int getTelecommutePreferenceValue(); + /** + * + * + *
+   * Allows the client to return jobs without a
+   * set location, specifically, telecommuting jobs (telecommuting is considered
+   * by the service as a special location.
+   * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates
+   * if a job permits telecommuting. If this field is set to
+   * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED],
+   * telecommuting jobs are searched, and
+   * [address][google.cloud.talent.v4.LocationFilter.address] and
+   * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If
+   * not set or set to
+   * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED],
+   * telecommute job are not searched.
+   * This filter can be used by itself to search exclusively for telecommuting
+   * jobs, or it can be combined with another location
+   * filter to search for a combination of job locations,
+   * such as "Mountain View" or "telecommuting" jobs. However, when used in
+   * combination with other location filters, telecommuting jobs can be
+   * treated as less relevant than other jobs in the search response.
+   * This field is only used for job search requests.
+   * 
+ * + * .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * + * + * @return The telecommutePreference. + */ + com.google.cloud.talent.v4.LocationFilter.TelecommutePreference getTelecommutePreference(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationOrBuilder.java new file mode 100644 index 00000000..b55a6e81 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface LocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of a location, which corresponds to the address lines field of
+   * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+   * "Downtown, Atlanta, GA, USA" has a type of
+   * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+   * and "Kansas City, KS, USA" has a type of
+   * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+   * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The enum numeric value on the wire for locationType. + */ + int getLocationTypeValue(); + /** + * + * + *
+   * The type of a location, which corresponds to the address lines field of
+   * [google.type.PostalAddress][google.type.PostalAddress]. For example,
+   * "Downtown, Atlanta, GA, USA" has a type of
+   * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
+   * and "Kansas City, KS, USA" has a type of
+   * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
+   * 
+ * + * .google.cloud.talent.v4.Location.LocationType location_type = 1; + * + * @return The locationType. + */ + com.google.cloud.talent.v4.Location.LocationType getLocationType(); + + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return Whether the postalAddress field is set. + */ + boolean hasPostalAddress(); + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + * + * @return The postalAddress. + */ + com.google.type.PostalAddress getPostalAddress(); + /** + * + * + *
+   * Postal address of the location that includes human readable information,
+   * such as postal delivery and payments addresses. Given a postal address,
+   * a postal service can deliver items to a premises, P.O. Box, or other
+   * delivery location.
+   * 
+ * + * .google.type.PostalAddress postal_address = 2; + */ + com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder(); + + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + * + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + * + * + *
+   * An object representing a latitude/longitude pair.
+   * 
+ * + * .google.type.LatLng lat_lng = 3; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); + + /** + * + * + *
+   * Radius in miles of the job location. This value is derived from the
+   * location bounding box in which a circle with the specified radius
+   * centered from [google.type.LatLng][google.type.LatLng] covers the area
+   * associated with the job location. For example, currently, "Mountain View,
+   * CA, USA" has a radius of 6.17 miles.
+   * 
+ * + * double radius_miles = 4; + * + * @return The radiusMiles. + */ + double getRadiusMiles(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/PostingRegion.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/PostingRegion.java new file mode 100644 index 00000000..91ef1a8e --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/PostingRegion.java @@ -0,0 +1,232 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * An enum that represents the job posting region. In most cases, job postings
+ * don't need to specify a region. If a region is given, jobs are
+ * eligible for searches in the specified region.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.PostingRegion} + */ +public enum PostingRegion implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * If the region is unspecified, the job is only returned if it
+   * matches the [LocationFilter][google.cloud.talent.v4.LocationFilter].
+   * 
+ * + * POSTING_REGION_UNSPECIFIED = 0; + */ + POSTING_REGION_UNSPECIFIED(0), + /** + * + * + *
+   * In addition to exact location matching, job posting is returned when the
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] in the search query
+   * is in the same administrative area as the returned job posting. For
+   * example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's
+   * returned if [LocationFilter][google.cloud.talent.v4.LocationFilter] has
+   * "Mountain View".
+   * Administrative area refers to top-level administrative subdivision of this
+   * country. For example, US state, IT region, UK constituent nation and
+   * JP prefecture.
+   * 
+ * + * ADMINISTRATIVE_AREA = 1; + */ + ADMINISTRATIVE_AREA(1), + /** + * + * + *
+   * In addition to exact location matching, job is returned when
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] in search query is
+   * in the same country as this job. For example, if a `NATION_WIDE` job is
+   * posted in "USA", it's returned if
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] has 'Mountain
+   * View'.
+   * 
+ * + * NATION = 2; + */ + NATION(2), + /** + * + * + *
+   * Job allows employees to work remotely (telecommute).
+   * If locations are provided with this value, the job is
+   * considered as having a location, but telecommuting is allowed.
+   * 
+ * + * TELECOMMUTE = 3; + */ + TELECOMMUTE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * If the region is unspecified, the job is only returned if it
+   * matches the [LocationFilter][google.cloud.talent.v4.LocationFilter].
+   * 
+ * + * POSTING_REGION_UNSPECIFIED = 0; + */ + public static final int POSTING_REGION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * In addition to exact location matching, job posting is returned when the
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] in the search query
+   * is in the same administrative area as the returned job posting. For
+   * example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's
+   * returned if [LocationFilter][google.cloud.talent.v4.LocationFilter] has
+   * "Mountain View".
+   * Administrative area refers to top-level administrative subdivision of this
+   * country. For example, US state, IT region, UK constituent nation and
+   * JP prefecture.
+   * 
+ * + * ADMINISTRATIVE_AREA = 1; + */ + public static final int ADMINISTRATIVE_AREA_VALUE = 1; + /** + * + * + *
+   * In addition to exact location matching, job is returned when
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] in search query is
+   * in the same country as this job. For example, if a `NATION_WIDE` job is
+   * posted in "USA", it's returned if
+   * [LocationFilter][google.cloud.talent.v4.LocationFilter] has 'Mountain
+   * View'.
+   * 
+ * + * NATION = 2; + */ + public static final int NATION_VALUE = 2; + /** + * + * + *
+   * Job allows employees to work remotely (telecommute).
+   * If locations are provided with this value, the job is
+   * considered as having a location, but telecommuting is allowed.
+   * 
+ * + * TELECOMMUTE = 3; + */ + public static final int TELECOMMUTE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PostingRegion valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PostingRegion forNumber(int value) { + switch (value) { + case 0: + return POSTING_REGION_UNSPECIFIED; + case 1: + return ADMINISTRATIVE_AREA; + case 2: + return NATION; + case 3: + return TELECOMMUTE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PostingRegion findValueByNumber(int number) { + return PostingRegion.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(6); + } + + private static final PostingRegion[] VALUES = values(); + + public static PostingRegion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PostingRegion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.PostingRegion) +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ProjectName.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ProjectName.java new file mode 100644 index 00000000..f4ea772e --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ProjectName.java @@ -0,0 +1,162 @@ +/* + * Copyright 2020 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ProjectName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + + private volatile Map fieldValuesMap; + + private final String project; + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project); + } + + /** Builder for ProjectName. */ + public static class Builder { + + private String project; + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder() {} + + private Builder(ProjectName projectName) { + project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ProjectName) { + ProjectName that = (ProjectName) o; + return (this.project.equals(that.project)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadata.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadata.java new file mode 100644 index 00000000..065a318c --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadata.java @@ -0,0 +1,1631 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Meta information related to the job searcher or entity
+ * conducting the job search. This information is used to improve the
+ * performance of the service.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.RequestMetadata} + */ +public final class RequestMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.RequestMetadata) + RequestMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestMetadata.newBuilder() to construct. + private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestMetadata() { + domain_ = ""; + sessionId_ = ""; + userId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RequestMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sessionId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + userId_ = s; + break; + } + case 32: + { + allowMissingIds_ = input.readBool(); + break; + } + case 42: + { + com.google.cloud.talent.v4.DeviceInfo.Builder subBuilder = null; + if (deviceInfo_ != null) { + subBuilder = deviceInfo_.toBuilder(); + } + deviceInfo_ = + input.readMessage( + com.google.cloud.talent.v4.DeviceInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deviceInfo_); + deviceInfo_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.RequestMetadata.class, + com.google.cloud.talent.v4.RequestMetadata.Builder.class); + } + + public static final int DOMAIN_FIELD_NUMBER = 1; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * The client-defined scope or source of the service call, which typically
+   * is the domain on
+   * which the service has been implemented and is currently being run.
+   * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+   * job board www.foo.com and career site www.bar.com, then this field is
+   * set to "foo.com" for use on the job board, and "bar.com" for use on the
+   * career site.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique domain.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string domain = 1; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * The client-defined scope or source of the service call, which typically
+   * is the domain on
+   * which the service has been implemented and is currently being run.
+   * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+   * job board www.foo.com and career site www.bar.com, then this field is
+   * set to "foo.com" for use on the job board, and "bar.com" for use on the
+   * career site.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique domain.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object sessionId_; + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique session identification string. A session is defined as the
+   * duration of an end user's interaction with the service over a certain
+   * period.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique session ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string session_id = 2; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique session identification string. A session is defined as the
+   * duration of an end user's interaction with the service over a certain
+   * period.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique session ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string session_id = 2; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object userId_; + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique user identification string, as determined by the client.
+   * To have the strongest positive impact on search quality
+   * make sure the client-level is unique.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique user ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string user_id = 3; + * + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique user identification string, as determined by the client.
+   * To have the strongest positive impact on search quality
+   * make sure the client-level is unique.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique user ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string user_id = 3; + * + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_IDS_FIELD_NUMBER = 4; + private boolean allowMissingIds_; + /** + * + * + *
+   * Only set when any of
+   * [domain][google.cloud.talent.v4.RequestMetadata.domain],
+   * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+   * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available
+   * for some reason. It is highly recommended not to set this field and provide
+   * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain],
+   * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+   * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best
+   * service experience.
+   * 
+ * + * bool allow_missing_ids = 4; + * + * @return The allowMissingIds. + */ + @java.lang.Override + public boolean getAllowMissingIds() { + return allowMissingIds_; + } + + public static final int DEVICE_INFO_FIELD_NUMBER = 5; + private com.google.cloud.talent.v4.DeviceInfo deviceInfo_; + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return Whether the deviceInfo field is set. + */ + @java.lang.Override + public boolean hasDeviceInfo() { + return deviceInfo_ != null; + } + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return The deviceInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfo getDeviceInfo() { + return deviceInfo_ == null + ? com.google.cloud.talent.v4.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + @java.lang.Override + public com.google.cloud.talent.v4.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + return getDeviceInfo(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domain_); + } + if (!getSessionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sessionId_); + } + if (!getUserIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userId_); + } + if (allowMissingIds_ != false) { + output.writeBool(4, allowMissingIds_); + } + if (deviceInfo_ != null) { + output.writeMessage(5, getDeviceInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domain_); + } + if (!getSessionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sessionId_); + } + if (!getUserIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userId_); + } + if (allowMissingIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissingIds_); + } + if (deviceInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeviceInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.RequestMetadata)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.RequestMetadata other = + (com.google.cloud.talent.v4.RequestMetadata) obj; + + if (!getDomain().equals(other.getDomain())) return false; + if (!getSessionId().equals(other.getSessionId())) return false; + if (!getUserId().equals(other.getUserId())) return false; + if (getAllowMissingIds() != other.getAllowMissingIds()) return false; + if (hasDeviceInfo() != other.hasDeviceInfo()) return false; + if (hasDeviceInfo()) { + if (!getDeviceInfo().equals(other.getDeviceInfo())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissingIds()); + if (hasDeviceInfo()) { + hash = (37 * hash) + DEVICE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDeviceInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.RequestMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Meta information related to the job searcher or entity
+   * conducting the job search. This information is used to improve the
+   * performance of the service.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.RequestMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.RequestMetadata) + com.google.cloud.talent.v4.RequestMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.RequestMetadata.class, + com.google.cloud.talent.v4.RequestMetadata.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.RequestMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + domain_ = ""; + + sessionId_ = ""; + + userId_ = ""; + + allowMissingIds_ = false; + + if (deviceInfoBuilder_ == null) { + deviceInfo_ = null; + } else { + deviceInfo_ = null; + deviceInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_RequestMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadata getDefaultInstanceForType() { + return com.google.cloud.talent.v4.RequestMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadata build() { + com.google.cloud.talent.v4.RequestMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadata buildPartial() { + com.google.cloud.talent.v4.RequestMetadata result = + new com.google.cloud.talent.v4.RequestMetadata(this); + result.domain_ = domain_; + result.sessionId_ = sessionId_; + result.userId_ = userId_; + result.allowMissingIds_ = allowMissingIds_; + if (deviceInfoBuilder_ == null) { + result.deviceInfo_ = deviceInfo_; + } else { + result.deviceInfo_ = deviceInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.RequestMetadata) { + return mergeFrom((com.google.cloud.talent.v4.RequestMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.RequestMetadata other) { + if (other == com.google.cloud.talent.v4.RequestMetadata.getDefaultInstance()) return this; + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + onChanged(); + } + if (other.getAllowMissingIds() != false) { + setAllowMissingIds(other.getAllowMissingIds()); + } + if (other.hasDeviceInfo()) { + mergeDeviceInfo(other.getDeviceInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.RequestMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.RequestMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * The client-defined scope or source of the service call, which typically
+     * is the domain on
+     * which the service has been implemented and is currently being run.
+     * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+     * job board www.foo.com and career site www.bar.com, then this field is
+     * set to "foo.com" for use on the job board, and "bar.com" for use on the
+     * career site.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique domain.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string domain = 1; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * The client-defined scope or source of the service call, which typically
+     * is the domain on
+     * which the service has been implemented and is currently being run.
+     * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+     * job board www.foo.com and career site www.bar.com, then this field is
+     * set to "foo.com" for use on the job board, and "bar.com" for use on the
+     * career site.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique domain.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * The client-defined scope or source of the service call, which typically
+     * is the domain on
+     * which the service has been implemented and is currently being run.
+     * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+     * job board www.foo.com and career site www.bar.com, then this field is
+     * set to "foo.com" for use on the job board, and "bar.com" for use on the
+     * career site.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique domain.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string domain = 1; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * The client-defined scope or source of the service call, which typically
+     * is the domain on
+     * which the service has been implemented and is currently being run.
+     * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+     * job board www.foo.com and career site www.bar.com, then this field is
+     * set to "foo.com" for use on the job board, and "bar.com" for use on the
+     * career site.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique domain.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string domain = 1; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * The client-defined scope or source of the service call, which typically
+     * is the domain on
+     * which the service has been implemented and is currently being run.
+     * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+     * job board www.foo.com and career site www.bar.com, then this field is
+     * set to "foo.com" for use on the job board, and "bar.com" for use on the
+     * career site.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique domain.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string domain = 1; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique session identification string. A session is defined as the
+     * duration of an end user's interaction with the service over a certain
+     * period.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique session ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string session_id = 2; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique session identification string. A session is defined as the
+     * duration of an end user's interaction with the service over a certain
+     * period.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique session ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string session_id = 2; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique session identification string. A session is defined as the
+     * duration of an end user's interaction with the service over a certain
+     * period.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique session ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string session_id = 2; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sessionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique session identification string. A session is defined as the
+     * duration of an end user's interaction with the service over a certain
+     * period.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique session ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string session_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + + sessionId_ = getDefaultInstance().getSessionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique session identification string. A session is defined as the
+     * duration of an end user's interaction with the service over a certain
+     * period.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique session ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string session_id = 2; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sessionId_ = value; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique user identification string, as determined by the client.
+     * To have the strongest positive impact on search quality
+     * make sure the client-level is unique.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique user ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string user_id = 3; + * + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique user identification string, as determined by the client.
+     * To have the strongest positive impact on search quality
+     * make sure the client-level is unique.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique user ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string user_id = 3; + * + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique user identification string, as determined by the client.
+     * To have the strongest positive impact on search quality
+     * make sure the client-level is unique.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique user ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string user_id = 3; + * + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique user identification string, as determined by the client.
+     * To have the strongest positive impact on search quality
+     * make sure the client-level is unique.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique user ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string user_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserId() { + + userId_ = getDefaultInstance().getUserId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required if
+     * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+     * is unset or `false`.
+     * A unique user identification string, as determined by the client.
+     * To have the strongest positive impact on search quality
+     * make sure the client-level is unique.
+     * Obfuscate this field for privacy concerns before
+     * providing it to the service.
+     * Note that any improvements to the model for a particular tenant site rely
+     * on this field being set correctly to a unique user ID.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string user_id = 3; + * + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userId_ = value; + onChanged(); + return this; + } + + private boolean allowMissingIds_; + /** + * + * + *
+     * Only set when any of
+     * [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available
+     * for some reason. It is highly recommended not to set this field and provide
+     * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best
+     * service experience.
+     * 
+ * + * bool allow_missing_ids = 4; + * + * @return The allowMissingIds. + */ + @java.lang.Override + public boolean getAllowMissingIds() { + return allowMissingIds_; + } + /** + * + * + *
+     * Only set when any of
+     * [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available
+     * for some reason. It is highly recommended not to set this field and provide
+     * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best
+     * service experience.
+     * 
+ * + * bool allow_missing_ids = 4; + * + * @param value The allowMissingIds to set. + * @return This builder for chaining. + */ + public Builder setAllowMissingIds(boolean value) { + + allowMissingIds_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Only set when any of
+     * [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available
+     * for some reason. It is highly recommended not to set this field and provide
+     * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain],
+     * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+     * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best
+     * service experience.
+     * 
+ * + * bool allow_missing_ids = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissingIds() { + + allowMissingIds_ = false; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.DeviceInfo deviceInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.DeviceInfo, + com.google.cloud.talent.v4.DeviceInfo.Builder, + com.google.cloud.talent.v4.DeviceInfoOrBuilder> + deviceInfoBuilder_; + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return Whether the deviceInfo field is set. + */ + public boolean hasDeviceInfo() { + return deviceInfoBuilder_ != null || deviceInfo_ != null; + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return The deviceInfo. + */ + public com.google.cloud.talent.v4.DeviceInfo getDeviceInfo() { + if (deviceInfoBuilder_ == null) { + return deviceInfo_ == null + ? com.google.cloud.talent.v4.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } else { + return deviceInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public Builder setDeviceInfo(com.google.cloud.talent.v4.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceInfo_ = value; + onChanged(); + } else { + deviceInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public Builder setDeviceInfo(com.google.cloud.talent.v4.DeviceInfo.Builder builderForValue) { + if (deviceInfoBuilder_ == null) { + deviceInfo_ = builderForValue.build(); + onChanged(); + } else { + deviceInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public Builder mergeDeviceInfo(com.google.cloud.talent.v4.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (deviceInfo_ != null) { + deviceInfo_ = + com.google.cloud.talent.v4.DeviceInfo.newBuilder(deviceInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + deviceInfo_ = value; + } + onChanged(); + } else { + deviceInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public Builder clearDeviceInfo() { + if (deviceInfoBuilder_ == null) { + deviceInfo_ = null; + onChanged(); + } else { + deviceInfo_ = null; + deviceInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public com.google.cloud.talent.v4.DeviceInfo.Builder getDeviceInfoBuilder() { + + onChanged(); + return getDeviceInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + public com.google.cloud.talent.v4.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + if (deviceInfoBuilder_ != null) { + return deviceInfoBuilder_.getMessageOrBuilder(); + } else { + return deviceInfo_ == null + ? com.google.cloud.talent.v4.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } + } + /** + * + * + *
+     * The type of device used by the job seeker at the time of the call to the
+     * service.
+     * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.DeviceInfo, + com.google.cloud.talent.v4.DeviceInfo.Builder, + com.google.cloud.talent.v4.DeviceInfoOrBuilder> + getDeviceInfoFieldBuilder() { + if (deviceInfoBuilder_ == null) { + deviceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.DeviceInfo, + com.google.cloud.talent.v4.DeviceInfo.Builder, + com.google.cloud.talent.v4.DeviceInfoOrBuilder>( + getDeviceInfo(), getParentForChildren(), isClean()); + deviceInfo_ = null; + } + return deviceInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.RequestMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.RequestMetadata) + private static final com.google.cloud.talent.v4.RequestMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.RequestMetadata(); + } + + public static com.google.cloud.talent.v4.RequestMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RequestMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadataOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadataOrBuilder.java new file mode 100644 index 00000000..65aae770 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadataOrBuilder.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface RequestMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.RequestMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * The client-defined scope or source of the service call, which typically
+   * is the domain on
+   * which the service has been implemented and is currently being run.
+   * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+   * job board www.foo.com and career site www.bar.com, then this field is
+   * set to "foo.com" for use on the job board, and "bar.com" for use on the
+   * career site.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique domain.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string domain = 1; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * The client-defined scope or source of the service call, which typically
+   * is the domain on
+   * which the service has been implemented and is currently being run.
+   * For example, if the service is being run by client <em>Foo, Inc.</em>, on
+   * job board www.foo.com and career site www.bar.com, then this field is
+   * set to "foo.com" for use on the job board, and "bar.com" for use on the
+   * career site.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique domain.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique session identification string. A session is defined as the
+   * duration of an end user's interaction with the service over a certain
+   * period.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique session ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string session_id = 2; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique session identification string. A session is defined as the
+   * duration of an end user's interaction with the service over a certain
+   * period.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique session ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string session_id = 2; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique user identification string, as determined by the client.
+   * To have the strongest positive impact on search quality
+   * make sure the client-level is unique.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique user ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string user_id = 3; + * + * @return The userId. + */ + java.lang.String getUserId(); + /** + * + * + *
+   * Required if
+   * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids]
+   * is unset or `false`.
+   * A unique user identification string, as determined by the client.
+   * To have the strongest positive impact on search quality
+   * make sure the client-level is unique.
+   * Obfuscate this field for privacy concerns before
+   * providing it to the service.
+   * Note that any improvements to the model for a particular tenant site rely
+   * on this field being set correctly to a unique user ID.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string user_id = 3; + * + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * + * + *
+   * Only set when any of
+   * [domain][google.cloud.talent.v4.RequestMetadata.domain],
+   * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+   * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available
+   * for some reason. It is highly recommended not to set this field and provide
+   * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain],
+   * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and
+   * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best
+   * service experience.
+   * 
+ * + * bool allow_missing_ids = 4; + * + * @return The allowMissingIds. + */ + boolean getAllowMissingIds(); + + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return Whether the deviceInfo field is set. + */ + boolean hasDeviceInfo(); + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + * + * @return The deviceInfo. + */ + com.google.cloud.talent.v4.DeviceInfo getDeviceInfo(); + /** + * + * + *
+   * The type of device used by the job seeker at the time of the call to the
+   * service.
+   * 
+ * + * .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + com.google.cloud.talent.v4.DeviceInfoOrBuilder getDeviceInfoOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadata.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadata.java new file mode 100644 index 00000000..b6b06889 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadata.java @@ -0,0 +1,641 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Additional information returned to client, such as debugging information.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ResponseMetadata} + */ +public final class ResponseMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.ResponseMetadata) + ResponseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResponseMetadata.newBuilder() to construct. + private ResponseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResponseMetadata() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResponseMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResponseMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_ResponseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_ResponseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ResponseMetadata.class, + com.google.cloud.talent.v4.ResponseMetadata.Builder.class); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * A unique id associated with this call.
+   * This id is logged for tracking purposes.
+   * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique id associated with this call.
+   * This id is logged for tracking purposes.
+   * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.ResponseMetadata)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.ResponseMetadata other = + (com.google.cloud.talent.v4.ResponseMetadata) obj; + + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.ResponseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.ResponseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Additional information returned to client, such as debugging information.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.ResponseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.ResponseMetadata) + com.google.cloud.talent.v4.ResponseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_ResponseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_ResponseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.ResponseMetadata.class, + com.google.cloud.talent.v4.ResponseMetadata.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.ResponseMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_ResponseMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getDefaultInstanceForType() { + return com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata build() { + com.google.cloud.talent.v4.ResponseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata buildPartial() { + com.google.cloud.talent.v4.ResponseMetadata result = + new com.google.cloud.talent.v4.ResponseMetadata(this); + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.ResponseMetadata) { + return mergeFrom((com.google.cloud.talent.v4.ResponseMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.ResponseMetadata other) { + if (other == com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance()) return this; + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.ResponseMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.ResponseMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * A unique id associated with this call.
+     * This id is logged for tracking purposes.
+     * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique id associated with this call.
+     * This id is logged for tracking purposes.
+     * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique id associated with this call.
+     * This id is logged for tracking purposes.
+     * 
+ * + * string request_id = 1; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id associated with this call.
+     * This id is logged for tracking purposes.
+     * 
+ * + * string request_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique id associated with this call.
+     * This id is logged for tracking purposes.
+     * 
+ * + * string request_id = 1; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.ResponseMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.ResponseMetadata) + private static final com.google.cloud.talent.v4.ResponseMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.ResponseMetadata(); + } + + public static com.google.cloud.talent.v4.ResponseMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResponseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResponseMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadataOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadataOrBuilder.java new file mode 100644 index 00000000..b18a8fe5 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadataOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface ResponseMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.ResponseMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A unique id associated with this call.
+   * This id is logged for tracking purposes.
+   * 
+ * + * string request_id = 1; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * A unique id associated with this call.
+   * This id is logged for tracking purposes.
+   * 
+ * + * string request_id = 1; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequest.java new file mode 100644 index 00000000..90b21f02 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequest.java @@ -0,0 +1,7243 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * The Request body of the `SearchJobs` call.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsRequest} + */ +public final class SearchJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SearchJobsRequest) + SearchJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchJobsRequest.newBuilder() to construct. + private SearchJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchJobsRequest() { + parent_ = ""; + searchMode_ = 0; + histogramQueries_ = java.util.Collections.emptyList(); + jobView_ = 0; + pageToken_ = ""; + orderBy_ = ""; + diversificationLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + searchMode_ = rawValue; + break; + } + case 26: + { + com.google.cloud.talent.v4.RequestMetadata.Builder subBuilder = null; + if (requestMetadata_ != null) { + subBuilder = requestMetadata_.toBuilder(); + } + requestMetadata_ = + input.readMessage( + com.google.cloud.talent.v4.RequestMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestMetadata_); + requestMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.talent.v4.JobQuery.Builder subBuilder = null; + if (jobQuery_ != null) { + subBuilder = jobQuery_.toBuilder(); + } + jobQuery_ = + input.readMessage( + com.google.cloud.talent.v4.JobQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobQuery_); + jobQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + enableBroadening_ = input.readBool(); + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + histogramQueries_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + histogramQueries_.add( + input.readMessage( + com.google.cloud.talent.v4.HistogramQuery.parser(), extensionRegistry)); + break; + } + case 64: + { + int rawValue = input.readEnum(); + + jobView_ = rawValue; + break; + } + case 72: + { + offset_ = input.readInt32(); + break; + } + case 80: + { + maxPageSize_ = input.readInt32(); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 104: + { + int rawValue = input.readEnum(); + + diversificationLevel_ = rawValue; + break; + } + case 114: + { + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder subBuilder = + null; + if (customRankingInfo_ != null) { + subBuilder = customRankingInfo_.toBuilder(); + } + customRankingInfo_ = + input.readMessage( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customRankingInfo_); + customRankingInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 128: + { + disableKeywordMatch_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + histogramQueries_ = java.util.Collections.unmodifiableList(histogramQueries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsRequest.class, + com.google.cloud.talent.v4.SearchJobsRequest.Builder.class); + } + + /** + * + * + *
+   * A string-represented enumeration of the job search mode. The service
+   * operate differently for different modes of service.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.SearchJobsRequest.SearchMode} + */ + public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The mode of the search method isn't specified. The default search
+     * behavior is identical to JOB_SEARCH search behavior.
+     * 
+ * + * SEARCH_MODE_UNSPECIFIED = 0; + */ + SEARCH_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * The job search matches against all jobs, and featured jobs
+     * (jobs with promotionValue > 0) are not specially handled.
+     * 
+ * + * JOB_SEARCH = 1; + */ + JOB_SEARCH(1), + /** + * + * + *
+     * The job search matches only against featured jobs (jobs with a
+     * promotionValue > 0). This method doesn't return any jobs having a
+     * promotionValue <= 0. The search results order is determined by the
+     * promotionValue (jobs with a higher promotionValue are returned higher up
+     * in the search results), with relevance being used as a tiebreaker.
+     * 
+ * + * FEATURED_JOB_SEARCH = 2; + */ + FEATURED_JOB_SEARCH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The mode of the search method isn't specified. The default search
+     * behavior is identical to JOB_SEARCH search behavior.
+     * 
+ * + * SEARCH_MODE_UNSPECIFIED = 0; + */ + public static final int SEARCH_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job search matches against all jobs, and featured jobs
+     * (jobs with promotionValue > 0) are not specially handled.
+     * 
+ * + * JOB_SEARCH = 1; + */ + public static final int JOB_SEARCH_VALUE = 1; + /** + * + * + *
+     * The job search matches only against featured jobs (jobs with a
+     * promotionValue > 0). This method doesn't return any jobs having a
+     * promotionValue <= 0. The search results order is determined by the
+     * promotionValue (jobs with a higher promotionValue are returned higher up
+     * in the search results), with relevance being used as a tiebreaker.
+     * 
+ * + * FEATURED_JOB_SEARCH = 2; + */ + public static final int FEATURED_JOB_SEARCH_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SearchMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SearchMode forNumber(int value) { + switch (value) { + case 0: + return SEARCH_MODE_UNSPECIFIED; + case 1: + return JOB_SEARCH; + case 2: + return FEATURED_JOB_SEARCH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SearchMode findValueByNumber(int number) { + return SearchMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.SearchJobsRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final SearchMode[] VALUES = values(); + + public static SearchMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SearchMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.SearchJobsRequest.SearchMode) + } + + /** + * + * + *
+   * Controls whether highly similar jobs are returned next to each other in
+   * the search results. Jobs are identified as highly similar based on
+   * their titles, job categories, and locations. Highly similar results are
+   * clustered so that only one representative job of the cluster is
+   * displayed to the job seeker higher up in the results, with the other jobs
+   * being displayed lower down in the results.
+   * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel} + */ + public enum DiversificationLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The diversification level isn't specified.
+     * 
+ * + * DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + */ + DIVERSIFICATION_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+     * Disables diversification. Jobs that would normally be pushed to the last
+     * page would not have their positions altered. This may result in highly
+     * similar jobs appearing in sequence in the search results.
+     * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+     * Default diversifying behavior. The result list is ordered so that
+     * highly similar results are pushed to the end of the last page of search
+     * results. If you are using pageToken to page through the result set,
+     * latency might be lower but we can't guarantee that all results are
+     * returned. If you are using page offset, latency might be higher but all
+     * results are returned.
+     * 
+ * + * SIMPLE = 2; + */ + SIMPLE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The diversification level isn't specified.
+     * 
+ * + * DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + */ + public static final int DIVERSIFICATION_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Disables diversification. Jobs that would normally be pushed to the last
+     * page would not have their positions altered. This may result in highly
+     * similar jobs appearing in sequence in the search results.
+     * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+     * Default diversifying behavior. The result list is ordered so that
+     * highly similar results are pushed to the end of the last page of search
+     * results. If you are using pageToken to page through the result set,
+     * latency might be lower but we can't guarantee that all results are
+     * returned. If you are using page offset, latency might be higher but all
+     * results are returned.
+     * 
+ * + * SIMPLE = 2; + */ + public static final int SIMPLE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiversificationLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiversificationLevel forNumber(int value) { + switch (value) { + case 0: + return DIVERSIFICATION_LEVEL_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return SIMPLE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiversificationLevel findValueByNumber(int number) { + return DiversificationLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.SearchJobsRequest.getDescriptor().getEnumTypes().get(1); + } + + private static final DiversificationLevel[] VALUES = values(); + + public static DiversificationLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiversificationLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel) + } + + public interface CustomRankingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Controls over how important the score of
+     * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+     * ranking position.
+     * An error is thrown if not specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for importanceLevel. + */ + int getImportanceLevelValue(); + /** + * + * + *
+     * Required. Controls over how important the score of
+     * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+     * ranking position.
+     * An error is thrown if not specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importanceLevel. + */ + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + getImportanceLevel(); + + /** + * + * + *
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
+     * The syntax for this expression is a subset of Google SQL syntax.
+     * Supported operators are: +, -, *, /, where the left and right side of
+     * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+     * integer/double value or an expression that can be evaluated to a number.
+     * Parenthesis are supported to adjust calculation precedence. The
+     * expression must be < 100 characters in length.
+     * The expression is considered invalid for a job if the expression
+     * references custom attributes that are not populated on the job or if the
+     * expression results in a divide by zero. If an expression is invalid for a
+     * job, that job is demoted to the end of the results.
+     * Sample ranking expression
+     * (year + 25) * 0.25 - (freshness / 0.5)
+     * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rankingExpression. + */ + java.lang.String getRankingExpression(); + /** + * + * + *
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
+     * The syntax for this expression is a subset of Google SQL syntax.
+     * Supported operators are: +, -, *, /, where the left and right side of
+     * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+     * integer/double value or an expression that can be evaluated to a number.
+     * Parenthesis are supported to adjust calculation precedence. The
+     * expression must be < 100 characters in length.
+     * The expression is considered invalid for a job if the expression
+     * references custom attributes that are not populated on the job or if the
+     * expression results in a divide by zero. If an expression is invalid for a
+     * job, that job is demoted to the end of the results.
+     * Sample ranking expression
+     * (year + 25) * 0.25 - (freshness / 0.5)
+     * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rankingExpression. + */ + com.google.protobuf.ByteString getRankingExpressionBytes(); + } + /** + * + * + *
+   * Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo} + */ + public static final class CustomRankingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + CustomRankingInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomRankingInfo.newBuilder() to construct. + private CustomRankingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomRankingInfo() { + importanceLevel_ = 0; + rankingExpression_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomRankingInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomRankingInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + importanceLevel_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + rankingExpression_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.class, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder.class); + } + + /** + * + * + *
+     * The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression].
+     * 
+ * + * Protobuf enum {@code + * google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel} + */ + public enum ImportanceLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value if the importance level isn't specified.
+       * 
+ * + * IMPORTANCE_LEVEL_UNSPECIFIED = 0; + */ + IMPORTANCE_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+       * The given ranking expression is of None importance, existing relevance
+       * score (determined by API algorithm) dominates job's final ranking
+       * position.
+       * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+       * The given ranking expression is of Low importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * LOW = 2; + */ + LOW(2), + /** + * + * + *
+       * The given ranking expression is of Mild importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * MILD = 3; + */ + MILD(3), + /** + * + * + *
+       * The given ranking expression is of Medium importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * MEDIUM = 4; + */ + MEDIUM(4), + /** + * + * + *
+       * The given ranking expression is of High importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * HIGH = 5; + */ + HIGH(5), + /** + * + * + *
+       * The given ranking expression is of Extreme importance, and dominates
+       * job's final ranking position with existing relevance
+       * score (determined by API algorithm) ignored.
+       * 
+ * + * EXTREME = 6; + */ + EXTREME(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value if the importance level isn't specified.
+       * 
+ * + * IMPORTANCE_LEVEL_UNSPECIFIED = 0; + */ + public static final int IMPORTANCE_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The given ranking expression is of None importance, existing relevance
+       * score (determined by API algorithm) dominates job's final ranking
+       * position.
+       * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * + * + *
+       * The given ranking expression is of Low importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * LOW = 2; + */ + public static final int LOW_VALUE = 2; + /** + * + * + *
+       * The given ranking expression is of Mild importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * MILD = 3; + */ + public static final int MILD_VALUE = 3; + /** + * + * + *
+       * The given ranking expression is of Medium importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * MEDIUM = 4; + */ + public static final int MEDIUM_VALUE = 4; + /** + * + * + *
+       * The given ranking expression is of High importance in terms of job's
+       * final ranking position compared to existing relevance
+       * score (determined by API algorithm).
+       * 
+ * + * HIGH = 5; + */ + public static final int HIGH_VALUE = 5; + /** + * + * + *
+       * The given ranking expression is of Extreme importance, and dominates
+       * job's final ranking position with existing relevance
+       * score (determined by API algorithm) ignored.
+       * 
+ * + * EXTREME = 6; + */ + public static final int EXTREME_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImportanceLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ImportanceLevel forNumber(int value) { + switch (value) { + case 0: + return IMPORTANCE_LEVEL_UNSPECIFIED; + case 1: + return NONE; + case 2: + return LOW; + case 3: + return MILD; + case 4: + return MEDIUM; + case 5: + return HIGH; + case 6: + return EXTREME; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImportanceLevel findValueByNumber(int number) { + return ImportanceLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ImportanceLevel[] VALUES = values(); + + public static ImportanceLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImportanceLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel) + } + + public static final int IMPORTANCE_LEVEL_FIELD_NUMBER = 1; + private int importanceLevel_; + /** + * + * + *
+     * Required. Controls over how important the score of
+     * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+     * ranking position.
+     * An error is thrown if not specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for importanceLevel. + */ + @java.lang.Override + public int getImportanceLevelValue() { + return importanceLevel_; + } + /** + * + * + *
+     * Required. Controls over how important the score of
+     * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+     * ranking position.
+     * An error is thrown if not specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importanceLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + getImportanceLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel result = + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel.valueOf( + importanceLevel_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + .UNRECOGNIZED + : result; + } + + public static final int RANKING_EXPRESSION_FIELD_NUMBER = 2; + private volatile java.lang.Object rankingExpression_; + /** + * + * + *
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
+     * The syntax for this expression is a subset of Google SQL syntax.
+     * Supported operators are: +, -, *, /, where the left and right side of
+     * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+     * integer/double value or an expression that can be evaluated to a number.
+     * Parenthesis are supported to adjust calculation precedence. The
+     * expression must be < 100 characters in length.
+     * The expression is considered invalid for a job if the expression
+     * references custom attributes that are not populated on the job or if the
+     * expression results in a divide by zero. If an expression is invalid for a
+     * job, that job is demoted to the end of the results.
+     * Sample ranking expression
+     * (year + 25) * 0.25 - (freshness / 0.5)
+     * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rankingExpression. + */ + @java.lang.Override + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingExpression_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm). A combination of the ranking
+     * expression and relevance score is used to determine job's final ranking
+     * position.
+     * The syntax for this expression is a subset of Google SQL syntax.
+     * Supported operators are: +, -, *, /, where the left and right side of
+     * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+     * integer/double value or an expression that can be evaluated to a number.
+     * Parenthesis are supported to adjust calculation precedence. The
+     * expression must be < 100 characters in length.
+     * The expression is considered invalid for a job if the expression
+     * references custom attributes that are not populated on the job or if the
+     * expression results in a divide by zero. If an expression is invalid for a
+     * job, that job is demoted to the end of the results.
+     * Sample ranking expression
+     * (year + 25) * 0.25 - (freshness / 0.5)
+     * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rankingExpression. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (importanceLevel_ + != com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + .IMPORTANCE_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, importanceLevel_); + } + if (!getRankingExpressionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rankingExpression_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (importanceLevel_ + != com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + .IMPORTANCE_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, importanceLevel_); + } + if (!getRankingExpressionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rankingExpression_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo other = + (com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) obj; + + if (importanceLevel_ != other.importanceLevel_) return false; + if (!getRankingExpression().equals(other.getRankingExpression())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMPORTANCE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + importanceLevel_; + hash = (37 * hash) + RANKING_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getRankingExpression().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.class, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + importanceLevel_ = 0; + + rankingExpression_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_CustomRankingInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo + getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo build() { + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo buildPartial() { + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo result = + new com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo(this); + result.importanceLevel_ = importanceLevel_; + result.rankingExpression_ = rankingExpression_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) { + return mergeFrom((com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo other) { + if (other + == com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDefaultInstance()) + return this; + if (other.importanceLevel_ != 0) { + setImportanceLevelValue(other.getImportanceLevelValue()); + } + if (!other.getRankingExpression().isEmpty()) { + rankingExpression_ = other.rankingExpression_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int importanceLevel_ = 0; + /** + * + * + *
+       * Required. Controls over how important the score of
+       * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+       * ranking position.
+       * An error is thrown if not specified.
+       * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for importanceLevel. + */ + @java.lang.Override + public int getImportanceLevelValue() { + return importanceLevel_; + } + /** + * + * + *
+       * Required. Controls over how important the score of
+       * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+       * ranking position.
+       * An error is thrown if not specified.
+       * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for importanceLevel to set. + * @return This builder for chaining. + */ + public Builder setImportanceLevelValue(int value) { + + importanceLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Controls over how important the score of
+       * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+       * ranking position.
+       * An error is thrown if not specified.
+       * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The importanceLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + getImportanceLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel result = + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel.valueOf( + importanceLevel_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. Controls over how important the score of
+       * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+       * ranking position.
+       * An error is thrown if not specified.
+       * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The importanceLevel to set. + * @return This builder for chaining. + */ + public Builder setImportanceLevel( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + importanceLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Controls over how important the score of
+       * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final
+       * ranking position.
+       * An error is thrown if not specified.
+       * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearImportanceLevel() { + + importanceLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object rankingExpression_ = ""; + /** + * + * + *
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
+       * The syntax for this expression is a subset of Google SQL syntax.
+       * Supported operators are: +, -, *, /, where the left and right side of
+       * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+       * integer/double value or an expression that can be evaluated to a number.
+       * Parenthesis are supported to adjust calculation precedence. The
+       * expression must be < 100 characters in length.
+       * The expression is considered invalid for a job if the expression
+       * references custom attributes that are not populated on the job or if the
+       * expression results in a divide by zero. If an expression is invalid for a
+       * job, that job is demoted to the end of the results.
+       * Sample ranking expression
+       * (year + 25) * 0.25 - (freshness / 0.5)
+       * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rankingExpression. + */ + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingExpression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
+       * The syntax for this expression is a subset of Google SQL syntax.
+       * Supported operators are: +, -, *, /, where the left and right side of
+       * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+       * integer/double value or an expression that can be evaluated to a number.
+       * Parenthesis are supported to adjust calculation precedence. The
+       * expression must be < 100 characters in length.
+       * The expression is considered invalid for a job if the expression
+       * references custom attributes that are not populated on the job or if the
+       * expression results in a divide by zero. If an expression is invalid for a
+       * job, that job is demoted to the end of the results.
+       * Sample ranking expression
+       * (year + 25) * 0.25 - (freshness / 0.5)
+       * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rankingExpression. + */ + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
+       * The syntax for this expression is a subset of Google SQL syntax.
+       * Supported operators are: +, -, *, /, where the left and right side of
+       * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+       * integer/double value or an expression that can be evaluated to a number.
+       * Parenthesis are supported to adjust calculation precedence. The
+       * expression must be < 100 characters in length.
+       * The expression is considered invalid for a job if the expression
+       * references custom attributes that are not populated on the job or if the
+       * expression results in a divide by zero. If an expression is invalid for a
+       * job, that job is demoted to the end of the results.
+       * Sample ranking expression
+       * (year + 25) * 0.25 - (freshness / 0.5)
+       * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The rankingExpression to set. + * @return This builder for chaining. + */ + public Builder setRankingExpression(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rankingExpression_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
+       * The syntax for this expression is a subset of Google SQL syntax.
+       * Supported operators are: +, -, *, /, where the left and right side of
+       * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+       * integer/double value or an expression that can be evaluated to a number.
+       * Parenthesis are supported to adjust calculation precedence. The
+       * expression must be < 100 characters in length.
+       * The expression is considered invalid for a job if the expression
+       * references custom attributes that are not populated on the job or if the
+       * expression results in a divide by zero. If an expression is invalid for a
+       * job, that job is demoted to the end of the results.
+       * Sample ranking expression
+       * (year + 25) * 0.25 - (freshness / 0.5)
+       * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRankingExpression() { + + rankingExpression_ = getDefaultInstance().getRankingExpression(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Controls over how job documents get ranked on top of existing relevance
+       * score (determined by API algorithm). A combination of the ranking
+       * expression and relevance score is used to determine job's final ranking
+       * position.
+       * The syntax for this expression is a subset of Google SQL syntax.
+       * Supported operators are: +, -, *, /, where the left and right side of
+       * the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key,
+       * integer/double value or an expression that can be evaluated to a number.
+       * Parenthesis are supported to adjust calculation precedence. The
+       * expression must be < 100 characters in length.
+       * The expression is considered invalid for a job if the expression
+       * references custom attributes that are not populated on the job or if the
+       * expression results in a divide by zero. If an expression is invalid for a
+       * job, that job is demoted to the end of the results.
+       * Sample ranking expression
+       * (year + 25) * 0.25 - (freshness / 0.5)
+       * 
+ * + * string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for rankingExpression to set. + * @return This builder for chaining. + */ + public Builder setRankingExpressionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rankingExpression_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo) + private static final com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo(); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomRankingInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomRankingInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the tenant to search within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the tenant to search within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_MODE_FIELD_NUMBER = 2; + private int searchMode_; + /** + * + * + *
+   * Mode of a search.
+   * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The enum numeric value on the wire for searchMode. + */ + @java.lang.Override + public int getSearchModeValue() { + return searchMode_; + } + /** + * + * + *
+   * Mode of a search.
+   * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The searchMode. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.SearchMode getSearchMode() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.SearchMode result = + com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.valueOf(searchMode_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.UNRECOGNIZED + : result; + } + + public static final int REQUEST_METADATA_FIELD_NUMBER = 3; + private com.google.cloud.talent.v4.RequestMetadata requestMetadata_; + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the requestMetadata field is set. + */ + @java.lang.Override + public boolean hasRequestMetadata() { + return requestMetadata_ != null; + } + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestMetadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadata getRequestMetadata() { + return requestMetadata_ == null + ? com.google.cloud.talent.v4.RequestMetadata.getDefaultInstance() + : requestMetadata_; + } + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { + return getRequestMetadata(); + } + + public static final int JOB_QUERY_FIELD_NUMBER = 4; + private com.google.cloud.talent.v4.JobQuery jobQuery_; + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return Whether the jobQuery field is set. + */ + @java.lang.Override + public boolean hasJobQuery() { + return jobQuery_ != null; + } + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return The jobQuery. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobQuery getJobQuery() { + return jobQuery_ == null ? com.google.cloud.talent.v4.JobQuery.getDefaultInstance() : jobQuery_; + } + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobQueryOrBuilder getJobQueryOrBuilder() { + return getJobQuery(); + } + + public static final int ENABLE_BROADENING_FIELD_NUMBER = 5; + private boolean enableBroadening_; + /** + * + * + *
+   * Controls whether to broaden the search when it produces sparse results.
+   * Broadened queries append results to the end of the matching results
+   * list.
+   * Defaults to false.
+   * 
+ * + * bool enable_broadening = 5; + * + * @return The enableBroadening. + */ + @java.lang.Override + public boolean getEnableBroadening() { + return enableBroadening_; + } + + public static final int HISTOGRAM_QUERIES_FIELD_NUMBER = 7; + private java.util.List histogramQueries_; + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + @java.lang.Override + public java.util.List getHistogramQueriesList() { + return histogramQueries_; + } + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + @java.lang.Override + public java.util.List + getHistogramQueriesOrBuilderList() { + return histogramQueries_; + } + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + @java.lang.Override + public int getHistogramQueriesCount() { + return histogramQueries_.size(); + } + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQuery getHistogramQueries(int index) { + return histogramQueries_.get(index); + } + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryOrBuilder getHistogramQueriesOrBuilder( + int index) { + return histogramQueries_.get(index); + } + + public static final int JOB_VIEW_FIELD_NUMBER = 8; + private int jobView_; + /** + * + * + *
+   * The desired job attributes returned for jobs in the search response.
+   * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The enum numeric value on the wire for jobView. + */ + @java.lang.Override + public int getJobViewValue() { + return jobView_; + } + /** + * + * + *
+   * The desired job attributes returned for jobs in the search response.
+   * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The jobView. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobView getJobView() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobView result = + com.google.cloud.talent.v4.JobView.valueOf(jobView_); + return result == null ? com.google.cloud.talent.v4.JobView.UNRECOGNIZED : result; + } + + public static final int OFFSET_FIELD_NUMBER = 9; + private int offset_; + /** + * + * + *
+   * An integer that specifies the current offset (that is, starting result
+   * location, amongst the jobs deemed by the API as relevant) in search
+   * results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset.
+   * The maximum allowed value is 5000. Otherwise an error is thrown.
+   * For example, 0 means to  return results starting from the first matching
+   * job, and 10 means to return from the 11th job. This can be used for
+   * pagination, (for example, pageSize = 10 and offset = 10 means to return
+   * from the second page).
+   * 
+ * + * int32 offset = 9; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + + public static final int MAX_PAGE_SIZE_FIELD_NUMBER = 10; + private int maxPageSize_; + /** + * + * + *
+   * A limit on the number of jobs returned in the search results.
+   * Increasing this value above the default value of 10 can increase search
+   * response time. The value can be between 1 and 100.
+   * 
+ * + * int32 max_page_size = 10; + * + * @return The maxPageSize. + */ + @java.lang.Override + public int getMaxPageSize() { + return maxPageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 11; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The token specifying the current offset within
+   * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+   * an explanation of how to obtain the next set of query results.
+   * 
+ * + * string page_token = 11; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token specifying the current offset within
+   * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+   * an explanation of how to obtain the next set of query results.
+   * 
+ * + * string page_token = 11; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 12; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * The criteria determining how search results are sorted. Default is
+   * `"relevance desc"`.
+   * Supported options are:
+   * * `"relevance desc"`: By relevance descending, as determined by the API
+   *   algorithms. Relevance thresholding of query results is only available
+   *   with this ordering.
+   * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   descending.
+   * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+   *   descending.
+   * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+   * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+   * * `"annualized_base_compensation"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_base_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"custom_ranking desc"`: By the relevance score adjusted to the
+   *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+   *   factor assigned by
+   *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+   *   order.
+   * * Location sorting: Use the special syntax to order jobs by distance:<br>
+   *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+   *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+   *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+   *   multiple locations. See details below.<br>
+   *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+   *   multiple locations. See details below.<br>
+   *   The string can have a maximum of 256 characters. When multiple distance
+   *   centers are provided, a job that is close to any of the distance centers
+   *   would have a high rank. When a job has multiple locations, the job
+   *   location closest to one of the distance centers will be used. Jobs that
+   *   don't have locations will be ranked at the bottom. Distance is calculated
+   *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+   *   still applied unless explicitly disabled in
+   *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+   * 
+ * + * string order_by = 12; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * The criteria determining how search results are sorted. Default is
+   * `"relevance desc"`.
+   * Supported options are:
+   * * `"relevance desc"`: By relevance descending, as determined by the API
+   *   algorithms. Relevance thresholding of query results is only available
+   *   with this ordering.
+   * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   descending.
+   * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+   *   descending.
+   * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+   * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+   * * `"annualized_base_compensation"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_base_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"custom_ranking desc"`: By the relevance score adjusted to the
+   *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+   *   factor assigned by
+   *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+   *   order.
+   * * Location sorting: Use the special syntax to order jobs by distance:<br>
+   *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+   *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+   *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+   *   multiple locations. See details below.<br>
+   *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+   *   multiple locations. See details below.<br>
+   *   The string can have a maximum of 256 characters. When multiple distance
+   *   centers are provided, a job that is close to any of the distance centers
+   *   would have a high rank. When a job has multiple locations, the job
+   *   location closest to one of the distance centers will be used. Jobs that
+   *   don't have locations will be ranked at the bottom. Distance is calculated
+   *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+   *   still applied unless explicitly disabled in
+   *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+   * 
+ * + * string order_by = 12; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIVERSIFICATION_LEVEL_FIELD_NUMBER = 13; + private int diversificationLevel_; + /** + * + * + *
+   * Controls whether highly similar jobs are returned next to each other in
+   * the search results. Jobs are identified as highly similar based on
+   * their titles, job categories, and locations. Highly similar results are
+   * clustered so that only one representative job of the cluster is
+   * displayed to the job seeker higher up in the results, with the other jobs
+   * being displayed lower down in the results.
+   * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+   * is specified.
+   * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The enum numeric value on the wire for diversificationLevel. + */ + @java.lang.Override + public int getDiversificationLevelValue() { + return diversificationLevel_; + } + /** + * + * + *
+   * Controls whether highly similar jobs are returned next to each other in
+   * the search results. Jobs are identified as highly similar based on
+   * their titles, job categories, and locations. Highly similar results are
+   * clustered so that only one representative job of the cluster is
+   * displayed to the job seeker higher up in the results, with the other jobs
+   * being displayed lower down in the results.
+   * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+   * is specified.
+   * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The diversificationLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel + getDiversificationLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel result = + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.valueOf( + diversificationLevel_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.UNRECOGNIZED + : result; + } + + public static final int CUSTOM_RANKING_INFO_FIELD_NUMBER = 14; + private com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo customRankingInfo_; + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return Whether the customRankingInfo field is set. + */ + @java.lang.Override + public boolean hasCustomRankingInfo() { + return customRankingInfo_ != null; + } + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return The customRankingInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo getCustomRankingInfo() { + return customRankingInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDefaultInstance() + : customRankingInfo_; + } + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder + getCustomRankingInfoOrBuilder() { + return getCustomRankingInfo(); + } + + public static final int DISABLE_KEYWORD_MATCH_FIELD_NUMBER = 16; + private boolean disableKeywordMatch_; + /** + * + * + *
+   * Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
+   * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
+   * keyword match returns jobs that do not match given category filters when
+   * there are matching keywords. For example, for the query "program manager,"
+   * a result is returned even if the job posting has the title "software
+   * developer," which doesn't fall into "program manager" ontology, but does
+   * have "program manager" appearing in its description.
+   * For queries like "cloud" that don't contain title or
+   * location specific ontology, jobs with "cloud" keyword matches are returned
+   * regardless of this flag's value.
+   * Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
+   * company-specific globally matched custom field/attribute string values are
+   * needed. Enabling keyword match improves recall of subsequent search
+   * requests.
+   * Defaults to false.
+   * 
+ * + * bool disable_keyword_match = 16; + * + * @return The disableKeywordMatch. + */ + @java.lang.Override + public boolean getDisableKeywordMatch() { + return disableKeywordMatch_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (searchMode_ + != com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.SEARCH_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, searchMode_); + } + if (requestMetadata_ != null) { + output.writeMessage(3, getRequestMetadata()); + } + if (jobQuery_ != null) { + output.writeMessage(4, getJobQuery()); + } + if (enableBroadening_ != false) { + output.writeBool(5, enableBroadening_); + } + for (int i = 0; i < histogramQueries_.size(); i++) { + output.writeMessage(7, histogramQueries_.get(i)); + } + if (jobView_ != com.google.cloud.talent.v4.JobView.JOB_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(8, jobView_); + } + if (offset_ != 0) { + output.writeInt32(9, offset_); + } + if (maxPageSize_ != 0) { + output.writeInt32(10, maxPageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, pageToken_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, orderBy_); + } + if (diversificationLevel_ + != com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel + .DIVERSIFICATION_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, diversificationLevel_); + } + if (customRankingInfo_ != null) { + output.writeMessage(14, getCustomRankingInfo()); + } + if (disableKeywordMatch_ != false) { + output.writeBool(16, disableKeywordMatch_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (searchMode_ + != com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.SEARCH_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, searchMode_); + } + if (requestMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequestMetadata()); + } + if (jobQuery_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getJobQuery()); + } + if (enableBroadening_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableBroadening_); + } + for (int i = 0; i < histogramQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, histogramQueries_.get(i)); + } + if (jobView_ != com.google.cloud.talent.v4.JobView.JOB_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, jobView_); + } + if (offset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, offset_); + } + if (maxPageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, maxPageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, pageToken_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, orderBy_); + } + if (diversificationLevel_ + != com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel + .DIVERSIFICATION_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, diversificationLevel_); + } + if (customRankingInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCustomRankingInfo()); + } + if (disableKeywordMatch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, disableKeywordMatch_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SearchJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SearchJobsRequest other = + (com.google.cloud.talent.v4.SearchJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (searchMode_ != other.searchMode_) return false; + if (hasRequestMetadata() != other.hasRequestMetadata()) return false; + if (hasRequestMetadata()) { + if (!getRequestMetadata().equals(other.getRequestMetadata())) return false; + } + if (hasJobQuery() != other.hasJobQuery()) return false; + if (hasJobQuery()) { + if (!getJobQuery().equals(other.getJobQuery())) return false; + } + if (getEnableBroadening() != other.getEnableBroadening()) return false; + if (!getHistogramQueriesList().equals(other.getHistogramQueriesList())) return false; + if (jobView_ != other.jobView_) return false; + if (getOffset() != other.getOffset()) return false; + if (getMaxPageSize() != other.getMaxPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (diversificationLevel_ != other.diversificationLevel_) return false; + if (hasCustomRankingInfo() != other.hasCustomRankingInfo()) return false; + if (hasCustomRankingInfo()) { + if (!getCustomRankingInfo().equals(other.getCustomRankingInfo())) return false; + } + if (getDisableKeywordMatch() != other.getDisableKeywordMatch()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SEARCH_MODE_FIELD_NUMBER; + hash = (53 * hash) + searchMode_; + if (hasRequestMetadata()) { + hash = (37 * hash) + REQUEST_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getRequestMetadata().hashCode(); + } + if (hasJobQuery()) { + hash = (37 * hash) + JOB_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getJobQuery().hashCode(); + } + hash = (37 * hash) + ENABLE_BROADENING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableBroadening()); + if (getHistogramQueriesCount() > 0) { + hash = (37 * hash) + HISTOGRAM_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getHistogramQueriesList().hashCode(); + } + hash = (37 * hash) + JOB_VIEW_FIELD_NUMBER; + hash = (53 * hash) + jobView_; + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getOffset(); + hash = (37 * hash) + MAX_PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + DIVERSIFICATION_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + diversificationLevel_; + if (hasCustomRankingInfo()) { + hash = (37 * hash) + CUSTOM_RANKING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCustomRankingInfo().hashCode(); + } + hash = (37 * hash) + DISABLE_KEYWORD_MATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableKeywordMatch()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.SearchJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Request body of the `SearchJobs` call.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SearchJobsRequest) + com.google.cloud.talent.v4.SearchJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsRequest.class, + com.google.cloud.talent.v4.SearchJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SearchJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHistogramQueriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + searchMode_ = 0; + + if (requestMetadataBuilder_ == null) { + requestMetadata_ = null; + } else { + requestMetadata_ = null; + requestMetadataBuilder_ = null; + } + if (jobQueryBuilder_ == null) { + jobQuery_ = null; + } else { + jobQuery_ = null; + jobQueryBuilder_ = null; + } + enableBroadening_ = false; + + if (histogramQueriesBuilder_ == null) { + histogramQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + histogramQueriesBuilder_.clear(); + } + jobView_ = 0; + + offset_ = 0; + + maxPageSize_ = 0; + + pageToken_ = ""; + + orderBy_ = ""; + + diversificationLevel_ = 0; + + if (customRankingInfoBuilder_ == null) { + customRankingInfo_ = null; + } else { + customRankingInfo_ = null; + customRankingInfoBuilder_ = null; + } + disableKeywordMatch_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SearchJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest build() { + com.google.cloud.talent.v4.SearchJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest buildPartial() { + com.google.cloud.talent.v4.SearchJobsRequest result = + new com.google.cloud.talent.v4.SearchJobsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + result.searchMode_ = searchMode_; + if (requestMetadataBuilder_ == null) { + result.requestMetadata_ = requestMetadata_; + } else { + result.requestMetadata_ = requestMetadataBuilder_.build(); + } + if (jobQueryBuilder_ == null) { + result.jobQuery_ = jobQuery_; + } else { + result.jobQuery_ = jobQueryBuilder_.build(); + } + result.enableBroadening_ = enableBroadening_; + if (histogramQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + histogramQueries_ = java.util.Collections.unmodifiableList(histogramQueries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.histogramQueries_ = histogramQueries_; + } else { + result.histogramQueries_ = histogramQueriesBuilder_.build(); + } + result.jobView_ = jobView_; + result.offset_ = offset_; + result.maxPageSize_ = maxPageSize_; + result.pageToken_ = pageToken_; + result.orderBy_ = orderBy_; + result.diversificationLevel_ = diversificationLevel_; + if (customRankingInfoBuilder_ == null) { + result.customRankingInfo_ = customRankingInfo_; + } else { + result.customRankingInfo_ = customRankingInfoBuilder_.build(); + } + result.disableKeywordMatch_ = disableKeywordMatch_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SearchJobsRequest) { + return mergeFrom((com.google.cloud.talent.v4.SearchJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.SearchJobsRequest other) { + if (other == com.google.cloud.talent.v4.SearchJobsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.searchMode_ != 0) { + setSearchModeValue(other.getSearchModeValue()); + } + if (other.hasRequestMetadata()) { + mergeRequestMetadata(other.getRequestMetadata()); + } + if (other.hasJobQuery()) { + mergeJobQuery(other.getJobQuery()); + } + if (other.getEnableBroadening() != false) { + setEnableBroadening(other.getEnableBroadening()); + } + if (histogramQueriesBuilder_ == null) { + if (!other.histogramQueries_.isEmpty()) { + if (histogramQueries_.isEmpty()) { + histogramQueries_ = other.histogramQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHistogramQueriesIsMutable(); + histogramQueries_.addAll(other.histogramQueries_); + } + onChanged(); + } + } else { + if (!other.histogramQueries_.isEmpty()) { + if (histogramQueriesBuilder_.isEmpty()) { + histogramQueriesBuilder_.dispose(); + histogramQueriesBuilder_ = null; + histogramQueries_ = other.histogramQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + histogramQueriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHistogramQueriesFieldBuilder() + : null; + } else { + histogramQueriesBuilder_.addAllMessages(other.histogramQueries_); + } + } + } + if (other.jobView_ != 0) { + setJobViewValue(other.getJobViewValue()); + } + if (other.getOffset() != 0) { + setOffset(other.getOffset()); + } + if (other.getMaxPageSize() != 0) { + setMaxPageSize(other.getMaxPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (other.diversificationLevel_ != 0) { + setDiversificationLevelValue(other.getDiversificationLevelValue()); + } + if (other.hasCustomRankingInfo()) { + mergeCustomRankingInfo(other.getCustomRankingInfo()); + } + if (other.getDisableKeywordMatch() != false) { + setDisableKeywordMatch(other.getDisableKeywordMatch()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SearchJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.SearchJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the tenant to search within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to search within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the tenant to search within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to search within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the tenant to search within.
+     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int searchMode_ = 0; + /** + * + * + *
+     * Mode of a search.
+     * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The enum numeric value on the wire for searchMode. + */ + @java.lang.Override + public int getSearchModeValue() { + return searchMode_; + } + /** + * + * + *
+     * Mode of a search.
+     * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @param value The enum numeric value on the wire for searchMode to set. + * @return This builder for chaining. + */ + public Builder setSearchModeValue(int value) { + + searchMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Mode of a search.
+     * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The searchMode. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.SearchMode getSearchMode() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.SearchMode result = + com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.valueOf(searchMode_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.SearchMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Mode of a search.
+     * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @param value The searchMode to set. + * @return This builder for chaining. + */ + public Builder setSearchMode(com.google.cloud.talent.v4.SearchJobsRequest.SearchMode value) { + if (value == null) { + throw new NullPointerException(); + } + + searchMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Mode of a search.
+     * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return This builder for chaining. + */ + public Builder clearSearchMode() { + + searchMode_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.RequestMetadata requestMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.RequestMetadata, + com.google.cloud.talent.v4.RequestMetadata.Builder, + com.google.cloud.talent.v4.RequestMetadataOrBuilder> + requestMetadataBuilder_; + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the requestMetadata field is set. + */ + public boolean hasRequestMetadata() { + return requestMetadataBuilder_ != null || requestMetadata_ != null; + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestMetadata. + */ + public com.google.cloud.talent.v4.RequestMetadata getRequestMetadata() { + if (requestMetadataBuilder_ == null) { + return requestMetadata_ == null + ? com.google.cloud.talent.v4.RequestMetadata.getDefaultInstance() + : requestMetadata_; + } else { + return requestMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequestMetadata(com.google.cloud.talent.v4.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestMetadata_ = value; + onChanged(); + } else { + requestMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequestMetadata( + com.google.cloud.talent.v4.RequestMetadata.Builder builderForValue) { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = builderForValue.build(); + onChanged(); + } else { + requestMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRequestMetadata(com.google.cloud.talent.v4.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { + if (requestMetadata_ != null) { + requestMetadata_ = + com.google.cloud.talent.v4.RequestMetadata.newBuilder(requestMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + requestMetadata_ = value; + } + onChanged(); + } else { + requestMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRequestMetadata() { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = null; + onChanged(); + } else { + requestMetadata_ = null; + requestMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.RequestMetadata.Builder getRequestMetadataBuilder() { + + onChanged(); + return getRequestMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { + if (requestMetadataBuilder_ != null) { + return requestMetadataBuilder_.getMessageOrBuilder(); + } else { + return requestMetadata_ == null + ? com.google.cloud.talent.v4.RequestMetadata.getDefaultInstance() + : requestMetadata_; + } + } + /** + * + * + *
+     * Required. The meta information collected about the job searcher, used to improve the
+     * search quality of the service. The identifiers (such as `user_id`) are
+     * provided by users, and must be unique and consistent.
+     * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.RequestMetadata, + com.google.cloud.talent.v4.RequestMetadata.Builder, + com.google.cloud.talent.v4.RequestMetadataOrBuilder> + getRequestMetadataFieldBuilder() { + if (requestMetadataBuilder_ == null) { + requestMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.RequestMetadata, + com.google.cloud.talent.v4.RequestMetadata.Builder, + com.google.cloud.talent.v4.RequestMetadataOrBuilder>( + getRequestMetadata(), getParentForChildren(), isClean()); + requestMetadata_ = null; + } + return requestMetadataBuilder_; + } + + private com.google.cloud.talent.v4.JobQuery jobQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobQuery, + com.google.cloud.talent.v4.JobQuery.Builder, + com.google.cloud.talent.v4.JobQueryOrBuilder> + jobQueryBuilder_; + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return Whether the jobQuery field is set. + */ + public boolean hasJobQuery() { + return jobQueryBuilder_ != null || jobQuery_ != null; + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return The jobQuery. + */ + public com.google.cloud.talent.v4.JobQuery getJobQuery() { + if (jobQueryBuilder_ == null) { + return jobQuery_ == null + ? com.google.cloud.talent.v4.JobQuery.getDefaultInstance() + : jobQuery_; + } else { + return jobQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public Builder setJobQuery(com.google.cloud.talent.v4.JobQuery value) { + if (jobQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobQuery_ = value; + onChanged(); + } else { + jobQueryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public Builder setJobQuery(com.google.cloud.talent.v4.JobQuery.Builder builderForValue) { + if (jobQueryBuilder_ == null) { + jobQuery_ = builderForValue.build(); + onChanged(); + } else { + jobQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public Builder mergeJobQuery(com.google.cloud.talent.v4.JobQuery value) { + if (jobQueryBuilder_ == null) { + if (jobQuery_ != null) { + jobQuery_ = + com.google.cloud.talent.v4.JobQuery.newBuilder(jobQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + jobQuery_ = value; + } + onChanged(); + } else { + jobQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public Builder clearJobQuery() { + if (jobQueryBuilder_ == null) { + jobQuery_ = null; + onChanged(); + } else { + jobQuery_ = null; + jobQueryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public com.google.cloud.talent.v4.JobQuery.Builder getJobQueryBuilder() { + + onChanged(); + return getJobQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + public com.google.cloud.talent.v4.JobQueryOrBuilder getJobQueryOrBuilder() { + if (jobQueryBuilder_ != null) { + return jobQueryBuilder_.getMessageOrBuilder(); + } else { + return jobQuery_ == null + ? com.google.cloud.talent.v4.JobQuery.getDefaultInstance() + : jobQuery_; + } + } + /** + * + * + *
+     * Query used to search against jobs, such as keyword, location filters, etc.
+     * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobQuery, + com.google.cloud.talent.v4.JobQuery.Builder, + com.google.cloud.talent.v4.JobQueryOrBuilder> + getJobQueryFieldBuilder() { + if (jobQueryBuilder_ == null) { + jobQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.JobQuery, + com.google.cloud.talent.v4.JobQuery.Builder, + com.google.cloud.talent.v4.JobQueryOrBuilder>( + getJobQuery(), getParentForChildren(), isClean()); + jobQuery_ = null; + } + return jobQueryBuilder_; + } + + private boolean enableBroadening_; + /** + * + * + *
+     * Controls whether to broaden the search when it produces sparse results.
+     * Broadened queries append results to the end of the matching results
+     * list.
+     * Defaults to false.
+     * 
+ * + * bool enable_broadening = 5; + * + * @return The enableBroadening. + */ + @java.lang.Override + public boolean getEnableBroadening() { + return enableBroadening_; + } + /** + * + * + *
+     * Controls whether to broaden the search when it produces sparse results.
+     * Broadened queries append results to the end of the matching results
+     * list.
+     * Defaults to false.
+     * 
+ * + * bool enable_broadening = 5; + * + * @param value The enableBroadening to set. + * @return This builder for chaining. + */ + public Builder setEnableBroadening(boolean value) { + + enableBroadening_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls whether to broaden the search when it produces sparse results.
+     * Broadened queries append results to the end of the matching results
+     * list.
+     * Defaults to false.
+     * 
+ * + * bool enable_broadening = 5; + * + * @return This builder for chaining. + */ + public Builder clearEnableBroadening() { + + enableBroadening_ = false; + onChanged(); + return this; + } + + private java.util.List histogramQueries_ = + java.util.Collections.emptyList(); + + private void ensureHistogramQueriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + histogramQueries_ = + new java.util.ArrayList(histogramQueries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQuery, + com.google.cloud.talent.v4.HistogramQuery.Builder, + com.google.cloud.talent.v4.HistogramQueryOrBuilder> + histogramQueriesBuilder_; + + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public java.util.List getHistogramQueriesList() { + if (histogramQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(histogramQueries_); + } else { + return histogramQueriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public int getHistogramQueriesCount() { + if (histogramQueriesBuilder_ == null) { + return histogramQueries_.size(); + } else { + return histogramQueriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public com.google.cloud.talent.v4.HistogramQuery getHistogramQueries(int index) { + if (histogramQueriesBuilder_ == null) { + return histogramQueries_.get(index); + } else { + return histogramQueriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder setHistogramQueries(int index, com.google.cloud.talent.v4.HistogramQuery value) { + if (histogramQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueriesIsMutable(); + histogramQueries_.set(index, value); + onChanged(); + } else { + histogramQueriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder setHistogramQueries( + int index, com.google.cloud.talent.v4.HistogramQuery.Builder builderForValue) { + if (histogramQueriesBuilder_ == null) { + ensureHistogramQueriesIsMutable(); + histogramQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + histogramQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder addHistogramQueries(com.google.cloud.talent.v4.HistogramQuery value) { + if (histogramQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueriesIsMutable(); + histogramQueries_.add(value); + onChanged(); + } else { + histogramQueriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder addHistogramQueries(int index, com.google.cloud.talent.v4.HistogramQuery value) { + if (histogramQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueriesIsMutable(); + histogramQueries_.add(index, value); + onChanged(); + } else { + histogramQueriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder addHistogramQueries( + com.google.cloud.talent.v4.HistogramQuery.Builder builderForValue) { + if (histogramQueriesBuilder_ == null) { + ensureHistogramQueriesIsMutable(); + histogramQueries_.add(builderForValue.build()); + onChanged(); + } else { + histogramQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder addHistogramQueries( + int index, com.google.cloud.talent.v4.HistogramQuery.Builder builderForValue) { + if (histogramQueriesBuilder_ == null) { + ensureHistogramQueriesIsMutable(); + histogramQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + histogramQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder addAllHistogramQueries( + java.lang.Iterable values) { + if (histogramQueriesBuilder_ == null) { + ensureHistogramQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, histogramQueries_); + onChanged(); + } else { + histogramQueriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder clearHistogramQueries() { + if (histogramQueriesBuilder_ == null) { + histogramQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + histogramQueriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public Builder removeHistogramQueries(int index) { + if (histogramQueriesBuilder_ == null) { + ensureHistogramQueriesIsMutable(); + histogramQueries_.remove(index); + onChanged(); + } else { + histogramQueriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public com.google.cloud.talent.v4.HistogramQuery.Builder getHistogramQueriesBuilder(int index) { + return getHistogramQueriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public com.google.cloud.talent.v4.HistogramQueryOrBuilder getHistogramQueriesOrBuilder( + int index) { + if (histogramQueriesBuilder_ == null) { + return histogramQueries_.get(index); + } else { + return histogramQueriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public java.util.List + getHistogramQueriesOrBuilderList() { + if (histogramQueriesBuilder_ != null) { + return histogramQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(histogramQueries_); + } + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public com.google.cloud.talent.v4.HistogramQuery.Builder addHistogramQueriesBuilder() { + return getHistogramQueriesFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.HistogramQuery.getDefaultInstance()); + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public com.google.cloud.talent.v4.HistogramQuery.Builder addHistogramQueriesBuilder(int index) { + return getHistogramQueriesFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.HistogramQuery.getDefaultInstance()); + } + /** + * + * + *
+     * An expression specifies a histogram request against matching jobs.
+     * Expression syntax is an aggregation function call with histogram facets and
+     * other options.
+     * Available aggregation function calls are:
+     * * `count(string_histogram_facet)`: Count the number of matching entities,
+     * for each distinct attribute value.
+     * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+     * matching entities within each bucket.
+     * Data types:
+     * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+     * * String: string like "any string with backslash escape for quote(\")."
+     * * Number: whole number and floating point number like 10, -1 and -0.01.
+     * * List: list of elements with comma(,) separator surrounded by square
+     * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+     * Built-in constants:
+     * * MIN (minimum number similar to java Double.MIN_VALUE)
+     * * MAX (maximum number similar to java Double.MAX_VALUE)
+     * Built-in functions:
+     * * bucket(start, end[, label]): bucket built-in function creates a bucket
+     * with range of [start, end). Note that the end is exclusive, for example,
+     * bucket(1, MAX, "positive number") or bucket(1, 10).
+     * Job histogram facets:
+     * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+     * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+     *   "FULL_TIME", "PART_TIME".
+     * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+     * "MEDIUM", "BIG".
+     * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in months.
+     *   Must specify list of numeric buckets in spec.
+     * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   in years.
+     *   Must specify list of numeric buckets in spec.
+     * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+     *   "Bachelors", "Masters".
+     * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+     *   Level".
+     * * country: histogram by the country code of jobs, for example, "US", "FR".
+     * * admin1: histogram by the admin1 code of jobs, which is a global
+     *   placeholder referring to the state, province, or the particular term a
+     *   country uses to define the geographic structure below the country level,
+     *   for example, "CA", "IL".
+     * * city: histogram by a combination of the "city name, admin1 code". For
+     *   example,  "Mountain View, CA", "New York, NY".
+     * * admin1_country: histogram by a combination of the "admin1 code, country",
+     *   for example, "CA, US", "IL, US".
+     * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+     *   and longitude), for example, 37.4038522,-122.0987765. Since the
+     *   coordinates of a city center can change, customers may need to refresh
+     *   them periodically.
+     * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+     *   "fr-FR".
+     * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+     *   for example, "en", "fr".
+     * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+     *   "COMPUTER_AND_IT", "HEALTHCARE".
+     * * base_compensation_unit: histogram by the
+     *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+     *   salary, for example, "WEEKLY", "MONTHLY".
+     * * base_compensation: histogram by the base salary. Must specify list of
+     *   numeric buckets to group results by.
+     * * annualized_base_compensation: histogram by the base annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * annualized_total_compensation: histogram by the total annualized salary.
+     *   Must specify list of numeric buckets to group results by.
+     * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   string_custom_attribute["key1"].
+     * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+     *   Values can be accessed via square bracket notations like
+     *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+     *   group results by.
+     * Example expressions:
+     * * `count(admin1)`
+     * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+     * bucket(100000, MAX)])`
+     * * `count(string_custom_attribute["some-string-custom-attribute"])`
+     * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+     *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + public java.util.List + getHistogramQueriesBuilderList() { + return getHistogramQueriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQuery, + com.google.cloud.talent.v4.HistogramQuery.Builder, + com.google.cloud.talent.v4.HistogramQueryOrBuilder> + getHistogramQueriesFieldBuilder() { + if (histogramQueriesBuilder_ == null) { + histogramQueriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQuery, + com.google.cloud.talent.v4.HistogramQuery.Builder, + com.google.cloud.talent.v4.HistogramQueryOrBuilder>( + histogramQueries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + histogramQueries_ = null; + } + return histogramQueriesBuilder_; + } + + private int jobView_ = 0; + /** + * + * + *
+     * The desired job attributes returned for jobs in the search response.
+     * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The enum numeric value on the wire for jobView. + */ + @java.lang.Override + public int getJobViewValue() { + return jobView_; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the search response.
+     * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @param value The enum numeric value on the wire for jobView to set. + * @return This builder for chaining. + */ + public Builder setJobViewValue(int value) { + + jobView_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the search response.
+     * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The jobView. + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobView getJobView() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.JobView result = + com.google.cloud.talent.v4.JobView.valueOf(jobView_); + return result == null ? com.google.cloud.talent.v4.JobView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the search response.
+     * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @param value The jobView to set. + * @return This builder for chaining. + */ + public Builder setJobView(com.google.cloud.talent.v4.JobView value) { + if (value == null) { + throw new NullPointerException(); + } + + jobView_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The desired job attributes returned for jobs in the search response.
+     * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+     * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return This builder for chaining. + */ + public Builder clearJobView() { + + jobView_ = 0; + onChanged(); + return this; + } + + private int offset_; + /** + * + * + *
+     * An integer that specifies the current offset (that is, starting result
+     * location, amongst the jobs deemed by the API as relevant) in search
+     * results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset.
+     * The maximum allowed value is 5000. Otherwise an error is thrown.
+     * For example, 0 means to  return results starting from the first matching
+     * job, and 10 means to return from the 11th job. This can be used for
+     * pagination, (for example, pageSize = 10 and offset = 10 means to return
+     * from the second page).
+     * 
+ * + * int32 offset = 9; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + /** + * + * + *
+     * An integer that specifies the current offset (that is, starting result
+     * location, amongst the jobs deemed by the API as relevant) in search
+     * results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset.
+     * The maximum allowed value is 5000. Otherwise an error is thrown.
+     * For example, 0 means to  return results starting from the first matching
+     * job, and 10 means to return from the 11th job. This can be used for
+     * pagination, (for example, pageSize = 10 and offset = 10 means to return
+     * from the second page).
+     * 
+ * + * int32 offset = 9; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(int value) { + + offset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An integer that specifies the current offset (that is, starting result
+     * location, amongst the jobs deemed by the API as relevant) in search
+     * results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset.
+     * The maximum allowed value is 5000. Otherwise an error is thrown.
+     * For example, 0 means to  return results starting from the first matching
+     * job, and 10 means to return from the 11th job. This can be used for
+     * pagination, (for example, pageSize = 10 and offset = 10 means to return
+     * from the second page).
+     * 
+ * + * int32 offset = 9; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + + offset_ = 0; + onChanged(); + return this; + } + + private int maxPageSize_; + /** + * + * + *
+     * A limit on the number of jobs returned in the search results.
+     * Increasing this value above the default value of 10 can increase search
+     * response time. The value can be between 1 and 100.
+     * 
+ * + * int32 max_page_size = 10; + * + * @return The maxPageSize. + */ + @java.lang.Override + public int getMaxPageSize() { + return maxPageSize_; + } + /** + * + * + *
+     * A limit on the number of jobs returned in the search results.
+     * Increasing this value above the default value of 10 can increase search
+     * response time. The value can be between 1 and 100.
+     * 
+ * + * int32 max_page_size = 10; + * + * @param value The maxPageSize to set. + * @return This builder for chaining. + */ + public Builder setMaxPageSize(int value) { + + maxPageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A limit on the number of jobs returned in the search results.
+     * Increasing this value above the default value of 10 can increase search
+     * response time. The value can be between 1 and 100.
+     * 
+ * + * int32 max_page_size = 10; + * + * @return This builder for chaining. + */ + public Builder clearMaxPageSize() { + + maxPageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The token specifying the current offset within
+     * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+     * an explanation of how to obtain the next set of query results.
+     * 
+ * + * string page_token = 11; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token specifying the current offset within
+     * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+     * an explanation of how to obtain the next set of query results.
+     * 
+ * + * string page_token = 11; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token specifying the current offset within
+     * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+     * an explanation of how to obtain the next set of query results.
+     * 
+ * + * string page_token = 11; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token specifying the current offset within
+     * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+     * an explanation of how to obtain the next set of query results.
+     * 
+ * + * string page_token = 11; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token specifying the current offset within
+     * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+     * an explanation of how to obtain the next set of query results.
+     * 
+ * + * string page_token = 11; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * The criteria determining how search results are sorted. Default is
+     * `"relevance desc"`.
+     * Supported options are:
+     * * `"relevance desc"`: By relevance descending, as determined by the API
+     *   algorithms. Relevance thresholding of query results is only available
+     *   with this ordering.
+     * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   descending.
+     * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+     *   descending.
+     * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+     * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+     * * `"annualized_base_compensation"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_base_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"custom_ranking desc"`: By the relevance score adjusted to the
+     *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+     *   factor assigned by
+     *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+     *   order.
+     * * Location sorting: Use the special syntax to order jobs by distance:<br>
+     *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+     *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+     *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+     *   multiple locations. See details below.<br>
+     *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+     *   multiple locations. See details below.<br>
+     *   The string can have a maximum of 256 characters. When multiple distance
+     *   centers are provided, a job that is close to any of the distance centers
+     *   would have a high rank. When a job has multiple locations, the job
+     *   location closest to one of the distance centers will be used. Jobs that
+     *   don't have locations will be ranked at the bottom. Distance is calculated
+     *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+     *   still applied unless explicitly disabled in
+     *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+     * 
+ * + * string order_by = 12; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The criteria determining how search results are sorted. Default is
+     * `"relevance desc"`.
+     * Supported options are:
+     * * `"relevance desc"`: By relevance descending, as determined by the API
+     *   algorithms. Relevance thresholding of query results is only available
+     *   with this ordering.
+     * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   descending.
+     * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+     *   descending.
+     * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+     * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+     * * `"annualized_base_compensation"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_base_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"custom_ranking desc"`: By the relevance score adjusted to the
+     *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+     *   factor assigned by
+     *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+     *   order.
+     * * Location sorting: Use the special syntax to order jobs by distance:<br>
+     *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+     *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+     *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+     *   multiple locations. See details below.<br>
+     *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+     *   multiple locations. See details below.<br>
+     *   The string can have a maximum of 256 characters. When multiple distance
+     *   centers are provided, a job that is close to any of the distance centers
+     *   would have a high rank. When a job has multiple locations, the job
+     *   location closest to one of the distance centers will be used. Jobs that
+     *   don't have locations will be ranked at the bottom. Distance is calculated
+     *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+     *   still applied unless explicitly disabled in
+     *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+     * 
+ * + * string order_by = 12; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The criteria determining how search results are sorted. Default is
+     * `"relevance desc"`.
+     * Supported options are:
+     * * `"relevance desc"`: By relevance descending, as determined by the API
+     *   algorithms. Relevance thresholding of query results is only available
+     *   with this ordering.
+     * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   descending.
+     * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+     *   descending.
+     * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+     * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+     * * `"annualized_base_compensation"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_base_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"custom_ranking desc"`: By the relevance score adjusted to the
+     *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+     *   factor assigned by
+     *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+     *   order.
+     * * Location sorting: Use the special syntax to order jobs by distance:<br>
+     *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+     *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+     *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+     *   multiple locations. See details below.<br>
+     *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+     *   multiple locations. See details below.<br>
+     *   The string can have a maximum of 256 characters. When multiple distance
+     *   centers are provided, a job that is close to any of the distance centers
+     *   would have a high rank. When a job has multiple locations, the job
+     *   location closest to one of the distance centers will be used. Jobs that
+     *   don't have locations will be ranked at the bottom. Distance is calculated
+     *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+     *   still applied unless explicitly disabled in
+     *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+     * 
+ * + * string order_by = 12; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The criteria determining how search results are sorted. Default is
+     * `"relevance desc"`.
+     * Supported options are:
+     * * `"relevance desc"`: By relevance descending, as determined by the API
+     *   algorithms. Relevance thresholding of query results is only available
+     *   with this ordering.
+     * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   descending.
+     * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+     *   descending.
+     * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+     * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+     * * `"annualized_base_compensation"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_base_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"custom_ranking desc"`: By the relevance score adjusted to the
+     *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+     *   factor assigned by
+     *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+     *   order.
+     * * Location sorting: Use the special syntax to order jobs by distance:<br>
+     *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+     *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+     *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+     *   multiple locations. See details below.<br>
+     *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+     *   multiple locations. See details below.<br>
+     *   The string can have a maximum of 256 characters. When multiple distance
+     *   centers are provided, a job that is close to any of the distance centers
+     *   would have a high rank. When a job has multiple locations, the job
+     *   location closest to one of the distance centers will be used. Jobs that
+     *   don't have locations will be ranked at the bottom. Distance is calculated
+     *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+     *   still applied unless explicitly disabled in
+     *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+     * 
+ * + * string order_by = 12; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * The criteria determining how search results are sorted. Default is
+     * `"relevance desc"`.
+     * Supported options are:
+     * * `"relevance desc"`: By relevance descending, as determined by the API
+     *   algorithms. Relevance thresholding of query results is only available
+     *   with this ordering.
+     * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+     *   descending.
+     * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+     *   descending.
+     * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+     * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+     * * `"annualized_base_compensation"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_base_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"annualized_total_compensation desc"`: By job's
+     *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+     *   whose annualized base compensation is unspecified are put at the end of
+     *   search results.
+     * * `"custom_ranking desc"`: By the relevance score adjusted to the
+     *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+     *   factor assigned by
+     *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+     *   order.
+     * * Location sorting: Use the special syntax to order jobs by distance:<br>
+     *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+     *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+     *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+     *   multiple locations. See details below.<br>
+     *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+     *   multiple locations. See details below.<br>
+     *   The string can have a maximum of 256 characters. When multiple distance
+     *   centers are provided, a job that is close to any of the distance centers
+     *   would have a high rank. When a job has multiple locations, the job
+     *   location closest to one of the distance centers will be used. Jobs that
+     *   don't have locations will be ranked at the bottom. Distance is calculated
+     *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+     *   still applied unless explicitly disabled in
+     *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+     * 
+ * + * string order_by = 12; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private int diversificationLevel_ = 0; + /** + * + * + *
+     * Controls whether highly similar jobs are returned next to each other in
+     * the search results. Jobs are identified as highly similar based on
+     * their titles, job categories, and locations. Highly similar results are
+     * clustered so that only one representative job of the cluster is
+     * displayed to the job seeker higher up in the results, with the other jobs
+     * being displayed lower down in the results.
+     * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+     * is specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The enum numeric value on the wire for diversificationLevel. + */ + @java.lang.Override + public int getDiversificationLevelValue() { + return diversificationLevel_; + } + /** + * + * + *
+     * Controls whether highly similar jobs are returned next to each other in
+     * the search results. Jobs are identified as highly similar based on
+     * their titles, job categories, and locations. Highly similar results are
+     * clustered so that only one representative job of the cluster is
+     * displayed to the job seeker higher up in the results, with the other jobs
+     * being displayed lower down in the results.
+     * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+     * is specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @param value The enum numeric value on the wire for diversificationLevel to set. + * @return This builder for chaining. + */ + public Builder setDiversificationLevelValue(int value) { + + diversificationLevel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls whether highly similar jobs are returned next to each other in
+     * the search results. Jobs are identified as highly similar based on
+     * their titles, job categories, and locations. Highly similar results are
+     * clustered so that only one representative job of the cluster is
+     * displayed to the job seeker higher up in the results, with the other jobs
+     * being displayed lower down in the results.
+     * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+     * is specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The diversificationLevel. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel + getDiversificationLevel() { + @SuppressWarnings("deprecation") + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel result = + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.valueOf( + diversificationLevel_); + return result == null + ? com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Controls whether highly similar jobs are returned next to each other in
+     * the search results. Jobs are identified as highly similar based on
+     * their titles, job categories, and locations. Highly similar results are
+     * clustered so that only one representative job of the cluster is
+     * displayed to the job seeker higher up in the results, with the other jobs
+     * being displayed lower down in the results.
+     * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+     * is specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @param value The diversificationLevel to set. + * @return This builder for chaining. + */ + public Builder setDiversificationLevel( + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + diversificationLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Controls whether highly similar jobs are returned next to each other in
+     * the search results. Jobs are identified as highly similar based on
+     * their titles, job categories, and locations. Highly similar results are
+     * clustered so that only one representative job of the cluster is
+     * displayed to the job seeker higher up in the results, with the other jobs
+     * being displayed lower down in the results.
+     * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+     * is specified.
+     * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return This builder for chaining. + */ + public Builder clearDiversificationLevel() { + + diversificationLevel_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo customRankingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder> + customRankingInfoBuilder_; + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return Whether the customRankingInfo field is set. + */ + public boolean hasCustomRankingInfo() { + return customRankingInfoBuilder_ != null || customRankingInfo_ != null; + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return The customRankingInfo. + */ + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo getCustomRankingInfo() { + if (customRankingInfoBuilder_ == null) { + return customRankingInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDefaultInstance() + : customRankingInfo_; + } else { + return customRankingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public Builder setCustomRankingInfo( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo value) { + if (customRankingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customRankingInfo_ = value; + onChanged(); + } else { + customRankingInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public Builder setCustomRankingInfo( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder builderForValue) { + if (customRankingInfoBuilder_ == null) { + customRankingInfo_ = builderForValue.build(); + onChanged(); + } else { + customRankingInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public Builder mergeCustomRankingInfo( + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo value) { + if (customRankingInfoBuilder_ == null) { + if (customRankingInfo_ != null) { + customRankingInfo_ = + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.newBuilder( + customRankingInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + customRankingInfo_ = value; + } + onChanged(); + } else { + customRankingInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public Builder clearCustomRankingInfo() { + if (customRankingInfoBuilder_ == null) { + customRankingInfo_ = null; + onChanged(); + } else { + customRankingInfo_ = null; + customRankingInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder + getCustomRankingInfoBuilder() { + + onChanged(); + return getCustomRankingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + public com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder + getCustomRankingInfoOrBuilder() { + if (customRankingInfoBuilder_ != null) { + return customRankingInfoBuilder_.getMessageOrBuilder(); + } else { + return customRankingInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.getDefaultInstance() + : customRankingInfo_; + } + } + /** + * + * + *
+     * Controls over how job documents get ranked on top of existing relevance
+     * score (determined by API algorithm).
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder> + getCustomRankingInfoFieldBuilder() { + if (customRankingInfoBuilder_ == null) { + customRankingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.Builder, + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder>( + getCustomRankingInfo(), getParentForChildren(), isClean()); + customRankingInfo_ = null; + } + return customRankingInfoBuilder_; + } + + private boolean disableKeywordMatch_; + /** + * + * + *
+     * Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
+     * [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
+     * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
+     * keyword match returns jobs that do not match given category filters when
+     * there are matching keywords. For example, for the query "program manager,"
+     * a result is returned even if the job posting has the title "software
+     * developer," which doesn't fall into "program manager" ontology, but does
+     * have "program manager" appearing in its description.
+     * For queries like "cloud" that don't contain title or
+     * location specific ontology, jobs with "cloud" keyword matches are returned
+     * regardless of this flag's value.
+     * Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
+     * company-specific globally matched custom field/attribute string values are
+     * needed. Enabling keyword match improves recall of subsequent search
+     * requests.
+     * Defaults to false.
+     * 
+ * + * bool disable_keyword_match = 16; + * + * @return The disableKeywordMatch. + */ + @java.lang.Override + public boolean getDisableKeywordMatch() { + return disableKeywordMatch_; + } + /** + * + * + *
+     * Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
+     * [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
+     * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
+     * keyword match returns jobs that do not match given category filters when
+     * there are matching keywords. For example, for the query "program manager,"
+     * a result is returned even if the job posting has the title "software
+     * developer," which doesn't fall into "program manager" ontology, but does
+     * have "program manager" appearing in its description.
+     * For queries like "cloud" that don't contain title or
+     * location specific ontology, jobs with "cloud" keyword matches are returned
+     * regardless of this flag's value.
+     * Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
+     * company-specific globally matched custom field/attribute string values are
+     * needed. Enabling keyword match improves recall of subsequent search
+     * requests.
+     * Defaults to false.
+     * 
+ * + * bool disable_keyword_match = 16; + * + * @param value The disableKeywordMatch to set. + * @return This builder for chaining. + */ + public Builder setDisableKeywordMatch(boolean value) { + + disableKeywordMatch_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
+     * [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
+     * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
+     * keyword match returns jobs that do not match given category filters when
+     * there are matching keywords. For example, for the query "program manager,"
+     * a result is returned even if the job posting has the title "software
+     * developer," which doesn't fall into "program manager" ontology, but does
+     * have "program manager" appearing in its description.
+     * For queries like "cloud" that don't contain title or
+     * location specific ontology, jobs with "cloud" keyword matches are returned
+     * regardless of this flag's value.
+     * Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
+     * company-specific globally matched custom field/attribute string values are
+     * needed. Enabling keyword match improves recall of subsequent search
+     * requests.
+     * Defaults to false.
+     * 
+ * + * bool disable_keyword_match = 16; + * + * @return This builder for chaining. + */ + public Builder clearDisableKeywordMatch() { + + disableKeywordMatch_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SearchJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SearchJobsRequest) + private static final com.google.cloud.talent.v4.SearchJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SearchJobsRequest(); + } + + public static com.google.cloud.talent.v4.SearchJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequestOrBuilder.java new file mode 100644 index 00000000..503e0d2d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequestOrBuilder.java @@ -0,0 +1,948 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface SearchJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SearchJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the tenant to search within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the tenant to search within.
+   * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Mode of a search.
+   * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The enum numeric value on the wire for searchMode. + */ + int getSearchModeValue(); + /** + * + * + *
+   * Mode of a search.
+   * Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH].
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * + * @return The searchMode. + */ + com.google.cloud.talent.v4.SearchJobsRequest.SearchMode getSearchMode(); + + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the requestMetadata field is set. + */ + boolean hasRequestMetadata(); + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestMetadata. + */ + com.google.cloud.talent.v4.RequestMetadata getRequestMetadata(); + /** + * + * + *
+   * Required. The meta information collected about the job searcher, used to improve the
+   * search quality of the service. The identifiers (such as `user_id`) are
+   * provided by users, and must be unique and consistent.
+   * 
+ * + * + * .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.RequestMetadataOrBuilder getRequestMetadataOrBuilder(); + + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return Whether the jobQuery field is set. + */ + boolean hasJobQuery(); + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + * + * @return The jobQuery. + */ + com.google.cloud.talent.v4.JobQuery getJobQuery(); + /** + * + * + *
+   * Query used to search against jobs, such as keyword, location filters, etc.
+   * 
+ * + * .google.cloud.talent.v4.JobQuery job_query = 4; + */ + com.google.cloud.talent.v4.JobQueryOrBuilder getJobQueryOrBuilder(); + + /** + * + * + *
+   * Controls whether to broaden the search when it produces sparse results.
+   * Broadened queries append results to the end of the matching results
+   * list.
+   * Defaults to false.
+   * 
+ * + * bool enable_broadening = 5; + * + * @return The enableBroadening. + */ + boolean getEnableBroadening(); + + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + java.util.List getHistogramQueriesList(); + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + com.google.cloud.talent.v4.HistogramQuery getHistogramQueries(int index); + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + int getHistogramQueriesCount(); + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + java.util.List + getHistogramQueriesOrBuilderList(); + /** + * + * + *
+   * An expression specifies a histogram request against matching jobs.
+   * Expression syntax is an aggregation function call with histogram facets and
+   * other options.
+   * Available aggregation function calls are:
+   * * `count(string_histogram_facet)`: Count the number of matching entities,
+   * for each distinct attribute value.
+   * * `count(numeric_histogram_facet, list of buckets)`: Count the number of
+   * matching entities within each bucket.
+   * Data types:
+   * * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
+   * * String: string like "any string with backslash escape for quote(\")."
+   * * Number: whole number and floating point number like 10, -1 and -0.01.
+   * * List: list of elements with comma(,) separator surrounded by square
+   * brackets, for example, [1, 2, 3] and ["one", "two", "three"].
+   * Built-in constants:
+   * * MIN (minimum number similar to java Double.MIN_VALUE)
+   * * MAX (maximum number similar to java Double.MAX_VALUE)
+   * Built-in functions:
+   * * bucket(start, end[, label]): bucket built-in function creates a bucket
+   * with range of [start, end). Note that the end is exclusive, for example,
+   * bucket(1, MAX, "positive number") or bucket(1, 10).
+   * Job histogram facets:
+   * * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name].
+   * * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example,
+   *   "FULL_TIME", "PART_TIME".
+   * * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
+   * "MEDIUM", "BIG".
+   * * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in months.
+   *   Must specify list of numeric buckets in spec.
+   * * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   in years.
+   *   Must specify list of numeric buckets in spec.
+   * * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example,
+   *   "Bachelors", "Masters".
+   * * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry
+   *   Level".
+   * * country: histogram by the country code of jobs, for example, "US", "FR".
+   * * admin1: histogram by the admin1 code of jobs, which is a global
+   *   placeholder referring to the state, province, or the particular term a
+   *   country uses to define the geographic structure below the country level,
+   *   for example, "CA", "IL".
+   * * city: histogram by a combination of the "city name, admin1 code". For
+   *   example,  "Mountain View, CA", "New York, NY".
+   * * admin1_country: histogram by a combination of the "admin1 code, country",
+   *   for example, "CA, US", "IL, US".
+   * * city_coordinate: histogram by the city center's GPS coordinates (latitude
+   *   and longitude), for example, 37.4038522,-122.0987765. Since the
+   *   coordinates of a city center can change, customers may need to refresh
+   *   them periodically.
+   * * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US",
+   *   "fr-FR".
+   * * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code],
+   *   for example, "en", "fr".
+   * * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example,
+   *   "COMPUTER_AND_IT", "HEALTHCARE".
+   * * base_compensation_unit: histogram by the
+   *   [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base
+   *   salary, for example, "WEEKLY", "MONTHLY".
+   * * base_compensation: histogram by the base salary. Must specify list of
+   *   numeric buckets to group results by.
+   * * annualized_base_compensation: histogram by the base annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * annualized_total_compensation: histogram by the total annualized salary.
+   *   Must specify list of numeric buckets to group results by.
+   * * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   string_custom_attribute["key1"].
+   * * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes].
+   *   Values can be accessed via square bracket notations like
+   *   numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
+   *   group results by.
+   * Example expressions:
+   * * `count(admin1)`
+   * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
+   * bucket(100000, MAX)])`
+   * * `count(string_custom_attribute["some-string-custom-attribute"])`
+   * * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
+   *   [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + com.google.cloud.talent.v4.HistogramQueryOrBuilder getHistogramQueriesOrBuilder(int index); + + /** + * + * + *
+   * The desired job attributes returned for jobs in the search response.
+   * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The enum numeric value on the wire for jobView. + */ + int getJobViewValue(); + /** + * + * + *
+   * The desired job attributes returned for jobs in the search response.
+   * Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified.
+   * 
+ * + * .google.cloud.talent.v4.JobView job_view = 8; + * + * @return The jobView. + */ + com.google.cloud.talent.v4.JobView getJobView(); + + /** + * + * + *
+   * An integer that specifies the current offset (that is, starting result
+   * location, amongst the jobs deemed by the API as relevant) in search
+   * results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset.
+   * The maximum allowed value is 5000. Otherwise an error is thrown.
+   * For example, 0 means to  return results starting from the first matching
+   * job, and 10 means to return from the 11th job. This can be used for
+   * pagination, (for example, pageSize = 10 and offset = 10 means to return
+   * from the second page).
+   * 
+ * + * int32 offset = 9; + * + * @return The offset. + */ + int getOffset(); + + /** + * + * + *
+   * A limit on the number of jobs returned in the search results.
+   * Increasing this value above the default value of 10 can increase search
+   * response time. The value can be between 1 and 100.
+   * 
+ * + * int32 max_page_size = 10; + * + * @return The maxPageSize. + */ + int getMaxPageSize(); + + /** + * + * + *
+   * The token specifying the current offset within
+   * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+   * an explanation of how to obtain the next set of query results.
+   * 
+ * + * string page_token = 11; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The token specifying the current offset within
+   * search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for
+   * an explanation of how to obtain the next set of query results.
+   * 
+ * + * string page_token = 11; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The criteria determining how search results are sorted. Default is
+   * `"relevance desc"`.
+   * Supported options are:
+   * * `"relevance desc"`: By relevance descending, as determined by the API
+   *   algorithms. Relevance thresholding of query results is only available
+   *   with this ordering.
+   * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   descending.
+   * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+   *   descending.
+   * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+   * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+   * * `"annualized_base_compensation"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_base_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"custom_ranking desc"`: By the relevance score adjusted to the
+   *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+   *   factor assigned by
+   *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+   *   order.
+   * * Location sorting: Use the special syntax to order jobs by distance:<br>
+   *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+   *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+   *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+   *   multiple locations. See details below.<br>
+   *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+   *   multiple locations. See details below.<br>
+   *   The string can have a maximum of 256 characters. When multiple distance
+   *   centers are provided, a job that is close to any of the distance centers
+   *   would have a high rank. When a job has multiple locations, the job
+   *   location closest to one of the distance centers will be used. Jobs that
+   *   don't have locations will be ranked at the bottom. Distance is calculated
+   *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+   *   still applied unless explicitly disabled in
+   *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+   * 
+ * + * string order_by = 12; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * The criteria determining how search results are sorted. Default is
+   * `"relevance desc"`.
+   * Supported options are:
+   * * `"relevance desc"`: By relevance descending, as determined by the API
+   *   algorithms. Relevance thresholding of query results is only available
+   *   with this ordering.
+   * * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
+   *   descending.
+   * * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time]
+   *   descending.
+   * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending.
+   * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending.
+   * * `"annualized_base_compensation"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_base_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"annualized_total_compensation desc"`: By job's
+   *   [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs
+   *   whose annualized base compensation is unspecified are put at the end of
+   *   search results.
+   * * `"custom_ranking desc"`: By the relevance score adjusted to the
+   *   [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight
+   *   factor assigned by
+   *   [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending
+   *   order.
+   * * Location sorting: Use the special syntax to order jobs by distance:<br>
+   *   `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
+   *   `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
+   *   `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
+   *   multiple locations. See details below.<br>
+   *   `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
+   *   multiple locations. See details below.<br>
+   *   The string can have a maximum of 256 characters. When multiple distance
+   *   centers are provided, a job that is close to any of the distance centers
+   *   would have a high rank. When a job has multiple locations, the job
+   *   location closest to one of the distance centers will be used. Jobs that
+   *   don't have locations will be ranked at the bottom. Distance is calculated
+   *   with a precision of 11.3 meters (37.4 feet). Diversification strategy is
+   *   still applied unless explicitly disabled in
+   *   [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level].
+   * 
+ * + * string order_by = 12; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Controls whether highly similar jobs are returned next to each other in
+   * the search results. Jobs are identified as highly similar based on
+   * their titles, job categories, and locations. Highly similar results are
+   * clustered so that only one representative job of the cluster is
+   * displayed to the job seeker higher up in the results, with the other jobs
+   * being displayed lower down in the results.
+   * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+   * is specified.
+   * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The enum numeric value on the wire for diversificationLevel. + */ + int getDiversificationLevelValue(); + /** + * + * + *
+   * Controls whether highly similar jobs are returned next to each other in
+   * the search results. Jobs are identified as highly similar based on
+   * their titles, job categories, and locations. Highly similar results are
+   * clustered so that only one representative job of the cluster is
+   * displayed to the job seeker higher up in the results, with the other jobs
+   * being displayed lower down in the results.
+   * Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value
+   * is specified.
+   * 
+ * + * + * .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * + * + * @return The diversificationLevel. + */ + com.google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel getDiversificationLevel(); + + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return Whether the customRankingInfo field is set. + */ + boolean hasCustomRankingInfo(); + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + * + * @return The customRankingInfo. + */ + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo getCustomRankingInfo(); + /** + * + * + *
+   * Controls over how job documents get ranked on top of existing relevance
+   * score (determined by API algorithm).
+   * 
+ * + * .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * + */ + com.google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfoOrBuilder + getCustomRankingInfoOrBuilder(); + + /** + * + * + *
+   * Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
+   * [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
+   * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
+   * keyword match returns jobs that do not match given category filters when
+   * there are matching keywords. For example, for the query "program manager,"
+   * a result is returned even if the job posting has the title "software
+   * developer," which doesn't fall into "program manager" ontology, but does
+   * have "program manager" appearing in its description.
+   * For queries like "cloud" that don't contain title or
+   * location specific ontology, jobs with "cloud" keyword matches are returned
+   * regardless of this flag's value.
+   * Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
+   * company-specific globally matched custom field/attribute string values are
+   * needed. Enabling keyword match improves recall of subsequent search
+   * requests.
+   * Defaults to false.
+   * 
+ * + * bool disable_keyword_match = 16; + * + * @return The disableKeywordMatch. + */ + boolean getDisableKeywordMatch(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponse.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponse.java new file mode 100644 index 00000000..7110af38 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponse.java @@ -0,0 +1,5901 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Response for SearchJob method.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse} + */ +public final class SearchJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SearchJobsResponse) + SearchJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchJobsResponse.newBuilder() to construct. + private SearchJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchJobsResponse() { + matchingJobs_ = java.util.Collections.emptyList(); + histogramQueryResults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + locationFilters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + matchingJobs_ = + new java.util.ArrayList< + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob>(); + mutable_bitField0_ |= 0x00000001; + } + matchingJobs_.add( + input.readMessage( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + histogramQueryResults_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + histogramQueryResults_.add( + input.readMessage( + com.google.cloud.talent.v4.HistogramQueryResult.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + locationFilters_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + locationFilters_.add( + input.readMessage( + com.google.cloud.talent.v4.Location.parser(), extensionRegistry)); + break; + } + case 48: + { + totalSize_ = input.readInt32(); + break; + } + case 58: + { + com.google.cloud.talent.v4.ResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.talent.v4.ResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + broadenedQueryJobsCount_ = input.readInt32(); + break; + } + case 74: + { + com.google.cloud.talent.v4.SpellingCorrection.Builder subBuilder = null; + if (spellCorrection_ != null) { + subBuilder = spellCorrection_.toBuilder(); + } + spellCorrection_ = + input.readMessage( + com.google.cloud.talent.v4.SpellingCorrection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(spellCorrection_); + spellCorrection_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + matchingJobs_ = java.util.Collections.unmodifiableList(matchingJobs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + histogramQueryResults_ = java.util.Collections.unmodifiableList(histogramQueryResults_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + locationFilters_ = java.util.Collections.unmodifiableList(locationFilters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.class, + com.google.cloud.talent.v4.SearchJobsResponse.Builder.class); + } + + public interface MatchingJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SearchJobsResponse.MatchingJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + boolean hasJob(); + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + com.google.cloud.talent.v4.Job getJob(); + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder(); + + /** + * + * + *
+     * A summary of the job with core information that's displayed on the search
+     * results listing page.
+     * 
+ * + * string job_summary = 2; + * + * @return The jobSummary. + */ + java.lang.String getJobSummary(); + /** + * + * + *
+     * A summary of the job with core information that's displayed on the search
+     * results listing page.
+     * 
+ * + * string job_summary = 2; + * + * @return The bytes for jobSummary. + */ + com.google.protobuf.ByteString getJobSummaryBytes(); + + /** + * + * + *
+     * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+     * closely matching a search query's keywords, if available. The matching
+     * query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string job_title_snippet = 3; + * + * @return The jobTitleSnippet. + */ + java.lang.String getJobTitleSnippet(); + /** + * + * + *
+     * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+     * closely matching a search query's keywords, if available. The matching
+     * query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string job_title_snippet = 3; + * + * @return The bytes for jobTitleSnippet. + */ + com.google.protobuf.ByteString getJobTitleSnippetBytes(); + + /** + * + * + *
+     * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+     * fields that most closely match a search query's keywords, if available.
+     * All HTML tags in the original fields are stripped when returned in this
+     * field, and matching query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string search_text_snippet = 4; + * + * @return The searchTextSnippet. + */ + java.lang.String getSearchTextSnippet(); + /** + * + * + *
+     * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+     * fields that most closely match a search query's keywords, if available.
+     * All HTML tags in the original fields are stripped when returned in this
+     * field, and matching query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string search_text_snippet = 4; + * + * @return The bytes for searchTextSnippet. + */ + com.google.protobuf.ByteString getSearchTextSnippetBytes(); + + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return Whether the commuteInfo field is set. + */ + boolean hasCommuteInfo(); + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return The commuteInfo. + */ + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getCommuteInfo(); + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder getCommuteInfoOrBuilder(); + } + /** + * + * + *
+   * Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4.SearchJobsResponse].
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse.MatchingJob} + */ + public static final class MatchingJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SearchJobsResponse.MatchingJob) + MatchingJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use MatchingJob.newBuilder() to construct. + private MatchingJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MatchingJob() { + jobSummary_ = ""; + jobTitleSnippet_ = ""; + searchTextSnippet_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MatchingJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MatchingJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Job.Builder subBuilder = null; + if (job_ != null) { + subBuilder = job_.toBuilder(); + } + job_ = + input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(job_); + job_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + jobSummary_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + jobTitleSnippet_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + searchTextSnippet_ = s; + break; + } + case 42: + { + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder subBuilder = null; + if (commuteInfo_ != null) { + subBuilder = commuteInfo_.toBuilder(); + } + commuteInfo_ = + input.readMessage( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commuteInfo_); + commuteInfo_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.class, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder.class); + } + + public static final int JOB_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Job job_; + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + @java.lang.Override + public boolean hasJob() { + return job_ != null; + } + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJob() { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + /** + * + * + *
+     * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + return getJob(); + } + + public static final int JOB_SUMMARY_FIELD_NUMBER = 2; + private volatile java.lang.Object jobSummary_; + /** + * + * + *
+     * A summary of the job with core information that's displayed on the search
+     * results listing page.
+     * 
+ * + * string job_summary = 2; + * + * @return The jobSummary. + */ + @java.lang.Override + public java.lang.String getJobSummary() { + java.lang.Object ref = jobSummary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobSummary_ = s; + return s; + } + } + /** + * + * + *
+     * A summary of the job with core information that's displayed on the search
+     * results listing page.
+     * 
+ * + * string job_summary = 2; + * + * @return The bytes for jobSummary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobSummaryBytes() { + java.lang.Object ref = jobSummary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_TITLE_SNIPPET_FIELD_NUMBER = 3; + private volatile java.lang.Object jobTitleSnippet_; + /** + * + * + *
+     * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+     * closely matching a search query's keywords, if available. The matching
+     * query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string job_title_snippet = 3; + * + * @return The jobTitleSnippet. + */ + @java.lang.Override + public java.lang.String getJobTitleSnippet() { + java.lang.Object ref = jobTitleSnippet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobTitleSnippet_ = s; + return s; + } + } + /** + * + * + *
+     * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+     * closely matching a search query's keywords, if available. The matching
+     * query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string job_title_snippet = 3; + * + * @return The bytes for jobTitleSnippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobTitleSnippetBytes() { + java.lang.Object ref = jobTitleSnippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobTitleSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_TEXT_SNIPPET_FIELD_NUMBER = 4; + private volatile java.lang.Object searchTextSnippet_; + /** + * + * + *
+     * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+     * fields that most closely match a search query's keywords, if available.
+     * All HTML tags in the original fields are stripped when returned in this
+     * field, and matching query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string search_text_snippet = 4; + * + * @return The searchTextSnippet. + */ + @java.lang.Override + public java.lang.String getSearchTextSnippet() { + java.lang.Object ref = searchTextSnippet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchTextSnippet_ = s; + return s; + } + } + /** + * + * + *
+     * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+     * fields that most closely match a search query's keywords, if available.
+     * All HTML tags in the original fields are stripped when returned in this
+     * field, and matching query keywords are enclosed in HTML bold tags.
+     * 
+ * + * string search_text_snippet = 4; + * + * @return The bytes for searchTextSnippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchTextSnippetBytes() { + java.lang.Object ref = searchTextSnippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchTextSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMUTE_INFO_FIELD_NUMBER = 5; + private com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commuteInfo_; + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return Whether the commuteInfo field is set. + */ + @java.lang.Override + public boolean hasCommuteInfo() { + return commuteInfo_ != null; + } + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return The commuteInfo. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getCommuteInfo() { + return commuteInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.getDefaultInstance() + : commuteInfo_; + } + /** + * + * + *
+     * Commute information which is generated based on specified
+     *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+     * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder + getCommuteInfoOrBuilder() { + return getCommuteInfo(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (job_ != null) { + output.writeMessage(1, getJob()); + } + if (!getJobSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobSummary_); + } + if (!getJobTitleSnippetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobTitleSnippet_); + } + if (!getSearchTextSnippetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, searchTextSnippet_); + } + if (commuteInfo_ != null) { + output.writeMessage(5, getCommuteInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (job_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getJob()); + } + if (!getJobSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobSummary_); + } + if (!getJobTitleSnippetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobTitleSnippet_); + } + if (!getSearchTextSnippetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, searchTextSnippet_); + } + if (commuteInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCommuteInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob other = + (com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob) obj; + + if (hasJob() != other.hasJob()) return false; + if (hasJob()) { + if (!getJob().equals(other.getJob())) return false; + } + if (!getJobSummary().equals(other.getJobSummary())) return false; + if (!getJobTitleSnippet().equals(other.getJobTitleSnippet())) return false; + if (!getSearchTextSnippet().equals(other.getSearchTextSnippet())) return false; + if (hasCommuteInfo() != other.hasCommuteInfo()) return false; + if (hasCommuteInfo()) { + if (!getCommuteInfo().equals(other.getCommuteInfo())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJob()) { + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJob().hashCode(); + } + hash = (37 * hash) + JOB_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getJobSummary().hashCode(); + hash = (37 * hash) + JOB_TITLE_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getJobTitleSnippet().hashCode(); + hash = (37 * hash) + SEARCH_TEXT_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getSearchTextSnippet().hashCode(); + if (hasCommuteInfo()) { + hash = (37 * hash) + COMMUTE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCommuteInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4.SearchJobsResponse].
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse.MatchingJob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SearchJobsResponse.MatchingJob) + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.class, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobBuilder_ == null) { + job_ = null; + } else { + job_ = null; + jobBuilder_ = null; + } + jobSummary_ = ""; + + jobTitleSnippet_ = ""; + + searchTextSnippet_ = ""; + + if (commuteInfoBuilder_ == null) { + commuteInfo_ = null; + } else { + commuteInfo_ = null; + commuteInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_MatchingJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob build() { + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob buildPartial() { + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob result = + new com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob(this); + if (jobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = jobBuilder_.build(); + } + result.jobSummary_ = jobSummary_; + result.jobTitleSnippet_ = jobTitleSnippet_; + result.searchTextSnippet_ = searchTextSnippet_; + if (commuteInfoBuilder_ == null) { + result.commuteInfo_ = commuteInfo_; + } else { + result.commuteInfo_ = commuteInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob) { + return mergeFrom((com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob other) { + if (other == com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.getDefaultInstance()) + return this; + if (other.hasJob()) { + mergeJob(other.getJob()); + } + if (!other.getJobSummary().isEmpty()) { + jobSummary_ = other.jobSummary_; + onChanged(); + } + if (!other.getJobTitleSnippet().isEmpty()) { + jobTitleSnippet_ = other.jobTitleSnippet_; + onChanged(); + } + if (!other.getSearchTextSnippet().isEmpty()) { + searchTextSnippet_ = other.searchTextSnippet_; + onChanged(); + } + if (other.hasCommuteInfo()) { + mergeCommuteInfo(other.getCommuteInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Job job_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobBuilder_; + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return Whether the job field is set. + */ + public boolean hasJob() { + return jobBuilder_ != null || job_ != null; + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + * + * @return The job. + */ + public com.google.cloud.talent.v4.Job getJob() { + if (jobBuilder_ == null) { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } else { + return jobBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder setJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + jobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder setJob(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + jobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder mergeJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (job_ != null) { + job_ = com.google.cloud.talent.v4.Job.newBuilder(job_).mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + jobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public Builder clearJob() { + if (jobBuilder_ == null) { + job_ = null; + onChanged(); + } else { + job_ = null; + jobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public com.google.cloud.talent.v4.Job.Builder getJobBuilder() { + + onChanged(); + return getJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + if (jobBuilder_ != null) { + return jobBuilder_.getMessageOrBuilder(); + } else { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + } + /** + * + * + *
+       * Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+       * 
+ * + * .google.cloud.talent.v4.Job job = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobFieldBuilder() { + if (jobBuilder_ == null) { + jobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + getJob(), getParentForChildren(), isClean()); + job_ = null; + } + return jobBuilder_; + } + + private java.lang.Object jobSummary_ = ""; + /** + * + * + *
+       * A summary of the job with core information that's displayed on the search
+       * results listing page.
+       * 
+ * + * string job_summary = 2; + * + * @return The jobSummary. + */ + public java.lang.String getJobSummary() { + java.lang.Object ref = jobSummary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobSummary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A summary of the job with core information that's displayed on the search
+       * results listing page.
+       * 
+ * + * string job_summary = 2; + * + * @return The bytes for jobSummary. + */ + public com.google.protobuf.ByteString getJobSummaryBytes() { + java.lang.Object ref = jobSummary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A summary of the job with core information that's displayed on the search
+       * results listing page.
+       * 
+ * + * string job_summary = 2; + * + * @param value The jobSummary to set. + * @return This builder for chaining. + */ + public Builder setJobSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobSummary_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A summary of the job with core information that's displayed on the search
+       * results listing page.
+       * 
+ * + * string job_summary = 2; + * + * @return This builder for chaining. + */ + public Builder clearJobSummary() { + + jobSummary_ = getDefaultInstance().getJobSummary(); + onChanged(); + return this; + } + /** + * + * + *
+       * A summary of the job with core information that's displayed on the search
+       * results listing page.
+       * 
+ * + * string job_summary = 2; + * + * @param value The bytes for jobSummary to set. + * @return This builder for chaining. + */ + public Builder setJobSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobSummary_ = value; + onChanged(); + return this; + } + + private java.lang.Object jobTitleSnippet_ = ""; + /** + * + * + *
+       * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+       * closely matching a search query's keywords, if available. The matching
+       * query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string job_title_snippet = 3; + * + * @return The jobTitleSnippet. + */ + public java.lang.String getJobTitleSnippet() { + java.lang.Object ref = jobTitleSnippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobTitleSnippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+       * closely matching a search query's keywords, if available. The matching
+       * query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string job_title_snippet = 3; + * + * @return The bytes for jobTitleSnippet. + */ + public com.google.protobuf.ByteString getJobTitleSnippetBytes() { + java.lang.Object ref = jobTitleSnippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobTitleSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+       * closely matching a search query's keywords, if available. The matching
+       * query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string job_title_snippet = 3; + * + * @param value The jobTitleSnippet to set. + * @return This builder for chaining. + */ + public Builder setJobTitleSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobTitleSnippet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+       * closely matching a search query's keywords, if available. The matching
+       * query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string job_title_snippet = 3; + * + * @return This builder for chaining. + */ + public Builder clearJobTitleSnippet() { + + jobTitleSnippet_ = getDefaultInstance().getJobTitleSnippet(); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most
+       * closely matching a search query's keywords, if available. The matching
+       * query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string job_title_snippet = 3; + * + * @param value The bytes for jobTitleSnippet to set. + * @return This builder for chaining. + */ + public Builder setJobTitleSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobTitleSnippet_ = value; + onChanged(); + return this; + } + + private java.lang.Object searchTextSnippet_ = ""; + /** + * + * + *
+       * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+       * fields that most closely match a search query's keywords, if available.
+       * All HTML tags in the original fields are stripped when returned in this
+       * field, and matching query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string search_text_snippet = 4; + * + * @return The searchTextSnippet. + */ + public java.lang.String getSearchTextSnippet() { + java.lang.Object ref = searchTextSnippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchTextSnippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+       * fields that most closely match a search query's keywords, if available.
+       * All HTML tags in the original fields are stripped when returned in this
+       * field, and matching query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string search_text_snippet = 4; + * + * @return The bytes for searchTextSnippet. + */ + public com.google.protobuf.ByteString getSearchTextSnippetBytes() { + java.lang.Object ref = searchTextSnippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchTextSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+       * fields that most closely match a search query's keywords, if available.
+       * All HTML tags in the original fields are stripped when returned in this
+       * field, and matching query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string search_text_snippet = 4; + * + * @param value The searchTextSnippet to set. + * @return This builder for chaining. + */ + public Builder setSearchTextSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + searchTextSnippet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+       * fields that most closely match a search query's keywords, if available.
+       * All HTML tags in the original fields are stripped when returned in this
+       * field, and matching query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string search_text_snippet = 4; + * + * @return This builder for chaining. + */ + public Builder clearSearchTextSnippet() { + + searchTextSnippet_ = getDefaultInstance().getSearchTextSnippet(); + onChanged(); + return this; + } + /** + * + * + *
+       * Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar
+       * fields that most closely match a search query's keywords, if available.
+       * All HTML tags in the original fields are stripped when returned in this
+       * field, and matching query keywords are enclosed in HTML bold tags.
+       * 
+ * + * string search_text_snippet = 4; + * + * @param value The bytes for searchTextSnippet to set. + * @return This builder for chaining. + */ + public Builder setSearchTextSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + searchTextSnippet_ = value; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commuteInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder> + commuteInfoBuilder_; + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return Whether the commuteInfo field is set. + */ + public boolean hasCommuteInfo() { + return commuteInfoBuilder_ != null || commuteInfo_ != null; + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * + * @return The commuteInfo. + */ + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getCommuteInfo() { + if (commuteInfoBuilder_ == null) { + return commuteInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.getDefaultInstance() + : commuteInfo_; + } else { + return commuteInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public Builder setCommuteInfo( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo value) { + if (commuteInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commuteInfo_ = value; + onChanged(); + } else { + commuteInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public Builder setCommuteInfo( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder builderForValue) { + if (commuteInfoBuilder_ == null) { + commuteInfo_ = builderForValue.build(); + onChanged(); + } else { + commuteInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public Builder mergeCommuteInfo( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo value) { + if (commuteInfoBuilder_ == null) { + if (commuteInfo_ != null) { + commuteInfo_ = + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.newBuilder(commuteInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + commuteInfo_ = value; + } + onChanged(); + } else { + commuteInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public Builder clearCommuteInfo() { + if (commuteInfoBuilder_ == null) { + commuteInfo_ = null; + onChanged(); + } else { + commuteInfo_ = null; + commuteInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder + getCommuteInfoBuilder() { + + onChanged(); + return getCommuteInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder + getCommuteInfoOrBuilder() { + if (commuteInfoBuilder_ != null) { + return commuteInfoBuilder_.getMessageOrBuilder(); + } else { + return commuteInfo_ == null + ? com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.getDefaultInstance() + : commuteInfo_; + } + } + /** + * + * + *
+       * Commute information which is generated based on specified
+       *  [CommuteFilter][google.cloud.talent.v4.CommuteFilter].
+       * 
+ * + * .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder> + getCommuteInfoFieldBuilder() { + if (commuteInfoBuilder_ == null) { + commuteInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder>( + getCommuteInfo(), getParentForChildren(), isClean()); + commuteInfo_ = null; + } + return commuteInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SearchJobsResponse.MatchingJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SearchJobsResponse.MatchingJob) + private static final com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob(); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchingJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MatchingJob(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CommuteInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return Whether the jobLocation field is set. + */ + boolean hasJobLocation(); + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return The jobLocation. + */ + com.google.cloud.talent.v4.Location getJobLocation(); + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + com.google.cloud.talent.v4.LocationOrBuilder getJobLocationOrBuilder(); + + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return Whether the travelDuration field is set. + */ + boolean hasTravelDuration(); + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return The travelDuration. + */ + com.google.protobuf.Duration getTravelDuration(); + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder(); + } + /** + * + * + *
+   * Commute details related to this job.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse.CommuteInfo} + */ + public static final class CommuteInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) + CommuteInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommuteInfo.newBuilder() to construct. + private CommuteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommuteInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommuteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommuteInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Location.Builder subBuilder = null; + if (jobLocation_ != null) { + subBuilder = jobLocation_.toBuilder(); + } + jobLocation_ = + input.readMessage( + com.google.cloud.talent.v4.Location.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobLocation_); + jobLocation_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (travelDuration_ != null) { + subBuilder = travelDuration_.toBuilder(); + } + travelDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(travelDuration_); + travelDuration_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.class, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder.class); + } + + public static final int JOB_LOCATION_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Location jobLocation_; + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return Whether the jobLocation field is set. + */ + @java.lang.Override + public boolean hasJobLocation() { + return jobLocation_ != null; + } + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return The jobLocation. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location getJobLocation() { + return jobLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : jobLocation_; + } + /** + * + * + *
+     * Location used as the destination in the commute calculation.
+     * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationOrBuilder getJobLocationOrBuilder() { + return getJobLocation(); + } + + public static final int TRAVEL_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration travelDuration_; + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return Whether the travelDuration field is set. + */ + @java.lang.Override + public boolean hasTravelDuration() { + return travelDuration_ != null; + } + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return The travelDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTravelDuration() { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } + /** + * + * + *
+     * The number of seconds required to travel to the job location from the
+     * query location. A duration of 0 seconds indicates that the job isn't
+     * reachable within the requested duration, but was returned as part of an
+     * expanded query.
+     * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { + return getTravelDuration(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (jobLocation_ != null) { + output.writeMessage(1, getJobLocation()); + } + if (travelDuration_ != null) { + output.writeMessage(2, getTravelDuration()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (jobLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getJobLocation()); + } + if (travelDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTravelDuration()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo other = + (com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) obj; + + if (hasJobLocation() != other.hasJobLocation()) return false; + if (hasJobLocation()) { + if (!getJobLocation().equals(other.getJobLocation())) return false; + } + if (hasTravelDuration() != other.hasTravelDuration()) return false; + if (hasTravelDuration()) { + if (!getTravelDuration().equals(other.getTravelDuration())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJobLocation()) { + hash = (37 * hash) + JOB_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getJobLocation().hashCode(); + } + if (hasTravelDuration()) { + hash = (37 * hash) + TRAVEL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTravelDuration().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Commute details related to this job.
+     * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse.CommuteInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.class, + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobLocationBuilder_ == null) { + jobLocation_ = null; + } else { + jobLocation_ = null; + jobLocationBuilder_ = null; + } + if (travelDurationBuilder_ == null) { + travelDuration_ = null; + } else { + travelDuration_ = null; + travelDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_CommuteInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo build() { + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo buildPartial() { + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo result = + new com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo(this); + if (jobLocationBuilder_ == null) { + result.jobLocation_ = jobLocation_; + } else { + result.jobLocation_ = jobLocationBuilder_.build(); + } + if (travelDurationBuilder_ == null) { + result.travelDuration_ = travelDuration_; + } else { + result.travelDuration_ = travelDurationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) { + return mergeFrom((com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo other) { + if (other == com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo.getDefaultInstance()) + return this; + if (other.hasJobLocation()) { + mergeJobLocation(other.getJobLocation()); + } + if (other.hasTravelDuration()) { + mergeTravelDuration(other.getTravelDuration()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Location jobLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + jobLocationBuilder_; + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return Whether the jobLocation field is set. + */ + public boolean hasJobLocation() { + return jobLocationBuilder_ != null || jobLocation_ != null; + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + * + * @return The jobLocation. + */ + public com.google.cloud.talent.v4.Location getJobLocation() { + if (jobLocationBuilder_ == null) { + return jobLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : jobLocation_; + } else { + return jobLocationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public Builder setJobLocation(com.google.cloud.talent.v4.Location value) { + if (jobLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobLocation_ = value; + onChanged(); + } else { + jobLocationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public Builder setJobLocation(com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (jobLocationBuilder_ == null) { + jobLocation_ = builderForValue.build(); + onChanged(); + } else { + jobLocationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public Builder mergeJobLocation(com.google.cloud.talent.v4.Location value) { + if (jobLocationBuilder_ == null) { + if (jobLocation_ != null) { + jobLocation_ = + com.google.cloud.talent.v4.Location.newBuilder(jobLocation_) + .mergeFrom(value) + .buildPartial(); + } else { + jobLocation_ = value; + } + onChanged(); + } else { + jobLocationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public Builder clearJobLocation() { + if (jobLocationBuilder_ == null) { + jobLocation_ = null; + onChanged(); + } else { + jobLocation_ = null; + jobLocationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public com.google.cloud.talent.v4.Location.Builder getJobLocationBuilder() { + + onChanged(); + return getJobLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + public com.google.cloud.talent.v4.LocationOrBuilder getJobLocationOrBuilder() { + if (jobLocationBuilder_ != null) { + return jobLocationBuilder_.getMessageOrBuilder(); + } else { + return jobLocation_ == null + ? com.google.cloud.talent.v4.Location.getDefaultInstance() + : jobLocation_; + } + } + /** + * + * + *
+       * Location used as the destination in the commute calculation.
+       * 
+ * + * .google.cloud.talent.v4.Location job_location = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + getJobLocationFieldBuilder() { + if (jobLocationBuilder_ == null) { + jobLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder>( + getJobLocation(), getParentForChildren(), isClean()); + jobLocation_ = null; + } + return jobLocationBuilder_; + } + + private com.google.protobuf.Duration travelDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + travelDurationBuilder_; + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return Whether the travelDuration field is set. + */ + public boolean hasTravelDuration() { + return travelDurationBuilder_ != null || travelDuration_ != null; + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + * + * @return The travelDuration. + */ + public com.google.protobuf.Duration getTravelDuration() { + if (travelDurationBuilder_ == null) { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } else { + return travelDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public Builder setTravelDuration(com.google.protobuf.Duration value) { + if (travelDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + travelDuration_ = value; + onChanged(); + } else { + travelDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public Builder setTravelDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (travelDurationBuilder_ == null) { + travelDuration_ = builderForValue.build(); + onChanged(); + } else { + travelDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public Builder mergeTravelDuration(com.google.protobuf.Duration value) { + if (travelDurationBuilder_ == null) { + if (travelDuration_ != null) { + travelDuration_ = + com.google.protobuf.Duration.newBuilder(travelDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + travelDuration_ = value; + } + onChanged(); + } else { + travelDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public Builder clearTravelDuration() { + if (travelDurationBuilder_ == null) { + travelDuration_ = null; + onChanged(); + } else { + travelDuration_ = null; + travelDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public com.google.protobuf.Duration.Builder getTravelDurationBuilder() { + + onChanged(); + return getTravelDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getTravelDurationOrBuilder() { + if (travelDurationBuilder_ != null) { + return travelDurationBuilder_.getMessageOrBuilder(); + } else { + return travelDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : travelDuration_; + } + } + /** + * + * + *
+       * The number of seconds required to travel to the job location from the
+       * query location. A duration of 0 seconds indicates that the job isn't
+       * reachable within the requested duration, but was returned as part of an
+       * expanded query.
+       * 
+ * + * .google.protobuf.Duration travel_duration = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTravelDurationFieldBuilder() { + if (travelDurationBuilder_ == null) { + travelDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTravelDuration(), getParentForChildren(), isClean()); + travelDuration_ = null; + } + return travelDurationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SearchJobsResponse.CommuteInfo) + private static final com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo(); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommuteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommuteInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.CommuteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MATCHING_JOBS_FIELD_NUMBER = 1; + private java.util.List matchingJobs_; + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + @java.lang.Override + public java.util.List + getMatchingJobsList() { + return matchingJobs_; + } + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder> + getMatchingJobsOrBuilderList() { + return matchingJobs_; + } + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + @java.lang.Override + public int getMatchingJobsCount() { + return matchingJobs_.size(); + } + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getMatchingJobs(int index) { + return matchingJobs_.get(index); + } + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder + getMatchingJobsOrBuilder(int index) { + return matchingJobs_.get(index); + } + + public static final int HISTOGRAM_QUERY_RESULTS_FIELD_NUMBER = 2; + private java.util.List histogramQueryResults_; + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + @java.lang.Override + public java.util.List + getHistogramQueryResultsList() { + return histogramQueryResults_; + } + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + @java.lang.Override + public java.util.List + getHistogramQueryResultsOrBuilderList() { + return histogramQueryResults_; + } + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + @java.lang.Override + public int getHistogramQueryResultsCount() { + return histogramQueryResults_.size(); + } + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResult getHistogramQueryResults(int index) { + return histogramQueryResults_.get(index); + } + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + @java.lang.Override + public com.google.cloud.talent.v4.HistogramQueryResultOrBuilder getHistogramQueryResultsOrBuilder( + int index) { + return histogramQueryResults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token that specifies the starting position of the next page of results.
+   * This field is empty if there are no more results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token that specifies the starting position of the next page of results.
+   * This field is empty if there are no more results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FILTERS_FIELD_NUMBER = 4; + private java.util.List locationFilters_; + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + @java.lang.Override + public java.util.List getLocationFiltersList() { + return locationFilters_; + } + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + @java.lang.Override + public java.util.List + getLocationFiltersOrBuilderList() { + return locationFilters_; + } + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + @java.lang.Override + public int getLocationFiltersCount() { + return locationFilters_.size(); + } + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + @java.lang.Override + public com.google.cloud.talent.v4.Location getLocationFilters(int index) { + return locationFilters_.get(index); + } + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + @java.lang.Override + public com.google.cloud.talent.v4.LocationOrBuilder getLocationFiltersOrBuilder(int index) { + return locationFilters_.get(index); + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 6; + private int totalSize_; + /** + * + * + *
+   * Number of jobs that match the specified query.
+   * Note: This size is precise only if the total is less than 100,000.
+   * 
+ * + * int32 total_size = 6; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + + public static final int METADATA_FIELD_NUMBER = 7; + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + @java.lang.Override + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int BROADENED_QUERY_JOBS_COUNT_FIELD_NUMBER = 8; + private int broadenedQueryJobsCount_; + /** + * + * + *
+   * If query broadening is enabled, we may append additional results from the
+   * broadened query. This number indicates how many of the jobs returned in the
+   * jobs field are from the broadened query. These results are always at the
+   * end of the jobs list. In particular, a value of 0, or if the field isn't
+   * set, all the jobs in the jobs list are from the original
+   * (without broadening) query. If this field is non-zero, subsequent requests
+   * with offset after this result set should contain all broadened results.
+   * 
+ * + * int32 broadened_query_jobs_count = 8; + * + * @return The broadenedQueryJobsCount. + */ + @java.lang.Override + public int getBroadenedQueryJobsCount() { + return broadenedQueryJobsCount_; + } + + public static final int SPELL_CORRECTION_FIELD_NUMBER = 9; + private com.google.cloud.talent.v4.SpellingCorrection spellCorrection_; + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return Whether the spellCorrection field is set. + */ + @java.lang.Override + public boolean hasSpellCorrection() { + return spellCorrection_ != null; + } + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return The spellCorrection. + */ + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrection getSpellCorrection() { + return spellCorrection_ == null + ? com.google.cloud.talent.v4.SpellingCorrection.getDefaultInstance() + : spellCorrection_; + } + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrectionOrBuilder getSpellCorrectionOrBuilder() { + return getSpellCorrection(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < matchingJobs_.size(); i++) { + output.writeMessage(1, matchingJobs_.get(i)); + } + for (int i = 0; i < histogramQueryResults_.size(); i++) { + output.writeMessage(2, histogramQueryResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + for (int i = 0; i < locationFilters_.size(); i++) { + output.writeMessage(4, locationFilters_.get(i)); + } + if (totalSize_ != 0) { + output.writeInt32(6, totalSize_); + } + if (metadata_ != null) { + output.writeMessage(7, getMetadata()); + } + if (broadenedQueryJobsCount_ != 0) { + output.writeInt32(8, broadenedQueryJobsCount_); + } + if (spellCorrection_ != null) { + output.writeMessage(9, getSpellCorrection()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < matchingJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, matchingJobs_.get(i)); + } + for (int i = 0; i < histogramQueryResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, histogramQueryResults_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + for (int i = 0; i < locationFilters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, locationFilters_.get(i)); + } + if (totalSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, totalSize_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetadata()); + } + if (broadenedQueryJobsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, broadenedQueryJobsCount_); + } + if (spellCorrection_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSpellCorrection()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SearchJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SearchJobsResponse other = + (com.google.cloud.talent.v4.SearchJobsResponse) obj; + + if (!getMatchingJobsList().equals(other.getMatchingJobsList())) return false; + if (!getHistogramQueryResultsList().equals(other.getHistogramQueryResultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getLocationFiltersList().equals(other.getLocationFiltersList())) return false; + if (getTotalSize() != other.getTotalSize()) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (getBroadenedQueryJobsCount() != other.getBroadenedQueryJobsCount()) return false; + if (hasSpellCorrection() != other.hasSpellCorrection()) return false; + if (hasSpellCorrection()) { + if (!getSpellCorrection().equals(other.getSpellCorrection())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMatchingJobsCount() > 0) { + hash = (37 * hash) + MATCHING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getMatchingJobsList().hashCode(); + } + if (getHistogramQueryResultsCount() > 0) { + hash = (37 * hash) + HISTOGRAM_QUERY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getHistogramQueryResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getLocationFiltersCount() > 0) { + hash = (37 * hash) + LOCATION_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getLocationFiltersList().hashCode(); + } + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTotalSize(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + BROADENED_QUERY_JOBS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getBroadenedQueryJobsCount(); + if (hasSpellCorrection()) { + hash = (37 * hash) + SPELL_CORRECTION_FIELD_NUMBER; + hash = (53 * hash) + getSpellCorrection().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.SearchJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for SearchJob method.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SearchJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SearchJobsResponse) + com.google.cloud.talent.v4.SearchJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SearchJobsResponse.class, + com.google.cloud.talent.v4.SearchJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SearchJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMatchingJobsFieldBuilder(); + getHistogramQueryResultsFieldBuilder(); + getLocationFiltersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (matchingJobsBuilder_ == null) { + matchingJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + matchingJobsBuilder_.clear(); + } + if (histogramQueryResultsBuilder_ == null) { + histogramQueryResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + histogramQueryResultsBuilder_.clear(); + } + nextPageToken_ = ""; + + if (locationFiltersBuilder_ == null) { + locationFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + locationFiltersBuilder_.clear(); + } + totalSize_ = 0; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + broadenedQueryJobsCount_ = 0; + + if (spellCorrectionBuilder_ == null) { + spellCorrection_ = null; + } else { + spellCorrection_ = null; + spellCorrectionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_SearchJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SearchJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse build() { + com.google.cloud.talent.v4.SearchJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse buildPartial() { + com.google.cloud.talent.v4.SearchJobsResponse result = + new com.google.cloud.talent.v4.SearchJobsResponse(this); + int from_bitField0_ = bitField0_; + if (matchingJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + matchingJobs_ = java.util.Collections.unmodifiableList(matchingJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.matchingJobs_ = matchingJobs_; + } else { + result.matchingJobs_ = matchingJobsBuilder_.build(); + } + if (histogramQueryResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + histogramQueryResults_ = java.util.Collections.unmodifiableList(histogramQueryResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.histogramQueryResults_ = histogramQueryResults_; + } else { + result.histogramQueryResults_ = histogramQueryResultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (locationFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + locationFilters_ = java.util.Collections.unmodifiableList(locationFilters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.locationFilters_ = locationFilters_; + } else { + result.locationFilters_ = locationFiltersBuilder_.build(); + } + result.totalSize_ = totalSize_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + result.broadenedQueryJobsCount_ = broadenedQueryJobsCount_; + if (spellCorrectionBuilder_ == null) { + result.spellCorrection_ = spellCorrection_; + } else { + result.spellCorrection_ = spellCorrectionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SearchJobsResponse) { + return mergeFrom((com.google.cloud.talent.v4.SearchJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.SearchJobsResponse other) { + if (other == com.google.cloud.talent.v4.SearchJobsResponse.getDefaultInstance()) return this; + if (matchingJobsBuilder_ == null) { + if (!other.matchingJobs_.isEmpty()) { + if (matchingJobs_.isEmpty()) { + matchingJobs_ = other.matchingJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMatchingJobsIsMutable(); + matchingJobs_.addAll(other.matchingJobs_); + } + onChanged(); + } + } else { + if (!other.matchingJobs_.isEmpty()) { + if (matchingJobsBuilder_.isEmpty()) { + matchingJobsBuilder_.dispose(); + matchingJobsBuilder_ = null; + matchingJobs_ = other.matchingJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + matchingJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMatchingJobsFieldBuilder() + : null; + } else { + matchingJobsBuilder_.addAllMessages(other.matchingJobs_); + } + } + } + if (histogramQueryResultsBuilder_ == null) { + if (!other.histogramQueryResults_.isEmpty()) { + if (histogramQueryResults_.isEmpty()) { + histogramQueryResults_ = other.histogramQueryResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.addAll(other.histogramQueryResults_); + } + onChanged(); + } + } else { + if (!other.histogramQueryResults_.isEmpty()) { + if (histogramQueryResultsBuilder_.isEmpty()) { + histogramQueryResultsBuilder_.dispose(); + histogramQueryResultsBuilder_ = null; + histogramQueryResults_ = other.histogramQueryResults_; + bitField0_ = (bitField0_ & ~0x00000002); + histogramQueryResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHistogramQueryResultsFieldBuilder() + : null; + } else { + histogramQueryResultsBuilder_.addAllMessages(other.histogramQueryResults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (locationFiltersBuilder_ == null) { + if (!other.locationFilters_.isEmpty()) { + if (locationFilters_.isEmpty()) { + locationFilters_ = other.locationFilters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLocationFiltersIsMutable(); + locationFilters_.addAll(other.locationFilters_); + } + onChanged(); + } + } else { + if (!other.locationFilters_.isEmpty()) { + if (locationFiltersBuilder_.isEmpty()) { + locationFiltersBuilder_.dispose(); + locationFiltersBuilder_ = null; + locationFilters_ = other.locationFilters_; + bitField0_ = (bitField0_ & ~0x00000004); + locationFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLocationFiltersFieldBuilder() + : null; + } else { + locationFiltersBuilder_.addAllMessages(other.locationFilters_); + } + } + } + if (other.getTotalSize() != 0) { + setTotalSize(other.getTotalSize()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.getBroadenedQueryJobsCount() != 0) { + setBroadenedQueryJobsCount(other.getBroadenedQueryJobsCount()); + } + if (other.hasSpellCorrection()) { + mergeSpellCorrection(other.getSpellCorrection()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SearchJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.SearchJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + matchingJobs_ = java.util.Collections.emptyList(); + + private void ensureMatchingJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + matchingJobs_ = + new java.util.ArrayList( + matchingJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder> + matchingJobsBuilder_; + + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public java.util.List + getMatchingJobsList() { + if (matchingJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(matchingJobs_); + } else { + return matchingJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public int getMatchingJobsCount() { + if (matchingJobsBuilder_ == null) { + return matchingJobs_.size(); + } else { + return matchingJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getMatchingJobs(int index) { + if (matchingJobsBuilder_ == null) { + return matchingJobs_.get(index); + } else { + return matchingJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder setMatchingJobs( + int index, com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob value) { + if (matchingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingJobsIsMutable(); + matchingJobs_.set(index, value); + onChanged(); + } else { + matchingJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder setMatchingJobs( + int index, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder builderForValue) { + if (matchingJobsBuilder_ == null) { + ensureMatchingJobsIsMutable(); + matchingJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + matchingJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder addMatchingJobs( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob value) { + if (matchingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingJobsIsMutable(); + matchingJobs_.add(value); + onChanged(); + } else { + matchingJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder addMatchingJobs( + int index, com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob value) { + if (matchingJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingJobsIsMutable(); + matchingJobs_.add(index, value); + onChanged(); + } else { + matchingJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder addMatchingJobs( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder builderForValue) { + if (matchingJobsBuilder_ == null) { + ensureMatchingJobsIsMutable(); + matchingJobs_.add(builderForValue.build()); + onChanged(); + } else { + matchingJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder addMatchingJobs( + int index, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder builderForValue) { + if (matchingJobsBuilder_ == null) { + ensureMatchingJobsIsMutable(); + matchingJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + matchingJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder addAllMatchingJobs( + java.lang.Iterable + values) { + if (matchingJobsBuilder_ == null) { + ensureMatchingJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchingJobs_); + onChanged(); + } else { + matchingJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder clearMatchingJobs() { + if (matchingJobsBuilder_ == null) { + matchingJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + matchingJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public Builder removeMatchingJobs(int index) { + if (matchingJobsBuilder_ == null) { + ensureMatchingJobsIsMutable(); + matchingJobs_.remove(index); + onChanged(); + } else { + matchingJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder getMatchingJobsBuilder( + int index) { + return getMatchingJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder + getMatchingJobsOrBuilder(int index) { + if (matchingJobsBuilder_ == null) { + return matchingJobs_.get(index); + } else { + return matchingJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder> + getMatchingJobsOrBuilderList() { + if (matchingJobsBuilder_ != null) { + return matchingJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matchingJobs_); + } + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder + addMatchingJobsBuilder() { + return getMatchingJobsFieldBuilder() + .addBuilder( + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.getDefaultInstance()); + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder addMatchingJobsBuilder( + int index) { + return getMatchingJobsFieldBuilder() + .addBuilder( + index, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.getDefaultInstance()); + } + /** + * + * + *
+     * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+     * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * + */ + public java.util.List + getMatchingJobsBuilderList() { + return getMatchingJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder> + getMatchingJobsFieldBuilder() { + if (matchingJobsBuilder_ == null) { + matchingJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob.Builder, + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder>( + matchingJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + matchingJobs_ = null; + } + return matchingJobsBuilder_; + } + + private java.util.List histogramQueryResults_ = + java.util.Collections.emptyList(); + + private void ensureHistogramQueryResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + histogramQueryResults_ = + new java.util.ArrayList( + histogramQueryResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQueryResult, + com.google.cloud.talent.v4.HistogramQueryResult.Builder, + com.google.cloud.talent.v4.HistogramQueryResultOrBuilder> + histogramQueryResultsBuilder_; + + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public java.util.List + getHistogramQueryResultsList() { + if (histogramQueryResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(histogramQueryResults_); + } else { + return histogramQueryResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public int getHistogramQueryResultsCount() { + if (histogramQueryResultsBuilder_ == null) { + return histogramQueryResults_.size(); + } else { + return histogramQueryResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public com.google.cloud.talent.v4.HistogramQueryResult getHistogramQueryResults(int index) { + if (histogramQueryResultsBuilder_ == null) { + return histogramQueryResults_.get(index); + } else { + return histogramQueryResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder setHistogramQueryResults( + int index, com.google.cloud.talent.v4.HistogramQueryResult value) { + if (histogramQueryResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.set(index, value); + onChanged(); + } else { + histogramQueryResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder setHistogramQueryResults( + int index, com.google.cloud.talent.v4.HistogramQueryResult.Builder builderForValue) { + if (histogramQueryResultsBuilder_ == null) { + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.set(index, builderForValue.build()); + onChanged(); + } else { + histogramQueryResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder addHistogramQueryResults(com.google.cloud.talent.v4.HistogramQueryResult value) { + if (histogramQueryResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.add(value); + onChanged(); + } else { + histogramQueryResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder addHistogramQueryResults( + int index, com.google.cloud.talent.v4.HistogramQueryResult value) { + if (histogramQueryResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.add(index, value); + onChanged(); + } else { + histogramQueryResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder addHistogramQueryResults( + com.google.cloud.talent.v4.HistogramQueryResult.Builder builderForValue) { + if (histogramQueryResultsBuilder_ == null) { + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.add(builderForValue.build()); + onChanged(); + } else { + histogramQueryResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder addHistogramQueryResults( + int index, com.google.cloud.talent.v4.HistogramQueryResult.Builder builderForValue) { + if (histogramQueryResultsBuilder_ == null) { + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.add(index, builderForValue.build()); + onChanged(); + } else { + histogramQueryResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder addAllHistogramQueryResults( + java.lang.Iterable values) { + if (histogramQueryResultsBuilder_ == null) { + ensureHistogramQueryResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, histogramQueryResults_); + onChanged(); + } else { + histogramQueryResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder clearHistogramQueryResults() { + if (histogramQueryResultsBuilder_ == null) { + histogramQueryResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + histogramQueryResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public Builder removeHistogramQueryResults(int index) { + if (histogramQueryResultsBuilder_ == null) { + ensureHistogramQueryResultsIsMutable(); + histogramQueryResults_.remove(index); + onChanged(); + } else { + histogramQueryResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public com.google.cloud.talent.v4.HistogramQueryResult.Builder getHistogramQueryResultsBuilder( + int index) { + return getHistogramQueryResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public com.google.cloud.talent.v4.HistogramQueryResultOrBuilder + getHistogramQueryResultsOrBuilder(int index) { + if (histogramQueryResultsBuilder_ == null) { + return histogramQueryResults_.get(index); + } else { + return histogramQueryResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public java.util.List + getHistogramQueryResultsOrBuilderList() { + if (histogramQueryResultsBuilder_ != null) { + return histogramQueryResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(histogramQueryResults_); + } + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public com.google.cloud.talent.v4.HistogramQueryResult.Builder + addHistogramQueryResultsBuilder() { + return getHistogramQueryResultsFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.HistogramQueryResult.getDefaultInstance()); + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public com.google.cloud.talent.v4.HistogramQueryResult.Builder addHistogramQueryResultsBuilder( + int index) { + return getHistogramQueryResultsFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.HistogramQueryResult.getDefaultInstance()); + } + /** + * + * + *
+     * The histogram results that match with specified
+     * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+     * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * + */ + public java.util.List + getHistogramQueryResultsBuilderList() { + return getHistogramQueryResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQueryResult, + com.google.cloud.talent.v4.HistogramQueryResult.Builder, + com.google.cloud.talent.v4.HistogramQueryResultOrBuilder> + getHistogramQueryResultsFieldBuilder() { + if (histogramQueryResultsBuilder_ == null) { + histogramQueryResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.HistogramQueryResult, + com.google.cloud.talent.v4.HistogramQueryResult.Builder, + com.google.cloud.talent.v4.HistogramQueryResultOrBuilder>( + histogramQueryResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + histogramQueryResults_ = null; + } + return histogramQueryResultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token that specifies the starting position of the next page of results.
+     * This field is empty if there are no more results.
+     * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token that specifies the starting position of the next page of results.
+     * This field is empty if there are no more results.
+     * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token that specifies the starting position of the next page of results.
+     * This field is empty if there are no more results.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token that specifies the starting position of the next page of results.
+     * This field is empty if there are no more results.
+     * 
+ * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token that specifies the starting position of the next page of results.
+     * This field is empty if there are no more results.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private java.util.List locationFilters_ = + java.util.Collections.emptyList(); + + private void ensureLocationFiltersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + locationFilters_ = + new java.util.ArrayList(locationFilters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + locationFiltersBuilder_; + + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public java.util.List getLocationFiltersList() { + if (locationFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(locationFilters_); + } else { + return locationFiltersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public int getLocationFiltersCount() { + if (locationFiltersBuilder_ == null) { + return locationFilters_.size(); + } else { + return locationFiltersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public com.google.cloud.talent.v4.Location getLocationFilters(int index) { + if (locationFiltersBuilder_ == null) { + return locationFilters_.get(index); + } else { + return locationFiltersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder setLocationFilters(int index, com.google.cloud.talent.v4.Location value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.set(index, value); + onChanged(); + } else { + locationFiltersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder setLocationFilters( + int index, com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder addLocationFilters(com.google.cloud.talent.v4.Location value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.add(value); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder addLocationFilters(int index, com.google.cloud.talent.v4.Location value) { + if (locationFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFiltersIsMutable(); + locationFilters_.add(index, value); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder addLocationFilters(com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.add(builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder addLocationFilters( + int index, com.google.cloud.talent.v4.Location.Builder builderForValue) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + locationFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder addAllLocationFilters( + java.lang.Iterable values) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locationFilters_); + onChanged(); + } else { + locationFiltersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder clearLocationFilters() { + if (locationFiltersBuilder_ == null) { + locationFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + locationFiltersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public Builder removeLocationFilters(int index) { + if (locationFiltersBuilder_ == null) { + ensureLocationFiltersIsMutable(); + locationFilters_.remove(index); + onChanged(); + } else { + locationFiltersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public com.google.cloud.talent.v4.Location.Builder getLocationFiltersBuilder(int index) { + return getLocationFiltersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public com.google.cloud.talent.v4.LocationOrBuilder getLocationFiltersOrBuilder(int index) { + if (locationFiltersBuilder_ == null) { + return locationFilters_.get(index); + } else { + return locationFiltersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public java.util.List + getLocationFiltersOrBuilderList() { + if (locationFiltersBuilder_ != null) { + return locationFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locationFilters_); + } + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public com.google.cloud.talent.v4.Location.Builder addLocationFiltersBuilder() { + return getLocationFiltersFieldBuilder() + .addBuilder(com.google.cloud.talent.v4.Location.getDefaultInstance()); + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public com.google.cloud.talent.v4.Location.Builder addLocationFiltersBuilder(int index) { + return getLocationFiltersFieldBuilder() + .addBuilder(index, com.google.cloud.talent.v4.Location.getDefaultInstance()); + } + /** + * + * + *
+     * The location filters that the service applied to the specified query. If
+     * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+     * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+     * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + public java.util.List + getLocationFiltersBuilderList() { + return getLocationFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder> + getLocationFiltersFieldBuilder() { + if (locationFiltersBuilder_ == null) { + locationFiltersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.talent.v4.Location, + com.google.cloud.talent.v4.Location.Builder, + com.google.cloud.talent.v4.LocationOrBuilder>( + locationFilters_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + locationFilters_ = null; + } + return locationFiltersBuilder_; + } + + private int totalSize_; + /** + * + * + *
+     * Number of jobs that match the specified query.
+     * Note: This size is precise only if the total is less than 100,000.
+     * 
+ * + * int32 total_size = 6; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * Number of jobs that match the specified query.
+     * Note: This size is precise only if the total is less than 100,000.
+     * 
+ * + * int32 total_size = 6; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(int value) { + + totalSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of jobs that match the specified query.
+     * Note: This size is precise only if the total is less than 100,000.
+     * 
+ * + * int32 total_size = 6; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + + totalSize_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.ResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return The metadata. + */ + public com.google.cloud.talent.v4.ResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public Builder setMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public Builder setMetadata( + com.google.cloud.talent.v4.ResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public Builder mergeMetadata(com.google.cloud.talent.v4.ResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.talent.v4.ResponseMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public com.google.cloud.talent.v4.ResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + public com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.talent.v4.ResponseMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Additional information for the API invocation, such as the request
+     * tracking id.
+     * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.ResponseMetadata, + com.google.cloud.talent.v4.ResponseMetadata.Builder, + com.google.cloud.talent.v4.ResponseMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int broadenedQueryJobsCount_; + /** + * + * + *
+     * If query broadening is enabled, we may append additional results from the
+     * broadened query. This number indicates how many of the jobs returned in the
+     * jobs field are from the broadened query. These results are always at the
+     * end of the jobs list. In particular, a value of 0, or if the field isn't
+     * set, all the jobs in the jobs list are from the original
+     * (without broadening) query. If this field is non-zero, subsequent requests
+     * with offset after this result set should contain all broadened results.
+     * 
+ * + * int32 broadened_query_jobs_count = 8; + * + * @return The broadenedQueryJobsCount. + */ + @java.lang.Override + public int getBroadenedQueryJobsCount() { + return broadenedQueryJobsCount_; + } + /** + * + * + *
+     * If query broadening is enabled, we may append additional results from the
+     * broadened query. This number indicates how many of the jobs returned in the
+     * jobs field are from the broadened query. These results are always at the
+     * end of the jobs list. In particular, a value of 0, or if the field isn't
+     * set, all the jobs in the jobs list are from the original
+     * (without broadening) query. If this field is non-zero, subsequent requests
+     * with offset after this result set should contain all broadened results.
+     * 
+ * + * int32 broadened_query_jobs_count = 8; + * + * @param value The broadenedQueryJobsCount to set. + * @return This builder for chaining. + */ + public Builder setBroadenedQueryJobsCount(int value) { + + broadenedQueryJobsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If query broadening is enabled, we may append additional results from the
+     * broadened query. This number indicates how many of the jobs returned in the
+     * jobs field are from the broadened query. These results are always at the
+     * end of the jobs list. In particular, a value of 0, or if the field isn't
+     * set, all the jobs in the jobs list are from the original
+     * (without broadening) query. If this field is non-zero, subsequent requests
+     * with offset after this result set should contain all broadened results.
+     * 
+ * + * int32 broadened_query_jobs_count = 8; + * + * @return This builder for chaining. + */ + public Builder clearBroadenedQueryJobsCount() { + + broadenedQueryJobsCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.talent.v4.SpellingCorrection spellCorrection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SpellingCorrection, + com.google.cloud.talent.v4.SpellingCorrection.Builder, + com.google.cloud.talent.v4.SpellingCorrectionOrBuilder> + spellCorrectionBuilder_; + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return Whether the spellCorrection field is set. + */ + public boolean hasSpellCorrection() { + return spellCorrectionBuilder_ != null || spellCorrection_ != null; + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return The spellCorrection. + */ + public com.google.cloud.talent.v4.SpellingCorrection getSpellCorrection() { + if (spellCorrectionBuilder_ == null) { + return spellCorrection_ == null + ? com.google.cloud.talent.v4.SpellingCorrection.getDefaultInstance() + : spellCorrection_; + } else { + return spellCorrectionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public Builder setSpellCorrection(com.google.cloud.talent.v4.SpellingCorrection value) { + if (spellCorrectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spellCorrection_ = value; + onChanged(); + } else { + spellCorrectionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public Builder setSpellCorrection( + com.google.cloud.talent.v4.SpellingCorrection.Builder builderForValue) { + if (spellCorrectionBuilder_ == null) { + spellCorrection_ = builderForValue.build(); + onChanged(); + } else { + spellCorrectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public Builder mergeSpellCorrection(com.google.cloud.talent.v4.SpellingCorrection value) { + if (spellCorrectionBuilder_ == null) { + if (spellCorrection_ != null) { + spellCorrection_ = + com.google.cloud.talent.v4.SpellingCorrection.newBuilder(spellCorrection_) + .mergeFrom(value) + .buildPartial(); + } else { + spellCorrection_ = value; + } + onChanged(); + } else { + spellCorrectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public Builder clearSpellCorrection() { + if (spellCorrectionBuilder_ == null) { + spellCorrection_ = null; + onChanged(); + } else { + spellCorrection_ = null; + spellCorrectionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public com.google.cloud.talent.v4.SpellingCorrection.Builder getSpellCorrectionBuilder() { + + onChanged(); + return getSpellCorrectionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + public com.google.cloud.talent.v4.SpellingCorrectionOrBuilder getSpellCorrectionOrBuilder() { + if (spellCorrectionBuilder_ != null) { + return spellCorrectionBuilder_.getMessageOrBuilder(); + } else { + return spellCorrection_ == null + ? com.google.cloud.talent.v4.SpellingCorrection.getDefaultInstance() + : spellCorrection_; + } + } + /** + * + * + *
+     * The spell checking result, and correction.
+     * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SpellingCorrection, + com.google.cloud.talent.v4.SpellingCorrection.Builder, + com.google.cloud.talent.v4.SpellingCorrectionOrBuilder> + getSpellCorrectionFieldBuilder() { + if (spellCorrectionBuilder_ == null) { + spellCorrectionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.SpellingCorrection, + com.google.cloud.talent.v4.SpellingCorrection.Builder, + com.google.cloud.talent.v4.SpellingCorrectionOrBuilder>( + getSpellCorrection(), getParentForChildren(), isClean()); + spellCorrection_ = null; + } + return spellCorrectionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SearchJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SearchJobsResponse) + private static final com.google.cloud.talent.v4.SearchJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SearchJobsResponse(); + } + + public static com.google.cloud.talent.v4.SearchJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SearchJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponseOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponseOrBuilder.java new file mode 100644 index 00000000..3767d6f4 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponseOrBuilder.java @@ -0,0 +1,331 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface SearchJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SearchJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + java.util.List getMatchingJobsList(); + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJob getMatchingJobs(int index); + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + int getMatchingJobsCount(); + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + java.util.List + getMatchingJobsOrBuilderList(); + /** + * + * + *
+   * The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest].
+   * 
+ * + * repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + com.google.cloud.talent.v4.SearchJobsResponse.MatchingJobOrBuilder getMatchingJobsOrBuilder( + int index); + + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + java.util.List getHistogramQueryResultsList(); + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + com.google.cloud.talent.v4.HistogramQueryResult getHistogramQueryResults(int index); + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + int getHistogramQueryResultsCount(); + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + java.util.List + getHistogramQueryResultsOrBuilderList(); + /** + * + * + *
+   * The histogram results that match with specified
+   * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries].
+   * 
+ * + * repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + com.google.cloud.talent.v4.HistogramQueryResultOrBuilder getHistogramQueryResultsOrBuilder( + int index); + + /** + * + * + *
+   * The token that specifies the starting position of the next page of results.
+   * This field is empty if there are no more results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token that specifies the starting position of the next page of results.
+   * This field is empty if there are no more results.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + java.util.List getLocationFiltersList(); + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + com.google.cloud.talent.v4.Location getLocationFilters(int index); + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + int getLocationFiltersCount(); + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + java.util.List + getLocationFiltersOrBuilderList(); + /** + * + * + *
+   * The location filters that the service applied to the specified query. If
+   * any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is
+   * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED].
+   * 
+ * + * repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + com.google.cloud.talent.v4.LocationOrBuilder getLocationFiltersOrBuilder(int index); + + /** + * + * + *
+   * Number of jobs that match the specified query.
+   * Note: This size is precise only if the total is less than 100,000.
+   * 
+ * + * int32 total_size = 6; + * + * @return The totalSize. + */ + int getTotalSize(); + + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * + * @return The metadata. + */ + com.google.cloud.talent.v4.ResponseMetadata getMetadata(); + /** + * + * + *
+   * Additional information for the API invocation, such as the request
+   * tracking id.
+   * 
+ * + * .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + com.google.cloud.talent.v4.ResponseMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * If query broadening is enabled, we may append additional results from the
+   * broadened query. This number indicates how many of the jobs returned in the
+   * jobs field are from the broadened query. These results are always at the
+   * end of the jobs list. In particular, a value of 0, or if the field isn't
+   * set, all the jobs in the jobs list are from the original
+   * (without broadening) query. If this field is non-zero, subsequent requests
+   * with offset after this result set should contain all broadened results.
+   * 
+ * + * int32 broadened_query_jobs_count = 8; + * + * @return The broadenedQueryJobsCount. + */ + int getBroadenedQueryJobsCount(); + + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return Whether the spellCorrection field is set. + */ + boolean hasSpellCorrection(); + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * + * @return The spellCorrection. + */ + com.google.cloud.talent.v4.SpellingCorrection getSpellCorrection(); + /** + * + * + *
+   * The spell checking result, and correction.
+   * 
+ * + * .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + com.google.cloud.talent.v4.SpellingCorrectionOrBuilder getSpellCorrectionOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrection.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrection.java new file mode 100644 index 00000000..0d095ec1 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrection.java @@ -0,0 +1,938 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Spell check result.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SpellingCorrection} + */ +public final class SpellingCorrection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.SpellingCorrection) + SpellingCorrectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpellingCorrection.newBuilder() to construct. + private SpellingCorrection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpellingCorrection() { + correctedText_ = ""; + correctedHtml_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpellingCorrection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SpellingCorrection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + corrected_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + correctedText_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + correctedHtml_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_SpellingCorrection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_SpellingCorrection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SpellingCorrection.class, + com.google.cloud.talent.v4.SpellingCorrection.Builder.class); + } + + public static final int CORRECTED_FIELD_NUMBER = 1; + private boolean corrected_; + /** + * + * + *
+   * Indicates if the query was corrected by the spell checker.
+   * 
+ * + * bool corrected = 1; + * + * @return The corrected. + */ + @java.lang.Override + public boolean getCorrected() { + return corrected_; + } + + public static final int CORRECTED_TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object correctedText_; + /** + * + * + *
+   * Correction output consisting of the corrected keyword string.
+   * 
+ * + * string corrected_text = 2; + * + * @return The correctedText. + */ + @java.lang.Override + public java.lang.String getCorrectedText() { + java.lang.Object ref = correctedText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedText_ = s; + return s; + } + } + /** + * + * + *
+   * Correction output consisting of the corrected keyword string.
+   * 
+ * + * string corrected_text = 2; + * + * @return The bytes for correctedText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorrectedTextBytes() { + java.lang.Object ref = correctedText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CORRECTED_HTML_FIELD_NUMBER = 3; + private volatile java.lang.Object correctedHtml_; + /** + * + * + *
+   * Corrected output with html tags to highlight the corrected words.
+   * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+   * For example, the user input query is "software enginear", where the second
+   * word, "enginear," is incorrect. It should be "engineer". When spelling
+   * correction is enabled, this value is
+   * "software <b><i>engineer</i></b>".
+   * 
+ * + * string corrected_html = 3; + * + * @return The correctedHtml. + */ + @java.lang.Override + public java.lang.String getCorrectedHtml() { + java.lang.Object ref = correctedHtml_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedHtml_ = s; + return s; + } + } + /** + * + * + *
+   * Corrected output with html tags to highlight the corrected words.
+   * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+   * For example, the user input query is "software enginear", where the second
+   * word, "enginear," is incorrect. It should be "engineer". When spelling
+   * correction is enabled, this value is
+   * "software <b><i>engineer</i></b>".
+   * 
+ * + * string corrected_html = 3; + * + * @return The bytes for correctedHtml. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorrectedHtmlBytes() { + java.lang.Object ref = correctedHtml_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedHtml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (corrected_ != false) { + output.writeBool(1, corrected_); + } + if (!getCorrectedTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, correctedText_); + } + if (!getCorrectedHtmlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, correctedHtml_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (corrected_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, corrected_); + } + if (!getCorrectedTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, correctedText_); + } + if (!getCorrectedHtmlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, correctedHtml_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.SpellingCorrection)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.SpellingCorrection other = + (com.google.cloud.talent.v4.SpellingCorrection) obj; + + if (getCorrected() != other.getCorrected()) return false; + if (!getCorrectedText().equals(other.getCorrectedText())) return false; + if (!getCorrectedHtml().equals(other.getCorrectedHtml())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CORRECTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCorrected()); + hash = (37 * hash) + CORRECTED_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedText().hashCode(); + hash = (37 * hash) + CORRECTED_HTML_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedHtml().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.SpellingCorrection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.SpellingCorrection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Spell check result.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.SpellingCorrection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.SpellingCorrection) + com.google.cloud.talent.v4.SpellingCorrectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_SpellingCorrection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_SpellingCorrection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.SpellingCorrection.class, + com.google.cloud.talent.v4.SpellingCorrection.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.SpellingCorrection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + corrected_ = false; + + correctedText_ = ""; + + correctedHtml_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_SpellingCorrection_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrection getDefaultInstanceForType() { + return com.google.cloud.talent.v4.SpellingCorrection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrection build() { + com.google.cloud.talent.v4.SpellingCorrection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrection buildPartial() { + com.google.cloud.talent.v4.SpellingCorrection result = + new com.google.cloud.talent.v4.SpellingCorrection(this); + result.corrected_ = corrected_; + result.correctedText_ = correctedText_; + result.correctedHtml_ = correctedHtml_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.SpellingCorrection) { + return mergeFrom((com.google.cloud.talent.v4.SpellingCorrection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.SpellingCorrection other) { + if (other == com.google.cloud.talent.v4.SpellingCorrection.getDefaultInstance()) return this; + if (other.getCorrected() != false) { + setCorrected(other.getCorrected()); + } + if (!other.getCorrectedText().isEmpty()) { + correctedText_ = other.correctedText_; + onChanged(); + } + if (!other.getCorrectedHtml().isEmpty()) { + correctedHtml_ = other.correctedHtml_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.SpellingCorrection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.SpellingCorrection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean corrected_; + /** + * + * + *
+     * Indicates if the query was corrected by the spell checker.
+     * 
+ * + * bool corrected = 1; + * + * @return The corrected. + */ + @java.lang.Override + public boolean getCorrected() { + return corrected_; + } + /** + * + * + *
+     * Indicates if the query was corrected by the spell checker.
+     * 
+ * + * bool corrected = 1; + * + * @param value The corrected to set. + * @return This builder for chaining. + */ + public Builder setCorrected(boolean value) { + + corrected_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates if the query was corrected by the spell checker.
+     * 
+ * + * bool corrected = 1; + * + * @return This builder for chaining. + */ + public Builder clearCorrected() { + + corrected_ = false; + onChanged(); + return this; + } + + private java.lang.Object correctedText_ = ""; + /** + * + * + *
+     * Correction output consisting of the corrected keyword string.
+     * 
+ * + * string corrected_text = 2; + * + * @return The correctedText. + */ + public java.lang.String getCorrectedText() { + java.lang.Object ref = correctedText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Correction output consisting of the corrected keyword string.
+     * 
+ * + * string corrected_text = 2; + * + * @return The bytes for correctedText. + */ + public com.google.protobuf.ByteString getCorrectedTextBytes() { + java.lang.Object ref = correctedText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Correction output consisting of the corrected keyword string.
+     * 
+ * + * string corrected_text = 2; + * + * @param value The correctedText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + correctedText_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Correction output consisting of the corrected keyword string.
+     * 
+ * + * string corrected_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearCorrectedText() { + + correctedText_ = getDefaultInstance().getCorrectedText(); + onChanged(); + return this; + } + /** + * + * + *
+     * Correction output consisting of the corrected keyword string.
+     * 
+ * + * string corrected_text = 2; + * + * @param value The bytes for correctedText to set. + * @return This builder for chaining. + */ + public Builder setCorrectedTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + correctedText_ = value; + onChanged(); + return this; + } + + private java.lang.Object correctedHtml_ = ""; + /** + * + * + *
+     * Corrected output with html tags to highlight the corrected words.
+     * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+     * For example, the user input query is "software enginear", where the second
+     * word, "enginear," is incorrect. It should be "engineer". When spelling
+     * correction is enabled, this value is
+     * "software <b><i>engineer</i></b>".
+     * 
+ * + * string corrected_html = 3; + * + * @return The correctedHtml. + */ + public java.lang.String getCorrectedHtml() { + java.lang.Object ref = correctedHtml_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedHtml_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Corrected output with html tags to highlight the corrected words.
+     * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+     * For example, the user input query is "software enginear", where the second
+     * word, "enginear," is incorrect. It should be "engineer". When spelling
+     * correction is enabled, this value is
+     * "software <b><i>engineer</i></b>".
+     * 
+ * + * string corrected_html = 3; + * + * @return The bytes for correctedHtml. + */ + public com.google.protobuf.ByteString getCorrectedHtmlBytes() { + java.lang.Object ref = correctedHtml_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedHtml_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Corrected output with html tags to highlight the corrected words.
+     * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+     * For example, the user input query is "software enginear", where the second
+     * word, "enginear," is incorrect. It should be "engineer". When spelling
+     * correction is enabled, this value is
+     * "software <b><i>engineer</i></b>".
+     * 
+ * + * string corrected_html = 3; + * + * @param value The correctedHtml to set. + * @return This builder for chaining. + */ + public Builder setCorrectedHtml(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + correctedHtml_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Corrected output with html tags to highlight the corrected words.
+     * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+     * For example, the user input query is "software enginear", where the second
+     * word, "enginear," is incorrect. It should be "engineer". When spelling
+     * correction is enabled, this value is
+     * "software <b><i>engineer</i></b>".
+     * 
+ * + * string corrected_html = 3; + * + * @return This builder for chaining. + */ + public Builder clearCorrectedHtml() { + + correctedHtml_ = getDefaultInstance().getCorrectedHtml(); + onChanged(); + return this; + } + /** + * + * + *
+     * Corrected output with html tags to highlight the corrected words.
+     * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+     * For example, the user input query is "software enginear", where the second
+     * word, "enginear," is incorrect. It should be "engineer". When spelling
+     * correction is enabled, this value is
+     * "software <b><i>engineer</i></b>".
+     * 
+ * + * string corrected_html = 3; + * + * @param value The bytes for correctedHtml to set. + * @return This builder for chaining. + */ + public Builder setCorrectedHtmlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + correctedHtml_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.SpellingCorrection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.SpellingCorrection) + private static final com.google.cloud.talent.v4.SpellingCorrection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.SpellingCorrection(); + } + + public static com.google.cloud.talent.v4.SpellingCorrection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpellingCorrection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SpellingCorrection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.SpellingCorrection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrectionOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrectionOrBuilder.java new file mode 100644 index 00000000..96e41197 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrectionOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface SpellingCorrectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.SpellingCorrection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Indicates if the query was corrected by the spell checker.
+   * 
+ * + * bool corrected = 1; + * + * @return The corrected. + */ + boolean getCorrected(); + + /** + * + * + *
+   * Correction output consisting of the corrected keyword string.
+   * 
+ * + * string corrected_text = 2; + * + * @return The correctedText. + */ + java.lang.String getCorrectedText(); + /** + * + * + *
+   * Correction output consisting of the corrected keyword string.
+   * 
+ * + * string corrected_text = 2; + * + * @return The bytes for correctedText. + */ + com.google.protobuf.ByteString getCorrectedTextBytes(); + + /** + * + * + *
+   * Corrected output with html tags to highlight the corrected words.
+   * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+   * For example, the user input query is "software enginear", where the second
+   * word, "enginear," is incorrect. It should be "engineer". When spelling
+   * correction is enabled, this value is
+   * "software <b><i>engineer</i></b>".
+   * 
+ * + * string corrected_html = 3; + * + * @return The correctedHtml. + */ + java.lang.String getCorrectedHtml(); + /** + * + * + *
+   * Corrected output with html tags to highlight the corrected words.
+   * Corrected words are called out with the "<b><i>...</i></b>" html tags.
+   * For example, the user input query is "software enginear", where the second
+   * word, "enginear," is incorrect. It should be "engineer". When spelling
+   * correction is enabled, this value is
+   * "software <b><i>engineer</i></b>".
+   * 
+ * + * string corrected_html = 3; + * + * @return The bytes for correctedHtml. + */ + com.google.protobuf.ByteString getCorrectedHtmlBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Tenant.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Tenant.java new file mode 100644 index 00000000..cdbf7bbe --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Tenant.java @@ -0,0 +1,858 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * A Tenant resource represents a tenant in the service. A tenant is a group or
+ * entity that shares common access with specific privileges for resources like
+ * jobs. Customer may create multiple tenants to provide data isolation for
+ * different groups.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Tenant} + */ +public final class Tenant extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.Tenant) + TenantOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tenant.newBuilder() to construct. + private Tenant(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Tenant() { + name_ = ""; + externalId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Tenant(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Tenant( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantProto + .internal_static_google_cloud_talent_v4_Tenant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantProto + .internal_static_google_cloud_talent_v4_Tenant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Tenant.class, + com.google.cloud.talent.v4.Tenant.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required during tenant update.
+   * The resource name for a tenant. This is generated by the service when a
+   * tenant is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required during tenant update.
+   * The resource name for a tenant. This is generated by the service when a
+   * tenant is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object externalId_; + /** + * + * + *
+   * Required. Client side tenant identifier, used to uniquely identify the
+   * tenant.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + @java.lang.Override + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Client side tenant identifier, used to uniquely identify the
+   * tenant.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getExternalIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getExternalIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.Tenant)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.Tenant other = (com.google.cloud.talent.v4.Tenant) obj; + + if (!getName().equals(other.getName())) return false; + if (!getExternalId().equals(other.getExternalId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getExternalId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.Tenant parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Tenant parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Tenant parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.Tenant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.Tenant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Tenant resource represents a tenant in the service. A tenant is a group or
+   * entity that shares common access with specific privileges for resources like
+   * jobs. Customer may create multiple tenants to provide data isolation for
+   * different groups.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.Tenant} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Tenant) + com.google.cloud.talent.v4.TenantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantProto + .internal_static_google_cloud_talent_v4_Tenant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantProto + .internal_static_google_cloud_talent_v4_Tenant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.Tenant.class, + com.google.cloud.talent.v4.Tenant.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.Tenant.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + externalId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantProto + .internal_static_google_cloud_talent_v4_Tenant_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Tenant getDefaultInstanceForType() { + return com.google.cloud.talent.v4.Tenant.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.Tenant build() { + com.google.cloud.talent.v4.Tenant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Tenant buildPartial() { + com.google.cloud.talent.v4.Tenant result = new com.google.cloud.talent.v4.Tenant(this); + result.name_ = name_; + result.externalId_ = externalId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.Tenant) { + return mergeFrom((com.google.cloud.talent.v4.Tenant) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.Tenant other) { + if (other == com.google.cloud.talent.v4.Tenant.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getExternalId().isEmpty()) { + externalId_ = other.externalId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.Tenant parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.Tenant) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required during tenant update.
+     * The resource name for a tenant. This is generated by the service when a
+     * tenant is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required during tenant update.
+     * The resource name for a tenant. This is generated by the service when a
+     * tenant is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required during tenant update.
+     * The resource name for a tenant. This is generated by the service when a
+     * tenant is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required during tenant update.
+     * The resource name for a tenant. This is generated by the service when a
+     * tenant is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required during tenant update.
+     * The resource name for a tenant. This is generated by the service when a
+     * tenant is created.
+     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+     * "projects/foo/tenants/bar".
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalId_ = ""; + /** + * + * + *
+     * Required. Client side tenant identifier, used to uniquely identify the
+     * tenant.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Client side tenant identifier, used to uniquely identify the
+     * tenant.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Client side tenant identifier, used to uniquely identify the
+     * tenant.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Client side tenant identifier, used to uniquely identify the
+     * tenant.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExternalId() { + + externalId_ = getDefaultInstance().getExternalId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Client side tenant identifier, used to uniquely identify the
+     * tenant.
+     * The maximum number of allowed characters is 255.
+     * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Tenant) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Tenant) + private static final com.google.cloud.talent.v4.Tenant DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Tenant(); + } + + public static com.google.cloud.talent.v4.Tenant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tenant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Tenant(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.Tenant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantName.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantName.java new file mode 100644 index 00000000..034f10fc --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantName.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TenantName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/tenants/{tenant}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String tenant; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TenantName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + tenant = Preconditions.checkNotNull(builder.getTenant()); + } + + public static TenantName of(String project, String tenant) { + return newBuilder().setProject(project).setTenant(tenant).build(); + } + + public static String format(String project, String tenant) { + return newBuilder().setProject(project).setTenant(tenant).build().toString(); + } + + public static TenantName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "TenantName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("tenant")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (TenantName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("tenant", tenant); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "tenant", tenant); + } + + /** Builder for TenantName. */ + public static class Builder { + + private String project; + private String tenant; + + public String getProject() { + return project; + } + + public String getTenant() { + return tenant; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setTenant(String tenant) { + this.tenant = tenant; + return this; + } + + private Builder() {} + + private Builder(TenantName tenantName) { + project = tenantName.project; + tenant = tenantName.tenant; + } + + public TenantName build() { + return new TenantName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TenantName) { + TenantName that = (TenantName) o; + return (this.project.equals(that.project)) && (this.tenant.equals(that.tenant)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= tenant.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantOrBuilder.java new file mode 100644 index 00000000..c25e4245 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant.proto + +package com.google.cloud.talent.v4; + +public interface TenantOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.Tenant) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required during tenant update.
+   * The resource name for a tenant. This is generated by the service when a
+   * tenant is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required during tenant update.
+   * The resource name for a tenant. This is generated by the service when a
+   * tenant is created.
+   * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
+   * "projects/foo/tenants/bar".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Client side tenant identifier, used to uniquely identify the
+   * tenant.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalId. + */ + java.lang.String getExternalId(); + /** + * + * + *
+   * Required. Client side tenant identifier, used to uniquely identify the
+   * tenant.
+   * The maximum number of allowed characters is 255.
+   * 
+ * + * string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalId. + */ + com.google.protobuf.ByteString getExternalIdBytes(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantProto.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantProto.java new file mode 100644 index 00000000..cbfaf6cb --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantProto.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant.proto + +package com.google.cloud.talent.v4; + +public final class TenantProto { + private TenantProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_talent_v4_Tenant_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_talent_v4_Tenant_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/talent/v4/tenant.proto\022\026g" + + "oogle.cloud.talent.v4\032\034google/api/annota" + + "tions.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\"v\n\006Tenan" + + "t\022\014\n\004name\030\001 \001(\t\022\030\n\013external_id\030\002 \001(\tB\003\340A" + + "\002:D\352AA\n\032jobs.googleapis.com/Tenant\022#proj" + + "ects/{project}/tenants/{tenant}Bo\n\032com.g" + + "oogle.cloud.talent.v4B\013TenantProtoP\001Z + * Message representing a period of time between two timestamps. + * + * + * Protobuf type {@code google.cloud.talent.v4.TimestampRange} + */ +public final class TimestampRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.TimestampRange) + TimestampRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimestampRange.newBuilder() to construct. + private TimestampRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimestampRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimestampRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimestampRange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_TimestampRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_TimestampRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.TimestampRange.class, + com.google.cloud.talent.v4.TimestampRange.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.TimestampRange)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.TimestampRange other = + (com.google.cloud.talent.v4.TimestampRange) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.TimestampRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.TimestampRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.TimestampRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.TimestampRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message representing a period of time between two timestamps.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.TimestampRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.TimestampRange) + com.google.cloud.talent.v4.TimestampRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_TimestampRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_TimestampRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.TimestampRange.class, + com.google.cloud.talent.v4.TimestampRange.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.TimestampRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CommonProto + .internal_static_google_cloud_talent_v4_TimestampRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRange getDefaultInstanceForType() { + return com.google.cloud.talent.v4.TimestampRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRange build() { + com.google.cloud.talent.v4.TimestampRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRange buildPartial() { + com.google.cloud.talent.v4.TimestampRange result = + new com.google.cloud.talent.v4.TimestampRange(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.TimestampRange) { + return mergeFrom((com.google.cloud.talent.v4.TimestampRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.TimestampRange other) { + if (other == com.google.cloud.talent.v4.TimestampRange.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.TimestampRange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.TimestampRange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Begin of the period (inclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * End of the period (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.TimestampRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.TimestampRange) + private static final com.google.cloud.talent.v4.TimestampRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.TimestampRange(); + } + + public static com.google.cloud.talent.v4.TimestampRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimestampRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimestampRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.TimestampRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TimestampRangeOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TimestampRangeOrBuilder.java new file mode 100644 index 00000000..775b0aef --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TimestampRangeOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +public interface TimestampRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.TimestampRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Begin of the period (inclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * End of the period (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequest.java new file mode 100644 index 00000000..c6acc726 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequest.java @@ -0,0 +1,1109 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request for updating a specified company.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateCompanyRequest} + */ +public final class UpdateCompanyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.UpdateCompanyRequest) + UpdateCompanyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCompanyRequest.newBuilder() to construct. + private UpdateCompanyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCompanyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCompanyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCompanyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Company.Builder subBuilder = null; + if (company_ != null) { + subBuilder = company_.toBuilder(); + } + company_ = + input.readMessage(com.google.cloud.talent.v4.Company.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(company_); + company_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_UpdateCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_UpdateCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateCompanyRequest.class, + com.google.cloud.talent.v4.UpdateCompanyRequest.Builder.class); + } + + public static final int COMPANY_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Company company_; + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + @java.lang.Override + public boolean hasCompany() { + return company_ != null; + } + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Company getCompany() { + return company_ == null ? com.google.cloud.talent.v4.Company.getDefaultInstance() : company_; + } + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder() { + return getCompany(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (company_ != null) { + output.writeMessage(1, getCompany()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (company_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCompany()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.UpdateCompanyRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.UpdateCompanyRequest other = + (com.google.cloud.talent.v4.UpdateCompanyRequest) obj; + + if (hasCompany() != other.hasCompany()) return false; + if (hasCompany()) { + if (!getCompany().equals(other.getCompany())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCompany()) { + hash = (37 * hash) + COMPANY_FIELD_NUMBER; + hash = (53 * hash) + getCompany().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.UpdateCompanyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for updating a specified company.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateCompanyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.UpdateCompanyRequest) + com.google.cloud.talent.v4.UpdateCompanyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_UpdateCompanyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_UpdateCompanyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateCompanyRequest.class, + com.google.cloud.talent.v4.UpdateCompanyRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.UpdateCompanyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (companyBuilder_ == null) { + company_ = null; + } else { + company_ = null; + companyBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.CompanyServiceProto + .internal_static_google_cloud_talent_v4_UpdateCompanyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateCompanyRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.UpdateCompanyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateCompanyRequest build() { + com.google.cloud.talent.v4.UpdateCompanyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateCompanyRequest buildPartial() { + com.google.cloud.talent.v4.UpdateCompanyRequest result = + new com.google.cloud.talent.v4.UpdateCompanyRequest(this); + if (companyBuilder_ == null) { + result.company_ = company_; + } else { + result.company_ = companyBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.UpdateCompanyRequest) { + return mergeFrom((com.google.cloud.talent.v4.UpdateCompanyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.UpdateCompanyRequest other) { + if (other == com.google.cloud.talent.v4.UpdateCompanyRequest.getDefaultInstance()) + return this; + if (other.hasCompany()) { + mergeCompany(other.getCompany()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.UpdateCompanyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.UpdateCompanyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Company company_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + companyBuilder_; + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + public boolean hasCompany() { + return companyBuilder_ != null || company_ != null; + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + public com.google.cloud.talent.v4.Company getCompany() { + if (companyBuilder_ == null) { + return company_ == null + ? com.google.cloud.talent.v4.Company.getDefaultInstance() + : company_; + } else { + return companyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCompany(com.google.cloud.talent.v4.Company value) { + if (companyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + company_ = value; + onChanged(); + } else { + companyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCompany(com.google.cloud.talent.v4.Company.Builder builderForValue) { + if (companyBuilder_ == null) { + company_ = builderForValue.build(); + onChanged(); + } else { + companyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCompany(com.google.cloud.talent.v4.Company value) { + if (companyBuilder_ == null) { + if (company_ != null) { + company_ = + com.google.cloud.talent.v4.Company.newBuilder(company_) + .mergeFrom(value) + .buildPartial(); + } else { + company_ = value; + } + onChanged(); + } else { + companyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCompany() { + if (companyBuilder_ == null) { + company_ = null; + onChanged(); + } else { + company_ = null; + companyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Company.Builder getCompanyBuilder() { + + onChanged(); + return getCompanyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder() { + if (companyBuilder_ != null) { + return companyBuilder_.getMessageOrBuilder(); + } else { + return company_ == null + ? com.google.cloud.talent.v4.Company.getDefaultInstance() + : company_; + } + } + /** + * + * + *
+     * Required. The company resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder> + getCompanyFieldBuilder() { + if (companyBuilder_ == null) { + companyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Company, + com.google.cloud.talent.v4.Company.Builder, + com.google.cloud.talent.v4.CompanyOrBuilder>( + getCompany(), getParentForChildren(), isClean()); + company_ = null; + } + return companyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+     * is provided, only the specified fields in
+     * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the company fields to be updated. Only
+     * top level fields of [Company][google.cloud.talent.v4.Company] are
+     * supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.UpdateCompanyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.UpdateCompanyRequest) + private static final com.google.cloud.talent.v4.UpdateCompanyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.UpdateCompanyRequest(); + } + + public static com.google.cloud.talent.v4.UpdateCompanyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCompanyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCompanyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateCompanyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequestOrBuilder.java new file mode 100644 index 00000000..50a8a0fe --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/company_service.proto + +package com.google.cloud.talent.v4; + +public interface UpdateCompanyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.UpdateCompanyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the company field is set. + */ + boolean hasCompany(); + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The company. + */ + com.google.cloud.talent.v4.Company getCompany(); + /** + * + * + *
+   * Required. The company resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.CompanyOrBuilder getCompanyOrBuilder(); + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask]
+   * is provided, only the specified fields in
+   * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the company fields to be updated. Only
+   * top level fields of [Company][google.cloud.talent.v4.Company] are
+   * supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequest.java new file mode 100644 index 00000000..6f201c39 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequest.java @@ -0,0 +1,1040 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Update job request.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateJobRequest} + */ +public final class UpdateJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.UpdateJobRequest) + UpdateJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateJobRequest.newBuilder() to construct. + private UpdateJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateJobRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Job.Builder subBuilder = null; + if (job_ != null) { + subBuilder = job_.toBuilder(); + } + job_ = input.readMessage(com.google.cloud.talent.v4.Job.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(job_); + job_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_UpdateJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_UpdateJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateJobRequest.class, + com.google.cloud.talent.v4.UpdateJobRequest.Builder.class); + } + + public static final int JOB_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Job job_; + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + @java.lang.Override + public boolean hasJob() { + return job_ != null; + } + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Job getJob() { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + return getJob(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (job_ != null) { + output.writeMessage(1, getJob()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (job_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getJob()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.UpdateJobRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.UpdateJobRequest other = + (com.google.cloud.talent.v4.UpdateJobRequest) obj; + + if (hasJob() != other.hasJob()) return false; + if (hasJob()) { + if (!getJob().equals(other.getJob())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJob()) { + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJob().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.UpdateJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Update job request.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.UpdateJobRequest) + com.google.cloud.talent.v4.UpdateJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_UpdateJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_UpdateJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateJobRequest.class, + com.google.cloud.talent.v4.UpdateJobRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.UpdateJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobBuilder_ == null) { + job_ = null; + } else { + job_ = null; + jobBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.JobServiceProto + .internal_static_google_cloud_talent_v4_UpdateJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateJobRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.UpdateJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateJobRequest build() { + com.google.cloud.talent.v4.UpdateJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateJobRequest buildPartial() { + com.google.cloud.talent.v4.UpdateJobRequest result = + new com.google.cloud.talent.v4.UpdateJobRequest(this); + if (jobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = jobBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.UpdateJobRequest) { + return mergeFrom((com.google.cloud.talent.v4.UpdateJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.UpdateJobRequest other) { + if (other == com.google.cloud.talent.v4.UpdateJobRequest.getDefaultInstance()) return this; + if (other.hasJob()) { + mergeJob(other.getJob()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.UpdateJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.UpdateJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Job job_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + jobBuilder_; + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + public boolean hasJob() { + return jobBuilder_ != null || job_ != null; + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + public com.google.cloud.talent.v4.Job getJob() { + if (jobBuilder_ == null) { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } else { + return jobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + jobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJob(com.google.cloud.talent.v4.Job.Builder builderForValue) { + if (jobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + jobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeJob(com.google.cloud.talent.v4.Job value) { + if (jobBuilder_ == null) { + if (job_ != null) { + job_ = com.google.cloud.talent.v4.Job.newBuilder(job_).mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + jobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearJob() { + if (jobBuilder_ == null) { + job_ = null; + onChanged(); + } else { + job_ = null; + jobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.talent.v4.Job.Builder getJobBuilder() { + + onChanged(); + return getJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder() { + if (jobBuilder_ != null) { + return jobBuilder_.getMessageOrBuilder(); + } else { + return job_ == null ? com.google.cloud.talent.v4.Job.getDefaultInstance() : job_; + } + } + /** + * + * + *
+     * Required. The Job to be updated.
+     * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder> + getJobFieldBuilder() { + if (jobBuilder_ == null) { + jobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Job, + com.google.cloud.talent.v4.Job.Builder, + com.google.cloud.talent.v4.JobOrBuilder>( + getJob(), getParentForChildren(), isClean()); + job_ = null; + } + return jobBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+     * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+     * A field mask to restrict the fields that are updated. Only
+     * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.UpdateJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.UpdateJobRequest) + private static final com.google.cloud.talent.v4.UpdateJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.UpdateJobRequest(); + } + + public static com.google.cloud.talent.v4.UpdateJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequestOrBuilder.java new file mode 100644 index 00000000..3e29fb29 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/job_service.proto + +package com.google.cloud.talent.v4; + +public interface UpdateJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.UpdateJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the job field is set. + */ + boolean hasJob(); + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The job. + */ + com.google.cloud.talent.v4.Job getJob(); + /** + * + * + *
+   * Required. The Job to be updated.
+   * 
+ * + * .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.talent.v4.JobOrBuilder getJobOrBuilder(); + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in
+   * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated.
+   * A field mask to restrict the fields that are updated. Only
+   * top level fields of [Job][google.cloud.talent.v4.Job] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequest.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequest.java new file mode 100644 index 00000000..efa17d9d --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequest.java @@ -0,0 +1,1090 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Request for updating a specified tenant.
+ * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateTenantRequest} + */ +public final class UpdateTenantRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.UpdateTenantRequest) + UpdateTenantRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTenantRequest.newBuilder() to construct. + private UpdateTenantRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTenantRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTenantRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTenantRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.talent.v4.Tenant.Builder subBuilder = null; + if (tenant_ != null) { + subBuilder = tenant_.toBuilder(); + } + tenant_ = + input.readMessage(com.google.cloud.talent.v4.Tenant.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tenant_); + tenant_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_UpdateTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_UpdateTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateTenantRequest.class, + com.google.cloud.talent.v4.UpdateTenantRequest.Builder.class); + } + + public static final int TENANT_FIELD_NUMBER = 1; + private com.google.cloud.talent.v4.Tenant tenant_; + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + @java.lang.Override + public boolean hasTenant() { + return tenant_ != null; + } + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + @java.lang.Override + public com.google.cloud.talent.v4.Tenant getTenant() { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder() { + return getTenant(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tenant_ != null) { + output.writeMessage(1, getTenant()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tenant_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTenant()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.talent.v4.UpdateTenantRequest)) { + return super.equals(obj); + } + com.google.cloud.talent.v4.UpdateTenantRequest other = + (com.google.cloud.talent.v4.UpdateTenantRequest) obj; + + if (hasTenant() != other.hasTenant()) return false; + if (hasTenant()) { + if (!getTenant().equals(other.getTenant())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTenant()) { + hash = (37 * hash) + TENANT_FIELD_NUMBER; + hash = (53 * hash) + getTenant().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.talent.v4.UpdateTenantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for updating a specified tenant.
+   * 
+ * + * Protobuf type {@code google.cloud.talent.v4.UpdateTenantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.UpdateTenantRequest) + com.google.cloud.talent.v4.UpdateTenantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_UpdateTenantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_UpdateTenantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.talent.v4.UpdateTenantRequest.class, + com.google.cloud.talent.v4.UpdateTenantRequest.Builder.class); + } + + // Construct using com.google.cloud.talent.v4.UpdateTenantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (tenantBuilder_ == null) { + tenant_ = null; + } else { + tenant_ = null; + tenantBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.talent.v4.TenantServiceProto + .internal_static_google_cloud_talent_v4_UpdateTenantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateTenantRequest getDefaultInstanceForType() { + return com.google.cloud.talent.v4.UpdateTenantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateTenantRequest build() { + com.google.cloud.talent.v4.UpdateTenantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateTenantRequest buildPartial() { + com.google.cloud.talent.v4.UpdateTenantRequest result = + new com.google.cloud.talent.v4.UpdateTenantRequest(this); + if (tenantBuilder_ == null) { + result.tenant_ = tenant_; + } else { + result.tenant_ = tenantBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.talent.v4.UpdateTenantRequest) { + return mergeFrom((com.google.cloud.talent.v4.UpdateTenantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.talent.v4.UpdateTenantRequest other) { + if (other == com.google.cloud.talent.v4.UpdateTenantRequest.getDefaultInstance()) return this; + if (other.hasTenant()) { + mergeTenant(other.getTenant()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.talent.v4.UpdateTenantRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.talent.v4.UpdateTenantRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.talent.v4.Tenant tenant_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + tenantBuilder_; + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + public boolean hasTenant() { + return tenantBuilder_ != null || tenant_ != null; + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + public com.google.cloud.talent.v4.Tenant getTenant() { + if (tenantBuilder_ == null) { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } else { + return tenantBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTenant(com.google.cloud.talent.v4.Tenant value) { + if (tenantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tenant_ = value; + onChanged(); + } else { + tenantBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTenant(com.google.cloud.talent.v4.Tenant.Builder builderForValue) { + if (tenantBuilder_ == null) { + tenant_ = builderForValue.build(); + onChanged(); + } else { + tenantBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTenant(com.google.cloud.talent.v4.Tenant value) { + if (tenantBuilder_ == null) { + if (tenant_ != null) { + tenant_ = + com.google.cloud.talent.v4.Tenant.newBuilder(tenant_).mergeFrom(value).buildPartial(); + } else { + tenant_ = value; + } + onChanged(); + } else { + tenantBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTenant() { + if (tenantBuilder_ == null) { + tenant_ = null; + onChanged(); + } else { + tenant_ = null; + tenantBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.Tenant.Builder getTenantBuilder() { + + onChanged(); + return getTenantFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder() { + if (tenantBuilder_ != null) { + return tenantBuilder_.getMessageOrBuilder(); + } else { + return tenant_ == null ? com.google.cloud.talent.v4.Tenant.getDefaultInstance() : tenant_; + } + } + /** + * + * + *
+     * Required. The tenant resource to replace the current resource in the
+     * system.
+     * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder> + getTenantFieldBuilder() { + if (tenantBuilder_ == null) { + tenantBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.talent.v4.Tenant, + com.google.cloud.talent.v4.Tenant.Builder, + com.google.cloud.talent.v4.TenantOrBuilder>( + getTenant(), getParentForChildren(), isClean()); + tenant_ = null; + } + return tenantBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Strongly recommended for the best service experience.
+     * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+     * provided, only the specified fields in
+     * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+     * Otherwise all the fields are updated.
+     * A field mask to specify the tenant fields to be updated. Only
+     * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.UpdateTenantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.UpdateTenantRequest) + private static final com.google.cloud.talent.v4.UpdateTenantRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.talent.v4.UpdateTenantRequest(); + } + + public static com.google.cloud.talent.v4.UpdateTenantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTenantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTenantRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.talent.v4.UpdateTenantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequestOrBuilder.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequestOrBuilder.java new file mode 100644 index 00000000..6b8b8363 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/tenant_service.proto + +package com.google.cloud.talent.v4; + +public interface UpdateTenantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.talent.v4.UpdateTenantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tenant field is set. + */ + boolean hasTenant(); + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tenant. + */ + com.google.cloud.talent.v4.Tenant getTenant(); + /** + * + * + *
+   * Required. The tenant resource to replace the current resource in the
+   * system.
+   * 
+ * + * .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.talent.v4.TenantOrBuilder getTenantOrBuilder(); + + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Strongly recommended for the best service experience.
+   * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is
+   * provided, only the specified fields in
+   * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated.
+   * Otherwise all the fields are updated.
+   * A field mask to specify the tenant fields to be updated. Only
+   * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Visibility.java b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Visibility.java new file mode 100644 index 00000000..bea68896 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Visibility.java @@ -0,0 +1,203 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/talent/v4/common.proto + +package com.google.cloud.talent.v4; + +/** + * + * + *
+ * Deprecated. All resources are only visible to the owner.
+ * An enum that represents who has view access to the resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.talent.v4.Visibility} + */ +public enum Visibility implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value.
+   * 
+ * + * VISIBILITY_UNSPECIFIED = 0; + */ + VISIBILITY_UNSPECIFIED(0), + /** + * + * + *
+   * The resource is only visible to the GCP account who owns it.
+   * 
+ * + * ACCOUNT_ONLY = 1; + */ + ACCOUNT_ONLY(1), + /** + * + * + *
+   * The resource is visible to the owner and may be visible to other
+   * applications and processes at Google.
+   * 
+ * + * SHARED_WITH_GOOGLE = 2; + */ + SHARED_WITH_GOOGLE(2), + /** + * + * + *
+   * The resource is visible to the owner and may be visible to all other API
+   * clients.
+   * 
+ * + * SHARED_WITH_PUBLIC = 3; + */ + SHARED_WITH_PUBLIC(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value.
+   * 
+ * + * VISIBILITY_UNSPECIFIED = 0; + */ + public static final int VISIBILITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The resource is only visible to the GCP account who owns it.
+   * 
+ * + * ACCOUNT_ONLY = 1; + */ + public static final int ACCOUNT_ONLY_VALUE = 1; + /** + * + * + *
+   * The resource is visible to the owner and may be visible to other
+   * applications and processes at Google.
+   * 
+ * + * SHARED_WITH_GOOGLE = 2; + */ + public static final int SHARED_WITH_GOOGLE_VALUE = 2; + /** + * + * + *
+   * The resource is visible to the owner and may be visible to all other API
+   * clients.
+   * 
+ * + * SHARED_WITH_PUBLIC = 3; + */ + public static final int SHARED_WITH_PUBLIC_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Visibility valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Visibility forNumber(int value) { + switch (value) { + case 0: + return VISIBILITY_UNSPECIFIED; + case 1: + return ACCOUNT_ONLY; + case 2: + return SHARED_WITH_GOOGLE; + case 3: + return SHARED_WITH_PUBLIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Visibility findValueByNumber(int number) { + return Visibility.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(7); + } + + private static final Visibility[] VALUES = values(); + + public static Visibility valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Visibility(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.Visibility) +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/common.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/common.proto new file mode 100644 index 00000000..a7daca9e --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/common.proto @@ -0,0 +1,928 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/latlng.proto"; +import "google/type/money.proto"; +import "google/type/postal_address.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// Message representing a period of time between two timestamps. +message TimestampRange { + // Begin of the period (inclusive). + google.protobuf.Timestamp start_time = 1; + + // End of the period (exclusive). + google.protobuf.Timestamp end_time = 2; +} + +// An enum that represents the size of the company. +enum CompanySize { + // Default value if the size isn't specified. + COMPANY_SIZE_UNSPECIFIED = 0; + + // The company has less than 50 employees. + MINI = 1; + + // The company has between 50 and 99 employees. + SMALL = 2; + + // The company has between 100 and 499 employees. + SMEDIUM = 3; + + // The company has between 500 and 999 employees. + MEDIUM = 4; + + // The company has between 1,000 and 4,999 employees. + BIG = 5; + + // The company has between 5,000 and 9,999 employees. + BIGGER = 6; + + // The company has 10,000 or more employees. + GIANT = 7; +} + +// An enum that represents employee benefits included with the job. +enum JobBenefit { + // Default value if the type isn't specified. + JOB_BENEFIT_UNSPECIFIED = 0; + + // The job includes access to programs that support child care, such + // as daycare. + CHILD_CARE = 1; + + // The job includes dental services covered by a dental + // insurance plan. + DENTAL = 2; + + // The job offers specific benefits to domestic partners. + DOMESTIC_PARTNER = 3; + + // The job allows for a flexible work schedule. + FLEXIBLE_HOURS = 4; + + // The job includes health services covered by a medical insurance plan. + MEDICAL = 5; + + // The job includes a life insurance plan provided by the employer or + // available for purchase by the employee. + LIFE_INSURANCE = 6; + + // The job allows for a leave of absence to a parent to care for a newborn + // child. + PARENTAL_LEAVE = 7; + + // The job includes a workplace retirement plan provided by the + // employer or available for purchase by the employee. + RETIREMENT_PLAN = 8; + + // The job allows for paid time off due to illness. + SICK_DAYS = 9; + + // The job includes paid time off for vacation. + VACATION = 10; + + // The job includes vision services covered by a vision + // insurance plan. + VISION = 11; +} + +// Educational degree level defined in International Standard Classification +// of Education (ISCED). +enum DegreeType { + // Default value. Represents no degree, or early childhood education. + // Maps to ISCED code 0. + // Ex) Kindergarten + DEGREE_TYPE_UNSPECIFIED = 0; + + // Primary education which is typically the first stage of compulsory + // education. ISCED code 1. + // Ex) Elementary school + PRIMARY_EDUCATION = 1; + + // Lower secondary education; First stage of secondary education building on + // primary education, typically with a more subject-oriented curriculum. + // ISCED code 2. + // Ex) Middle school + LOWER_SECONDARY_EDUCATION = 2; + + // Middle education; Second/final stage of secondary education preparing for + // tertiary education and/or providing skills relevant to employment. + // Usually with an increased range of subject options and streams. ISCED + // code 3. + // Ex) High school + UPPER_SECONDARY_EDUCATION = 3; + + // Adult Remedial Education; Programmes providing learning experiences that + // build on secondary education and prepare for labour market entry and/or + // tertiary education. The content is broader than secondary but not as + // complex as tertiary education. ISCED code 4. + ADULT_REMEDIAL_EDUCATION = 4; + + // Associate's or equivalent; Short first tertiary programmes that are + // typically practically-based, occupationally-specific and prepare for + // labour market entry. These programmes may also provide a pathway to other + // tertiary programmes. ISCED code 5. + ASSOCIATES_OR_EQUIVALENT = 5; + + // Bachelor's or equivalent; Programmes designed to provide intermediate + // academic and/or professional knowledge, skills and competencies leading + // to a first tertiary degree or equivalent qualification. ISCED code 6. + BACHELORS_OR_EQUIVALENT = 6; + + // Master's or equivalent; Programmes designed to provide advanced academic + // and/or professional knowledge, skills and competencies leading to a + // second tertiary degree or equivalent qualification. ISCED code 7. + MASTERS_OR_EQUIVALENT = 7; + + // Doctoral or equivalent; Programmes designed primarily to lead to an + // advanced research qualification, usually concluding with the submission + // and defense of a substantive dissertation of publishable quality based on + // original research. ISCED code 8. + DOCTORAL_OR_EQUIVALENT = 8; +} + +// An enum that represents the employment type of a job. +enum EmploymentType { + // The default value if the employment type isn't specified. + EMPLOYMENT_TYPE_UNSPECIFIED = 0; + + // The job requires working a number of hours that constitute full + // time employment, typically 40 or more hours per week. + FULL_TIME = 1; + + // The job entails working fewer hours than a full time job, + // typically less than 40 hours a week. + PART_TIME = 2; + + // The job is offered as a contracted, as opposed to a salaried employee, + // position. + CONTRACTOR = 3; + + // The job is offered as a contracted position with the understanding + // that it's converted into a full-time position at the end of the + // contract. Jobs of this type are also returned by a search for + // [EmploymentType.CONTRACTOR][google.cloud.talent.v4.EmploymentType.CONTRACTOR] + // jobs. + CONTRACT_TO_HIRE = 4; + + // The job is offered as a temporary employment opportunity, usually + // a short-term engagement. + TEMPORARY = 5; + + // The job is a fixed-term opportunity for students or entry-level job + // seekers to obtain on-the-job training, typically offered as a summer + // position. + INTERN = 6; + + // The is an opportunity for an individual to volunteer, where there's no + // expectation of compensation for the provided services. + VOLUNTEER = 7; + + // The job requires an employee to work on an as-needed basis with a + // flexible schedule. + PER_DIEM = 8; + + // The job involves employing people in remote areas and flying them + // temporarily to the work site instead of relocating employees and their + // families permanently. + FLY_IN_FLY_OUT = 9; + + // The job does not fit any of the other listed types. + OTHER_EMPLOYMENT_TYPE = 10; +} + +// An enum that represents the required experience level required for the job. +enum JobLevel { + // The default value if the level isn't specified. + JOB_LEVEL_UNSPECIFIED = 0; + + // Entry-level individual contributors, typically with less than 2 years of + // experience in a similar role. Includes interns. + ENTRY_LEVEL = 1; + + // Experienced individual contributors, typically with 2+ years of + // experience in a similar role. + EXPERIENCED = 2; + + // Entry- to mid-level managers responsible for managing a team of people. + MANAGER = 3; + + // Senior-level managers responsible for managing teams of managers. + DIRECTOR = 4; + + // Executive-level managers and above, including C-level positions. + EXECUTIVE = 5; +} + +// An enum that represents the categorization or primary focus of specific +// role. This value is different than the "industry" associated with a role, +// which is related to the categorization of the company listing the job. +enum JobCategory { + // The default value if the category isn't specified. + JOB_CATEGORY_UNSPECIFIED = 0; + + // An accounting and finance job, such as an Accountant. + ACCOUNTING_AND_FINANCE = 1; + + // An administrative and office job, such as an Administrative Assistant. + ADMINISTRATIVE_AND_OFFICE = 2; + + // An advertising and marketing job, such as Marketing Manager. + ADVERTISING_AND_MARKETING = 3; + + // An animal care job, such as Veterinarian. + ANIMAL_CARE = 4; + + // An art, fashion, or design job, such as Designer. + ART_FASHION_AND_DESIGN = 5; + + // A business operations job, such as Business Operations Manager. + BUSINESS_OPERATIONS = 6; + + // A cleaning and facilities job, such as Custodial Staff. + CLEANING_AND_FACILITIES = 7; + + // A computer and IT job, such as Systems Administrator. + COMPUTER_AND_IT = 8; + + // A construction job, such as General Laborer. + CONSTRUCTION = 9; + + // A customer service job, such s Cashier. + CUSTOMER_SERVICE = 10; + + // An education job, such as School Teacher. + EDUCATION = 11; + + // An entertainment and travel job, such as Flight Attendant. + ENTERTAINMENT_AND_TRAVEL = 12; + + // A farming or outdoor job, such as Park Ranger. + FARMING_AND_OUTDOORS = 13; + + // A healthcare job, such as Registered Nurse. + HEALTHCARE = 14; + + // A human resources job, such as Human Resources Director. + HUMAN_RESOURCES = 15; + + // An installation, maintenance, or repair job, such as Electrician. + INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + + // A legal job, such as Law Clerk. + LEGAL = 17; + + // A management job, often used in conjunction with another category, + // such as Store Manager. + MANAGEMENT = 18; + + // A manufacturing or warehouse job, such as Assembly Technician. + MANUFACTURING_AND_WAREHOUSE = 19; + + // A media, communications, or writing job, such as Media Relations. + MEDIA_COMMUNICATIONS_AND_WRITING = 20; + + // An oil, gas or mining job, such as Offshore Driller. + OIL_GAS_AND_MINING = 21; + + // A personal care and services job, such as Hair Stylist. + PERSONAL_CARE_AND_SERVICES = 22; + + // A protective services job, such as Security Guard. + PROTECTIVE_SERVICES = 23; + + // A real estate job, such as Buyer's Agent. + REAL_ESTATE = 24; + + // A restaurant and hospitality job, such as Restaurant Server. + RESTAURANT_AND_HOSPITALITY = 25; + + // A sales and/or retail job, such Sales Associate. + SALES_AND_RETAIL = 26; + + // A science and engineering job, such as Lab Technician. + SCIENCE_AND_ENGINEERING = 27; + + // A social services or non-profit job, such as Case Worker. + SOCIAL_SERVICES_AND_NON_PROFIT = 28; + + // A sports, fitness, or recreation job, such as Personal Trainer. + SPORTS_FITNESS_AND_RECREATION = 29; + + // A transportation or logistics job, such as Truck Driver. + TRANSPORTATION_AND_LOGISTICS = 30; +} + +// An enum that represents the job posting region. In most cases, job postings +// don't need to specify a region. If a region is given, jobs are +// eligible for searches in the specified region. +enum PostingRegion { + // If the region is unspecified, the job is only returned if it + // matches the [LocationFilter][google.cloud.talent.v4.LocationFilter]. + POSTING_REGION_UNSPECIFIED = 0; + + // In addition to exact location matching, job posting is returned when the + // [LocationFilter][google.cloud.talent.v4.LocationFilter] in the search query + // is in the same administrative area as the returned job posting. For + // example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's + // returned if [LocationFilter][google.cloud.talent.v4.LocationFilter] has + // "Mountain View". + // + // Administrative area refers to top-level administrative subdivision of this + // country. For example, US state, IT region, UK constituent nation and + // JP prefecture. + ADMINISTRATIVE_AREA = 1; + + // In addition to exact location matching, job is returned when + // [LocationFilter][google.cloud.talent.v4.LocationFilter] in search query is + // in the same country as this job. For example, if a `NATION_WIDE` job is + // posted in "USA", it's returned if + // [LocationFilter][google.cloud.talent.v4.LocationFilter] has 'Mountain + // View'. + NATION = 2; + + // Job allows employees to work remotely (telecommute). + // If locations are provided with this value, the job is + // considered as having a location, but telecommuting is allowed. + TELECOMMUTE = 3; +} + +// Deprecated. All resources are only visible to the owner. +// +// An enum that represents who has view access to the resource. +enum Visibility { + option deprecated = true; + + // Default value. + VISIBILITY_UNSPECIFIED = 0; + + // The resource is only visible to the GCP account who owns it. + ACCOUNT_ONLY = 1; + + // The resource is visible to the owner and may be visible to other + // applications and processes at Google. + SHARED_WITH_GOOGLE = 2; + + // The resource is visible to the owner and may be visible to all other API + // clients. + SHARED_WITH_PUBLIC = 3; +} + +// Option for HTML content sanitization on user input fields, for example, job +// description. By setting this option, user can determine whether and how +// sanitization is performed on these fields. +enum HtmlSanitization { + // Default value. + HTML_SANITIZATION_UNSPECIFIED = 0; + + // Disables sanitization on HTML input. + HTML_SANITIZATION_DISABLED = 1; + + // Sanitizes HTML input, only accepts bold, italic, ordered list, and + // unordered list markup tags. + SIMPLE_FORMATTING_ONLY = 2; +} + +// Method for commute. +enum CommuteMethod { + // Commute method isn't specified. + COMMUTE_METHOD_UNSPECIFIED = 0; + + // Commute time is calculated based on driving time. + DRIVING = 1; + + // Commute time is calculated based on public transit including bus, metro, + // subway, and so on. + TRANSIT = 2; + + // Commute time is calculated based on walking time. + WALKING = 3; + + // Commute time is calculated based on biking time. + CYCLING = 4; +} + +// A resource that represents a location with full geographic information. +message Location { + // An enum which represents the type of a location. + enum LocationType { + // Default value if the type isn't specified. + LOCATION_TYPE_UNSPECIFIED = 0; + + // A country level location. + COUNTRY = 1; + + // A state or equivalent level location. + ADMINISTRATIVE_AREA = 2; + + // A county or equivalent level location. + SUB_ADMINISTRATIVE_AREA = 3; + + // A city or equivalent level location. + LOCALITY = 4; + + // A postal code level location. + POSTAL_CODE = 5; + + // A sublocality is a subdivision of a locality, for example a city borough, + // ward, or arrondissement. Sublocalities are usually recognized by a local + // political authority. For example, Manhattan and Brooklyn are recognized + // as boroughs by the City of New York, and are therefore modeled as + // sublocalities. + SUB_LOCALITY = 6; + + // A district or equivalent level location. + SUB_LOCALITY_1 = 7; + + // A smaller district or equivalent level display. + SUB_LOCALITY_2 = 8; + + // A neighborhood level location. + NEIGHBORHOOD = 9; + + // A street address level location. + STREET_ADDRESS = 10; + } + + // The type of a location, which corresponds to the address lines field of + // [google.type.PostalAddress][google.type.PostalAddress]. For example, + // "Downtown, Atlanta, GA, USA" has a type of + // [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], + // and "Kansas City, KS, USA" has a type of + // [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. + LocationType location_type = 1; + + // Postal address of the location that includes human readable information, + // such as postal delivery and payments addresses. Given a postal address, + // a postal service can deliver items to a premises, P.O. Box, or other + // delivery location. + google.type.PostalAddress postal_address = 2; + + // An object representing a latitude/longitude pair. + google.type.LatLng lat_lng = 3; + + // Radius in miles of the job location. This value is derived from the + // location bounding box in which a circle with the specified radius + // centered from [google.type.LatLng][google.type.LatLng] covers the area + // associated with the job location. For example, currently, "Mountain View, + // CA, USA" has a radius of 6.17 miles. + double radius_miles = 4; +} + +// Meta information related to the job searcher or entity +// conducting the job search. This information is used to improve the +// performance of the service. +message RequestMetadata { + // Required if + // [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + // is unset or `false`. + // + // The client-defined scope or source of the service call, which typically + // is the domain on + // which the service has been implemented and is currently being run. + // + // For example, if the service is being run by client Foo, Inc., on + // job board www.foo.com and career site www.bar.com, then this field is + // set to "foo.com" for use on the job board, and "bar.com" for use on the + // career site. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique domain. + // + // The maximum number of allowed characters is 255. + string domain = 1; + + // Required if + // [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + // is unset or `false`. + // + // A unique session identification string. A session is defined as the + // duration of an end user's interaction with the service over a certain + // period. + // Obfuscate this field for privacy concerns before + // providing it to the service. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique session ID. + // + // The maximum number of allowed characters is 255. + string session_id = 2; + + // Required if + // [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + // is unset or `false`. + // + // A unique user identification string, as determined by the client. + // To have the strongest positive impact on search quality + // make sure the client-level is unique. + // Obfuscate this field for privacy concerns before + // providing it to the service. + // + // Note that any improvements to the model for a particular tenant site rely + // on this field being set correctly to a unique user ID. + // + // The maximum number of allowed characters is 255. + string user_id = 3; + + // Only set when any of + // [domain][google.cloud.talent.v4.RequestMetadata.domain], + // [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + // [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available + // for some reason. It is highly recommended not to set this field and provide + // accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], + // [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + // [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best + // service experience. + bool allow_missing_ids = 4; + + // The type of device used by the job seeker at the time of the call to the + // service. + DeviceInfo device_info = 5; +} + +// Additional information returned to client, such as debugging information. +message ResponseMetadata { + // A unique id associated with this call. + // This id is logged for tracking purposes. + string request_id = 1; +} + +// Device information collected from the job seeker, candidate, or +// other entity conducting the job search. Providing this information improves +// the quality of the search results across devices. +message DeviceInfo { + // An enumeration describing an API access portal and exposure mechanism. + enum DeviceType { + // The device type isn't specified. + DEVICE_TYPE_UNSPECIFIED = 0; + + // A desktop web browser, such as, Chrome, Firefox, Safari, or Internet + // Explorer) + WEB = 1; + + // A mobile device web browser, such as a phone or tablet with a Chrome + // browser. + MOBILE_WEB = 2; + + // An Android device native application. + ANDROID = 3; + + // An iOS device native application. + IOS = 4; + + // A bot, as opposed to a device operated by human beings, such as a web + // crawler. + BOT = 5; + + // Other devices types. + OTHER = 6; + } + + // Type of the device. + DeviceType device_type = 1; + + // A device-specific ID. The ID must be a unique identifier that + // distinguishes the device from other devices. + string id = 2; +} + +// Custom attribute values that are either filterable or non-filterable. +message CustomAttribute { + // Exactly one of + // [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + // [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + // specified. + // + // This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + // `CASE_INSENSITIVE_MATCH`) search. + // For filterable `string_value`s, a maximum total number of 200 values + // is allowed, with each `string_value` has a byte size of no more than + // 500B. For unfilterable `string_values`, the maximum total byte size of + // unfilterable `string_values` is 50KB. + // + // Empty string isn't allowed. + repeated string string_values = 1; + + // Exactly one of + // [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + // [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + // specified. + // + // This field is used to perform number range search. + // (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + // + // Currently at most 1 + // [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is + // supported. + repeated int64 long_values = 2; + + // If the `filterable` flag is true, the custom field values may be used for + // custom attribute filters + // [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. + // If false, these values may not be used for custom attribute filters. + // + // Default is false. + bool filterable = 3; + + // If the `keyword_searchable` flag is true, the keywords in custom fields are + // searchable by keyword match. + // If false, the values are not searchable by keyword match. + // + // Default is false. + bool keyword_searchable = 4; +} + +// Spell check result. +message SpellingCorrection { + // Indicates if the query was corrected by the spell checker. + bool corrected = 1; + + // Correction output consisting of the corrected keyword string. + string corrected_text = 2; + + // Corrected output with html tags to highlight the corrected words. + // Corrected words are called out with the "..." html tags. + // + // For example, the user input query is "software enginear", where the second + // word, "enginear," is incorrect. It should be "engineer". When spelling + // correction is enabled, this value is + // "software engineer". + string corrected_html = 3; +} + +// Job compensation details. +message CompensationInfo { + // A compensation entry that represents one component of compensation, such + // as base pay, bonus, or other compensation type. + // + // Annualization: One compensation entry can be annualized if + // - it contains valid + // [amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // or + // [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range]. + // - and its + // [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year] + // is set or can be derived. Its annualized range is determined as + // ([amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // or + // [range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range]) + // times + // [expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + message CompensationEntry { + // Compensation type. + // + // Default is + // [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + CompensationType type = 1; + + // Frequency of the specified amount. + // + // Default is + // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + CompensationUnit unit = 2; + + // Compensation amount. It could be a fixed amount or a floating range. + oneof compensation_amount { + // Compensation amount. + google.type.Money amount = 3; + + // Compensation range. + CompensationRange range = 4; + } + + // Compensation description. For example, could + // indicate equity terms or provide additional context to an estimated + // bonus. + string description = 5; + + // Expected number of units paid each year. If not specified, when + // [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + // FULLTIME, a default value is inferred based on + // [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + // Default values: + // - HOURLY: 2080 + // - DAILY: 260 + // - WEEKLY: 52 + // - MONTHLY: 12 + // - ANNUAL: 1 + google.protobuf.DoubleValue expected_units_per_year = 6; + } + + // Compensation range. + message CompensationRange { + // The maximum amount of compensation. If left empty, the value is set + // to a maximal compensation value and the currency code is set to + // match the [currency code][google.type.Money.currency_code] of + // min_compensation. + google.type.Money max_compensation = 2; + + // The minimum amount of compensation. If left empty, the value is set + // to zero and the currency code is set to match the + // [currency code][google.type.Money.currency_code] of max_compensation. + google.type.Money min_compensation = 1; + } + + // The type of compensation. + // + // For compensation amounts specified in non-monetary amounts, + // describe the compensation scheme in the + // [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description]. + // + // For example, tipping format is described in + // [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description] + // (for example, "expect 15-20% tips based on customer bill.") and an estimate + // of the tips provided in + // [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // or + // [CompensationEntry.range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range] + // ($10 per hour). + // + // For example, equity is described in + // [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description] + // (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and + // value estimated in + // [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // or + // [CompensationEntry.range][google.cloud.talent.v4.CompensationInfo.CompensationEntry.range]. + // If no value estimate is possible, units are + // [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED] + // and then further clarified in + // [CompensationEntry.description][google.cloud.talent.v4.CompensationInfo.CompensationEntry.description] + // field. + enum CompensationType { + // Default value. + COMPENSATION_TYPE_UNSPECIFIED = 0; + + // Base compensation: Refers to the fixed amount of money paid to an + // employee by an employer in return for work performed. Base compensation + // does not include benefits, bonuses or any other potential compensation + // from an employer. + BASE = 1; + + // Bonus. + BONUS = 2; + + // Signing bonus. + SIGNING_BONUS = 3; + + // Equity. + EQUITY = 4; + + // Profit sharing. + PROFIT_SHARING = 5; + + // Commission. + COMMISSIONS = 6; + + // Tips. + TIPS = 7; + + // Other compensation type. + OTHER_COMPENSATION_TYPE = 8; + } + + // Pay frequency. + enum CompensationUnit { + // Default value. + COMPENSATION_UNIT_UNSPECIFIED = 0; + + // Hourly. + HOURLY = 1; + + // Daily. + DAILY = 2; + + // Weekly + WEEKLY = 3; + + // Monthly. + MONTHLY = 4; + + // Yearly. + YEARLY = 5; + + // One time. + ONE_TIME = 6; + + // Other compensation units. + OTHER_COMPENSATION_UNIT = 7; + } + + // Job compensation information. + // + // At most one entry can be of type + // [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], + // which is referred as **base compensation entry** for the job. + repeated CompensationEntry entries = 1; + + // Output only. Annualized base compensation range. Computed as base + // compensation entry's + // [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // times + // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + // + // See + // [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + // for explanation on compensation annualization. + CompensationRange annualized_base_compensation_range = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Annualized total compensation range. Computed as all + // compensation entries' + // [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + // times + // [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + // + // See + // [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + // for explanation on compensation annualization. + CompensationRange annualized_total_compensation_range = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata used for long running operations returned by CTS batch APIs. +// It's used to replace +// [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata]. +message BatchOperationMetadata { + enum State { + // Default value. + STATE_UNSPECIFIED = 0; + + // The batch operation is being prepared for processing. + INITIALIZING = 1; + + // The batch operation is actively being processed. + PROCESSING = 2; + + // The batch operation is processed, and at least one item has been + // successfully processed. + SUCCEEDED = 3; + + // The batch operation is done and no item has been successfully processed. + FAILED = 4; + + // The batch operation is in the process of cancelling after + // [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + // is called. + CANCELLING = 5; + + // The batch operation is done after + // [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + // is called. Any items processed before cancelling are returned in the + // response. + CANCELLED = 6; + } + + // The state of a long running operation. + State state = 1; + + // More detailed information about operation state. + string state_description = 2; + + // Count of successful item(s) inside an operation. + int32 success_count = 3; + + // Count of failed item(s) inside an operation. + int32 failure_count = 4; + + // Count of total item(s) inside an operation. + int32 total_count = 5; + + // The time when the batch operation is created. + google.protobuf.Timestamp create_time = 6; + + // The time when the batch operation status is updated. The metadata and the + // [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is + // refreshed every minute otherwise cached data is returned. + google.protobuf.Timestamp update_time = 7; + + // The time when the batch operation is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is + // set to `true`. + google.protobuf.Timestamp end_time = 8; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company.proto new file mode 100644 index 00000000..5c1de8f2 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company.proto @@ -0,0 +1,118 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "CompanyProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A Company resource represents a company in the service. A company is the +// entity that owns job postings, that is, the hiring entity responsible for +// employing applicants for the job position. +message Company { + option (google.api.resource) = { + type: "jobs.googleapis.com/Company" + pattern: "projects/{project}/tenants/{tenant}/companies/{company}" + }; + + // Derived details about the company. + message DerivedInfo { + // A structured headquarters location of the company, resolved from + // [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] + // if provided. + Location headquarters_location = 1; + } + + // Required during company update. + // + // The resource name for a company. This is generated by the service when a + // company is created. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + // example, "projects/foo/tenants/bar/companies/baz". + string name = 1; + + // Required. The display name of the company, for example, "Google LLC". + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Client side company identifier, used to uniquely identify the + // company. + // + // The maximum number of allowed characters is 255. + string external_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // The employer's company size. + CompanySize size = 4; + + // The street address of the company's main headquarters, which may be + // different from the job location. The service attempts + // to geolocate the provided address, and populates a more specific + // location wherever possible in + // [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. + string headquarters_address = 5; + + // Set to true if it is the hiring agency that post jobs for other + // employers. + // + // Defaults to false if not provided. + bool hiring_agency = 6; + + // Equal Employment Opportunity legal disclaimer text to be + // associated with all jobs, and typically to be displayed in all + // roles. + // + // The maximum number of allowed characters is 500. + string eeo_text = 7; + + // The URI representing the company's primary web site or home page, + // for example, "https://www.google.com". + // + // The maximum number of allowed characters is 255. + string website_uri = 8; + + // The URI to employer's career site or careers page on the employer's web + // site, for example, "https://careers.google.com". + string career_site_uri = 9; + + // A URI that hosts the employer's company logo. + string image_uri = 10; + + // A list of keys of filterable + // [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], + // whose corresponding `string_values` are used in keyword searches. Jobs with + // `string_values` under these specified field keys are returned if any + // of the values match the search keyword. Custom field values with + // parenthesis, brackets and special symbols are not searchable as-is, + // and those keyword queries must be surrounded by quotes. + repeated string keyword_searchable_job_custom_attributes = 11; + + // Output only. Derived details about the company. + DerivedInfo derived_info = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether a company is flagged to be suspended from + // public availability by the service when job content appears suspicious, + // abusive, or spammy. + bool suspended = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company_service.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company_service.proto new file mode 100644 index 00000000..78bba7cc --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company_service.proto @@ -0,0 +1,184 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; +import "google/cloud/talent/v4/company.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "CompanyServiceProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A service that handles company management, including CRUD and enumeration. +service CompanyService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new company entity. + rpc CreateCompany(CreateCompanyRequest) returns (Company) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/companies" + body: "company" + }; + option (google.api.method_signature) = "parent,company"; + } + + // Retrieves specified company. + rpc GetCompany(GetCompanyRequest) returns (Company) { + option (google.api.http) = { + get: "/v4/{name=projects/*/tenants/*/companies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates specified company. + rpc UpdateCompany(UpdateCompanyRequest) returns (Company) { + option (google.api.http) = { + patch: "/v4/{company.name=projects/*/tenants/*/companies/*}" + body: "company" + }; + option (google.api.method_signature) = "company,update_mask"; + } + + // Deletes specified company. + // Prerequisite: The company has no jobs associated with it. + rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4/{name=projects/*/tenants/*/companies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all companies associated with the project. + rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) { + option (google.api.http) = { + get: "/v4/{parent=projects/*/tenants/*}/companies" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Request of the CreateCompany method. +message CreateCompanyRequest { + // Required. Resource name of the tenant under which the company is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; + + // Required. The company to be created. + Company company = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for getting a company by name. +message GetCompanyRequest { + // Required. The resource name of the company to be retrieved. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + // example, "projects/api-test-project/tenants/foo/companies/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; +} + +// Request for updating a specified company. +message UpdateCompanyRequest { + // Required. The company resource to replace the current resource in the + // system. + Company company = 1 [(google.api.field_behavior) = REQUIRED]; + + // Strongly recommended for the best service experience. + // + // If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + // is provided, only the specified fields in + // [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + // Otherwise all the fields are updated. + // + // A field mask to specify the company fields to be updated. Only + // top level fields of [Company][google.cloud.talent.v4.Company] are + // supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete a company. +message DeleteCompanyRequest { + // Required. The resource name of the company to be deleted. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + // example, "projects/foo/tenants/bar/companies/baz". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; +} + +// List companies for which the client has ACL visibility. +message ListCompaniesRequest { + // Required. Resource name of the tenant under which the company is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; + + // The starting indicator from which to return results. + string page_token = 2; + + // The maximum number of companies to be returned, at most 100. + // Default is 100 if a non-positive number is provided. + int32 page_size = 3; + + // Set to true if the companies requested must have open jobs. + // + // Defaults to false. + // + // If true, at most + // [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of + // companies are fetched, among which only those with open jobs are returned. + bool require_open_jobs = 4; +} + +// The List companies response object. +message ListCompaniesResponse { + // Companies for the current client. + repeated Company companies = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/completion_service.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/completion_service.proto new file mode 100644 index 00000000..e910d580 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/completion_service.proto @@ -0,0 +1,163 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "CompletionServiceProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A service handles auto completion. +service Completion { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Completes the specified prefix with keyword suggestions. + // Intended for use by a job search auto-complete search box. + rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { + option (google.api.http) = { + get: "/v4/{tenant=projects/*/tenants/*}:completeQuery" + }; + } +} + +// Auto-complete parameters. +message CompleteQueryRequest { + // Enum to specify the scope of completion. + enum CompletionScope { + // Default value. + COMPLETION_SCOPE_UNSPECIFIED = 0; + + // Suggestions are based only on the data provided by the client. + TENANT = 1; + + // Suggestions are based on all jobs data in the system that's visible to + // the client + PUBLIC = 2; + } + + // Enum to specify auto-completion topics. + enum CompletionType { + // Default value. + COMPLETION_TYPE_UNSPECIFIED = 0; + + // Suggest job titles for jobs autocomplete. + // + // For + // [CompletionType.JOB_TITLE][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.JOB_TITLE] + // type, only open jobs with the same + // [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + // are returned. + JOB_TITLE = 1; + + // Suggest company names for jobs autocomplete. + // + // For + // [CompletionType.COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME] + // type, only companies having open jobs with the same + // [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + // are returned. + COMPANY_NAME = 2; + + // Suggest both job titles and company names for jobs autocomplete. + // + // For + // [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED] + // type, only open jobs with the same + // [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + // or companies having open jobs with the same + // [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + // are returned. + COMBINED = 3; + } + + // Required. Resource name of tenant the completion is performed within. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string tenant = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; + + // Required. The query used to generate suggestions. + // + // The maximum number of allowed characters is 255. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // The list of languages of the query. This is + // the BCP-47 language code, such as "en-US" or "sr-Latn". + // For more information, see + // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + // + // The maximum number of allowed characters is 255. + repeated string language_codes = 3; + + // Required. Completion result count. + // + // The maximum allowed page size is 10. + int32 page_size = 4 [(google.api.field_behavior) = REQUIRED]; + + // If provided, restricts completion to specified company. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + // example, "projects/foo/tenants/bar/companies/baz". + string company = 5 [ + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; + + // The scope of the completion. The defaults is + // [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. + CompletionScope scope = 6; + + // The completion topic. The default is + // [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. + CompletionType type = 7; +} + +// Response of auto-complete query. +message CompleteQueryResponse { + // Resource that represents completion results. + message CompletionResult { + // The suggestion for the query. + string suggestion = 1; + + // The completion topic. + CompleteQueryRequest.CompletionType type = 2; + + // The URI of the company image for + // [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + string image_uri = 3; + } + + // Results of the matching job/company candidates. + repeated CompletionResult completion_results = 1; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 2; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event.proto new file mode 100644 index 00000000..862a4b9a --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event.proto @@ -0,0 +1,180 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "EventProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// An event issued when an end user interacts with the application that +// implements Cloud Talent Solution. Providing this information improves the +// quality of results for the API clients, enabling the +// service to perform optimally. The number of events sent must be consistent +// with other calls, such as job searches, issued to the service by the client. +message ClientEvent { + // Strongly recommended for the best service experience. + // + // A unique ID generated in the API responses. It can be found in + // [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. + string request_id = 1; + + // Required. A unique identifier, generated by the client application. + string event_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The timestamp of the event. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Required. + // + // The detail information of a specific event type. + oneof event { + // An event issued when a job seeker interacts with the application that + // implements Cloud Talent Solution. + JobEvent job_event = 5; + } + + // Notes about the event provided by recruiters or other users, for example, + // feedback on why a job was bookmarked. + string event_notes = 9; +} + +// An event issued when a job seeker interacts with the application that +// implements Cloud Talent Solution. +message JobEvent { + // An enumeration of an event attributed to the behavior of the end user, + // such as a job seeker. + enum JobEventType { + // The event is unspecified by other provided values. + JOB_EVENT_TYPE_UNSPECIFIED = 0; + + // The job seeker or other entity interacting with the service has + // had a job rendered in their view, such as in a list of search results in + // a compressed or clipped format. This event is typically associated with + // the viewing of a jobs list on a single page by a job seeker. + IMPRESSION = 1; + + // The job seeker, or other entity interacting with the service, has + // viewed the details of a job, including the full description. This + // event doesn't apply to the viewing a snippet of a job appearing as a + // part of the job search results. Viewing a snippet is associated with an + // [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]). + VIEW = 2; + + // The job seeker or other entity interacting with the service + // performed an action to view a job and was redirected to a different + // website for job. + VIEW_REDIRECT = 3; + + // The job seeker or other entity interacting with the service + // began the process or demonstrated the intention of applying for a job. + APPLICATION_START = 4; + + // The job seeker or other entity interacting with the service + // submitted an application for a job. + APPLICATION_FINISH = 5; + + // The job seeker or other entity interacting with the service + // submitted an application for a job with a single click without + // entering information. If a job seeker performs this action, send only + // this event to the service. Do not also send + // [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START] + // or + // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] + // events. + APPLICATION_QUICK_SUBMISSION = 6; + + // The job seeker or other entity interacting with the service + // performed an action to apply to a job and was redirected to a different + // website to complete the application. + APPLICATION_REDIRECT = 7; + + // The job seeker or other entity interacting with the service began the + // process or demonstrated the intention of applying for a job from the + // search results page without viewing the details of the job posting. + // If sending this event, JobEventType.VIEW event shouldn't be sent. + APPLICATION_START_FROM_SEARCH = 8; + + // The job seeker, or other entity interacting with the service, performs an + // action with a single click from the search results page to apply to a job + // (without viewing the details of the job posting), and is redirected + // to a different website to complete the application. If a candidate + // performs this action, send only this event to the service. Do not also + // send + // [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START], + // [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] + // or [JobEventType.VIEW][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] + // events. + APPLICATION_REDIRECT_FROM_SEARCH = 9; + + // This event should be used when a company submits an application + // on behalf of a job seeker. This event is intended for use by staffing + // agencies attempting to place candidates. + APPLICATION_COMPANY_SUBMIT = 10; + + // The job seeker or other entity interacting with the service demonstrated + // an interest in a job by bookmarking or saving it. + BOOKMARK = 11; + + // The job seeker or other entity interacting with the service was + // sent a notification, such as an email alert or device notification, + // containing one or more jobs listings generated by the service. + NOTIFICATION = 12; + + // The job seeker or other entity interacting with the service was + // employed by the hiring entity (employer). Send this event + // only if the job seeker was hired through an application that was + // initiated by a search conducted through the Cloud Talent Solution + // service. + HIRED = 13; + + // A recruiter or staffing agency submitted an application on behalf of the + // candidate after interacting with the service to identify a suitable job + // posting. + SENT_CV = 14; + + // The entity interacting with the service (for example, the job seeker), + // was granted an initial interview by the hiring entity (employer). This + // event should only be sent if the job seeker was granted an interview as + // part of an application that was initiated by a search conducted through / + // recommendation provided by the Cloud Talent Solution service. + INTERVIEW_GRANTED = 15; + } + + // Required. The type of the event (see + // [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). + JobEventType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated + // with this event. For example, if this is an + // [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] + // event, this field contains the identifiers of all jobs shown to the job + // seeker. If this was a + // [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field + // contains the identifier of the viewed job. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + // example, "projects/foo/tenants/bar/jobs/baz". + repeated string jobs = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event_service.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event_service.proto new file mode 100644 index 00000000..7cd25f11 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event_service.proto @@ -0,0 +1,68 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/event.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "EventServiceProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A service handles client event report. +service EventService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Report events issued when end user interacts with customer's application + // that uses Cloud Talent Solution. You may inspect the created events in + // [self service + // tools](https://console.cloud.google.com/talent-solution/overview). + // [Learn + // more](https://cloud.google.com/talent-solution/docs/management-tools) + // about self service tools. + rpc CreateClientEvent(CreateClientEventRequest) returns (ClientEvent) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/clientEvents" + body: "client_event" + }; + option (google.api.method_signature) = "parent,client_event"; + } +} + +// The report event request. +message CreateClientEventRequest { + // Required. Resource name of the tenant under which the event is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; + + // Required. Events issued when end user interacts with customer's application + // that uses Cloud Talent Solution. + ClientEvent client_event = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/filters.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/filters.proto new file mode 100644 index 00000000..fb3ffc4f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/filters.proto @@ -0,0 +1,358 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/talent/v4/common.proto"; +import "google/protobuf/duration.proto"; +import "google/type/latlng.proto"; +import "google/type/timeofday.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "FiltersProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// The query required to perform a search query. +message JobQuery { + // The query string that matches against the job title, description, and + // location fields. + // + // The maximum number of allowed characters is 255. + string query = 1; + + // The language code of [query][google.cloud.talent.v4.JobQuery.query]. For + // example, "en-US". This field helps to better interpret the query. + // + // If a value isn't specified, the query language code is automatically + // detected, which may not be accurate. + // + // Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + // For more information, see + // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + string query_language_code = 14; + + // This filter specifies the company entities to search against. + // + // If a value isn't specified, jobs are searched for against all + // companies. + // + // If multiple values are specified, jobs are searched against the + // companies specified. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + // example, "projects/foo/tenants/bar/companies/baz". + // + // At most 20 company filters are allowed. + repeated string companies = 2; + + // The location filter specifies geo-regions containing the jobs to + // search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] + // for more information. + // + // If a location value isn't specified, jobs fitting the other search + // criteria are retrieved regardless of where they're located. + // + // If multiple values are specified, jobs are retrieved from any of the + // specified locations. If different values are specified for the + // [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] + // parameter, the maximum provided distance is used for all locations. + // + // At most 5 location filters are allowed. + repeated LocationFilter location_filters = 3; + + // The category filter specifies the categories of jobs to search against. + // See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. + // + // If a value isn't specified, jobs from any category are searched against. + // + // If multiple values are specified, jobs from any of the specified + // categories are searched against. + repeated JobCategory job_categories = 4; + + // Allows filtering jobs by commute time with different travel methods (for + // example, driving or public transit). + // + // Note: This only works when you specify a + // [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, + // [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is + // ignored. + // + // Currently we don't support sorting by commute time. + CommuteFilter commute_filter = 5; + + // This filter specifies the exact company + // [Company.display_name][google.cloud.talent.v4.Company.display_name] of the + // jobs to search against. + // + // If a value isn't specified, jobs within the search results are + // associated with any company. + // + // If multiple values are specified, jobs within the search results may be + // associated with any of the specified companies. + // + // At most 20 company display name filters are allowed. + repeated string company_display_names = 6; + + // This search filter is applied only to + // [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For + // example, if the filter is specified as "Hourly job with per-hour + // compensation > $15", only jobs meeting these criteria are searched. If a + // filter isn't defined, all open jobs are searched. + CompensationFilter compensation_filter = 7; + + // This filter specifies a structured syntax to match against the + // [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + // marked as `filterable`. + // + // The syntax for this expression is a subset of SQL syntax. + // + // Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + // left of the operator is a custom field key and the right of the operator + // is a number or a quoted string. You must escape backslash (\\) and + // quote (\") characters. + // + // Supported functions are `LOWER([field_name])` to + // perform a case insensitive match and `EMPTY([field_name])` to filter on the + // existence of a key. + // + // Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + // nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + // comparisons or functions are allowed in the expression. The expression + // must be < 6000 bytes in length. + // + // Sample Query: + // `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + // driving_years > 10` + string custom_attribute_filter = 8; + + // This flag controls the spell-check feature. If false, the + // service attempts to correct a misspelled query, + // for example, "enginee" is corrected to "engineer". + // + // Defaults to false: a spell check is performed. + bool disable_spell_check = 9; + + // The employment type filter specifies the employment type of jobs to + // search against, such as + // [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. + // + // If a value isn't specified, jobs in the search results includes any + // employment type. + // + // If multiple values are specified, jobs in the search results include + // any of the specified employment types. + repeated EmploymentType employment_types = 10; + + // This filter specifies the locale of jobs to search against, + // for example, "en-US". + // + // If a value isn't specified, the search results can contain jobs in any + // locale. + // + // + // Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + // For more information, see + // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + // + // At most 10 language code filters are allowed. + repeated string language_codes = 11; + + // Jobs published within a range specified by this filter are searched + // against. + TimestampRange publish_time_range = 12; + + // This filter specifies a list of job names to be excluded during search. + // + // At most 400 excluded job names are allowed. + repeated string excluded_jobs = 13; +} + +// Geographic region of the search. +message LocationFilter { + // Specify whether to include telecommute jobs. + enum TelecommutePreference { + // Default value if the telecommute preference isn't specified. + TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + + // Exclude telecommute jobs. + TELECOMMUTE_EXCLUDED = 1; + + // Allow telecommute jobs. + TELECOMMUTE_ALLOWED = 2; + } + + // The address name, such as "Mountain View" or "Bay Area". + string address = 1; + + // CLDR region code of the country/region of the address. This is used + // to address ambiguity of the user-input location, for example, "Liverpool" + // against "Liverpool, NY, US" or "Liverpool, UK". + // + // Set this field to bias location resolution toward a specific country + // or territory. If this field is not set, application behavior is biased + // toward the United States by default. + // + // See + // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + // for details. Example: "CH" for Switzerland. + string region_code = 2; + + // The latitude and longitude of the geographic center to search from. This + // field is ignored if `address` is provided. + google.type.LatLng lat_lng = 3; + + // The distance_in_miles is applied when the location being searched for is + // identified as a city or smaller. This field is ignored if the location + // being searched for is a state or larger. + double distance_in_miles = 4; + + // Allows the client to return jobs without a + // set location, specifically, telecommuting jobs (telecommuting is considered + // by the service as a special location. + // [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates + // if a job permits telecommuting. If this field is set to + // [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + // telecommuting jobs are searched, and + // [address][google.cloud.talent.v4.LocationFilter.address] and + // [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If + // not set or set to + // [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], + // telecommute job are not searched. + // + // This filter can be used by itself to search exclusively for telecommuting + // jobs, or it can be combined with another location + // filter to search for a combination of job locations, + // such as "Mountain View" or "telecommuting" jobs. However, when used in + // combination with other location filters, telecommuting jobs can be + // treated as less relevant than other jobs in the search response. + // + // This field is only used for job search requests. + TelecommutePreference telecommute_preference = 5; +} + +// Filter on job compensation type and amount. +message CompensationFilter { + // Specify the type of filtering. + enum FilterType { + // Filter type unspecified. Position holder, INVALID, should never be used. + FILTER_TYPE_UNSPECIFIED = 0; + + // Filter by `base compensation entry's` unit. A job is a match if and + // only if the job contains a base CompensationEntry and the base + // CompensationEntry's unit matches provided + // [units][google.cloud.talent.v4.CompensationFilter.units]. Populate one or + // more [units][google.cloud.talent.v4.CompensationFilter.units]. + // + // See + // [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + // for definition of base compensation entry. + UNIT_ONLY = 1; + + // Filter by `base compensation entry's` unit and amount / range. A job + // is a match if and only if the job contains a base CompensationEntry, and + // the base entry's unit matches provided + // [CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + // and amount or range overlaps with provided + // [CompensationRange][google.cloud.talent.v4.CompensationInfo.CompensationRange]. + // + // See + // [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + // for definition of base compensation entry. + // + // Set exactly one [units][google.cloud.talent.v4.CompensationFilter.units] + // and populate [range][google.cloud.talent.v4.CompensationFilter.range]. + UNIT_AND_AMOUNT = 2; + + // Filter by annualized base compensation amount and `base compensation + // entry's` unit. Populate + // [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more + // [units][google.cloud.talent.v4.CompensationFilter.units]. + ANNUALIZED_BASE_AMOUNT = 3; + + // Filter by annualized total compensation amount and `base compensation + // entry's` unit . Populate + // [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more + // [units][google.cloud.talent.v4.CompensationFilter.units]. + ANNUALIZED_TOTAL_AMOUNT = 4; + } + + // Required. Type of filter. + FilterType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specify desired `base compensation entry's` + // [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. + repeated CompensationInfo.CompensationUnit units = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Compensation range. + CompensationInfo.CompensationRange range = 3; + + // If set to true, jobs with unspecified compensation range fields are + // included. + bool include_jobs_with_unspecified_compensation_range = 4; +} + +// Parameters needed for commute search. +message CommuteFilter { + // The traffic density to use when calculating commute time. + enum RoadTraffic { + // Road traffic situation isn't specified. + ROAD_TRAFFIC_UNSPECIFIED = 0; + + // Optimal commute time without considering any traffic impact. + TRAFFIC_FREE = 1; + + // Commute time calculation takes in account the peak traffic impact. + BUSY_HOUR = 2; + } + + // Required. The method of transportation to calculate the commute time for. + CommuteMethod commute_method = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The latitude and longitude of the location to calculate the + // commute time from. + google.type.LatLng start_coordinates = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum travel time in seconds. The maximum allowed value is + // `3600s` (one hour). Format is `123s`. + google.protobuf.Duration travel_duration = 3 + [(google.api.field_behavior) = REQUIRED]; + + // If `true`, jobs without street level addresses may also be returned. + // For city level addresses, the city center is used. For state and coarser + // level addresses, text matching is used. + // If this field is set to `false` or isn't specified, only jobs that include + // street level addresses will be returned by commute search. + bool allow_imprecise_addresses = 4; + + // Traffic factor to take into account while searching by commute. + oneof traffic_option { + // Specifies the traffic density to use when calculating commute time. + RoadTraffic road_traffic = 5; + + // The departure time used to calculate traffic impact, represented as + // [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. + // + // Currently traffic model is restricted to hour level resolution. + google.type.TimeOfDay departure_time = 6; + } +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/histogram.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/histogram.proto new file mode 100644 index 00000000..f58ac1c0 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/histogram.proto @@ -0,0 +1,56 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "HistogramProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// The histogram request. +message HistogramQuery { + // An expression specifies a histogram request against matching jobs for + // searches. + // + // See + // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] + // for details about syntax. + string histogram_query = 1; +} + +// Histogram result that matches +// [HistogramQuery][google.cloud.talent.v4.HistogramQuery] specified in +// searches. +message HistogramQueryResult { + // Requested histogram expression. + string histogram_query = 1; + + // A map from the values of the facet associated with distinct values to the + // number of matching entries with corresponding value. + // + // The key format is: + // + // * (for string histogram) string values stored in the field. + // * (for named numeric bucket) name specified in `bucket()` function, like + // for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + // * (for anonymous numeric bucket) range formatted as `-`, for + // example, `0-1000`, `MIN-0`, and `0-MAX`. + map histogram = 2; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job.proto new file mode 100644 index 00000000..66242e10 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job.proto @@ -0,0 +1,370 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "JobProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A Job resource represents a job posting (also referred to as a "job listing" +// or "job requisition"). A job belongs to a +// [Company][google.cloud.talent.v4.Company], which is the hiring entity +// responsible for the job. +message Job { + option (google.api.resource) = { + type: "jobs.googleapis.com/Job" + pattern: "projects/{project}/tenants/{tenant}/jobs/{job}" + }; + + // Application related details of a job posting. + message ApplicationInfo { + // Use this field to specify email address(es) to which resumes or + // applications can be sent. + // + // The maximum number of allowed characters for each entry is 255. + repeated string emails = 1; + + // Use this field to provide instructions, such as "Mail your application + // to ...", that a candidate can follow to apply for the job. + // + // This field accepts and sanitizes HTML input, and also accepts + // bold, italic, ordered list, and unordered list markup tags. + // + // The maximum number of allowed characters is 3,000. + string instruction = 2; + + // Use this URI field to direct an applicant to a website, for example to + // link to an online application form. + // + // The maximum number of allowed characters for each entry is 2,000. + repeated string uris = 3; + } + + // Derived details about the job posting. + message DerivedInfo { + // Structured locations of the job, resolved from + // [Job.addresses][google.cloud.talent.v4.Job.addresses]. + // + // [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly + // matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the + // same order. + repeated Location locations = 1; + + // Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] + // and [Job.description][google.cloud.talent.v4.Job.description]. + repeated JobCategory job_categories = 3; + } + + // Options for job processing. + message ProcessingOptions { + // If set to `true`, the service does not attempt to resolve a + // more precise address for the job. + bool disable_street_address_resolution = 1; + + // Option for job HTML content sanitization. Applied fields are: + // + // * description + // * applicationInfo.instruction + // * incentives + // * qualifications + // * responsibilities + // + // HTML tags in these fields may be stripped if sanitiazation isn't + // disabled. + // + // Defaults to + // [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + HtmlSanitization html_sanitization = 2; + } + + // Required during job update. + // + // The resource name for the job. This is generated by the service when a + // job is created. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". + // + // Use of this field in job queries and API calls is preferred over the use of + // [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this + // value is unique. + string name = 1; + + // Required. The resource name of the company listing the job. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + // example, "projects/foo/tenants/bar/companies/baz". + string company = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; + + // Required. The requisition ID, also referred to as the posting ID, is + // assigned by the client to identify a job. This field is intended to be used + // by clients for client identification and tracking of postings. A job isn't + // allowed to be created if there is another job with the same + // [company][google.cloud.talent.v4.Job.name], + // [language_code][google.cloud.talent.v4.Job.language_code] and + // [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + // + // The maximum number of allowed characters is 255. + string requisition_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the job, such as "Software Engineer" + // + // The maximum number of allowed characters is 500. + string title = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The description of the job, which typically includes a + // multi-paragraph description of the company and related information. + // Separate fields are provided on the job object for + // [responsibilities][google.cloud.talent.v4.Job.responsibilities], + // [qualifications][google.cloud.talent.v4.Job.qualifications], and other job + // characteristics. Use of these separate job fields is recommended. + // + // This field accepts and sanitizes HTML input, and also accepts + // bold, italic, ordered list, and unordered list markup tags. + // + // The maximum number of allowed characters is 100,000. + string description = 5 [(google.api.field_behavior) = REQUIRED]; + + // Strongly recommended for the best service experience. + // + // Location(s) where the employer is looking to hire for this job posting. + // + // Specifying the full street address(es) of the hiring location enables + // better API results, especially job searches by commute time. + // + // At most 50 locations are allowed for best search performance. If a job has + // more locations, it is suggested to split it into multiple jobs with unique + // [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' + // becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same + // [company][google.cloud.talent.v4.Job.company], + // [language_code][google.cloud.talent.v4.Job.language_code] and + // [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not + // allowed. If the original + // [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be + // preserved, a custom field should be used for storage. It is also suggested + // to group the locations that close to each other in the same job for better + // search experience. + // + // The maximum number of allowed characters is 500. + repeated string addresses = 6; + + // Job application information. + ApplicationInfo application_info = 7; + + // The benefits included with the job. + repeated JobBenefit job_benefits = 8; + + // Job compensation information (a.k.a. "pay rate") i.e., the compensation + // that will paid to the employee. + CompensationInfo compensation_info = 9; + + // A map of fields to hold both filterable and non-filterable custom job + // attributes that are not covered by the provided structured fields. + // + // The keys of the map are strings up to 64 bytes and must match the + // pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, key0LikeThis or + // KEY_1_LIKE_THIS. + // + // At most 100 filterable and at most 100 unfilterable keys are supported. + // For filterable `string_values`, across all keys at most 200 values are + // allowed, with each string no more than 255 characters. For unfilterable + // `string_values`, the maximum total size of `string_values` across all keys + // is 50KB. + map custom_attributes = 10; + + // The desired education degrees for the job, such as Bachelors, Masters. + repeated DegreeType degree_types = 11; + + // The department or functional area within the company with the open + // position. + // + // The maximum number of allowed characters is 255. + string department = 12; + + // The employment type(s) of a job, for example, + // [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or + // [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. + repeated EmploymentType employment_types = 13; + + // A description of bonus, commission, and other compensation + // incentives associated with the job not including salary or pay. + // + // The maximum number of allowed characters is 10,000. + string incentives = 14; + + // The language of the posting. This field is distinct from + // any requirements for fluency that are associated with the job. + // + // Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + // For more information, see + // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + // class="external" target="_blank" }. + // + // If this field is unspecified and + // [Job.description][google.cloud.talent.v4.Job.description] is present, + // detected language code based on + // [Job.description][google.cloud.talent.v4.Job.description] is assigned, + // otherwise defaults to 'en_US'. + string language_code = 15; + + // The experience level associated with the job, such as "Entry Level". + JobLevel job_level = 16; + + // A promotion value of the job, as determined by the client. + // The value determines the sort order of the jobs returned when searching for + // jobs using the featured jobs search call, with higher promotional values + // being returned first and ties being resolved by relevance sort. Only the + // jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + // + // Default value is 0, and negative values are treated as 0. + int32 promotion_value = 17; + + // A description of the qualifications required to perform the + // job. The use of this field is recommended + // as an alternative to using the more general + // [description][google.cloud.talent.v4.Job.description] field. + // + // This field accepts and sanitizes HTML input, and also accepts + // bold, italic, ordered list, and unordered list markup tags. + // + // The maximum number of allowed characters is 10,000. + string qualifications = 18; + + // A description of job responsibilities. The use of this field is + // recommended as an alternative to using the more general + // [description][google.cloud.talent.v4.Job.description] field. + // + // This field accepts and sanitizes HTML input, and also accepts + // bold, italic, ordered list, and unordered list markup tags. + // + // The maximum number of allowed characters is 10,000. + string responsibilities = 19; + + // The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, + // state, country) throughout which the job is available. If this field is + // set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search + // query within the job region finds this job posting if an exact location + // match isn't specified. If this field is set to + // [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or + // [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], + // setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the + // same location level as this field is strongly recommended. + PostingRegion posting_region = 20; + + // Deprecated. The job is only visible to the owner. + // + // The visibility of the job. + // + // Defaults to + // [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] + // if not specified. + Visibility visibility = 21 [deprecated = true]; + + // The start timestamp of the job in UTC time zone. Typically this field + // is used for contracting engagements. Invalid timestamps are ignored. + google.protobuf.Timestamp job_start_time = 22; + + // The end timestamp of the job. Typically this field is used for contracting + // engagements. Invalid timestamps are ignored. + google.protobuf.Timestamp job_end_time = 23; + + // The timestamp this job posting was most recently published. The default + // value is the time the request arrives at the server. Invalid timestamps are + // ignored. + google.protobuf.Timestamp posting_publish_time = 24; + + // Strongly recommended for the best service experience. + // + // The expiration timestamp of the job. After this timestamp, the + // job is marked as expired, and it no longer appears in search results. The + // expired job can't be listed by the + // [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be + // retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API + // or updated with the + // [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted + // with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An + // expired job can be updated and opened again by using a future expiration + // timestamp. Updating an expired job fails if there is another existing open + // job with same [company][google.cloud.talent.v4.Job.company], + // [language_code][google.cloud.talent.v4.Job.language_code] and + // [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + // + // The expired jobs are retained in our system for 90 days. However, the + // overall expired job count cannot exceed 3 times the maximum number of + // open jobs over previous 7 days. If this threshold is exceeded, + // expired jobs are cleaned out in order of earliest expire time. + // Expired jobs are no longer accessible after they are cleaned + // out. + // + // Invalid timestamps are ignored, and treated as expire time not provided. + // + // If the timestamp is before the instant request is made, the job + // is treated as expired immediately on creation. This kind of job can + // not be updated. And when creating a job with past timestamp, the + // [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + // must be set before + // [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The + // purpose of this feature is to allow other objects, such as [Application][], + // to refer a job that didn't exist in the system prior to becoming expired. + // If you want to modify a job that was expired on creation, delete it and + // create a new one. + // + // If this value isn't provided at the time of job creation or is invalid, + // the job posting expires after 30 days from the job's creation time. For + // example, if the job was created on 2017/01/01 13:00AM UTC with an + // unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + // + // If this value isn't provided on job update, it depends on the field masks + // set by + // [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. + // If the field masks include + // [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are + // empty meaning that every field is updated, the job posting expires after 30 + // days from the job's last update time. Otherwise the expiration date isn't + // updated. + google.protobuf.Timestamp posting_expire_time = 25; + + // Output only. The timestamp when this job posting was created. + google.protobuf.Timestamp posting_create_time = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when this job posting was last updated. + google.protobuf.Timestamp posting_update_time = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Display name of the company listing the job. + string company_display_name = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Derived details about the job posting. + DerivedInfo derived_info = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Options for job processing. + ProcessingOptions processing_options = 30; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job_service.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job_service.proto new file mode 100644 index 00000000..37642927 --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job_service.proto @@ -0,0 +1,865 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; +import "google/cloud/talent/v4/filters.proto"; +import "google/cloud/talent/v4/histogram.proto"; +import "google/cloud/talent/v4/job.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "JobServiceProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A service handles job management, including job CRUD, enumeration and search. +service JobService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new job. + // + // Typically, the job becomes searchable within 10 seconds, but it may take + // up to 5 minutes. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs" + body: "job" + }; + option (google.api.method_signature) = "parent,job"; + } + + // Begins executing a batch create jobs operation. + rpc BatchCreateJobs(BatchCreateJobsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,jobs"; + option (google.longrunning.operation_info) = { + response_type: "BatchCreateJobsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Retrieves the specified job, whose status is OPEN or recently EXPIRED + // within the last 90 days. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v4/{name=projects/*/tenants/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates specified job. + // + // Typically, updated contents become visible in search results within 10 + // seconds, but it may take up to 5 minutes. + rpc UpdateJob(UpdateJobRequest) returns (Job) { + option (google.api.http) = { + patch: "/v4/{job.name=projects/*/tenants/*/jobs/*}" + body: "job" + }; + option (google.api.method_signature) = "job,update_mask"; + } + + // Begins executing a batch update jobs operation. + rpc BatchUpdateJobs(BatchUpdateJobsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,jobs"; + option (google.longrunning.operation_info) = { + response_type: "BatchUpdateJobsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Deletes the specified job. + // + // Typically, the job becomes unsearchable within 10 seconds, but it may take + // up to 5 minutes. + rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4/{name=projects/*/tenants/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Begins executing a batch delete jobs operation. + rpc BatchDeleteJobs(BatchDeleteJobsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,names"; + option (google.longrunning.operation_info) = { + response_type: "BatchDeleteJobsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Lists jobs by filter. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v4/{parent=projects/*/tenants/*}/jobs" + }; + option (google.api.method_signature) = "parent,filter"; + } + + // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + // + // This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs + // present in the database, and only returns jobs that the caller has + // permission to search against. + rpc SearchJobs(SearchJobsRequest) returns (SearchJobsResponse) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs:search" + body: "*" + }; + } + + // Searches for jobs using the provided [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + // + // This API call is intended for the use case of targeting passive job + // seekers (for example, job seekers who have signed up to receive email + // alerts about potential job opportunities), it has different algorithmic + // adjustments that are designed to specifically target passive job seekers. + // + // This call constrains the [visibility][google.cloud.talent.v4.Job.visibility] of jobs + // present in the database, and only returns jobs the caller has + // permission to search against. + rpc SearchJobsForAlert(SearchJobsRequest) returns (SearchJobsResponse) { + option (google.api.http) = { + post: "/v4/{parent=projects/*/tenants/*}/jobs:searchForAlert" + body: "*" + }; + } +} + +// Create job request. +message CreateJobRequest { + // Required. The resource name of the tenant under which the job is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; + + // Required. The Job to be created. + Job job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Get job request. +message GetJobRequest { + // Required. The resource name of the job to retrieve. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Job" + } + ]; +} + +// Update job request. +message UpdateJobRequest { + // Required. The Job to be updated. + Job job = 1 [(google.api.field_behavior) = REQUIRED]; + + // Strongly recommended for the best service experience. + // + // If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is provided, only the specified fields in + // [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise all the fields are updated. + // + // A field mask to restrict the fields that are updated. Only + // top level fields of [Job][google.cloud.talent.v4.Job] are supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Delete job request. +message DeleteJobRequest { + // Required. The resource name of the job to be deleted. + // + // The format is + // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + // example, "projects/foo/tenants/bar/jobs/baz". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Job" + } + ]; +} + +// List jobs request. +message ListJobsRequest { + // Required. The resource name of the tenant under which the job is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; + + // Required. The filter string specifies the jobs to be enumerated. + // + // Supported operator: =, AND + // + // The fields eligible for filtering are: + // + // * `companyName` (Required) + // * `requisitionId` + // * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + // OPEN if no value is specified. + // + // Sample Query: + // + // * companyName = "projects/foo/tenants/bar/companies/baz" + // * companyName = "projects/foo/tenants/bar/companies/baz" AND + // requisitionId = "req-1" + // * companyName = "projects/foo/tenants/bar/companies/baz" AND + // status = "EXPIRED" + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // The starting point of a query result. + string page_token = 3; + + // The maximum number of jobs to be returned per page of results. + // + // If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], the maximum allowed + // page size is 1000. Otherwise, the maximum allowed page size is 100. + // + // Default is 100 if empty or a number < 1 is specified. + int32 page_size = 4; + + // The desired job attributes returned for jobs in the + // search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no value is + // specified. + JobView job_view = 5; +} + +// An enum that specifies the job attributes that are returned in the +// [MatchingJob.job][google.cloud.talent.v4.SearchJobsResponse.MatchingJob.job] or +// [ListJobsResponse.jobs][google.cloud.talent.v4.ListJobsResponse.jobs] fields. +enum JobView { + // Default value. + JOB_VIEW_UNSPECIFIED = 0; + + // A ID only view of job, with following attributes: + // [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.language_code][google.cloud.talent.v4.Job.language_code]. + JOB_VIEW_ID_ONLY = 1; + + // A minimal view of the job, with the following attributes: + // [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title], + // [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.language_code][google.cloud.talent.v4.Job.language_code]. + JOB_VIEW_MINIMAL = 2; + + // A small view of the job, with the following attributes in the search + // results: [Job.name][google.cloud.talent.v4.Job.name], [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], [Job.title][google.cloud.talent.v4.Job.title], + // [Job.company][google.cloud.talent.v4.Job.company], [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], [Job.visibility][google.cloud.talent.v4.Job.visibility], + // [Job.language_code][google.cloud.talent.v4.Job.language_code], [Job.description][google.cloud.talent.v4.Job.description]. + JOB_VIEW_SMALL = 3; + + // All available attributes are included in the search results. + JOB_VIEW_FULL = 4; +} + +// List jobs response. +message ListJobsResponse { + // The Jobs for a given company. + // + // The maximum number of items returned is based on the limit field + // provided in the request. + repeated Job jobs = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} + +// The Request body of the `SearchJobs` call. +message SearchJobsRequest { + // Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + message CustomRankingInfo { + // The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression]. + enum ImportanceLevel { + // Default value if the importance level isn't specified. + IMPORTANCE_LEVEL_UNSPECIFIED = 0; + + // The given ranking expression is of None importance, existing relevance + // score (determined by API algorithm) dominates job's final ranking + // position. + NONE = 1; + + // The given ranking expression is of Low importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + LOW = 2; + + // The given ranking expression is of Mild importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + MILD = 3; + + // The given ranking expression is of Medium importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + MEDIUM = 4; + + // The given ranking expression is of High importance in terms of job's + // final ranking position compared to existing relevance + // score (determined by API algorithm). + HIGH = 5; + + // The given ranking expression is of Extreme importance, and dominates + // job's final ranking position with existing relevance + // score (determined by API algorithm) ignored. + EXTREME = 6; + } + + // Required. Controls over how important the score of + // [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] gets applied to job's final + // ranking position. + // + // An error is thrown if not specified. + ImportanceLevel importance_level = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Controls over how job documents get ranked on top of existing relevance + // score (determined by API algorithm). A combination of the ranking + // expression and relevance score is used to determine job's final ranking + // position. + // + // The syntax for this expression is a subset of Google SQL syntax. + // + // Supported operators are: +, -, *, /, where the left and right side of + // the operator is either a numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] key, + // integer/double value or an expression that can be evaluated to a number. + // + // Parenthesis are supported to adjust calculation precedence. The + // expression must be < 100 characters in length. + // + // The expression is considered invalid for a job if the expression + // references custom attributes that are not populated on the job or if the + // expression results in a divide by zero. If an expression is invalid for a + // job, that job is demoted to the end of the results. + // + // Sample ranking expression + // (year + 25) * 0.25 - (freshness / 0.5) + string ranking_expression = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A string-represented enumeration of the job search mode. The service + // operate differently for different modes of service. + enum SearchMode { + // The mode of the search method isn't specified. The default search + // behavior is identical to JOB_SEARCH search behavior. + SEARCH_MODE_UNSPECIFIED = 0; + + // The job search matches against all jobs, and featured jobs + // (jobs with promotionValue > 0) are not specially handled. + JOB_SEARCH = 1; + + // The job search matches only against featured jobs (jobs with a + // promotionValue > 0). This method doesn't return any jobs having a + // promotionValue <= 0. The search results order is determined by the + // promotionValue (jobs with a higher promotionValue are returned higher up + // in the search results), with relevance being used as a tiebreaker. + FEATURED_JOB_SEARCH = 2; + } + + // Controls whether highly similar jobs are returned next to each other in + // the search results. Jobs are identified as highly similar based on + // their titles, job categories, and locations. Highly similar results are + // clustered so that only one representative job of the cluster is + // displayed to the job seeker higher up in the results, with the other jobs + // being displayed lower down in the results. + enum DiversificationLevel { + // The diversification level isn't specified. + DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + + // Disables diversification. Jobs that would normally be pushed to the last + // page would not have their positions altered. This may result in highly + // similar jobs appearing in sequence in the search results. + DISABLED = 1; + + // Default diversifying behavior. The result list is ordered so that + // highly similar results are pushed to the end of the last page of search + // results. If you are using pageToken to page through the result set, + // latency might be lower but we can't guarantee that all results are + // returned. If you are using page offset, latency might be higher but all + // results are returned. + SIMPLE = 2; + } + + // Required. The resource name of the tenant to search within. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; + + // Mode of a search. + // + // Defaults to [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. + SearchMode search_mode = 2; + + // Required. The meta information collected about the job searcher, used to improve the + // search quality of the service. The identifiers (such as `user_id`) are + // provided by users, and must be unique and consistent. + RequestMetadata request_metadata = 3 [(google.api.field_behavior) = REQUIRED]; + + // Query used to search against jobs, such as keyword, location filters, etc. + JobQuery job_query = 4; + + // Controls whether to broaden the search when it produces sparse results. + // Broadened queries append results to the end of the matching results + // list. + // + // Defaults to false. + bool enable_broadening = 5; + + // An expression specifies a histogram request against matching jobs. + // + // Expression syntax is an aggregation function call with histogram facets and + // other options. + // + // Available aggregation function calls are: + // * `count(string_histogram_facet)`: Count the number of matching entities, + // for each distinct attribute value. + // * `count(numeric_histogram_facet, list of buckets)`: Count the number of + // matching entities within each bucket. + // + // Data types: + // + // * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+. + // * String: string like "any string with backslash escape for quote(\")." + // * Number: whole number and floating point number like 10, -1 and -0.01. + // * List: list of elements with comma(,) separator surrounded by square + // brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + // + // Built-in constants: + // + // * MIN (minimum number similar to java Double.MIN_VALUE) + // * MAX (maximum number similar to java Double.MAX_VALUE) + // + // Built-in functions: + // + // * bucket(start, end[, label]): bucket built-in function creates a bucket + // with range of [start, end). Note that the end is exclusive, for example, + // bucket(1, MAX, "positive number") or bucket(1, 10). + // + // Job histogram facets: + // + // * company_display_name: histogram by [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. + // * employment_type: histogram by [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for example, + // "FULL_TIME", "PART_TIME". + // * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", + // "MEDIUM", "BIG". + // * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + // in months. + // Must specify list of numeric buckets in spec. + // * publish_time_in_year: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + // in years. + // Must specify list of numeric buckets in spec. + // * degree_types: histogram by the [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, + // "Bachelors", "Masters". + // * job_level: histogram by the [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry + // Level". + // * country: histogram by the country code of jobs, for example, "US", "FR". + // * admin1: histogram by the admin1 code of jobs, which is a global + // placeholder referring to the state, province, or the particular term a + // country uses to define the geographic structure below the country level, + // for example, "CA", "IL". + // * city: histogram by a combination of the "city name, admin1 code". For + // example, "Mountain View, CA", "New York, NY". + // * admin1_country: histogram by a combination of the "admin1 code, country", + // for example, "CA, US", "IL, US". + // * city_coordinate: histogram by the city center's GPS coordinates (latitude + // and longitude), for example, 37.4038522,-122.0987765. Since the + // coordinates of a city center can change, customers may need to refresh + // them periodically. + // * locale: histogram by the [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, "en-US", + // "fr-FR". + // * language: histogram by the language subtag of the [Job.language_code][google.cloud.talent.v4.Job.language_code], + // for example, "en", "fr". + // * category: histogram by the [JobCategory][google.cloud.talent.v4.JobCategory], for example, + // "COMPUTER_AND_IT", "HEALTHCARE". + // * base_compensation_unit: histogram by the + // [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] of base + // salary, for example, "WEEKLY", "MONTHLY". + // * base_compensation: histogram by the base salary. Must specify list of + // numeric buckets to group results by. + // * annualized_base_compensation: histogram by the base annualized salary. + // Must specify list of numeric buckets to group results by. + // * annualized_total_compensation: histogram by the total annualized salary. + // Must specify list of numeric buckets to group results by. + // * string_custom_attribute: histogram by string [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + // Values can be accessed via square bracket notations like + // string_custom_attribute["key1"]. + // * numeric_custom_attribute: histogram by numeric [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + // Values can be accessed via square bracket notations like + // numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + // group results by. + // + // Example expressions: + // + // * `count(admin1)` + // * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + // bucket(100000, MAX)])` + // * `count(string_custom_attribute["some-string-custom-attribute"])` + // * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])` + repeated HistogramQuery histogram_queries = 7; + + // The desired job attributes returned for jobs in the search response. + // Defaults to [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if no value is specified. + JobView job_view = 8; + + // An integer that specifies the current offset (that is, starting result + // location, amongst the jobs deemed by the API as relevant) in search + // results. This field is only considered if [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. + // + // The maximum allowed value is 5000. Otherwise an error is thrown. + // + // For example, 0 means to return results starting from the first matching + // job, and 10 means to return from the 11th job. This can be used for + // pagination, (for example, pageSize = 10 and offset = 10 means to return + // from the second page). + int32 offset = 9; + + // A limit on the number of jobs returned in the search results. + // Increasing this value above the default value of 10 can increase search + // response time. The value can be between 1 and 100. + int32 max_page_size = 10; + + // The token specifying the current offset within + // search results. See [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] for + // an explanation of how to obtain the next set of query results. + string page_token = 11; + + // The criteria determining how search results are sorted. Default is + // `"relevance desc"`. + // + // Supported options are: + // + // * `"relevance desc"`: By relevance descending, as determined by the API + // algorithms. Relevance thresholding of query results is only available + // with this ordering. + // * `"posting_publish_time desc"`: By [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + // descending. + // * `"posting_update_time desc"`: By [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] + // descending. + // * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. + // * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] descending. + // * `"annualized_base_compensation"`: By job's + // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] ascending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. + // * `"annualized_base_compensation desc"`: By job's + // [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] descending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. + // * `"annualized_total_compensation"`: By job's + // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] ascending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. + // * `"annualized_total_compensation desc"`: By job's + // [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] descending. Jobs + // whose annualized base compensation is unspecified are put at the end of + // search results. + // * `"custom_ranking desc"`: By the relevance score adjusted to the + // [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] with weight + // factor assigned by + // [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] in descending + // order. + // * Location sorting: Use the special syntax to order jobs by distance:
+ // `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ // `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ // `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + // multiple locations. See details below.
+ // `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + // multiple locations. See details below.
+ // The string can have a maximum of 256 characters. When multiple distance + // centers are provided, a job that is close to any of the distance centers + // would have a high rank. When a job has multiple locations, the job + // location closest to one of the distance centers will be used. Jobs that + // don't have locations will be ranked at the bottom. Distance is calculated + // with a precision of 11.3 meters (37.4 feet). Diversification strategy is + // still applied unless explicitly disabled in + // [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. + string order_by = 12; + + // Controls whether highly similar jobs are returned next to each other in + // the search results. Jobs are identified as highly similar based on + // their titles, job categories, and locations. Highly similar results are + // clustered so that only one representative job of the cluster is + // displayed to the job seeker higher up in the results, with the other jobs + // being displayed lower down in the results. + // + // Defaults to [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] if no value + // is specified. + DiversificationLevel diversification_level = 13; + + // Controls over how job documents get ranked on top of existing relevance + // score (determined by API algorithm). + CustomRankingInfo custom_ranking_info = 14; + + // Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title], + // [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses], + // [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a + // keyword match returns jobs that do not match given category filters when + // there are matching keywords. For example, for the query "program manager," + // a result is returned even if the job posting has the title "software + // developer," which doesn't fall into "program manager" ontology, but does + // have "program manager" appearing in its description. + // + // For queries like "cloud" that don't contain title or + // location specific ontology, jobs with "cloud" keyword matches are returned + // regardless of this flag's value. + // + // Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if + // company-specific globally matched custom field/attribute string values are + // needed. Enabling keyword match improves recall of subsequent search + // requests. + // + // Defaults to false. + bool disable_keyword_match = 16; +} + +// Response for SearchJob method. +message SearchJobsResponse { + // Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4.SearchJobsResponse]. + message MatchingJob { + // Job resource that matches the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + Job job = 1; + + // A summary of the job with core information that's displayed on the search + // results listing page. + string job_summary = 2; + + // Contains snippets of text from the [Job.title][google.cloud.talent.v4.Job.title] field most + // closely matching a search query's keywords, if available. The matching + // query keywords are enclosed in HTML bold tags. + string job_title_snippet = 3; + + // Contains snippets of text from the [Job.description][google.cloud.talent.v4.Job.description] and similar + // fields that most closely match a search query's keywords, if available. + // All HTML tags in the original fields are stripped when returned in this + // field, and matching query keywords are enclosed in HTML bold tags. + string search_text_snippet = 4; + + // Commute information which is generated based on specified + // [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. + CommuteInfo commute_info = 5; + } + + // Commute details related to this job. + message CommuteInfo { + // Location used as the destination in the commute calculation. + Location job_location = 1; + + // The number of seconds required to travel to the job location from the + // query location. A duration of 0 seconds indicates that the job isn't + // reachable within the requested duration, but was returned as part of an + // expanded query. + google.protobuf.Duration travel_duration = 2; + } + + // The Job entities that match the specified [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + repeated MatchingJob matching_jobs = 1; + + // The histogram results that match with specified + // [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. + repeated HistogramQueryResult histogram_query_results = 2; + + // The token that specifies the starting position of the next page of results. + // This field is empty if there are no more results. + string next_page_token = 3; + + // The location filters that the service applied to the specified query. If + // any filters are lat-lng based, the [Location.location_type][google.cloud.talent.v4.Location.location_type] is + // [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. + repeated Location location_filters = 4; + + // Number of jobs that match the specified query. + // + // Note: This size is precise only if the total is less than 100,000. + int32 total_size = 6; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 7; + + // If query broadening is enabled, we may append additional results from the + // broadened query. This number indicates how many of the jobs returned in the + // jobs field are from the broadened query. These results are always at the + // end of the jobs list. In particular, a value of 0, or if the field isn't + // set, all the jobs in the jobs list are from the original + // (without broadening) query. If this field is non-zero, subsequent requests + // with offset after this result set should contain all broadened results. + int32 broadened_query_jobs_count = 8; + + // The spell checking result, and correction. + SpellingCorrection spell_correction = 9; +} + +// Request to create a batch of jobs. +message BatchCreateJobsRequest { + // Required. The resource name of the tenant under which the job is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; + + // Required. The jobs to be created. + // A maximum of 200 jobs can be created in a batch. + repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a batch of jobs. +message BatchUpdateJobsRequest { + // Required. The resource name of the tenant under which the job is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Job" + } + ]; + + // Required. The jobs to be updated. + // A maximum of 200 jobs can be updated in a batch. + repeated Job jobs = 2 [(google.api.field_behavior) = REQUIRED]; + + // Strongly recommended for the best service experience. Be aware that it will + // also increase latency when checking the status of a batch operation. + // + // If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, only the specified fields in + // [Job][google.cloud.talent.v4.Job] are updated. Otherwise all the fields are updated. + // + // A field mask to restrict the fields that are updated. Only + // top level fields of [Job][google.cloud.talent.v4.Job] are supported. + // + // If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] is provided, The [Job][google.cloud.talent.v4.Job] inside + // [JobResult][JobOperationResult.JobResult] + // will only contains fields that is updated, plus the Id of the Job. + // Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, which can yield a very + // large response. + google.protobuf.FieldMask update_mask = 3; +} + +// Request to delete a batch of jobs. +message BatchDeleteJobsRequest { + // Required. The resource name of the tenant under which the job is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}". For example, + // "projects/foo/tenants/bar". + // + // The parent of all of the jobs specified in `names` must match this field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "jobs.googleapis.com/Tenant" + } + ]; + + // The names of the jobs to delete. + // + // The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + // For example, "projects/foo/tenants/bar/jobs/baz". + // + // A maximum of 200 jobs can be deleted in a batch. + repeated string names = 2 [(google.api.resource_reference) = { + type: "jobs.googleapis.com/Job" + }]; +} + +// Mutation result of a job from a batch operation. +message JobResult { + // Here [Job][google.cloud.talent.v4.Job] only contains basic information including [name][google.cloud.talent.v4.Job.name], + // [company][google.cloud.talent.v4.Job.company], [language_code][google.cloud.talent.v4.Job.language_code] + // and [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob method to retrieve + // detailed information of the created/updated job. + Job job = 1; + + // The status of the job processed. This field is populated if the + // processing of the [job][google.cloud.talent.v4.JobResult.job] fails. + google.rpc.Status status = 2; +} + +// The result of [JobService.BatchCreateJobs][google.cloud.talent.v4.JobService.BatchCreateJobs]. It's used to +// replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success. +message BatchCreateJobsResponse { + // List of job mutation results from a batch create operation. It can change + // until operation status is FINISHED, FAILED or CANCELLED. + repeated JobResult job_results = 1; +} + +// The result of [JobService.BatchUpdateJobs][google.cloud.talent.v4.JobService.BatchUpdateJobs]. It's used to +// replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success. +message BatchUpdateJobsResponse { + // List of job mutation results from a batch update operation. It can change + // until operation status is FINISHED, FAILED or CANCELLED. + repeated JobResult job_results = 1; +} + +// The result of [JobService.BatchDeleteJobs][google.cloud.talent.v4.JobService.BatchDeleteJobs]. It's used to +// replace [google.longrunning.Operation.response][google.longrunning.Operation.response] in case of success. +message BatchDeleteJobsResponse { + // List of job mutation results from a batch delete operation. It can change + // until operation status is FINISHED, FAILED or CANCELLED. + repeated JobResult job_results = 1; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant.proto new file mode 100644 index 00000000..a21fc06a --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant.proto @@ -0,0 +1,53 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "TenantProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A Tenant resource represents a tenant in the service. A tenant is a group or +// entity that shares common access with specific privileges for resources like +// jobs. Customer may create multiple tenants to provide data isolation for +// different groups. +message Tenant { + option (google.api.resource) = { + type: "jobs.googleapis.com/Tenant" + pattern: "projects/{project}/tenants/{tenant}" + }; + + // Required during tenant update. + // + // The resource name for a tenant. This is generated by the service when a + // tenant is created. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string name = 1; + + // Required. Client side tenant identifier, used to uniquely identify the + // tenant. + // + // The maximum number of allowed characters is 255. + string external_id = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant_service.proto b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant_service.proto new file mode 100644 index 00000000..8941ba7f --- /dev/null +++ b/proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant_service.proto @@ -0,0 +1,175 @@ +// Copyright 2020 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.talent.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/talent/v4/common.proto"; +import "google/cloud/talent/v4/tenant.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent"; +option java_multiple_files = true; +option java_outer_classname = "TenantServiceProto"; +option java_package = "com.google.cloud.talent.v4"; +option objc_class_prefix = "CTS"; + +// A service that handles tenant management, including CRUD and enumeration. +service TenantService { + option (google.api.default_host) = "jobs.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/jobs"; + + // Creates a new tenant entity. + rpc CreateTenant(CreateTenantRequest) returns (Tenant) { + option (google.api.http) = { + post: "/v4/{parent=projects/*}/tenants" + body: "tenant" + }; + option (google.api.method_signature) = "parent,tenant"; + } + + // Retrieves specified tenant. + rpc GetTenant(GetTenantRequest) returns (Tenant) { + option (google.api.http) = { + get: "/v4/{name=projects/*/tenants/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates specified tenant. + rpc UpdateTenant(UpdateTenantRequest) returns (Tenant) { + option (google.api.http) = { + patch: "/v4/{tenant.name=projects/*/tenants/*}" + body: "tenant" + }; + option (google.api.method_signature) = "tenant,update_mask"; + } + + // Deletes specified tenant. + rpc DeleteTenant(DeleteTenantRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v4/{name=projects/*/tenants/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all tenants associated with the project. + rpc ListTenants(ListTenantsRequest) returns (ListTenantsResponse) { + option (google.api.http) = { + get: "/v4/{parent=projects/*}/tenants" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The Request of the CreateTenant method. +message CreateTenantRequest { + // Required. Resource name of the project under which the tenant is created. + // + // The format is "projects/{project_id}", for example, + // "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The tenant to be created. + Tenant tenant = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for getting a tenant by name. +message GetTenantRequest { + // Required. The resource name of the tenant to be retrieved. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; +} + +// Request for updating a specified tenant. +message UpdateTenantRequest { + // Required. The tenant resource to replace the current resource in the + // system. + Tenant tenant = 1 [(google.api.field_behavior) = REQUIRED]; + + // Strongly recommended for the best service experience. + // + // If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + // provided, only the specified fields in + // [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + // Otherwise all the fields are updated. + // + // A field mask to specify the tenant fields to be updated. Only + // top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to delete a tenant. +message DeleteTenantRequest { + // Required. The resource name of the tenant to be deleted. + // + // The format is "projects/{project_id}/tenants/{tenant_id}", for example, + // "projects/foo/tenants/bar". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "jobs.googleapis.com/Tenant" } + ]; +} + +// List tenants for which the client has ACL visibility. +message ListTenantsRequest { + // Required. Resource name of the project under which the tenant is created. + // + // The format is "projects/{project_id}", for example, + // "projects/foo". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // The starting indicator from which to return results. + string page_token = 2; + + // The maximum number of tenants to be returned, at most 100. + // Default is 100 if a non-positive number is provided. + int32 page_size = 3; +} + +// The List tenants response object. +message ListTenantsResponse { + // Tenants for the current client. + repeated Tenant tenants = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; + + // Additional information for the API invocation, such as the request + // tracking id. + ResponseMetadata metadata = 3; +} diff --git a/synth.metadata b/synth.metadata index 3f780597..300ae604 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,23 +3,31 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/java-talent.git", - "sha": "65c5185b2c538bccb95ba3fcd35cc4141b7a6494" + "remote": "git@github.com:googleapis/java-talent.git", + "sha": "2c75d45c3c57930d3abba86bb3b082187fa22e64" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fa4d2ecd0804eb92f27a65fe65ce2a554a361b93", - "internalRef": "317110673" + "sha": "791be5a40033c18034afed50232daad6bdc8cf3e", + "internalRef": "331627223" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "791be5a40033c18034afed50232daad6bdc8cf3e", + "internalRef": "331627223" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "019c7168faa0e56619f792693a8acdb30d6de19b" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], @@ -32,6 +40,15 @@ "language": "java", "generator": "bazel" } + }, + { + "client": { + "source": "googleapis", + "apiName": "talent", + "apiVersion": "v4", + "language": "java", + "generator": "bazel" + } } ], "generatedFiles": [ @@ -93,6 +110,37 @@ "LICENSE", "README.md", "codecov.yaml", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceClient.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompanyServiceSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionClient.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/CompletionSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceClient.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/EventServiceSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceClient.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/JobServiceSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceClient.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/TenantServiceSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/package-info.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompanyServiceStubSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/CompletionStubSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/EventServiceStubSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceCallableFactory.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompanyServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionCallableFactory.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcCompletionStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceCallableFactory.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcEventServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceCallableFactory.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcJobServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceCallableFactory.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/GrpcTenantServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/JobServiceStubSettings.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStub.java", + "google-cloud-talent/src/main/java/com/google/cloud/talent/v4/stub/TenantServiceStubSettings.java", "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java", "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java", "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java", @@ -136,6 +184,21 @@ "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java", "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java", "google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompanyServiceClientTest.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/CompletionClientTest.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/EventServiceClientTest.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/JobServiceClientTest.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyService.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompanyServiceImpl.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletion.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockCompletionImpl.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventService.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockEventServiceImpl.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobService.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockJobServiceImpl.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantService.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/MockTenantServiceImpl.java", + "google-cloud-talent/src/test/java/com/google/cloud/talent/v4/TenantServiceClientTest.java", "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java", "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java", "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java", @@ -157,6 +220,11 @@ "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/MockTenantServiceImpl.java", "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java", "google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java", + "grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyServiceGrpc.java", + "grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionGrpc.java", + "grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventServiceGrpc.java", + "grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceGrpc.java", + "grpc-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantServiceGrpc.java", "grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceGrpc.java", "grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceGrpc.java", "grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompletionGrpc.java", @@ -166,6 +234,145 @@ "grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java", "java.header", "license-checks.xml", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchCreateJobsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchDeleteJobsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadata.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchOperationMetadataOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/BatchUpdateJobsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEvent.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ClientEventOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommonProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteFilter.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteFilterOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CommuteMethod.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Company.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyName.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanyServiceProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompanySize.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilter.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationFilterOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfo.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompensationInfoOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompleteQueryResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CompletionServiceProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateClientEventRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateClientEventRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateCompanyRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateJobRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CreateTenantRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttribute.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/CustomAttributeOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DegreeType.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteCompanyRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteJobRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeleteTenantRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfo.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/DeviceInfoOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EmploymentType.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/EventServiceProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/FiltersProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetCompanyRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetCompanyRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetJobRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/GetTenantRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQuery.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResult.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HistogramQueryResultOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/HtmlSanitization.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Job.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobBenefit.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobCategory.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEvent.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobEventOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobLevel.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobName.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobQuery.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobQueryOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResult.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobResultOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobServiceProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/JobView.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListCompaniesResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListJobsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ListTenantsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Location.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilter.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationFilterOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/LocationOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/PostingRegion.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ProjectName.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadata.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/RequestMetadataOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadata.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/ResponseMetadataOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponse.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SearchJobsResponseOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrection.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/SpellingCorrectionOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Tenant.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantName.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TenantServiceProto.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TimestampRange.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/TimestampRangeOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateCompanyRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateJobRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequest.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/UpdateTenantRequestOrBuilder.java", + "proto-google-cloud-talent-v4/src/main/java/com/google/cloud/talent/v4/Visibility.java", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/common.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/company_service.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/completion_service.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/event_service.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/filters.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/histogram.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/job_service.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant.proto", + "proto-google-cloud-talent-v4/src/main/proto/google/cloud/talent/v4/tenant_service.proto", "proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Activity.java", "proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ActivityOrBuilder.java", "proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/AdditionalContactInfo.java", diff --git a/synth.py b/synth.py index 509a5e4c..418c8e95 100644 --- a/synth.py +++ b/synth.py @@ -18,7 +18,7 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -versions = ['v4beta1'] +versions = ['v4beta1', 'v4'] service = 'talent' for version in versions: diff --git a/versions.txt b/versions.txt index 0c90c97b..cc4709fa 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,9 @@ # Format: # module:released-version:current-version +proto-google-cloud-talent-v4:0.37.0:0.37.1-SNAPSHOT proto-google-cloud-talent-v4beta1:0.37.0:0.37.1-SNAPSHOT +grpc-google-cloud-talent-v4:0.37.0:0.37.1-SNAPSHOT grpc-google-cloud-talent-v4beta1:0.37.0:0.37.1-SNAPSHOT google-cloud-talent:0.37.0:0.37.1-SNAPSHOT google-cloud-talent-bom:0.37.0:0.37.1-SNAPSHOT