From 0bf35f54ce026613fc7c2a1772d983866291d09a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Apr 2020 13:48:08 -0700 Subject: [PATCH] fix: increase default timeout; update templates (via synth) (#11) --- .coveragerc | 16 + .flake8 | 16 + .github/ISSUE_TEMPLATE/bug_report.md | 3 +- CONTRIBUTING.rst | 15 +- MANIFEST.in | 16 + google/cloud/talent.py | 6 +- google/cloud/talent_v4beta1/__init__.py | 26 +- .../gapic/application_service_client.py | 186 ++-- .../application_service_client_config.py | 18 +- .../gapic/company_service_client.py | 162 ++-- .../gapic/company_service_client_config.py | 18 +- .../talent_v4beta1/gapic/completion_client.py | 12 +- .../gapic/event_service_client.py | 12 +- .../gapic/job_service_client.py | 661 ++++++------- .../gapic/job_service_client_config.py | 48 +- .../gapic/profile_service_client.py | 916 +++++++++--------- .../gapic/profile_service_client_config.py | 24 +- .../gapic/tenant_service_client.py | 144 ++- .../gapic/tenant_service_client_config.py | 18 +- .../application_service_grpc_transport.py | 26 +- .../company_service_grpc_transport.py | 28 +- .../transports/job_service_grpc_transport.py | 82 +- .../profile_service_grpc_transport.py | 64 +- .../tenant_service_grpc_transport.py | 26 +- .../talent_v4beta1/proto/application.proto | 34 +- .../talent_v4beta1/proto/application_pb2.py | 34 +- .../proto/application_service.proto | 3 +- .../proto/application_service_pb2.py | 12 - google/cloud/talent_v4beta1/proto/batch.proto | 3 +- .../cloud/talent_v4beta1/proto/common.proto | 3 +- .../cloud/talent_v4beta1/proto/common_pb2.py | 90 +- .../cloud/talent_v4beta1/proto/company.proto | 5 +- .../cloud/talent_v4beta1/proto/company_pb2.py | 12 +- .../proto/company_service.proto | 5 +- .../proto/company_service_pb2.py | 26 +- .../proto/completion_service.proto | 30 +- .../proto/completion_service_pb2.py | 32 +- google/cloud/talent_v4beta1/proto/event.proto | 3 +- .../cloud/talent_v4beta1/proto/event_pb2.py | 26 +- .../talent_v4beta1/proto/event_service.proto | 5 +- .../talent_v4beta1/proto/event_service_pb2.py | 12 +- .../cloud/talent_v4beta1/proto/filters.proto | 3 +- .../cloud/talent_v4beta1/proto/filters_pb2.py | 70 +- .../talent_v4beta1/proto/histogram.proto | 3 +- .../talent_v4beta1/proto/histogram_pb2.py | 4 - google/cloud/talent_v4beta1/proto/job.proto | 5 +- google/cloud/talent_v4beta1/proto/job_pb2.py | 16 +- .../talent_v4beta1/proto/job_service.proto | 13 +- .../talent_v4beta1/proto/job_service_pb2.py | 55 +- .../cloud/talent_v4beta1/proto/profile.proto | 3 +- .../cloud/talent_v4beta1/proto/profile_pb2.py | 61 +- .../proto/profile_service.proto | 59 +- .../proto/profile_service_pb2.py | 84 +- .../cloud/talent_v4beta1/proto/tenant.proto | 8 +- .../cloud/talent_v4beta1/proto/tenant_pb2.py | 14 +- .../talent_v4beta1/proto/tenant_service.proto | 3 +- .../proto/tenant_service_pb2.py | 12 - noxfile.py | 6 +- setup.cfg | 16 + synth.metadata | 25 +- synth.py | 2 +- ...test_application_service_client_v4beta1.py | 70 +- .../test_company_service_client_v4beta1.py | 70 +- .../v4beta1/test_completion_client_v4beta1.py | 4 +- .../test_event_service_client_v4beta1.py | 4 +- .../test_job_service_client_v4beta1.py | 314 +++--- .../test_profile_service_client_v4beta1.py | 174 ++-- .../test_tenant_service_client_v4beta1.py | 62 +- 68 files changed, 1881 insertions(+), 2157 deletions(-) diff --git a/.coveragerc b/.coveragerc index b178b094..dd39c854 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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 synthtool. DO NOT EDIT! [run] branch = True diff --git a/.flake8 b/.flake8 index 0268ecc9..20fe9bda 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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 synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 62307049..0b2946a7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - Search the issues already opened: https://github.com/googleapis/python-talent/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python If you are still having issues, please be sure to include as much information as possible: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4dd4af55..730e2013 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, and 3.7 on both UNIX and Windows. + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -214,26 +214,18 @@ We support: - `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ +- `Python 3.8`_ .. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ +.. _Python 3.8: https://docs.python.org/3.8/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-talent/blob/master/noxfile.py -We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_ -and lack of continuous integration `support`_. - -.. _Python 2.5: https://docs.python.org/2.5/ -.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/ -.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ - -We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no -longer supported by the core development team. - Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version .. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django .. _projects: http://flask.pocoo.org/docs/0.10/python3/ .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ -.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995 ********** Versioning diff --git a/MANIFEST.in b/MANIFEST.in index cd011be2..68855abc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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 synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto diff --git a/google/cloud/talent.py b/google/cloud/talent.py index 431f7eb5..eee7964a 100644 --- a/google/cloud/talent.py +++ b/google/cloud/talent.py @@ -31,11 +31,11 @@ __all__ = ( "enums", "types", - "ApplicationServiceClient", + "JobServiceClient", "CompanyServiceClient", "CompletionClient", + "ApplicationServiceClient", + "TenantServiceClient", "EventServiceClient", - "JobServiceClient", "ProfileServiceClient", - "TenantServiceClient", ) diff --git a/google/cloud/talent_v4beta1/__init__.py b/google/cloud/talent_v4beta1/__init__.py index b29a60a2..ec57ed0c 100644 --- a/google/cloud/talent_v4beta1/__init__.py +++ b/google/cloud/talent_v4beta1/__init__.py @@ -39,8 +39,8 @@ warnings.warn(message, DeprecationWarning) -class ApplicationServiceClient(application_service_client.ApplicationServiceClient): - __doc__ = application_service_client.ApplicationServiceClient.__doc__ +class JobServiceClient(job_service_client.JobServiceClient): + __doc__ = job_service_client.JobServiceClient.__doc__ enums = enums @@ -54,34 +54,34 @@ class CompletionClient(completion_client.CompletionClient): enums = enums -class EventServiceClient(event_service_client.EventServiceClient): - __doc__ = event_service_client.EventServiceClient.__doc__ +class ApplicationServiceClient(application_service_client.ApplicationServiceClient): + __doc__ = application_service_client.ApplicationServiceClient.__doc__ enums = enums -class JobServiceClient(job_service_client.JobServiceClient): - __doc__ = job_service_client.JobServiceClient.__doc__ +class TenantServiceClient(tenant_service_client.TenantServiceClient): + __doc__ = tenant_service_client.TenantServiceClient.__doc__ enums = enums -class ProfileServiceClient(profile_service_client.ProfileServiceClient): - __doc__ = profile_service_client.ProfileServiceClient.__doc__ +class EventServiceClient(event_service_client.EventServiceClient): + __doc__ = event_service_client.EventServiceClient.__doc__ enums = enums -class TenantServiceClient(tenant_service_client.TenantServiceClient): - __doc__ = tenant_service_client.TenantServiceClient.__doc__ +class ProfileServiceClient(profile_service_client.ProfileServiceClient): + __doc__ = profile_service_client.ProfileServiceClient.__doc__ enums = enums __all__ = ( "enums", "types", - "ApplicationServiceClient", + "JobServiceClient", "CompanyServiceClient", "CompletionClient", + "ApplicationServiceClient", + "TenantServiceClient", "EventServiceClient", - "JobServiceClient", "ProfileServiceClient", - "TenantServiceClient", ) diff --git a/google/cloud/talent_v4beta1/gapic/application_service_client.py b/google/cloud/talent_v4beta1/gapic/application_service_client.py index af31abd4..2dcb2fe1 100644 --- a/google/cloud/talent_v4beta1/gapic/application_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/application_service_client.py @@ -39,6 +39,18 @@ from google.cloud.talent_v4beta1.proto import application_pb2 from google.cloud.talent_v4beta1.proto import application_service_pb2 from google.cloud.talent_v4beta1.proto import application_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import common_pb2 +from google.cloud.talent_v4beta1.proto import company_pb2 +from google.cloud.talent_v4beta1.proto import company_service_pb2 +from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import completion_service_pb2 +from google.cloud.talent_v4beta1.proto import completion_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import filters_pb2 +from google.cloud.talent_v4beta1.proto import histogram_pb2 +from google.cloud.talent_v4beta1.proto import job_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2_grpc +from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -90,6 +102,40 @@ def application_path(cls, project, tenant, profile, application): application=application, ) + @classmethod + def company_path(cls, project, tenant, company): + """Return a fully-qualified company string.""" + return google.api_core.path_template.expand( + "projects/{project}/tenants/{tenant}/companies/{company}", + project=project, + tenant=tenant, + company=company, + ) + + @classmethod + def company_without_tenant_path(cls, project, company): + """Return a fully-qualified company_without_tenant string.""" + return google.api_core.path_template.expand( + "projects/{project}/companies/{company}", project=project, company=company + ) + + @classmethod + def job_path(cls, project, tenant, job): + """Return a fully-qualified job string.""" + return google.api_core.path_template.expand( + "projects/{project}/tenants/{tenant}/jobs/{job}", + project=project, + tenant=tenant, + job=job, + ) + + @classmethod + def job_without_tenant_path(cls, project, job): + """Return a fully-qualified job_without_tenant string.""" + return google.api_core.path_template.expand( + "projects/{project}/jobs/{job}", project=project, job=job + ) + @classmethod def profile_path(cls, project, tenant, profile): """Return a fully-qualified profile string.""" @@ -213,6 +259,76 @@ def __init__( self._inner_api_calls = {} # Service calls + def delete_application( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes specified application. + + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.ApplicationServiceClient() + >>> + >>> name = client.application_path('[PROJECT]', '[TENANT]', '[PROFILE]', '[APPLICATION]') + >>> + >>> client.delete_application(name) + + Args: + name (str): Required. The resource name of the application to be deleted. + + The format is + "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}/applications/{application\_id}". + For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_application" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_application" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_application, + default_retry=self._method_configs["DeleteApplication"].retry, + default_timeout=self._method_configs["DeleteApplication"].timeout, + client_info=self._client_info, + ) + + request = application_service_pb2.DeleteApplicationRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_application"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def create_application( self, parent, @@ -456,76 +572,6 @@ def update_application( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_application( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes specified application. - - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.ApplicationServiceClient() - >>> - >>> name = client.application_path('[PROJECT]', '[TENANT]', '[PROFILE]', '[APPLICATION]') - >>> - >>> client.delete_application(name) - - Args: - name (str): Required. The resource name of the application to be deleted. - - The format is - "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}/applications/{application\_id}". - For example, "projects/foo/tenants/bar/profiles/baz/applications/qux". - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_application" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_application" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_application, - default_retry=self._method_configs["DeleteApplication"].retry, - default_timeout=self._method_configs["DeleteApplication"].timeout, - client_info=self._client_info, - ) - - request = application_service_pb2.DeleteApplicationRequest(name=name) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_application"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def list_applications( self, parent, diff --git a/google/cloud/talent_v4beta1/gapic/application_service_client_config.py b/google/cloud/talent_v4beta1/gapic/application_service_client_config.py index 5e9fe442..25fa68ca 100644 --- a/google/cloud/talent_v4beta1/gapic/application_service_client_config.py +++ b/google/cloud/talent_v4beta1/gapic/application_service_client_config.py @@ -17,28 +17,28 @@ } }, "methods": { + "DeleteApplication": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "CreateApplication": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetApplication": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "UpdateApplication": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteApplication": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "ListApplications": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/talent_v4beta1/gapic/company_service_client.py b/google/cloud/talent_v4beta1/gapic/company_service_client.py index e689ab4a..dd02eae9 100644 --- a/google/cloud/talent_v4beta1/gapic/company_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/company_service_client.py @@ -34,12 +34,16 @@ from google.cloud.talent_v4beta1.gapic import company_service_client_config from google.cloud.talent_v4beta1.gapic import enums from google.cloud.talent_v4beta1.gapic.transports import company_service_grpc_transport -from google.cloud.talent_v4beta1.proto import application_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import common_pb2 from google.cloud.talent_v4beta1.proto import company_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import filters_pb2 +from google.cloud.talent_v4beta1.proto import histogram_pb2 +from google.cloud.talent_v4beta1.proto import job_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2_grpc +from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -221,6 +225,80 @@ def __init__( self._inner_api_calls = {} # Service calls + def delete_company( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes specified company. + Prerequisite: The company has no jobs associated with it. + + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.CompanyServiceClient() + >>> + >>> name = client.company_path('[PROJECT]', '[TENANT]', '[COMPANY]') + >>> + >>> client.delete_company(name) + + Args: + name (str): 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". + + If tenant id is unspecified, the default tenant is used, for example, + "projects/foo/companies/bar". + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_company" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_company" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_company, + default_retry=self._method_configs["DeleteCompany"].retry, + default_timeout=self._method_configs["DeleteCompany"].timeout, + client_info=self._client_info, + ) + + request = company_service_pb2.DeleteCompanyRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_company"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def create_company( self, parent, @@ -237,7 +315,7 @@ def create_company( >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `company`: >>> company = {} @@ -467,80 +545,6 @@ def update_company( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_company( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes specified company. - Prerequisite: The company has no jobs associated with it. - - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.CompanyServiceClient() - >>> - >>> name = client.company_path('[PROJECT]', '[TENANT]', '[COMPANY]') - >>> - >>> client.delete_company(name) - - Args: - name (str): 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". - - If tenant id is unspecified, the default tenant is used, for example, - "projects/foo/companies/bar". - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_company" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_company" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_company, - default_retry=self._method_configs["DeleteCompany"].retry, - default_timeout=self._method_configs["DeleteCompany"].timeout, - client_info=self._client_info, - ) - - request = company_service_pb2.DeleteCompanyRequest(name=name) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_company"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def list_companies( self, parent, @@ -558,7 +562,7 @@ def list_companies( >>> >>> client = talent_v4beta1.CompanyServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # Iterate over all results >>> for element in client.list_companies(parent): diff --git a/google/cloud/talent_v4beta1/gapic/company_service_client_config.py b/google/cloud/talent_v4beta1/gapic/company_service_client_config.py index 85d50994..ce435e16 100644 --- a/google/cloud/talent_v4beta1/gapic/company_service_client_config.py +++ b/google/cloud/talent_v4beta1/gapic/company_service_client_config.py @@ -17,28 +17,28 @@ } }, "methods": { + "DeleteCompany": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "CreateCompany": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetCompany": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "UpdateCompany": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteCompany": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "ListCompanies": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/talent_v4beta1/gapic/completion_client.py b/google/cloud/talent_v4beta1/gapic/completion_client.py index f12b8249..f8030dd3 100644 --- a/google/cloud/talent_v4beta1/gapic/completion_client.py +++ b/google/cloud/talent_v4beta1/gapic/completion_client.py @@ -32,14 +32,18 @@ from google.cloud.talent_v4beta1.gapic import completion_client_config from google.cloud.talent_v4beta1.gapic import enums from google.cloud.talent_v4beta1.gapic.transports import completion_grpc_transport -from google.cloud.talent_v4beta1.proto import application_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import common_pb2 from google.cloud.talent_v4beta1.proto import company_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc from google.cloud.talent_v4beta1.proto import completion_service_pb2 from google.cloud.talent_v4beta1.proto import completion_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import filters_pb2 +from google.cloud.talent_v4beta1.proto import histogram_pb2 +from google.cloud.talent_v4beta1.proto import job_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2_grpc +from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -243,7 +247,7 @@ def complete_query( >>> >>> client = talent_v4beta1.CompletionClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `query`: >>> query = '' diff --git a/google/cloud/talent_v4beta1/gapic/event_service_client.py b/google/cloud/talent_v4beta1/gapic/event_service_client.py index 356671e4..e2b72b99 100644 --- a/google/cloud/talent_v4beta1/gapic/event_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/event_service_client.py @@ -35,6 +35,7 @@ from google.cloud.talent_v4beta1.proto import application_pb2 from google.cloud.talent_v4beta1.proto import application_service_pb2 from google.cloud.talent_v4beta1.proto import application_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import common_pb2 from google.cloud.talent_v4beta1.proto import company_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2 from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc @@ -43,6 +44,15 @@ from google.cloud.talent_v4beta1.proto import event_pb2 from google.cloud.talent_v4beta1.proto import event_service_pb2 from google.cloud.talent_v4beta1.proto import event_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import filters_pb2 +from google.cloud.talent_v4beta1.proto import histogram_pb2 +from google.cloud.talent_v4beta1.proto import job_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2 +from google.cloud.talent_v4beta1.proto import job_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import tenant_pb2 +from google.cloud.talent_v4beta1.proto import tenant_service_pb2 +from google.cloud.talent_v4beta1.proto import tenant_service_pb2_grpc +from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -229,7 +239,7 @@ def create_client_event( >>> >>> client = talent_v4beta1.EventServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `client_event`: >>> client_event = {} diff --git a/google/cloud/talent_v4beta1/gapic/job_service_client.py b/google/cloud/talent_v4beta1/gapic/job_service_client.py index 741ac4cd..b9487ac4 100644 --- a/google/cloud/talent_v4beta1/gapic/job_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/job_service_client.py @@ -36,18 +36,7 @@ from google.cloud.talent_v4beta1.gapic import enums from google.cloud.talent_v4beta1.gapic import job_service_client_config from google.cloud.talent_v4beta1.gapic.transports import job_service_grpc_transport -from google.cloud.talent_v4beta1.proto import application_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2 -from google.cloud.talent_v4beta1.proto import application_service_pb2_grpc from google.cloud.talent_v4beta1.proto import common_pb2 -from google.cloud.talent_v4beta1.proto import company_pb2 -from google.cloud.talent_v4beta1.proto import company_service_pb2 -from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc -from google.cloud.talent_v4beta1.proto import completion_service_pb2 -from google.cloud.talent_v4beta1.proto import completion_service_pb2_grpc -from google.cloud.talent_v4beta1.proto import event_pb2 -from google.cloud.talent_v4beta1.proto import event_service_pb2 -from google.cloud.talent_v4beta1.proto import event_service_pb2_grpc from google.cloud.talent_v4beta1.proto import filters_pb2 from google.cloud.talent_v4beta1.proto import histogram_pb2 from google.cloud.talent_v4beta1.proto import job_pb2 @@ -109,20 +98,20 @@ def company_without_tenant_path(cls, project, company): ) @classmethod - def job_path(cls, project, tenant, jobs): + def job_path(cls, project, tenant, job): """Return a fully-qualified job string.""" return google.api_core.path_template.expand( - "projects/{project}/tenants/{tenant}/jobs/{jobs}", + "projects/{project}/tenants/{tenant}/jobs/{job}", project=project, tenant=tenant, - jobs=jobs, + job=job, ) @classmethod - def job_without_tenant_path(cls, project, jobs): + def job_without_tenant_path(cls, project, job): """Return a fully-qualified job_without_tenant string.""" return google.api_core.path_template.expand( - "projects/{project}/jobs/{jobs}", project=project, jobs=jobs + "projects/{project}/jobs/{job}", project=project, job=job ) @classmethod @@ -252,6 +241,82 @@ def __init__( self._inner_api_calls = {} # Service calls + def delete_job( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes the specified job. + + Typically, the job becomes unsearchable within 10 seconds, but it may take + up to 5 minutes. + + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.JobServiceClient() + >>> + >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOB]') + >>> + >>> client.delete_job(name) + + Args: + name (str): 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". + + If tenant id is unspecified, the default tenant is used. For example, + "projects/foo/jobs/bar". + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_job" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_job" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_job, + default_retry=self._method_configs["DeleteJob"].retry, + default_timeout=self._method_configs["DeleteJob"].timeout, + client_info=self._client_info, + ) + + request = job_service_pb2.DeleteJobRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_job"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def create_job( self, parent, @@ -271,7 +336,7 @@ def create_job( >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `job`: >>> job = {} @@ -337,6 +402,103 @@ def create_job( request, retry=retry, timeout=timeout, metadata=metadata ) + def batch_create_jobs( + self, + parent, + jobs, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Begins executing a batch create jobs operation. + + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.JobServiceClient() + >>> + >>> parent = client.project_path('[PROJECT]') + >>> + >>> # TODO: Initialize `jobs`: + >>> jobs = [] + >>> + >>> response = client.batch_create_jobs(parent, jobs) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + parent (str): 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/tenant/bar". If tenant id is unspecified, a + default tenant is created. For example, "projects/foo". + jobs (list[Union[dict, ~google.cloud.talent_v4beta1.types.Job]]): Required. The jobs to be created. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.Job` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.talent_v4beta1.types._OperationFuture` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "batch_create_jobs" not in self._inner_api_calls: + self._inner_api_calls[ + "batch_create_jobs" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.batch_create_jobs, + default_retry=self._method_configs["BatchCreateJobs"].retry, + default_timeout=self._method_configs["BatchCreateJobs"].timeout, + client_info=self._client_info, + ) + + request = job_service_pb2.BatchCreateJobsRequest(parent=parent, jobs=jobs) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + operation = self._inner_api_calls["batch_create_jobs"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + job_service_pb2.JobOperationResult, + metadata_type=common_pb2.BatchOperationMetadata, + ) + def get_job( self, name, @@ -353,7 +515,7 @@ def get_job( >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOBS]') + >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOB]') >>> >>> response = client.get_job(name) @@ -501,37 +663,66 @@ def update_job( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_job( + def batch_update_jobs( self, - name, + parent, + jobs, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes the specified job. - - Typically, the job becomes unsearchable within 10 seconds, but it may take - up to 5 minutes. + Begins executing a batch update jobs operation. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> name = client.job_path('[PROJECT]', '[TENANT]', '[JOBS]') + >>> parent = client.project_path('[PROJECT]') >>> - >>> client.delete_job(name) + >>> # TODO: Initialize `jobs`: + >>> jobs = [] + >>> + >>> response = client.batch_update_jobs(parent, jobs) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: - name (str): Required. The resource name of the job to be deleted. + parent (str): Required. The resource name of the tenant under which the job is + created. - The format is - "projects/{project\_id}/tenants/{tenant\_id}/jobs/{job\_id}". For - example, "projects/foo/tenants/bar/jobs/baz". + The format is "projects/{project\_id}/tenants/{tenant\_id}". For + example, "projects/foo/tenant/bar". If tenant id is unspecified, a + default tenant is created. For example, "projects/foo". + jobs (list[Union[dict, ~google.cloud.talent_v4beta1.types.Job]]): Required. The jobs to be updated. - If tenant id is unspecified, the default tenant is used. For example, - "projects/foo/jobs/bar". + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.Job` + update_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): 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`` is provided, only the specified fields in ``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`` are supported. + + If ``update_mask`` is provided, The ``Job`` inside ``JobResult`` will + only contains fields that is updated, plus the Id of the Job. Otherwise, + ``Job`` will include all fields, which can yield a very large response. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -541,6 +732,9 @@ def delete_job( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.talent_v4beta1.types._OperationFuture` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -549,22 +743,24 @@ def delete_job( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_job" not in self._inner_api_calls: + if "batch_update_jobs" not in self._inner_api_calls: self._inner_api_calls[ - "delete_job" + "batch_update_jobs" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_job, - default_retry=self._method_configs["DeleteJob"].retry, - default_timeout=self._method_configs["DeleteJob"].timeout, + self.transport.batch_update_jobs, + default_retry=self._method_configs["BatchUpdateJobs"].retry, + default_timeout=self._method_configs["BatchUpdateJobs"].timeout, client_info=self._client_info, ) - request = job_service_pb2.DeleteJobRequest(name=name) + request = job_service_pb2.BatchUpdateJobsRequest( + parent=parent, jobs=jobs, update_mask=update_mask + ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -573,46 +769,38 @@ def delete_job( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_job"]( + operation = self._inner_api_calls["batch_update_jobs"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + job_service_pb2.JobOperationResult, + metadata_type=common_pb2.BatchOperationMetadata, + ) - def list_jobs( + def batch_delete_jobs( self, parent, filter_, - page_size=None, - job_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists jobs by filter. + Deletes a list of ``Job``\ s by filter. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `filter_`: >>> filter_ = '' >>> - >>> # Iterate over all results - >>> for element in client.list_jobs(parent, filter_): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_jobs(parent, filter_).pages: - ... for element in page: - ... # process element - ... pass + >>> client.batch_delete_jobs(parent, filter_) Args: parent (str): Required. The resource name of the tenant under which the job is @@ -621,31 +809,17 @@ def list_jobs( The format is "projects/{project\_id}/tenants/{tenant\_id}". For example, "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For example, "projects/foo". - filter_ (str): Required. The filter string specifies the jobs to be enumerated. + filter_ (str): Required. The filter string specifies the jobs to be deleted. 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: + - ``requisitionId`` (Required) - - 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" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - job_view (~google.cloud.talent_v4beta1.types.JobView): The desired job attributes returned for jobs in the search response. - Defaults to ``JobView.JOB_VIEW_FULL`` if no value is specified. + Sample Query: companyName = "projects/foo/companies/bar" AND + requisitionId = "req-1" retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -655,12 +829,6 @@ def list_jobs( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.talent_v4beta1.types.Job` instances. - You can also iterate over the pages of the response - using its `pages` property. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -669,19 +837,17 @@ def list_jobs( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_jobs" not in self._inner_api_calls: + if "batch_delete_jobs" not in self._inner_api_calls: self._inner_api_calls[ - "list_jobs" + "batch_delete_jobs" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_jobs, - default_retry=self._method_configs["ListJobs"].retry, - default_timeout=self._method_configs["ListJobs"].timeout, + self.transport.batch_delete_jobs, + default_retry=self._method_configs["BatchDeleteJobs"].retry, + default_timeout=self._method_configs["BatchDeleteJobs"].timeout, client_info=self._client_info, ) - request = job_service_pb2.ListJobsRequest( - parent=parent, filter=filter_, page_size=page_size, job_view=job_view - ) + request = job_service_pb2.BatchDeleteJobsRequest(parent=parent, filter=filter_) if metadata is None: metadata = [] metadata = list(metadata) @@ -695,43 +861,46 @@ def list_jobs( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_jobs"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="jobs", - request_token_field="page_token", - response_token_field="next_page_token", + self._inner_api_calls["batch_delete_jobs"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def batch_delete_jobs( + def list_jobs( self, parent, filter_, + page_size=None, + job_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes a list of ``Job``\ s by filter. + Lists jobs by filter. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `filter_`: >>> filter_ = '' >>> - >>> client.batch_delete_jobs(parent, filter_) + >>> # Iterate over all results + >>> for element in client.list_jobs(parent, filter_): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_jobs(parent, filter_).pages: + ... for element in page: + ... # process element + ... pass Args: parent (str): Required. The resource name of the tenant under which the job is @@ -740,17 +909,31 @@ def batch_delete_jobs( The format is "projects/{project\_id}/tenants/{tenant\_id}". For example, "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created. For example, "projects/foo". - filter_ (str): Required. The filter string specifies the jobs to be deleted. + filter_ (str): Required. The filter string specifies the jobs to be enumerated. Supported operator: =, AND The fields eligible for filtering are: - ``companyName`` (Required) - - ``requisitionId`` (Required) + - ``requisitionId`` + - ``status`` Available values: OPEN, EXPIRED, ALL. Defaults to OPEN if + no value is specified. - Sample Query: companyName = "projects/foo/companies/bar" AND - requisitionId = "req-1" + 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" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + job_view (~google.cloud.talent_v4beta1.types.JobView): The desired job attributes returned for jobs in the search response. + Defaults to ``JobView.JOB_VIEW_FULL`` if no value is specified. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -760,6 +943,12 @@ def batch_delete_jobs( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.talent_v4beta1.types.Job` instances. + You can also iterate over the pages of the response + using its `pages` property. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -768,17 +957,19 @@ def batch_delete_jobs( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "batch_delete_jobs" not in self._inner_api_calls: + if "list_jobs" not in self._inner_api_calls: self._inner_api_calls[ - "batch_delete_jobs" + "list_jobs" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_delete_jobs, - default_retry=self._method_configs["BatchDeleteJobs"].retry, - default_timeout=self._method_configs["BatchDeleteJobs"].timeout, + self.transport.list_jobs, + default_retry=self._method_configs["ListJobs"].retry, + default_timeout=self._method_configs["ListJobs"].timeout, client_info=self._client_info, ) - request = job_service_pb2.BatchDeleteJobsRequest(parent=parent, filter=filter_) + request = job_service_pb2.ListJobsRequest( + parent=parent, filter=filter_, page_size=page_size, job_view=job_view + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -792,9 +983,20 @@ def batch_delete_jobs( ) metadata.append(routing_metadata) - self._inner_api_calls["batch_delete_jobs"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_jobs"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="jobs", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator def search_jobs( self, @@ -827,7 +1029,7 @@ def search_jobs( >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `request_metadata`: >>> request_metadata = {} @@ -981,8 +1183,6 @@ def search_jobs( The maximum allowed value is 5000. Otherwise an error is thrown. - 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 @@ -1187,7 +1387,7 @@ def search_jobs_for_alert( >>> >>> client = talent_v4beta1.JobServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # TODO: Initialize `request_metadata`: >>> request_metadata = {} @@ -1341,8 +1541,6 @@ def search_jobs_for_alert( The maximum allowed value is 5000. Otherwise an error is thrown. - 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 @@ -1510,216 +1708,3 @@ def search_jobs_for_alert( response_token_field="next_page_token", ) return iterator - - def batch_create_jobs( - self, - parent, - jobs, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Begins executing a batch create jobs operation. - - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.JobServiceClient() - >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') - >>> - >>> # TODO: Initialize `jobs`: - >>> jobs = [] - >>> - >>> response = client.batch_create_jobs(parent, jobs) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - parent (str): 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/tenant/bar". If tenant id is unspecified, a - default tenant is created. For example, "projects/foo". - jobs (list[Union[dict, ~google.cloud.talent_v4beta1.types.Job]]): Required. The jobs to be created. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.Job` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.talent_v4beta1.types._OperationFuture` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "batch_create_jobs" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_create_jobs" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_create_jobs, - default_retry=self._method_configs["BatchCreateJobs"].retry, - default_timeout=self._method_configs["BatchCreateJobs"].timeout, - client_info=self._client_info, - ) - - request = job_service_pb2.BatchCreateJobsRequest(parent=parent, jobs=jobs) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - operation = self._inner_api_calls["batch_create_jobs"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - job_service_pb2.JobOperationResult, - metadata_type=common_pb2.BatchOperationMetadata, - ) - - def batch_update_jobs( - self, - parent, - jobs, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Begins executing a batch update jobs operation. - - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.JobServiceClient() - >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') - >>> - >>> # TODO: Initialize `jobs`: - >>> jobs = [] - >>> - >>> response = client.batch_update_jobs(parent, jobs) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - parent (str): 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/tenant/bar". If tenant id is unspecified, a - default tenant is created. For example, "projects/foo". - jobs (list[Union[dict, ~google.cloud.talent_v4beta1.types.Job]]): Required. The jobs to be updated. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.Job` - update_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): 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`` is provided, only the specified fields in ``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`` are supported. - - If ``update_mask`` is provided, The ``Job`` inside ``JobResult`` will - only contains fields that is updated, plus the Id of the Job. Otherwise, - ``Job`` will include all fields, which can yield a very large response. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.FieldMask` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.talent_v4beta1.types._OperationFuture` instance. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "batch_update_jobs" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_update_jobs" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_update_jobs, - default_retry=self._method_configs["BatchUpdateJobs"].retry, - default_timeout=self._method_configs["BatchUpdateJobs"].timeout, - client_info=self._client_info, - ) - - request = job_service_pb2.BatchUpdateJobsRequest( - parent=parent, jobs=jobs, update_mask=update_mask - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - operation = self._inner_api_calls["batch_update_jobs"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - job_service_pb2.JobOperationResult, - metadata_type=common_pb2.BatchOperationMetadata, - ) diff --git a/google/cloud/talent_v4beta1/gapic/job_service_client_config.py b/google/cloud/talent_v4beta1/gapic/job_service_client_config.py index 8dbb1033..e282e860 100644 --- a/google/cloud/talent_v4beta1/gapic/job_service_client_config.py +++ b/google/cloud/talent_v4beta1/gapic/job_service_client_config.py @@ -17,53 +17,53 @@ } }, "methods": { - "CreateJob": { - "timeout_millis": 30000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "GetJob": { - "timeout_millis": 30000, + "DeleteJob": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "UpdateJob": { - "timeout_millis": 30000, + "CreateJob": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteJob": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", + "BatchCreateJobs": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "ListJobs": { - "timeout_millis": 30000, + "GetJob": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "BatchDeleteJobs": { - "timeout_millis": 30000, + "UpdateJob": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "SearchJobs": { - "timeout_millis": 30000, + "BatchUpdateJobs": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "SearchJobsForAlert": { - "timeout_millis": 30000, + "BatchDeleteJobs": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "BatchCreateJobs": { - "timeout_millis": 30000, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "SearchJobs": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "BatchUpdateJobs": { - "timeout_millis": 30000, + "SearchJobsForAlert": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/talent_v4beta1/gapic/profile_service_client.py b/google/cloud/talent_v4beta1/gapic/profile_service_client.py index e6bb3e17..6c759074 100644 --- a/google/cloud/talent_v4beta1/gapic/profile_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/profile_service_client.py @@ -54,6 +54,9 @@ from google.cloud.talent_v4beta1.proto import profile_pb2 from google.cloud.talent_v4beta1.proto import profile_service_pb2 from google.cloud.talent_v4beta1.proto import profile_service_pb2_grpc +from google.cloud.talent_v4beta1.proto import tenant_pb2 +from google.cloud.talent_v4beta1.proto import tenant_service_pb2 +from google.cloud.talent_v4beta1.proto import tenant_service_pb2_grpc from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -225,77 +228,33 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_profiles( + def delete_profile( self, - parent, - filter_=None, - page_size=None, - read_mask=None, + name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists profiles by filter. The order is unspecified. + Deletes the specified profile. + Prerequisite: The profile has no associated applications or assignments + associated. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') - >>> - >>> # Iterate over all results - >>> for element in client.list_profiles(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_profiles(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> client.delete_profile(name) Args: - parent (str): Required. The resource name of the tenant under which the profile is - created. - - The format is "projects/{project\_id}/tenants/{tenant\_id}". For - example, "projects/foo/tenants/bar". - filter_ (str): The filter string specifies the profiles to be enumerated. - - Supported operator: =, AND - - The field(s) eligible for filtering are: - - - ``externalId`` - - ``groupId`` - - externalId and groupId cannot be specified at the same time. If both - externalId and groupId are provided, the API will return a bad request - error. - - Sample Query: - - - externalId = "externalId-1" - - groupId = "groupId-1" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - read_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): A field mask to specify the profile fields to be listed in response. All - fields are listed if it is unset. - - Valid values are: - - - name + name (str): Required. Resource name of the profile to be deleted. - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.FieldMask` + The format is + "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}". + For example, "projects/foo/tenants/bar/profiles/baz". retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -305,12 +264,6 @@ def list_profiles( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.talent_v4beta1.types.Profile` instances. - You can also iterate over the pages of the response - using its `pages` property. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -319,24 +272,22 @@ def list_profiles( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_profiles" not in self._inner_api_calls: + if "delete_profile" not in self._inner_api_calls: self._inner_api_calls[ - "list_profiles" + "delete_profile" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_profiles, - default_retry=self._method_configs["ListProfiles"].retry, - default_timeout=self._method_configs["ListProfiles"].timeout, + self.transport.delete_profile, + default_retry=self._method_configs["DeleteProfile"].retry, + default_timeout=self._method_configs["DeleteProfile"].timeout, client_info=self._client_info, ) - request = profile_service_pb2.ListProfilesRequest( - parent=parent, filter=filter_, page_size=page_size, read_mask=read_mask - ) + request = profile_service_pb2.DeleteProfileRequest(name=name) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("name", name)] except AttributeError: pass else: @@ -345,31 +296,35 @@ def list_profiles( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_profiles"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="profiles", - request_token_field="page_token", - response_token_field="next_page_token", + self._inner_api_calls["delete_profile"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def create_profile( + def search_profiles( self, parent, - profile, + request_metadata, + profile_query=None, + page_size=None, + offset=None, + disable_spell_check=None, + order_by=None, + case_sensitive_sort=None, + histogram_queries=None, + result_set_id=None, + strict_keywords_search=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates and returns a new profile. + Searches for profiles within a tenant. + + For example, search by raw queries "software engineer in Mountain View" + or search by structured filters (location filter, education filter, + etc.). + + See ``SearchProfilesRequest`` for more information. Example: >>> from google.cloud import talent_v4beta1 @@ -378,95 +333,189 @@ def create_profile( >>> >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> - >>> # TODO: Initialize `profile`: - >>> profile = {} + >>> # TODO: Initialize `request_metadata`: + >>> request_metadata = {} >>> - >>> response = client.create_profile(parent, profile) + >>> # Iterate over all results + >>> for element in client.search_profiles(parent, request_metadata): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.search_profiles(parent, request_metadata).pages: + ... for element in page: + ... # process element + ... pass Args: - parent (str): Required. The name of the tenant this profile belongs to. + parent (str): 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". - profile (Union[dict, ~google.cloud.talent_v4beta1.types.Profile]): Required. The profile to be created. + request_metadata (Union[dict, ~google.cloud.talent_v4beta1.types.RequestMetadata]): Required. The meta information collected about the profile search user. This is used + to improve the search quality of the service. These values are provided by + users, and must be precise and consistent. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.Profile` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. + message :class:`~google.cloud.talent_v4beta1.types.RequestMetadata` + profile_query (Union[dict, ~google.cloud.talent_v4beta1.types.ProfileQuery]): Search query to execute. See ``ProfileQuery`` for more details. - Returns: - A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.ProfileQuery` + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + offset (int): An integer that specifies the current offset (that is, starting result) + in search results. This field is only considered if ``page_token`` is + unset. - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "create_profile" not in self._inner_api_calls: - self._inner_api_calls[ - "create_profile" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_profile, - default_retry=self._method_configs["CreateProfile"].retry, - default_timeout=self._method_configs["CreateProfile"].timeout, - client_info=self._client_info, - ) + The maximum allowed value is 5000. Otherwise an error is thrown. - request = profile_service_pb2.CreateProfileRequest( - parent=parent, profile=profile - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) + For example, 0 means to search from the first profile, and 10 means to + search from the 11th profile. This can be used for pagination, for + example pageSize = 10 and offset = 10 means to search from the second + page. + disable_spell_check (bool): This flag controls the spell-check feature. If ``false``, the service + attempts to correct a misspelled query. - return self._inner_api_calls["create_profile"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + For example, "enginee" is corrected to "engineer". + order_by (str): The criteria that determines how search results are sorted. Defaults is + "relevance desc" if no value is specified. - def get_profile( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets the specified profile. + Supported options are: - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.ProfileServiceClient() - >>> - >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') - >>> - >>> response = client.get_profile(name) + - "relevance desc": By descending relevance, as determined by the API + algorithms. + - "update\_date desc": Sort by ``Profile.update_time`` in descending + order (recently updated profiles first). + - "create\_date desc": Sort by ``Profile.create_time`` in descending + order (recently created profiles first). + - "first\_name": Sort by ``PersonName.PersonStructuredName.given_name`` + in ascending order. + - "first\_name desc": Sort by + ``PersonName.PersonStructuredName.given_name`` in descending order. + - "last\_name": Sort by ``PersonName.PersonStructuredName.family_name`` + in ascending order. + - "last\_name desc": Sort by + ``PersonName.PersonStructuredName.family_name`` in ascending order. + case_sensitive_sort (bool): When sort by field is based on alphabetical order, sort values case + sensitively (based on ASCII) when the value is set to true. Default value + is case in-sensitive sort (false). + histogram_queries (list[Union[dict, ~google.cloud.talent_v4beta1.types.HistogramQuery]]): A list of expressions specifies histogram requests against matching + profiles for ``SearchProfilesRequest``. - Args: - name (str): Required. Resource name of the profile to get. + The expression syntax looks like a function definition with parameters. - The format is - "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}". - For example, "projects/foo/tenants/bar/profiles/baz". + Function syntax: function\_name(histogram\_facet[, list of buckets]) + + 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 build-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). + + Histogram Facets: + + - admin1: Admin1 is a global placeholder for referring to state, + province, or the particular term a country uses to define the + geographic structure below the country level. Examples include states + codes such as "CA", "IL", "NY", and provinces, such as "BC". + - locality: Locality is a global placeholder for referring to city, + town, or the particular term a country uses to define the geographic + structure below the admin1 level. Examples include city names such as + "Mountain View" and "New York". + - extended\_locality: Extended locality is concatenated version of + admin1 and locality with comma separator. For example, "Mountain + View, CA" and "New York, NY". + - postal\_code: Postal code of profile which follows locale code. + - country: Country code (ISO-3166-1 alpha-2 code) of profile, such as + US, JP, GB. + - job\_title: Normalized job titles specified in EmploymentHistory. + - company\_name: Normalized company name of profiles to match on. + - institution: The school name. For example, "MIT", "University of + California, Berkeley" + - degree: Highest education degree in ISCED code. Each value in degree + covers a specific level of education, without any expansion to upper + nor lower levels of education degree. + - experience\_in\_months: experience in months. 0 means 0 month to 1 + month (exclusive). + - application\_date: The application date specifies application start + dates. See [ApplicationDateFilter\` for more details. + - application\_outcome\_notes: The application outcome reason specifies + the reasons behind the outcome of the job application. See + ``ApplicationOutcomeNotesFilter`` for more details. + - application\_job\_title: The application job title specifies the job + applied for in the application. See ``ApplicationJobFilter`` for more + details. + - hirable\_status: Hirable status specifies the profile's hirable + status. + - string\_custom\_attribute: String custom attributes. Values can be + accessed via square bracket notation like + string\_custom\_attribute["key1"]. + - numeric\_custom\_attribute: Numeric custom attributes. Values can be + accessed via square bracket notation like + numeric\_custom\_attribute["key1"]. + + Example expressions: + + - count(admin1) + - count(experience\_in\_months, [bucket(0, 12, "1 year"), bucket(12, + 36, "1-3 years"), bucket(36, MAX, "3+ years")]) + - count(string\_custom\_attribute["assigned\_recruiter"]) + - count(numeric\_custom\_attribute["favorite\_number"], [bucket(MIN, 0, + "negative"), bucket(0, MAX, "non-negative")]) + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.HistogramQuery` + result_set_id (str): An id that uniquely identifies the result set of a ``SearchProfiles`` + call. The id should be retrieved from the ``SearchProfilesResponse`` + message returned from a previous invocation of ``SearchProfiles``. + + A result set is an ordered list of search results. + + If this field is not set, a new result set is computed based on the + ``profile_query``. A new ``result_set_id`` is returned as a handle to + access this result set. + + If this field is set, the service will ignore the resource and + ``profile_query`` values, and simply retrieve a page of results from the + corresponding result set. In this case, one and only one of + ``page_token`` or ``offset`` must be set. + + A typical use case is to invoke ``SearchProfilesRequest`` without this + field, then use the resulting ``result_set_id`` in + ``SearchProfilesResponse`` to page through the results. + strict_keywords_search (bool): This flag is used to indicate whether the service will attempt to + understand synonyms and terms related to the search query or treat the + query "as is" when it generates a set of results. By default this flag is + set to false, thus allowing expanded results to also be returned. For + example a search for "software engineer" might also return candidates who + have experience in jobs similar to software engineer positions. By setting + this flag to true, the service will only attempt to deliver candidates has + software engineer in his/her global fields by treating "software engineer" + as a keyword. + + It is recommended to provide a feature in the UI (such as a checkbox) to + allow recruiters to set this flag to true if they intend to search for + longer boolean strings. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -477,7 +526,10 @@ def get_profile( that is provided to the method. Returns: - A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.talent_v4beta1.types.SummarizedProfile` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -487,22 +539,34 @@ def get_profile( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_profile" not in self._inner_api_calls: + if "search_profiles" not in self._inner_api_calls: self._inner_api_calls[ - "get_profile" + "search_profiles" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_profile, - default_retry=self._method_configs["GetProfile"].retry, - default_timeout=self._method_configs["GetProfile"].timeout, + self.transport.search_profiles, + default_retry=self._method_configs["SearchProfiles"].retry, + default_timeout=self._method_configs["SearchProfiles"].timeout, client_info=self._client_info, ) - request = profile_service_pb2.GetProfileRequest(name=name) + request = profile_service_pb2.SearchProfilesRequest( + parent=parent, + request_metadata=request_metadata, + profile_query=profile_query, + page_size=page_size, + offset=offset, + disable_spell_check=disable_spell_check, + order_by=order_by, + case_sensitive_sort=case_sensitive_sort, + histogram_queries=histogram_queries, + result_set_id=result_set_id, + strict_keywords_search=strict_keywords_search, + ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -511,88 +575,89 @@ def get_profile( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_profile"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["search_profiles"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="summarized_profiles", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def update_profile( + def list_profiles( self, - profile, - update_mask=None, + parent, + filter_=None, + page_size=None, + read_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates the specified profile and returns the updated result. + Lists profiles by filter. The order is unspecified. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> - >>> # TODO: Initialize `profile`: - >>> profile = {} + >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> - >>> response = client.update_profile(profile) + >>> # Iterate over all results + >>> for element in client.list_profiles(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_profiles(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - profile (Union[dict, ~google.cloud.talent_v4beta1.types.Profile]): Required. Profile to be updated. + parent (str): Required. The resource name of the tenant under which the profile is + created. - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.Profile` - update_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): A field mask to specify the profile fields to update. + The format is "projects/{project\_id}/tenants/{tenant\_id}". For + example, "projects/foo/tenants/bar". + filter_ (str): The filter string specifies the profiles to be enumerated. - A full update is performed if it is unset. + Supported operator: =, AND + + The field(s) eligible for filtering are: + + - ``externalId`` + - ``groupId`` + + externalId and groupId cannot be specified at the same time. If both + externalId and groupId are provided, the API will return a bad request + error. + + Sample Query: + + - externalId = "externalId-1" + - groupId = "groupId-1" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + read_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): A field mask to specify the profile fields to be listed in response. All + fields are listed if it is unset. Valid values are: - - external\_id - - source - - source\_types - - uri - - is\_hirable - - create\_time - - update\_time - - candidate\_update\_time - - resume\_update\_time - - resume - - person\_names - - addresses - - email\_addresses - - phone\_numbers - - personal\_uris - - additional\_contact\_info - - employment\_records - - education\_records - - skills - - activities - - publications - - patents - - certifications - - recruiting\_notes - - custom\_attributes - - group\_id - - external\_system - - source\_note - - primary\_responsibilities - - citizenships - - work\_authorizations - - employee\_types - - language\_code - - qualification\_summary - - allowed\_contact\_types - - preferred\_contact\_types - - contact\_availability - - language\_fluencies - - work\_preference - - industry\_experiences - - work\_environment\_experiences - - work\_availability - - security\_clearances - - references - - assessments - - interviews + - name If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.talent_v4beta1.types.FieldMask` @@ -606,7 +671,10 @@ def update_profile( that is provided to the method. Returns: - A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.talent_v4beta1.types.Profile` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -616,24 +684,24 @@ def update_profile( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_profile" not in self._inner_api_calls: + if "list_profiles" not in self._inner_api_calls: self._inner_api_calls[ - "update_profile" + "list_profiles" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_profile, - default_retry=self._method_configs["UpdateProfile"].retry, - default_timeout=self._method_configs["UpdateProfile"].timeout, + self.transport.list_profiles, + default_retry=self._method_configs["ListProfiles"].retry, + default_timeout=self._method_configs["ListProfiles"].timeout, client_info=self._client_info, ) - request = profile_service_pb2.UpdateProfileRequest( - profile=profile, update_mask=update_mask + request = profile_service_pb2.ListProfilesRequest( + parent=parent, filter=filter_, page_size=page_size, read_mask=read_mask ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("profile.name", profile.name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -642,37 +710,53 @@ def update_profile( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_profile"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_profiles"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="profiles", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def delete_profile( + def create_profile( self, - name, + parent, + profile, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes the specified profile. - Prerequisite: The profile has no associated applications or assignments - associated. + Creates and returns a new profile. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> - >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') + >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') >>> - >>> client.delete_profile(name) + >>> # TODO: Initialize `profile`: + >>> profile = {} + >>> + >>> response = client.create_profile(parent, profile) Args: - name (str): Required. Resource name of the profile to be deleted. + parent (str): Required. The name of the tenant this profile belongs to. - The format is - "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}". - For example, "projects/foo/tenants/bar/profiles/baz". + The format is "projects/{project\_id}/tenants/{tenant\_id}". For + example, "projects/foo/tenants/bar". + profile (Union[dict, ~google.cloud.talent_v4beta1.types.Profile]): Required. The profile to be created. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.Profile` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -682,6 +766,9 @@ def delete_profile( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -690,22 +777,24 @@ def delete_profile( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_profile" not in self._inner_api_calls: + if "create_profile" not in self._inner_api_calls: self._inner_api_calls[ - "delete_profile" + "create_profile" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_profile, - default_retry=self._method_configs["DeleteProfile"].retry, - default_timeout=self._method_configs["DeleteProfile"].timeout, + self.transport.create_profile, + default_retry=self._method_configs["CreateProfile"].retry, + default_timeout=self._method_configs["CreateProfile"].timeout, client_info=self._client_info, ) - request = profile_service_pb2.DeleteProfileRequest(name=name) + request = profile_service_pb2.CreateProfileRequest( + parent=parent, profile=profile + ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -714,226 +803,115 @@ def delete_profile( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_profile"]( + return self._inner_api_calls["create_profile"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def search_profiles( + def get_profile( self, - parent, - request_metadata, - profile_query=None, - page_size=None, - offset=None, - disable_spell_check=None, - order_by=None, - case_sensitive_sort=None, - histogram_queries=None, - result_set_id=None, - strict_keywords_search=None, + name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Searches for profiles within a tenant. - - For example, search by raw queries "software engineer in Mountain View" - or search by structured filters (location filter, education filter, - etc.). - - See ``SearchProfilesRequest`` for more information. + Gets the specified profile. Example: >>> from google.cloud import talent_v4beta1 >>> >>> client = talent_v4beta1.ProfileServiceClient() >>> - >>> parent = client.tenant_path('[PROJECT]', '[TENANT]') - >>> - >>> # TODO: Initialize `request_metadata`: - >>> request_metadata = {} - >>> - >>> # Iterate over all results - >>> for element in client.search_profiles(parent, request_metadata): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> name = client.profile_path('[PROJECT]', '[TENANT]', '[PROFILE]') >>> - >>> # Iterate over results one page at a time - >>> for page in client.search_profiles(parent, request_metadata).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.get_profile(name) Args: - parent (str): 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". - request_metadata (Union[dict, ~google.cloud.talent_v4beta1.types.RequestMetadata]): Required. The meta information collected about the profile search user. This is used - to improve the search quality of the service. These values are provided by - users, and must be precise and consistent. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.RequestMetadata` - profile_query (Union[dict, ~google.cloud.talent_v4beta1.types.ProfileQuery]): Search query to execute. See ``ProfileQuery`` for more details. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.ProfileQuery` - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - offset (int): An integer that specifies the current offset (that is, starting result) - in search results. This field is only considered if ``page_token`` is - unset. - - The maximum allowed value is 5000. Otherwise an error is thrown. - - For example, 0 means to search from the first profile, and 10 means to - search from the 11th profile. This can be used for pagination, for - example pageSize = 10 and offset = 10 means to search from the second - page. - disable_spell_check (bool): This flag controls the spell-check feature. If ``false``, the service - attempts to correct a misspelled query. - - For example, "enginee" is corrected to "engineer". - order_by (str): The criteria that determines how search results are sorted. Defaults is - "relevance desc" if no value is specified. - - Supported options are: - - - "relevance desc": By descending relevance, as determined by the API - algorithms. - - "update\_date desc": Sort by ``Profile.update_time`` in descending - order (recently updated profiles first). - - "create\_date desc": Sort by ``Profile.create_time`` in descending - order (recently created profiles first). - - "first\_name": Sort by ``PersonName.PersonStructuredName.given_name`` - in ascending order. - - "first\_name desc": Sort by - ``PersonName.PersonStructuredName.given_name`` in descending order. - - "last\_name": Sort by ``PersonName.PersonStructuredName.family_name`` - in ascending order. - - "last\_name desc": Sort by - ``PersonName.PersonStructuredName.family_name`` in ascending order. - case_sensitive_sort (bool): When sort by field is based on alphabetical order, sort values case - sensitively (based on ASCII) when the value is set to true. Default value - is case in-sensitive sort (false). - histogram_queries (list[Union[dict, ~google.cloud.talent_v4beta1.types.HistogramQuery]]): A list of expressions specifies histogram requests against matching - profiles for ``SearchProfilesRequest``. - - The expression syntax looks like a function definition with parameters. - - Function syntax: function\_name(histogram\_facet[, list of buckets]) - - 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"]. + name (str): Required. Resource name of the profile to get. - Built-in constants: + The format is + "projects/{project\_id}/tenants/{tenant\_id}/profiles/{profile\_id}". + For example, "projects/foo/tenants/bar/profiles/baz". + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. - - MIN (minimum number similar to java Double.MIN\_VALUE) - - MAX (maximum number similar to java Double.MAX\_VALUE) + Returns: + A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. - Built-in functions: + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_profile" not in self._inner_api_calls: + self._inner_api_calls[ + "get_profile" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_profile, + default_retry=self._method_configs["GetProfile"].retry, + default_timeout=self._method_configs["GetProfile"].timeout, + client_info=self._client_info, + ) - - bucket(start, end[, label]) Bucket build-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). + request = profile_service_pb2.GetProfileRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) - Histogram Facets: + return self._inner_api_calls["get_profile"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) - - admin1: Admin1 is a global placeholder for referring to state, - province, or the particular term a country uses to define the - geographic structure below the country level. Examples include states - codes such as "CA", "IL", "NY", and provinces, such as "BC". - - locality: Locality is a global placeholder for referring to city, - town, or the particular term a country uses to define the geographic - structure below the admin1 level. Examples include city names such as - "Mountain View" and "New York". - - extended\_locality: Extended locality is concatenated version of - admin1 and locality with comma separator. For example, "Mountain - View, CA" and "New York, NY". - - postal\_code: Postal code of profile which follows locale code. - - country: Country code (ISO-3166-1 alpha-2 code) of profile, such as - US, JP, GB. - - job\_title: Normalized job titles specified in EmploymentHistory. - - company\_name: Normalized company name of profiles to match on. - - institution: The school name. For example, "MIT", "University of - California, Berkeley" - - degree: Highest education degree in ISCED code. Each value in degree - covers a specific level of education, without any expansion to upper - nor lower levels of education degree. - - experience\_in\_months: experience in months. 0 means 0 month to 1 - month (exclusive). - - application\_date: The application date specifies application start - dates. See [ApplicationDateFilter\` for more details. - - application\_outcome\_notes: The application outcome reason specifies - the reasons behind the outcome of the job application. See - ``ApplicationOutcomeNotesFilter`` for more details. - - application\_job\_title: The application job title specifies the job - applied for in the application. See ``ApplicationJobFilter`` for more - details. - - hirable\_status: Hirable status specifies the profile's hirable - status. - - string\_custom\_attribute: String custom attributes. Values can be - accessed via square bracket notation like - string\_custom\_attribute["key1"]. - - numeric\_custom\_attribute: Numeric custom attributes. Values can be - accessed via square bracket notation like - numeric\_custom\_attribute["key1"]. + def update_profile( + self, + profile, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates the specified profile and returns the updated result. - Example expressions: + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.ProfileServiceClient() + >>> + >>> # TODO: Initialize `profile`: + >>> profile = {} + >>> + >>> response = client.update_profile(profile) - - count(admin1) - - count(experience\_in\_months, [bucket(0, 12, "1 year"), bucket(12, - 36, "1-3 years"), bucket(36, MAX, "3+ years")]) - - count(string\_custom\_attribute["assigned\_recruiter"]) - - count(numeric\_custom\_attribute["favorite\_number"], [bucket(MIN, 0, - "negative"), bucket(0, MAX, "non-negative")]) + Args: + profile (Union[dict, ~google.cloud.talent_v4beta1.types.Profile]): Required. Profile to be updated. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.talent_v4beta1.types.HistogramQuery` - result_set_id (str): An id that uniquely identifies the result set of a ``SearchProfiles`` - call. The id should be retrieved from the ``SearchProfilesResponse`` - message returned from a previous invocation of ``SearchProfiles``. - - A result set is an ordered list of search results. - - If this field is not set, a new result set is computed based on the - ``profile_query``. A new ``result_set_id`` is returned as a handle to - access this result set. - - If this field is set, the service will ignore the resource and - ``profile_query`` values, and simply retrieve a page of results from the - corresponding result set. In this case, one and only one of - ``page_token`` or ``offset`` must be set. + message :class:`~google.cloud.talent_v4beta1.types.Profile` + update_mask (Union[dict, ~google.cloud.talent_v4beta1.types.FieldMask]): A field mask to specify the profile fields to update. - A typical use case is to invoke ``SearchProfilesRequest`` without this - field, then use the resulting ``result_set_id`` in - ``SearchProfilesResponse`` to page through the results. - strict_keywords_search (bool): This flag is used to indicate whether the service will attempt to - understand synonyms and terms related to the search query or treat the - query "as is" when it generates a set of results. By default this flag is - set to false, thus allowing expanded results to also be returned. For - example a search for "software engineer" might also return candidates who - have experience in jobs similar to software engineer positions. By setting - this flag to true, the service will only attempt to deliver candidates has - software engineer in his/her global fields by treating "software engineer" - as a keyword. + A full update is performed if it is unset. - It is recommended to provide a feature in the UI (such as a checkbox) to - allow recruiters to set this flag to true if they intend to search for - longer boolean strings. + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.talent_v4beta1.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -944,10 +922,7 @@ def search_profiles( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.talent_v4beta1.types.SummarizedProfile` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.talent_v4beta1.types.Profile` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -957,34 +932,24 @@ def search_profiles( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "search_profiles" not in self._inner_api_calls: + if "update_profile" not in self._inner_api_calls: self._inner_api_calls[ - "search_profiles" + "update_profile" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.search_profiles, - default_retry=self._method_configs["SearchProfiles"].retry, - default_timeout=self._method_configs["SearchProfiles"].timeout, + self.transport.update_profile, + default_retry=self._method_configs["UpdateProfile"].retry, + default_timeout=self._method_configs["UpdateProfile"].timeout, client_info=self._client_info, ) - request = profile_service_pb2.SearchProfilesRequest( - parent=parent, - request_metadata=request_metadata, - profile_query=profile_query, - page_size=page_size, - offset=offset, - disable_spell_check=disable_spell_check, - order_by=order_by, - case_sensitive_sort=case_sensitive_sort, - histogram_queries=histogram_queries, - result_set_id=result_set_id, - strict_keywords_search=strict_keywords_search, + request = profile_service_pb2.UpdateProfileRequest( + profile=profile, update_mask=update_mask ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("profile.name", profile.name)] except AttributeError: pass else: @@ -993,17 +958,6 @@ def search_profiles( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["search_profiles"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="summarized_profiles", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["update_profile"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator diff --git a/google/cloud/talent_v4beta1/gapic/profile_service_client_config.py b/google/cloud/talent_v4beta1/gapic/profile_service_client_config.py index 3283e333..af533653 100644 --- a/google/cloud/talent_v4beta1/gapic/profile_service_client_config.py +++ b/google/cloud/talent_v4beta1/gapic/profile_service_client_config.py @@ -17,33 +17,33 @@ } }, "methods": { - "ListProfiles": { - "timeout_millis": 30000, + "DeleteProfile": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "CreateProfile": { - "timeout_millis": 30000, + "SearchProfiles": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "GetProfile": { - "timeout_millis": 30000, + "ListProfiles": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "UpdateProfile": { - "timeout_millis": 30000, + "CreateProfile": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteProfile": { - "timeout_millis": 30000, + "GetProfile": { + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "SearchProfiles": { - "timeout_millis": 30000, + "UpdateProfile": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/talent_v4beta1/gapic/tenant_service_client.py b/google/cloud/talent_v4beta1/gapic/tenant_service_client.py index 1195e7df..2e2e02eb 100644 --- a/google/cloud/talent_v4beta1/gapic/tenant_service_client.py +++ b/google/cloud/talent_v4beta1/gapic/tenant_service_client.py @@ -43,17 +43,11 @@ from google.cloud.talent_v4beta1.proto import company_service_pb2_grpc from google.cloud.talent_v4beta1.proto import completion_service_pb2 from google.cloud.talent_v4beta1.proto import completion_service_pb2_grpc -from google.cloud.talent_v4beta1.proto import event_pb2 -from google.cloud.talent_v4beta1.proto import event_service_pb2 -from google.cloud.talent_v4beta1.proto import event_service_pb2_grpc from google.cloud.talent_v4beta1.proto import filters_pb2 from google.cloud.talent_v4beta1.proto import histogram_pb2 from google.cloud.talent_v4beta1.proto import job_pb2 from google.cloud.talent_v4beta1.proto import job_service_pb2 from google.cloud.talent_v4beta1.proto import job_service_pb2_grpc -from google.cloud.talent_v4beta1.proto import profile_pb2 -from google.cloud.talent_v4beta1.proto import profile_service_pb2 -from google.cloud.talent_v4beta1.proto import profile_service_pb2_grpc from google.cloud.talent_v4beta1.proto import tenant_pb2 from google.cloud.talent_v4beta1.proto import tenant_service_pb2 from google.cloud.talent_v4beta1.proto import tenant_service_pb2_grpc @@ -222,6 +216,75 @@ def __init__( self._inner_api_calls = {} # Service calls + def delete_tenant( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes specified tenant. + + Example: + >>> from google.cloud import talent_v4beta1 + >>> + >>> client = talent_v4beta1.TenantServiceClient() + >>> + >>> name = client.tenant_path('[PROJECT]', '[TENANT]') + >>> + >>> client.delete_tenant(name) + + Args: + name (str): 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". + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_tenant" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_tenant" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_tenant, + default_retry=self._method_configs["DeleteTenant"].retry, + default_timeout=self._method_configs["DeleteTenant"].timeout, + client_info=self._client_info, + ) + + request = tenant_service_pb2.DeleteTenantRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_tenant"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def create_tenant( self, parent, @@ -460,75 +523,6 @@ def update_tenant( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_tenant( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes specified tenant. - - Example: - >>> from google.cloud import talent_v4beta1 - >>> - >>> client = talent_v4beta1.TenantServiceClient() - >>> - >>> name = client.tenant_path('[PROJECT]', '[TENANT]') - >>> - >>> client.delete_tenant(name) - - Args: - name (str): 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". - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_tenant" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_tenant" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_tenant, - default_retry=self._method_configs["DeleteTenant"].retry, - default_timeout=self._method_configs["DeleteTenant"].timeout, - client_info=self._client_info, - ) - - request = tenant_service_pb2.DeleteTenantRequest(name=name) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_tenant"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def list_tenants( self, parent, diff --git a/google/cloud/talent_v4beta1/gapic/tenant_service_client_config.py b/google/cloud/talent_v4beta1/gapic/tenant_service_client_config.py index bc008435..af87b931 100644 --- a/google/cloud/talent_v4beta1/gapic/tenant_service_client_config.py +++ b/google/cloud/talent_v4beta1/gapic/tenant_service_client_config.py @@ -17,28 +17,28 @@ } }, "methods": { + "DeleteTenant": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "CreateTenant": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetTenant": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "UpdateTenant": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteTenant": { - "timeout_millis": 30000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "ListTenants": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, diff --git a/google/cloud/talent_v4beta1/gapic/transports/application_service_grpc_transport.py b/google/cloud/talent_v4beta1/gapic/transports/application_service_grpc_transport.py index 410f761e..3307e3df 100644 --- a/google/cloud/talent_v4beta1/gapic/transports/application_service_grpc_transport.py +++ b/google/cloud/talent_v4beta1/gapic/transports/application_service_grpc_transport.py @@ -112,6 +112,19 @@ def channel(self): """ return self._channel + @property + def delete_application(self): + """Return the gRPC stub for :meth:`ApplicationServiceClient.delete_application`. + + Deletes specified application. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["application_service_stub"].DeleteApplication + @property def create_application(self): """Return the gRPC stub for :meth:`ApplicationServiceClient.create_application`. @@ -151,19 +164,6 @@ def update_application(self): """ return self._stubs["application_service_stub"].UpdateApplication - @property - def delete_application(self): - """Return the gRPC stub for :meth:`ApplicationServiceClient.delete_application`. - - Deletes specified application. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["application_service_stub"].DeleteApplication - @property def list_applications(self): """Return the gRPC stub for :meth:`ApplicationServiceClient.list_applications`. diff --git a/google/cloud/talent_v4beta1/gapic/transports/company_service_grpc_transport.py b/google/cloud/talent_v4beta1/gapic/transports/company_service_grpc_transport.py index 0eaa3214..c2405145 100644 --- a/google/cloud/talent_v4beta1/gapic/transports/company_service_grpc_transport.py +++ b/google/cloud/talent_v4beta1/gapic/transports/company_service_grpc_transport.py @@ -110,6 +110,20 @@ def channel(self): """ return self._channel + @property + def delete_company(self): + """Return the gRPC stub for :meth:`CompanyServiceClient.delete_company`. + + Deletes specified company. + Prerequisite: The company has no jobs associated with it. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["company_service_stub"].DeleteCompany + @property def create_company(self): """Return the gRPC stub for :meth:`CompanyServiceClient.create_company`. @@ -149,20 +163,6 @@ def update_company(self): """ return self._stubs["company_service_stub"].UpdateCompany - @property - def delete_company(self): - """Return the gRPC stub for :meth:`CompanyServiceClient.delete_company`. - - Deletes specified company. - Prerequisite: The company has no jobs associated with it. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["company_service_stub"].DeleteCompany - @property def list_companies(self): """Return the gRPC stub for :meth:`CompanyServiceClient.list_companies`. diff --git a/google/cloud/talent_v4beta1/gapic/transports/job_service_grpc_transport.py b/google/cloud/talent_v4beta1/gapic/transports/job_service_grpc_transport.py index 60b8ccfc..bf39c464 100644 --- a/google/cloud/talent_v4beta1/gapic/transports/job_service_grpc_transport.py +++ b/google/cloud/talent_v4beta1/gapic/transports/job_service_grpc_transport.py @@ -116,6 +116,22 @@ def channel(self): """ return self._channel + @property + def delete_job(self): + """Return the gRPC stub for :meth:`JobServiceClient.delete_job`. + + Deletes the specified job. + + Typically, the job becomes unsearchable within 10 seconds, but it may take + up to 5 minutes. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["job_service_stub"].DeleteJob + @property def create_job(self): """Return the gRPC stub for :meth:`JobServiceClient.create_job`. @@ -132,6 +148,19 @@ def create_job(self): """ return self._stubs["job_service_stub"].CreateJob + @property + def batch_create_jobs(self): + """Return the gRPC stub for :meth:`JobServiceClient.batch_create_jobs`. + + Begins executing a batch create jobs operation. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["job_service_stub"].BatchCreateJobs + @property def get_job(self): """Return the gRPC stub for :meth:`JobServiceClient.get_job`. @@ -163,46 +192,43 @@ def update_job(self): return self._stubs["job_service_stub"].UpdateJob @property - def delete_job(self): - """Return the gRPC stub for :meth:`JobServiceClient.delete_job`. - - Deletes the specified job. + def batch_update_jobs(self): + """Return the gRPC stub for :meth:`JobServiceClient.batch_update_jobs`. - Typically, the job becomes unsearchable within 10 seconds, but it may take - up to 5 minutes. + Begins executing a batch update jobs operation. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["job_service_stub"].DeleteJob + return self._stubs["job_service_stub"].BatchUpdateJobs @property - def list_jobs(self): - """Return the gRPC stub for :meth:`JobServiceClient.list_jobs`. + def batch_delete_jobs(self): + """Return the gRPC stub for :meth:`JobServiceClient.batch_delete_jobs`. - Lists jobs by filter. + Deletes a list of ``Job``\ s by filter. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["job_service_stub"].ListJobs + return self._stubs["job_service_stub"].BatchDeleteJobs @property - def batch_delete_jobs(self): - """Return the gRPC stub for :meth:`JobServiceClient.batch_delete_jobs`. + def list_jobs(self): + """Return the gRPC stub for :meth:`JobServiceClient.list_jobs`. - Deletes a list of ``Job``\ s by filter. + Lists jobs by filter. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["job_service_stub"].BatchDeleteJobs + return self._stubs["job_service_stub"].ListJobs @property def search_jobs(self): @@ -240,29 +266,3 @@ def search_jobs_for_alert(self): deserialized response object. """ return self._stubs["job_service_stub"].SearchJobsForAlert - - @property - def batch_create_jobs(self): - """Return the gRPC stub for :meth:`JobServiceClient.batch_create_jobs`. - - Begins executing a batch create jobs operation. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["job_service_stub"].BatchCreateJobs - - @property - def batch_update_jobs(self): - """Return the gRPC stub for :meth:`JobServiceClient.batch_update_jobs`. - - Begins executing a batch update jobs operation. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["job_service_stub"].BatchUpdateJobs diff --git a/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py b/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py index a2db5593..d0942ec7 100644 --- a/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py +++ b/google/cloud/talent_v4beta1/gapic/transports/profile_service_grpc_transport.py @@ -111,87 +111,87 @@ def channel(self): return self._channel @property - def list_profiles(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.list_profiles`. + def delete_profile(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.delete_profile`. - Lists profiles by filter. The order is unspecified. + Deletes the specified profile. + Prerequisite: The profile has no associated applications or assignments + associated. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].ListProfiles + return self._stubs["profile_service_stub"].DeleteProfile @property - def create_profile(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.create_profile`. + def search_profiles(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.search_profiles`. - Creates and returns a new profile. + Searches for profiles within a tenant. + + For example, search by raw queries "software engineer in Mountain View" + or search by structured filters (location filter, education filter, + etc.). + + See ``SearchProfilesRequest`` for more information. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].CreateProfile + return self._stubs["profile_service_stub"].SearchProfiles @property - def get_profile(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.get_profile`. + def list_profiles(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.list_profiles`. - Gets the specified profile. + Lists profiles by filter. The order is unspecified. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].GetProfile + return self._stubs["profile_service_stub"].ListProfiles @property - def update_profile(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.update_profile`. + def create_profile(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.create_profile`. - Updates the specified profile and returns the updated result. + Creates and returns a new profile. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].UpdateProfile + return self._stubs["profile_service_stub"].CreateProfile @property - def delete_profile(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.delete_profile`. + def get_profile(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.get_profile`. - Deletes the specified profile. - Prerequisite: The profile has no associated applications or assignments - associated. + Gets the specified profile. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].DeleteProfile + return self._stubs["profile_service_stub"].GetProfile @property - def search_profiles(self): - """Return the gRPC stub for :meth:`ProfileServiceClient.search_profiles`. - - Searches for profiles within a tenant. - - For example, search by raw queries "software engineer in Mountain View" - or search by structured filters (location filter, education filter, - etc.). + def update_profile(self): + """Return the gRPC stub for :meth:`ProfileServiceClient.update_profile`. - See ``SearchProfilesRequest`` for more information. + Updates the specified profile and returns the updated result. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["profile_service_stub"].SearchProfiles + return self._stubs["profile_service_stub"].UpdateProfile diff --git a/google/cloud/talent_v4beta1/gapic/transports/tenant_service_grpc_transport.py b/google/cloud/talent_v4beta1/gapic/transports/tenant_service_grpc_transport.py index dff6e16e..a614bf29 100644 --- a/google/cloud/talent_v4beta1/gapic/transports/tenant_service_grpc_transport.py +++ b/google/cloud/talent_v4beta1/gapic/transports/tenant_service_grpc_transport.py @@ -110,6 +110,19 @@ def channel(self): """ return self._channel + @property + def delete_tenant(self): + """Return the gRPC stub for :meth:`TenantServiceClient.delete_tenant`. + + Deletes specified tenant. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["tenant_service_stub"].DeleteTenant + @property def create_tenant(self): """Return the gRPC stub for :meth:`TenantServiceClient.create_tenant`. @@ -149,19 +162,6 @@ def update_tenant(self): """ return self._stubs["tenant_service_stub"].UpdateTenant - @property - def delete_tenant(self): - """Return the gRPC stub for :meth:`TenantServiceClient.delete_tenant`. - - Deletes specified tenant. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["tenant_service_stub"].DeleteTenant - @property def list_tenants(self): """Return the gRPC stub for :meth:`TenantServiceClient.list_tenants`. diff --git a/google/cloud/talent_v4beta1/proto/application.proto b/google/cloud/talent_v4beta1/proto/application.proto index 3efcab00..ccb49208 100644 --- a/google/cloud/talent_v4beta1/proto/application.proto +++ b/google/cloud/talent_v4beta1/proto/application.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,19 +11,18 @@ // 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.v4beta1; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/talent/v4beta1/common.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; -import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent"; option java_multiple_files = true; @@ -116,33 +115,30 @@ message Application { // For example, "projects/foo/tenants/bar/profiles/baz". string profile = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // One of either a job or a company is required. - // - // Resource name of the job which the candidate applied for. + // Required. Resource name of the job which the candidate applied for. // // The format is // "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, // "projects/foo/tenants/bar/jobs/baz". - string job = 4 [(google.api.resource_reference) = { - type: "jobs.googleapis.com/Job" - }]; + string job = 4 [ + (google.api.resource_reference).type = "jobs.googleapis.com/Job", + (google.api.field_behavior) = REQUIRED + ]; - // One of either a job or a company is required. - // // Resource name of the company which the candidate applied for. // // 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" - }]; + string company = 5 [ + (google.api.resource_reference) = { type: "jobs.googleapis.com/Company" } + ]; // The application date. google.type.Date application_date = 7; - // Required. What is the most recent stage of the application (that is, new, screen, - // send cv, hired, finished work)? This field is intentionally not + // Required. What is the most recent stage of the application (that is, new, + // screen, send cv, hired, finished work)? This field is intentionally not // comprehensive of every possible status, but instead, represents statuses // that would be used to indicate to the ML models good / bad matches. ApplicationStage stage = 11 [(google.api.field_behavior) = REQUIRED]; @@ -159,7 +155,8 @@ message Application { google.protobuf.BoolValue referral = 18; // Required. Reflects the time that the application was created. - google.protobuf.Timestamp create_time = 19 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp create_time = 19 + [(google.api.field_behavior) = REQUIRED]; // The last update timestamp. google.protobuf.Timestamp update_time = 20; @@ -176,7 +173,8 @@ message Application { // Output only. Indicates whether this job application is a match to // application related filters. This value is only applicable in profile // search response. - google.protobuf.BoolValue is_match = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.BoolValue is_match = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Job title snippet shows how the job title is related to a // search query. It's empty if the job title isn't related to the search diff --git a/google/cloud/talent_v4beta1/proto/application_pb2.py b/google/cloud/talent_v4beta1/proto/application_pb2.py index b8e8a5bf..25c303d9 100644 --- a/google/cloud/talent_v4beta1/proto/application_pb2.py +++ b/google/cloud/talent_v4beta1/proto/application_pb2.py @@ -15,6 +15,7 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.talent_v4beta1.proto import ( @@ -23,7 +24,6 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 from google.type import date_pb2 as google_dot_type_dot_date__pb2 -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -34,16 +34,16 @@ "\n\037com.google.cloud.talent.v4beta1B\030ApplicationResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n3google/cloud/talent_v4beta1/proto/application.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto\x1a\x1cgoogle/api/annotations.proto"\x99\t\n\x0b\x41pplication\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x1f \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07profile\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12)\n\x03job\x18\x04 \x01(\tB\x1c\xfa\x41\x19\n\x17jobs.googleapis.com/Job\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12+\n\x10\x61pplication_date\x18\x07 \x01(\x0b\x32\x11.google.type.Date\x12M\n\x05stage\x18\x0b \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.Application.ApplicationStageB\x03\xe0\x41\x02\x12H\n\x05state\x18\r \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.Application.ApplicationState\x12:\n\ninterviews\x18\x10 \x03(\x0b\x32&.google.cloud.talent.v4beta1.Interview\x12,\n\x08referral\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x34\n\x0b\x63reate_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12/\n\x0bupdate_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\routcome_notes\x18\x15 \x01(\t\x12\x35\n\x07outcome\x18\x16 \x01(\x0e\x32$.google.cloud.talent.v4beta1.Outcome\x12\x31\n\x08is_match\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1e\n\x11job_title_snippet\x18\x1d \x01(\tB\x03\xe0\x41\x03"\x90\x01\n\x10\x41pplicationState\x12!\n\x1d\x41PPLICATION_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\x16\n\x12\x43\x41NDIDATE_WITHDREW\x10\x02\x12\x15\n\x11\x45MPLOYER_WITHDREW\x10\x03\x12\r\n\tCOMPLETED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05"\xa9\x01\n\x10\x41pplicationStage\x12!\n\x1d\x41PPLICATION_STAGE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\n\n\x06SCREEN\x10\x02\x12\x19\n\x15HIRING_MANAGER_REVIEW\x10\x03\x12\r\n\tINTERVIEW\x10\x04\x12\x12\n\x0eOFFER_EXTENDED\x10\x05\x12\x12\n\x0eOFFER_ACCEPTED\x10\x06\x12\x0b\n\x07STARTED\x10\x07:w\xea\x41t\n\x1fjobs.googleapis.com/Application\x12Qprojects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}B\x86\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x18\x41pplicationResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n3google/cloud/talent_v4beta1/proto/application.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16google/type/date.proto"\x9c\t\n\x0b\x41pplication\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x1f \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07profile\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12,\n\x03job\x18\x04 \x01(\tB\x1f\xfa\x41\x19\n\x17jobs.googleapis.com/Job\xe0\x41\x02\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12+\n\x10\x61pplication_date\x18\x07 \x01(\x0b\x32\x11.google.type.Date\x12M\n\x05stage\x18\x0b \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.Application.ApplicationStageB\x03\xe0\x41\x02\x12H\n\x05state\x18\r \x01(\x0e\x32\x39.google.cloud.talent.v4beta1.Application.ApplicationState\x12:\n\ninterviews\x18\x10 \x03(\x0b\x32&.google.cloud.talent.v4beta1.Interview\x12,\n\x08referral\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x34\n\x0b\x63reate_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12/\n\x0bupdate_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\routcome_notes\x18\x15 \x01(\t\x12\x35\n\x07outcome\x18\x16 \x01(\x0e\x32$.google.cloud.talent.v4beta1.Outcome\x12\x31\n\x08is_match\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1e\n\x11job_title_snippet\x18\x1d \x01(\tB\x03\xe0\x41\x03"\x90\x01\n\x10\x41pplicationState\x12!\n\x1d\x41PPLICATION_STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\x16\n\x12\x43\x41NDIDATE_WITHDREW\x10\x02\x12\x15\n\x11\x45MPLOYER_WITHDREW\x10\x03\x12\r\n\tCOMPLETED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05"\xa9\x01\n\x10\x41pplicationStage\x12!\n\x1d\x41PPLICATION_STAGE_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\n\n\x06SCREEN\x10\x02\x12\x19\n\x15HIRING_MANAGER_REVIEW\x10\x03\x12\r\n\tINTERVIEW\x10\x04\x12\x12\n\x0eOFFER_EXTENDED\x10\x05\x12\x12\n\x0eOFFER_ACCEPTED\x10\x06\x12\x0b\n\x07STARTED\x10\x07:w\xea\x41t\n\x1fjobs.googleapis.com/Application\x12Qprojects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}B\x86\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x18\x41pplicationResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_talent__v4beta1_dot_proto_dot_common__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR, google_dot_type_dot_date__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -87,8 +87,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1052, - serialized_end=1196, + serialized_start=1055, + serialized_end=1199, ) _sym_db.RegisterEnumDescriptor(_APPLICATION_APPLICATIONSTATE) @@ -133,8 +133,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1199, - serialized_end=1368, + serialized_start=1202, + serialized_end=1371, ) _sym_db.RegisterEnumDescriptor(_APPLICATION_APPLICATIONSTAGE) @@ -215,7 +215,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\372A\031\n\027jobs.googleapis.com/Job"), + serialized_options=_b("\372A\031\n\027jobs.googleapis.com/Job\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -446,7 +446,7 @@ extension_ranges=[], oneofs=[], serialized_start=312, - serialized_end=1489, + serialized_end=1492, ) _APPLICATION.fields_by_name[ @@ -485,10 +485,7 @@ dict( DESCRIPTOR=_APPLICATION, __module__="google.cloud.talent_v4beta1.proto.application_pb2", - __doc__="""Resource that represents a job application record of a - candidate. - - + __doc__="""Resource that represents a job application record of a candidate. Attributes: name: Required during application update. Resource name assigned to @@ -506,15 +503,14 @@ enant\_id}/profiles/{profile\_id}". For example, "projects/foo/tenants/bar/profiles/baz". job: - One of either a job or a company is required. Resource name - of the job which the candidate applied for. The format is + Required. Resource name of the job which the candidate applied + for. The format is "projects/{project\_id}/tenants/{tenant\_id}/jobs/{job\_id}". For example, "projects/foo/tenants/bar/jobs/baz". company: - One of either a job or a company is required. Resource name - of the company which the candidate applied for. The format is - "projects/{project\_id}/tenants/{tenant\_id}/companies/{compan - y\_id}". For example, + Resource name of the company which the candidate applied for. + The format is "projects/{project\_id}/tenants/{tenant\_id}/com + panies/{company\_id}". For example, "projects/foo/tenants/bar/companies/baz". application_date: The application date. diff --git a/google/cloud/talent_v4beta1/proto/application_service.proto b/google/cloud/talent_v4beta1/proto/application_service.proto index bfa38296..c9f990da 100644 --- a/google/cloud/talent_v4beta1/proto/application_service.proto +++ b/google/cloud/talent_v4beta1/proto/application_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/application_service_pb2.py b/google/cloud/talent_v4beta1/proto/application_service_pb2.py index 2d2df62b..36d255ac 100644 --- a/google/cloud/talent_v4beta1/proto/application_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/application_service_pb2.py @@ -439,8 +439,6 @@ DESCRIPTOR=_CREATEAPPLICATIONREQUEST, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""The Request of the CreateApplication method. - - Attributes: parent: Required. Resource name of the profile under which the @@ -462,8 +460,6 @@ DESCRIPTOR=_GETAPPLICATIONREQUEST, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""Request for getting a application by name. - - Attributes: name: Required. The resource name of the application to be @@ -484,8 +480,6 @@ DESCRIPTOR=_UPDATEAPPLICATIONREQUEST, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""Request for updating a specified application. - - Attributes: application: Required. The application resource to replace the current @@ -513,8 +507,6 @@ DESCRIPTOR=_DELETEAPPLICATIONREQUEST, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""Request to delete a application. - - Attributes: name: Required. The resource name of the application to be deleted. @@ -535,8 +527,6 @@ DESCRIPTOR=_LISTAPPLICATIONSREQUEST, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""List applications for which the client has ACL visibility. - - Attributes: parent: Required. Resource name of the profile under which the @@ -561,8 +551,6 @@ DESCRIPTOR=_LISTAPPLICATIONSRESPONSE, __module__="google.cloud.talent_v4beta1.proto.application_service_pb2", __doc__="""The List applications response object. - - Attributes: applications: Applications for the current client. diff --git a/google/cloud/talent_v4beta1/proto/batch.proto b/google/cloud/talent_v4beta1/proto/batch.proto index 577a304d..074e8705 100644 --- a/google/cloud/talent_v4beta1/proto/batch.proto +++ b/google/cloud/talent_v4beta1/proto/batch.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/common.proto b/google/cloud/talent_v4beta1/proto/common.proto index 2524a492..13f77421 100644 --- a/google/cloud/talent_v4beta1/proto/common.proto +++ b/google/cloud/talent_v4beta1/proto/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/common_pb2.py b/google/cloud/talent_v4beta1/proto/common_pb2.py index 9af7164c..8fe8fdb0 100644 --- a/google/cloud/talent_v4beta1/proto/common_pb2.py +++ b/google/cloud/talent_v4beta1/proto/common_pb2.py @@ -2631,10 +2631,7 @@ dict( DESCRIPTOR=_TIMESTAMPRANGE, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""Message representing a period of time between two - timestamps. - - + __doc__="""Message representing a period of time between two timestamps. Attributes: start_time: Begin of the period (inclusive). @@ -2654,8 +2651,6 @@ __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""A resource that represents a location with full geographic information. - - Attributes: location_type: The type of a location, which corresponds to the address lines @@ -2692,11 +2687,9 @@ dict( DESCRIPTOR=_REQUESTMETADATA, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""Meta information related to the job searcher or entity - conducting the job search. This information is used to improve the - performance of the service. - - + __doc__="""Meta information related to the job searcher or entity conducting the + job search. This information is used to improve the performance of the + service. Attributes: domain: Required if [allow\_missing\_ids][google.cloud.talent.v4beta1. @@ -2757,10 +2750,8 @@ dict( DESCRIPTOR=_RESPONSEMETADATA, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""Additional information returned to client, such as - debugging information. - - + __doc__="""Additional information returned to client, such as debugging + information. Attributes: request_id: A unique id associated with this call. This id is logged for @@ -2777,11 +2768,9 @@ dict( DESCRIPTOR=_DEVICEINFO, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""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. - - + __doc__="""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. Attributes: device_type: Type of the device. @@ -2800,10 +2789,7 @@ dict( DESCRIPTOR=_CUSTOMATTRIBUTE, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""Custom attribute values that are either filterable or - non-filterable. - - + __doc__="""Custom attribute values that are either filterable or non-filterable. Attributes: string_values: Exactly one of [string\_values][google.cloud.talent.v4beta1.Cu @@ -2841,8 +2827,6 @@ DESCRIPTOR=_SPELLINGCORRECTION, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Spell check result. - - Attributes: corrected: Indicates if the query was corrected by the spell checker. @@ -2871,24 +2855,19 @@ dict( DESCRIPTOR=_COMPENSATIONINFO_COMPENSATIONENTRY, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""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.v4beta1.CompensationInfo.CompensationEntry.amount] - or - [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]. - - and its - [expected\_units\_per\_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected\_units\_per\_year] - is set or can be derived. Its annualized range is determined as - ([amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount] - or - [range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]) - times - [expected\_units\_per\_year][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.expected\_units\_per\_year]. - - + __doc__="""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 [amoun + t][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amou + nt] or [range][google.cloud.talent.v4beta1.CompensationInfo.Compensati + onEntry.range]. - and its [expected\_units\_per\_year][google.cloud.ta + lent.v4beta1.CompensationInfo.CompensationEntry.expected\_units\_per\_ + year] is set or can be derived. Its annualized range is determined as + ([amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEnt + ry.amount] or [range][google.cloud.talent.v4beta1.CompensationInfo.Com + pensationEntry.range]) times [expected\_units\_per\_year][google.cloud + .talent.v4beta1.CompensationInfo.CompensationEntry.expected\_units\_pe + r\_year]. Attributes: type: Compensation type. Default is [CompensationType.COMPENSATION\ @@ -2927,8 +2906,6 @@ DESCRIPTOR=_COMPENSATIONINFO_COMPENSATIONRANGE, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Compensation range. - - Attributes: max_compensation: The maximum amount of compensation. If left empty, the value @@ -2947,8 +2924,6 @@ DESCRIPTOR=_COMPENSATIONINFO, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Job compensation details. - - Attributes: entries: Job compensation information. At most one entry can be of @@ -2988,8 +2963,6 @@ DESCRIPTOR=_CERTIFICATION, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Resource that represents a license or certification. - - Attributes: display_name: Name of license or certification. Number of characters @@ -3018,8 +2991,6 @@ DESCRIPTOR=_SKILL, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Resource that represents a skill of a candidate. - - Attributes: display_name: Skill display name. For example, "Java", "Python". Number of @@ -3051,8 +3022,6 @@ DESCRIPTOR=_INTERVIEW, __module__="google.cloud.talent_v4beta1.proto.common_pb2", __doc__="""Details of an interview. - - Attributes: rating: The rating on this interview. @@ -3071,10 +3040,7 @@ dict( DESCRIPTOR=_RATING, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""The details of the score received for an assessment or - interview. - - + __doc__="""The details of the score received for an assessment or interview. Attributes: overall: Overall score. @@ -3097,11 +3063,9 @@ dict( DESCRIPTOR=_BATCHOPERATIONMETADATA, __module__="google.cloud.talent_v4beta1.proto.common_pb2", - __doc__="""Metadata used for long running operations returned by CTS - batch APIs. It's used to replace - [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata]. - - + __doc__="""Metadata used for long running operations returned by CTS batch APIs. + It's used to replace [google.longrunning.Operation.metadata][google.lo + ngrunning.Operation.metadata]. Attributes: state: The state of a long running operation. diff --git a/google/cloud/talent_v4beta1/proto/company.proto b/google/cloud/talent_v4beta1/proto/company.proto index 74f0b889..c6894572 100644 --- a/google/cloud/talent_v4beta1/proto/company.proto +++ b/google/cloud/talent_v4beta1/proto/company.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -34,8 +33,8 @@ option objc_class_prefix = "CTS"; message Company { option (google.api.resource) = { type: "jobs.googleapis.com/Company" - pattern: "projects/{project}/companies/{company}" pattern: "projects/{project}/tenants/{tenant}/companies/{company}" + pattern: "projects/{project}/companies/{company}" }; // Derived details about the company. diff --git a/google/cloud/talent_v4beta1/proto/company_pb2.py b/google/cloud/talent_v4beta1/proto/company_pb2.py index 1def4dd3..f4bb5b8f 100644 --- a/google/cloud/talent_v4beta1/proto/company_pb2.py +++ b/google/cloud/talent_v4beta1/proto/company_pb2.py @@ -31,7 +31,7 @@ "\n\037com.google.cloud.talent.v4beta1B\024CompanyResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n/google/cloud/talent_v4beta1/proto/company.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1cgoogle/api/annotations.proto"\xfc\x04\n\x07\x43ompany\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04size\x18\x04 \x01(\x0e\x32(.google.cloud.talent.v4beta1.CompanySize\x12\x1c\n\x14headquarters_address\x18\x05 \x01(\t\x12\x15\n\rhiring_agency\x18\x06 \x01(\x08\x12\x10\n\x08\x65\x65o_text\x18\x07 \x01(\t\x12\x13\n\x0bwebsite_uri\x18\x08 \x01(\t\x12\x17\n\x0f\x63\x61reer_site_uri\x18\t \x01(\t\x12\x11\n\timage_uri\x18\n \x01(\t\x12\x30\n(keyword_searchable_job_custom_attributes\x18\x0b \x03(\t\x12K\n\x0c\x64\x65rived_info\x18\x0c \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Company.DerivedInfoB\x03\xe0\x41\x03\x12\x16\n\tsuspended\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x1aS\n\x0b\x44\x65rivedInfo\x12\x44\n\x15headquarters_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location:\x81\x01\xea\x41~\n\x1bjobs.googleapis.com/Company\x12&projects/{project}/companies/{company}\x12\x37projects/{project}/tenants/{tenant}/companies/{company}B\x82\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x14\x43ompanyResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n/google/cloud/talent_v4beta1/proto/company.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1cgoogle/api/annotations.proto"\xfc\x04\n\x07\x43ompany\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x65xternal_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04size\x18\x04 \x01(\x0e\x32(.google.cloud.talent.v4beta1.CompanySize\x12\x1c\n\x14headquarters_address\x18\x05 \x01(\t\x12\x15\n\rhiring_agency\x18\x06 \x01(\x08\x12\x10\n\x08\x65\x65o_text\x18\x07 \x01(\t\x12\x13\n\x0bwebsite_uri\x18\x08 \x01(\t\x12\x17\n\x0f\x63\x61reer_site_uri\x18\t \x01(\t\x12\x11\n\timage_uri\x18\n \x01(\t\x12\x30\n(keyword_searchable_job_custom_attributes\x18\x0b \x03(\t\x12K\n\x0c\x64\x65rived_info\x18\x0c \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Company.DerivedInfoB\x03\xe0\x41\x03\x12\x16\n\tsuspended\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x1aS\n\x0b\x44\x65rivedInfo\x12\x44\n\x15headquarters_location\x18\x01 \x01(\x0b\x32%.google.cloud.talent.v4beta1.Location:\x81\x01\xea\x41~\n\x1bjobs.googleapis.com/Company\x12\x37projects/{project}/tenants/{tenant}/companies/{company}\x12&projects/{project}/companies/{company}B\x82\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x14\x43ompanyResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -326,7 +326,7 @@ nested_types=[_COMPANY_DERIVEDINFO], enum_types=[], serialized_options=_b( - "\352A~\n\033jobs.googleapis.com/Company\022&projects/{project}/companies/{company}\0227projects/{project}/tenants/{tenant}/companies/{company}" + "\352A~\n\033jobs.googleapis.com/Company\0227projects/{project}/tenants/{tenant}/companies/{company}\022&projects/{project}/companies/{company}" ), is_extendable=False, syntax="proto3", @@ -362,8 +362,6 @@ DESCRIPTOR=_COMPANY_DERIVEDINFO, __module__="google.cloud.talent_v4beta1.proto.company_pb2", __doc__="""Derived details about the company. - - Attributes: headquarters_location: A structured headquarters location of the company, resolved @@ -375,11 +373,9 @@ ), DESCRIPTOR=_COMPANY, __module__="google.cloud.talent_v4beta1.proto.company_pb2", - __doc__="""A Company resource represents a company in the service. A - company is the entity that owns job postings, that is, the hiring entity + __doc__="""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. - - Attributes: name: Required during company update. The resource name for a diff --git a/google/cloud/talent_v4beta1/proto/company_service.proto b/google/cloud/talent_v4beta1/proto/company_service.proto index daeb2cce..ac6a7d74 100644 --- a/google/cloud/talent_v4beta1/proto/company_service.proto +++ b/google/cloud/talent_v4beta1/proto/company_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -181,7 +180,7 @@ message ListCompaniesRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/google/cloud/talent_v4beta1/proto/company_service_pb2.py b/google/cloud/talent_v4beta1/proto/company_service_pb2.py index fb47f132..8a2f8b93 100644 --- a/google/cloud/talent_v4beta1/proto/company_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/company_service_pb2.py @@ -37,7 +37,7 @@ "\n\037com.google.cloud.talent.v4beta1B\023CompanyServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n7google/cloud/talent_v4beta1/proto/company_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a/google/cloud/talent_v4beta1/proto/company.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x87\x01\n\x14\x43reateCompanyRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12:\n\x07\x63ompany\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02"F\n\x11GetCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company"\x83\x01\n\x14UpdateCompanyRequest\x12:\n\x07\x63ompany\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"I\n\x14\x44\x65leteCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company"\x95\x01\n\x14ListCompaniesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#jobs.googleapis.com/TenantOrProject\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x19\n\x11require_open_jobs\x18\x04 \x01(\x08"\xaa\x01\n\x15ListCompaniesResponse\x12\x37\n\tcompanies\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xd2\t\n\x0e\x43ompanyService\x12\xe3\x01\n\rCreateCompany\x12\x31.google.cloud.talent.v4beta1.CreateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"y\x82\xd3\xe4\x93\x02\x62"0/v4beta1/{parent=projects/*/tenants/*}/companies:\x01*Z+"&/v4beta1/{parent=projects/*}/companies:\x01*\xda\x41\x0eparent,company\x12\xcd\x01\n\nGetCompany\x12..google.cloud.talent.v4beta1.GetCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"i\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{name=projects/*/tenants/*/companies/*}Z(\x12&/v4beta1/{name=projects/*/companies/*}\xda\x41\x04name\x12\xed\x01\n\rUpdateCompany\x12\x31.google.cloud.talent.v4beta1.UpdateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"\x82\x01\x82\xd3\xe4\x93\x02r28/v4beta1/{company.name=projects/*/tenants/*/companies/*}:\x01*Z32./v4beta1/{company.name=projects/*/companies/*}:\x01*\xda\x41\x07\x63ompany\x12\xc5\x01\n\rDeleteCompany\x12\x31.google.cloud.talent.v4beta1.DeleteCompanyRequest\x1a\x16.google.protobuf.Empty"i\x82\xd3\xe4\x93\x02\\*0/v4beta1/{name=projects/*/tenants/*/companies/*}Z(*&/v4beta1/{name=projects/*/companies/*}\xda\x41\x04name\x12\xe3\x01\n\rListCompanies\x12\x31.google.cloud.talent.v4beta1.ListCompaniesRequest\x1a\x32.google.cloud.talent.v4beta1.ListCompaniesResponse"k\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{parent=projects/*/tenants/*}/companiesZ(\x12&/v4beta1/{parent=projects/*}/companies\xda\x41\x06parent\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x81\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13\x43ompanyServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n7google/cloud/talent_v4beta1/proto/company_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a/google/cloud/talent_v4beta1/proto/company.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x87\x01\n\x14\x43reateCompanyRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12:\n\x07\x63ompany\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02"F\n\x11GetCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company"\x83\x01\n\x14UpdateCompanyRequest\x12:\n\x07\x63ompany\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.CompanyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"I\n\x14\x44\x65leteCompanyRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company"\x8d\x01\n\x14ListCompaniesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x19\n\x11require_open_jobs\x18\x04 \x01(\x08"\xaa\x01\n\x15ListCompaniesResponse\x12\x37\n\tcompanies\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Company\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata2\xd2\t\n\x0e\x43ompanyService\x12\xe3\x01\n\rCreateCompany\x12\x31.google.cloud.talent.v4beta1.CreateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"y\x82\xd3\xe4\x93\x02\x62"0/v4beta1/{parent=projects/*/tenants/*}/companies:\x01*Z+"&/v4beta1/{parent=projects/*}/companies:\x01*\xda\x41\x0eparent,company\x12\xcd\x01\n\nGetCompany\x12..google.cloud.talent.v4beta1.GetCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"i\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{name=projects/*/tenants/*/companies/*}Z(\x12&/v4beta1/{name=projects/*/companies/*}\xda\x41\x04name\x12\xed\x01\n\rUpdateCompany\x12\x31.google.cloud.talent.v4beta1.UpdateCompanyRequest\x1a$.google.cloud.talent.v4beta1.Company"\x82\x01\x82\xd3\xe4\x93\x02r28/v4beta1/{company.name=projects/*/tenants/*/companies/*}:\x01*Z32./v4beta1/{company.name=projects/*/companies/*}:\x01*\xda\x41\x07\x63ompany\x12\xc5\x01\n\rDeleteCompany\x12\x31.google.cloud.talent.v4beta1.DeleteCompanyRequest\x1a\x16.google.protobuf.Empty"i\x82\xd3\xe4\x93\x02\\*0/v4beta1/{name=projects/*/tenants/*/companies/*}Z(*&/v4beta1/{name=projects/*/companies/*}\xda\x41\x04name\x12\xe3\x01\n\rListCompanies\x12\x31.google.cloud.talent.v4beta1.ListCompaniesRequest\x1a\x32.google.cloud.talent.v4beta1.ListCompaniesResponse"k\x82\xd3\xe4\x93\x02\\\x12\x30/v4beta1/{parent=projects/*/tenants/*}/companiesZ(\x12&/v4beta1/{parent=projects/*}/companies\xda\x41\x06parent\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x81\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13\x43ompanyServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -273,7 +273,7 @@ is_extension=False, extension_scope=None, serialized_options=_b( - "\340A\002\372A%\n#jobs.googleapis.com/TenantOrProject" + "\340A\002\372A\035\022\033jobs.googleapis.com/Company" ), file=DESCRIPTOR, ), @@ -341,7 +341,7 @@ extension_ranges=[], oneofs=[], serialized_start=783, - serialized_end=932, + serialized_end=924, ) @@ -415,8 +415,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=935, - serialized_end=1105, + serialized_start=927, + serialized_end=1097, ) _CREATECOMPANYREQUEST.fields_by_name[ @@ -457,8 +457,6 @@ DESCRIPTOR=_CREATECOMPANYREQUEST, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""The Request of the CreateCompany method. - - Attributes: parent: Required. Resource name of the tenant under which the company @@ -481,8 +479,6 @@ DESCRIPTOR=_GETCOMPANYREQUEST, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""Request for getting a company by name. - - Attributes: name: Required. The resource name of the company to be retrieved. @@ -504,8 +500,6 @@ DESCRIPTOR=_UPDATECOMPANYREQUEST, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""Request for updating a specified company. - - Attributes: company: Required. The company resource to replace the current resource @@ -532,8 +526,6 @@ DESCRIPTOR=_DELETECOMPANYREQUEST, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""Request to delete a company. - - Attributes: name: Required. The resource name of the company to be deleted. The @@ -555,8 +547,6 @@ DESCRIPTOR=_LISTCOMPANIESREQUEST, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""List companies for which the client has ACL visibility. - - Attributes: parent: Required. Resource name of the tenant under which the company @@ -588,8 +578,6 @@ DESCRIPTOR=_LISTCOMPANIESRESPONSE, __module__="google.cloud.talent_v4beta1.proto.company_service_pb2", __doc__="""The List companies response object. - - Attributes: companies: Companies for the current client. @@ -621,8 +609,8 @@ serialized_options=_b( "\312A\023jobs.googleapis.com\322AShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobs" ), - serialized_start=1108, - serialized_end=2342, + serialized_start=1100, + serialized_end=2334, methods=[ _descriptor.MethodDescriptor( name="CreateCompany", diff --git a/google/cloud/talent_v4beta1/proto/completion_service.proto b/google/cloud/talent_v4beta1/proto/completion_service.proto index d6fba95d..2e45ac7d 100644 --- a/google/cloud/talent_v4beta1/proto/completion_service.proto +++ b/google/cloud/talent_v4beta1/proto/completion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -70,31 +69,22 @@ message CompleteQueryRequest { // Suggest job titles for jobs autocomplete. // - // For - // [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.JOB_TITLE][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.JOB_TITLE] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. JOB_TITLE = 1; // Suggest company names for jobs autocomplete. // - // For - // [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] - // type, only companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.COMPANY_NAME][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMPANY_NAME] type, + // only companies having open jobs with the same [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are + // returned. COMPANY_NAME = 2; // Suggest both job titles and company names for jobs autocomplete. // - // For - // [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] - // type, only open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // or companies having open jobs with the same - // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] - // are returned. + // For [CompletionType.COMBINED][google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType.COMBINED] type, only open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] or companies having open jobs with the same + // [language_codes][google.cloud.talent.v4beta1.CompleteQueryRequest.language_codes] are returned. COMBINED = 3; } @@ -108,7 +98,7 @@ message CompleteQueryRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/google/cloud/talent_v4beta1/proto/completion_service_pb2.py b/google/cloud/talent_v4beta1/proto/completion_service_pb2.py index 9d97a99a..7d9d97e1 100644 --- a/google/cloud/talent_v4beta1/proto/completion_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/completion_service_pb2.py @@ -32,7 +32,7 @@ "\n\037com.google.cloud.talent.v4beta1B\026CompletionServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n:google/cloud/talent_v4beta1/proto/completion_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x17google/api/client.proto"\x9b\x04\n\x14\x43ompleteQueryRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#jobs.googleapis.com/TenantOrProject\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elanguage_codes\x18\x03 \x03(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12P\n\x05scope\x18\x06 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope\x12N\n\x04type\x18\x07 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType"K\n\x0f\x43ompletionScope\x12 \n\x1c\x43OMPLETION_SCOPE_UNSPECIFIED\x10\x00\x12\n\n\x06TENANT\x10\x01\x12\n\n\x06PUBLIC\x10\x02"`\n\x0e\x43ompletionType\x12\x1f\n\x1b\x43OMPLETION_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tJOB_TITLE\x10\x01\x12\x10\n\x0c\x43OMPANY_NAME\x10\x02\x12\x0c\n\x08\x43OMBINED\x10\x03"\xc5\x02\n\x15\x43ompleteQueryResponse\x12_\n\x12\x63ompletion_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult\x12?\n\x08metadata\x18\x02 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x1a\x89\x01\n\x10\x43ompletionResult\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\x12\x11\n\timage_uri\x18\x03 \x01(\t2\xd5\x02\n\nCompletion\x12\xd8\x01\n\rCompleteQuery\x12\x31.google.cloud.talent.v4beta1.CompleteQueryRequest\x1a\x32.google.cloud.talent.v4beta1.CompleteQueryResponse"`\x82\xd3\xe4\x93\x02Z\x12//v4beta1/{parent=projects/*/tenants/*}:completeZ\'\x12%/v4beta1/{parent=projects/*}:complete\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x84\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x16\x43ompletionServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n:google/cloud/talent_v4beta1/proto/completion_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x17google/api/client.proto"\x93\x04\n\x14\x43ompleteQueryRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0elanguage_codes\x18\x03 \x03(\t\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x02\x12\x31\n\x07\x63ompany\x18\x05 \x01(\tB \xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12P\n\x05scope\x18\x06 \x01(\x0e\x32\x41.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionScope\x12N\n\x04type\x18\x07 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType"K\n\x0f\x43ompletionScope\x12 \n\x1c\x43OMPLETION_SCOPE_UNSPECIFIED\x10\x00\x12\n\n\x06TENANT\x10\x01\x12\n\n\x06PUBLIC\x10\x02"`\n\x0e\x43ompletionType\x12\x1f\n\x1b\x43OMPLETION_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tJOB_TITLE\x10\x01\x12\x10\n\x0c\x43OMPANY_NAME\x10\x02\x12\x0c\n\x08\x43OMBINED\x10\x03"\xc5\x02\n\x15\x43ompleteQueryResponse\x12_\n\x12\x63ompletion_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.talent.v4beta1.CompleteQueryResponse.CompletionResult\x12?\n\x08metadata\x18\x02 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x1a\x89\x01\n\x10\x43ompletionResult\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32@.google.cloud.talent.v4beta1.CompleteQueryRequest.CompletionType\x12\x11\n\timage_uri\x18\x03 \x01(\t2\xd5\x02\n\nCompletion\x12\xd8\x01\n\rCompleteQuery\x12\x31.google.cloud.talent.v4beta1.CompleteQueryRequest\x1a\x32.google.cloud.talent.v4beta1.CompleteQueryResponse"`\x82\xd3\xe4\x93\x02Z\x12//v4beta1/{parent=projects/*/tenants/*}:completeZ\'\x12%/v4beta1/{parent=projects/*}:complete\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x84\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x16\x43ompletionServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -66,8 +66,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=621, - serialized_end=696, + serialized_start=613, + serialized_end=688, ) _sym_db.RegisterEnumDescriptor(_COMPLETEQUERYREQUEST_COMPLETIONSCOPE) @@ -96,8 +96,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=698, - serialized_end=794, + serialized_start=690, + serialized_end=786, ) _sym_db.RegisterEnumDescriptor(_COMPLETEQUERYREQUEST_COMPLETIONTYPE) @@ -125,7 +125,7 @@ is_extension=False, extension_scope=None, serialized_options=_b( - "\340A\002\372A%\n#jobs.googleapis.com/TenantOrProject" + "\340A\002\372A\035\022\033jobs.googleapis.com/Company" ), file=DESCRIPTOR, ), @@ -250,7 +250,7 @@ extension_ranges=[], oneofs=[], serialized_start=255, - serialized_end=794, + serialized_end=786, ) @@ -324,8 +324,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=985, - serialized_end=1122, + serialized_start=977, + serialized_end=1114, ) _COMPLETEQUERYRESPONSE = _descriptor.Descriptor( @@ -380,8 +380,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=797, - serialized_end=1122, + serialized_start=789, + serialized_end=1114, ) _COMPLETEQUERYREQUEST.fields_by_name[ @@ -415,8 +415,6 @@ DESCRIPTOR=_COMPLETEQUERYREQUEST, __module__="google.cloud.talent_v4beta1.proto.completion_service_pb2", __doc__="""Auto-complete parameters. - - Attributes: parent: Required. Resource name of tenant the completion is performed @@ -468,8 +466,6 @@ DESCRIPTOR=_COMPLETEQUERYRESPONSE_COMPLETIONRESULT, __module__="google.cloud.talent_v4beta1.proto.completion_service_pb2", __doc__="""Resource that represents completion results. - - Attributes: suggestion: The suggestion for the query. @@ -486,8 +482,6 @@ DESCRIPTOR=_COMPLETEQUERYRESPONSE, __module__="google.cloud.talent_v4beta1.proto.completion_service_pb2", __doc__="""Response of auto-complete query. - - Attributes: completion_results: Results of the matching job/company candidates. @@ -516,8 +510,8 @@ serialized_options=_b( "\312A\023jobs.googleapis.com\322AShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobs" ), - serialized_start=1125, - serialized_end=1466, + serialized_start=1117, + serialized_end=1458, methods=[ _descriptor.MethodDescriptor( name="CompleteQuery", diff --git a/google/cloud/talent_v4beta1/proto/event.proto b/google/cloud/talent_v4beta1/proto/event.proto index 8af726a4..c5a71553 100644 --- a/google/cloud/talent_v4beta1/proto/event.proto +++ b/google/cloud/talent_v4beta1/proto/event.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/event_pb2.py b/google/cloud/talent_v4beta1/proto/event_pb2.py index d58c625c..8bdbe209 100644 --- a/google/cloud/talent_v4beta1/proto/event_pb2.py +++ b/google/cloud/talent_v4beta1/proto/event_pb2.py @@ -485,14 +485,12 @@ dict( DESCRIPTOR=_CLIENTEVENT, __module__="google.cloud.talent_v4beta1.proto.event_pb2", - __doc__="""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. - - + __doc__="""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. Attributes: request_id: Strongly recommended for the best service experience. A @@ -527,10 +525,8 @@ dict( DESCRIPTOR=_JOBEVENT, __module__="google.cloud.talent_v4beta1.proto.event_pb2", - __doc__="""An event issued when a job seeker interacts with the - application that implements Cloud Talent Solution. - - + __doc__="""An event issued when a job seeker interacts with the application that + implements Cloud Talent Solution. Attributes: type: Required. The type of the event (see [JobEventType][google.clo @@ -564,10 +560,8 @@ dict( DESCRIPTOR=_PROFILEEVENT, __module__="google.cloud.talent_v4beta1.proto.event_pb2", - __doc__="""An event issued when a profile searcher interacts with the - application that implements Cloud Talent Solution. - - + __doc__="""An event issued when a profile searcher interacts with the application + that implements Cloud Talent Solution. Attributes: type: Required. Type of event. diff --git a/google/cloud/talent_v4beta1/proto/event_service.proto b/google/cloud/talent_v4beta1/proto/event_service.proto index b5da5f21..4577352e 100644 --- a/google/cloud/talent_v4beta1/proto/event_service.proto +++ b/google/cloud/talent_v4beta1/proto/event_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -66,7 +65,7 @@ message CreateClientEventRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "jobs.googleapis.com/TenantOrProject" + child_type: "jobs.googleapis.com/Company" } ]; diff --git a/google/cloud/talent_v4beta1/proto/event_service_pb2.py b/google/cloud/talent_v4beta1/proto/event_service_pb2.py index 8e8148a7..673e2e33 100644 --- a/google/cloud/talent_v4beta1/proto/event_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/event_service_pb2.py @@ -32,7 +32,7 @@ "\n\037com.google.cloud.talent.v4beta1B\021EventServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n5google/cloud/talent_v4beta1/proto/event_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/talent_v4beta1/proto/event.proto"\x9c\x01\n\x18\x43reateClientEventRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#jobs.googleapis.com/TenantOrProject\x12\x43\n\x0c\x63lient_event\x18\x02 \x01(\x0b\x32(.google.cloud.talent.v4beta1.ClientEventB\x03\xe0\x41\x02\x32\xfa\x02\n\x0c\x45ventService\x12\xfb\x01\n\x11\x43reateClientEvent\x12\x35.google.cloud.talent.v4beta1.CreateClientEventRequest\x1a(.google.cloud.talent.v4beta1.ClientEvent"\x84\x01\x82\xd3\xe4\x93\x02h"3/v4beta1/{parent=projects/*/tenants/*}/clientEvents:\x01*Z.")/v4beta1/{parent=projects/*}/clientEvents:\x01*\xda\x41\x13parent,client_event\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x7f\n\x1f\x63om.google.cloud.talent.v4beta1B\x11\x45ventServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n5google/cloud/talent_v4beta1/proto/event_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/talent_v4beta1/proto/event.proto"\x94\x01\n\x18\x43reateClientEventRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Company\x12\x43\n\x0c\x63lient_event\x18\x02 \x01(\x0b\x32(.google.cloud.talent.v4beta1.ClientEventB\x03\xe0\x41\x02\x32\xfa\x02\n\x0c\x45ventService\x12\xfb\x01\n\x11\x43reateClientEvent\x12\x35.google.cloud.talent.v4beta1.CreateClientEventRequest\x1a(.google.cloud.talent.v4beta1.ClientEvent"\x84\x01\x82\xd3\xe4\x93\x02h"3/v4beta1/{parent=projects/*/tenants/*}/clientEvents:\x01*Z.")/v4beta1/{parent=projects/*}/clientEvents:\x01*\xda\x41\x13parent,client_event\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x7f\n\x1f\x63om.google.cloud.talent.v4beta1B\x11\x45ventServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -67,7 +67,7 @@ is_extension=False, extension_scope=None, serialized_options=_b( - "\340A\002\372A%\n#jobs.googleapis.com/TenantOrProject" + "\340A\002\372A\035\022\033jobs.googleapis.com/Company" ), file=DESCRIPTOR, ), @@ -99,7 +99,7 @@ extension_ranges=[], oneofs=[], serialized_start=249, - serialized_end=405, + serialized_end=397, ) _CREATECLIENTEVENTREQUEST.fields_by_name[ @@ -117,8 +117,6 @@ DESCRIPTOR=_CREATECLIENTEVENTREQUEST, __module__="google.cloud.talent_v4beta1.proto.event_service_pb2", __doc__="""The report event request. - - Attributes: parent: Required. Resource name of the tenant under which the event is @@ -148,8 +146,8 @@ serialized_options=_b( "\312A\023jobs.googleapis.com\322AShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobs" ), - serialized_start=408, - serialized_end=786, + serialized_start=400, + serialized_end=778, methods=[ _descriptor.MethodDescriptor( name="CreateClientEvent", diff --git a/google/cloud/talent_v4beta1/proto/filters.proto b/google/cloud/talent_v4beta1/proto/filters.proto index 46b26795..be457b43 100644 --- a/google/cloud/talent_v4beta1/proto/filters.proto +++ b/google/cloud/talent_v4beta1/proto/filters.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/filters_pb2.py b/google/cloud/talent_v4beta1/proto/filters_pb2.py index 7626ecbf..5fefcdc3 100644 --- a/google/cloud/talent_v4beta1/proto/filters_pb2.py +++ b/google/cloud/talent_v4beta1/proto/filters_pb2.py @@ -2083,8 +2083,6 @@ DESCRIPTOR=_JOBQUERY, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""The query required to perform a search query. - - Attributes: query: The query string that matches against the job title, @@ -2210,8 +2208,6 @@ DESCRIPTOR=_PROFILEQUERY, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Filters to apply when performing the search query. - - Attributes: query: Keywords to match any text fields of profiles. For example, @@ -2436,8 +2432,6 @@ DESCRIPTOR=_LOCATIONFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Geographic region of the search. - - Attributes: address: The address name, such as "Mountain View" or "Bay Area". @@ -2499,8 +2493,6 @@ DESCRIPTOR=_COMPENSATIONFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Filter on job compensation type and amount. - - Attributes: type: Required. Type of filter. @@ -2526,8 +2518,6 @@ DESCRIPTOR=_COMMUTEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Parameters needed for commute search. - - Attributes: commute_method: Required. The method of transportation to calculate the @@ -2569,8 +2559,6 @@ DESCRIPTOR=_JOBTITLEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Job title of the search. - - Attributes: job_title: Required. The job title. For example, "Software engineer", or @@ -2591,8 +2579,6 @@ DESCRIPTOR=_SKILLFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Skill filter of the search. - - Attributes: skill: Required. The skill name. For example, "java", "j2ee", and so @@ -2613,8 +2599,6 @@ DESCRIPTOR=_EMPLOYERFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Employer filter of the search. - - Attributes: employer: Required. The name of the employer, for example "Google", @@ -2640,8 +2624,6 @@ DESCRIPTOR=_EDUCATIONFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Education filter of the search. - - Attributes: school: The school name. For example "MIT", "University of California, @@ -2670,15 +2652,11 @@ dict( DESCRIPTOR=_WORKEXPERIENCEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", - __doc__="""Work experience filter. - - This filter is used to search for profiles with working experience - length between - [min\_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.min\_experience] - and - [max\_experience][google.cloud.talent.v4beta1.WorkExperienceFilter.max\_experience]. - - + __doc__="""Work experience filter. This filter is used to search for profiles + with working experience length between [min\_experience][google.cloud. + talent.v4beta1.WorkExperienceFilter.min\_experience] and [max\_experie + nce][google.cloud.talent.v4beta1.WorkExperienceFilter.max\_experience] + . Attributes: min_experience: The minimum duration of the work experience (inclusive). @@ -2696,18 +2674,12 @@ dict( DESCRIPTOR=_APPLICATIONDATEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", - __doc__="""Application Date Range Filter. - - The API matches profiles with - [Application.application\_date][google.cloud.talent.v4beta1.Application.application\_date] - between start date and end date (both boundaries are inclusive). The - filter is ignored if both - [start\_date][google.cloud.talent.v4beta1.ApplicationDateFilter.start\_date] - and - [end\_date][google.cloud.talent.v4beta1.ApplicationDateFilter.end\_date] - are missing. - - + __doc__="""Application Date Range Filter. The API matches profiles with [Applica + tion.application\_date][google.cloud.talent.v4beta1.Application.applic + ation\_date] between start date and end date (both boundaries are + inclusive). The filter is ignored if both [start\_date][google.cloud.t + alent.v4beta1.ApplicationDateFilter.start\_date] and [end\_date][googl + e.cloud.talent.v4beta1.ApplicationDateFilter.end\_date] are missing. Attributes: start_date: Start date. If it's missing, The API matches profiles with @@ -2728,8 +2700,6 @@ DESCRIPTOR=_APPLICATIONOUTCOMENOTESFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Outcome Notes Filter. - - Attributes: outcome_notes: Required. User entered or selected outcome reason. The API @@ -2753,8 +2723,6 @@ DESCRIPTOR=_APPLICATIONJOBFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Filter on the job information of Application. - - Attributes: job_requisition_id: The job requisition id in the application. The API does an @@ -2783,10 +2751,7 @@ dict( DESCRIPTOR=_TIMEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", - __doc__="""Filter on create timestamp or update timestamp of - profiles. - - + __doc__="""Filter on create timestamp or update timestamp of profiles. Attributes: start_time: Start timestamp, matching profiles with the start time. If @@ -2812,11 +2777,8 @@ dict( DESCRIPTOR=_CANDIDATEAVAILABILITYFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", - __doc__="""Deprecated. Use AvailabilityFilter instead. - - Filter on availability signals. - - + __doc__="""Deprecated. Use AvailabilityFilter instead. Filter on availability + signals. Attributes: negated: It is false by default. If true, API excludes all the @@ -2834,8 +2796,6 @@ DESCRIPTOR=_AVAILABILITYFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Filter on availability signals. - - Attributes: signal_type: Required. Type of signal to apply filter on. @@ -2861,8 +2821,6 @@ DESCRIPTOR=_PERSONNAMEFILTER, __module__="google.cloud.talent_v4beta1.proto.filters_pb2", __doc__="""Filter on person name. - - Attributes: person_name: Required. The person name. For example, "John Smith". Can be diff --git a/google/cloud/talent_v4beta1/proto/histogram.proto b/google/cloud/talent_v4beta1/proto/histogram.proto index 467f8345..10938690 100644 --- a/google/cloud/talent_v4beta1/proto/histogram.proto +++ b/google/cloud/talent_v4beta1/proto/histogram.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/histogram_pb2.py b/google/cloud/talent_v4beta1/proto/histogram_pb2.py index bf7d1385..493a2043 100644 --- a/google/cloud/talent_v4beta1/proto/histogram_pb2.py +++ b/google/cloud/talent_v4beta1/proto/histogram_pb2.py @@ -198,8 +198,6 @@ DESCRIPTOR=_HISTOGRAMQUERY, __module__="google.cloud.talent_v4beta1.proto.histogram_pb2", __doc__="""The histogram request. - - Attributes: histogram_query: An expression specifies a histogram request against matching @@ -232,8 +230,6 @@ __doc__="""Histogram result that matches [HistogramQuery][google.cloud.talent.v4beta1.HistogramQuery] specified in searches. - - Attributes: histogram_query: Requested histogram expression. diff --git a/google/cloud/talent_v4beta1/proto/job.proto b/google/cloud/talent_v4beta1/proto/job.proto index 3746fa86..b2ffa2bc 100644 --- a/google/cloud/talent_v4beta1/proto/job.proto +++ b/google/cloud/talent_v4beta1/proto/job.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -36,8 +35,8 @@ option objc_class_prefix = "CTS"; message Job { option (google.api.resource) = { type: "jobs.googleapis.com/Job" - pattern: "projects/{project}/jobs/{job}" pattern: "projects/{project}/tenants/{tenant}/jobs/{job}" + pattern: "projects/{project}/jobs/{job}" }; // Application related details of a job posting. diff --git a/google/cloud/talent_v4beta1/proto/job_pb2.py b/google/cloud/talent_v4beta1/proto/job_pb2.py index 5c06289e..111a08a8 100644 --- a/google/cloud/talent_v4beta1/proto/job_pb2.py +++ b/google/cloud/talent_v4beta1/proto/job_pb2.py @@ -33,7 +33,7 @@ "\n\037com.google.cloud.talent.v4beta1B\020JobResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - "\n+google/cloud/talent_v4beta1/proto/job.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\x1a\x1cgoogle/api/annotations.proto\"\xe0\x0f\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x07\x63ompany\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12\x1b\n\x0erequisition_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\taddresses\x18\x06 \x03(\t\x12J\n\x10\x61pplication_info\x18\x07 \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Job.ApplicationInfo\x12=\n\x0cjob_benefits\x18\x08 \x03(\x0e\x32'.google.cloud.talent.v4beta1.JobBenefit\x12H\n\x11\x63ompensation_info\x18\t \x01(\x0b\x32-.google.cloud.talent.v4beta1.CompensationInfo\x12Q\n\x11\x63ustom_attributes\x18\n \x03(\x0b\x32\x36.google.cloud.talent.v4beta1.Job.CustomAttributesEntry\x12=\n\x0c\x64\x65gree_types\x18\x0b \x03(\x0e\x32'.google.cloud.talent.v4beta1.DegreeType\x12\x12\n\ndepartment\x18\x0c \x01(\t\x12\x45\n\x10\x65mployment_types\x18\r \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x12\n\nincentives\x18\x0e \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12\x38\n\tjob_level\x18\x10 \x01(\x0e\x32%.google.cloud.talent.v4beta1.JobLevel\x12\x17\n\x0fpromotion_value\x18\x11 \x01(\x05\x12\x16\n\x0equalifications\x18\x12 \x01(\t\x12\x18\n\x10responsibilities\x18\x13 \x01(\t\x12\x42\n\x0eposting_region\x18\x14 \x01(\x0e\x32*.google.cloud.talent.v4beta1.PostingRegion\x12?\n\nvisibility\x18\x15 \x01(\x0e\x32'.google.cloud.talent.v4beta1.VisibilityB\x02\x18\x01\x12\x32\n\x0ejob_start_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cjob_end_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14posting_publish_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13posting_expire_time\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x13posting_create_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13posting_update_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14\x63ompany_display_name\x18\x1c \x01(\tB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65rived_info\x18\x1d \x01(\x0b\x32,.google.cloud.talent.v4beta1.Job.DerivedInfoB\x03\xe0\x41\x03\x12N\n\x12processing_options\x18\x1e \x01(\x0b\x32\x32.google.cloud.talent.v4beta1.Job.ProcessingOptions\x1a\x44\n\x0f\x41pplicationInfo\x12\x0e\n\x06\x65mails\x18\x01 \x03(\t\x12\x13\n\x0binstruction\x18\x02 \x01(\t\x12\x0c\n\x04uris\x18\x03 \x03(\t\x1a\x89\x01\n\x0b\x44\x65rivedInfo\x12\x38\n\tlocations\x18\x01 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12@\n\x0ejob_categories\x18\x03 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x1a\x88\x01\n\x11ProcessingOptions\x12)\n!disable_street_address_resolution\x18\x01 \x01(\x08\x12H\n\x11html_sanitization\x18\x02 \x01(\x0e\x32-.google.cloud.talent.v4beta1.HtmlSanitization\x1a\x65\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.CustomAttribute:\x02\x38\x01:k\xea\x41h\n\x17jobs.googleapis.com/Job\x12\x1dprojects/{project}/jobs/{job}\x12.projects/{project}/tenants/{tenant}/jobs/{job}B~\n\x1f\x63om.google.cloud.talent.v4beta1B\x10JobResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3" + "\n+google/cloud/talent_v4beta1/proto/job.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\x1a\x1cgoogle/api/annotations.proto\"\xe0\x0f\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x07\x63ompany\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Company\x12\x1b\n\x0erequisition_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\taddresses\x18\x06 \x03(\t\x12J\n\x10\x61pplication_info\x18\x07 \x01(\x0b\x32\x30.google.cloud.talent.v4beta1.Job.ApplicationInfo\x12=\n\x0cjob_benefits\x18\x08 \x03(\x0e\x32'.google.cloud.talent.v4beta1.JobBenefit\x12H\n\x11\x63ompensation_info\x18\t \x01(\x0b\x32-.google.cloud.talent.v4beta1.CompensationInfo\x12Q\n\x11\x63ustom_attributes\x18\n \x03(\x0b\x32\x36.google.cloud.talent.v4beta1.Job.CustomAttributesEntry\x12=\n\x0c\x64\x65gree_types\x18\x0b \x03(\x0e\x32'.google.cloud.talent.v4beta1.DegreeType\x12\x12\n\ndepartment\x18\x0c \x01(\t\x12\x45\n\x10\x65mployment_types\x18\r \x03(\x0e\x32+.google.cloud.talent.v4beta1.EmploymentType\x12\x12\n\nincentives\x18\x0e \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12\x38\n\tjob_level\x18\x10 \x01(\x0e\x32%.google.cloud.talent.v4beta1.JobLevel\x12\x17\n\x0fpromotion_value\x18\x11 \x01(\x05\x12\x16\n\x0equalifications\x18\x12 \x01(\t\x12\x18\n\x10responsibilities\x18\x13 \x01(\t\x12\x42\n\x0eposting_region\x18\x14 \x01(\x0e\x32*.google.cloud.talent.v4beta1.PostingRegion\x12?\n\nvisibility\x18\x15 \x01(\x0e\x32'.google.cloud.talent.v4beta1.VisibilityB\x02\x18\x01\x12\x32\n\x0ejob_start_time\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cjob_end_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14posting_publish_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13posting_expire_time\x18\x19 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x13posting_create_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13posting_update_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12!\n\x14\x63ompany_display_name\x18\x1c \x01(\tB\x03\xe0\x41\x03\x12G\n\x0c\x64\x65rived_info\x18\x1d \x01(\x0b\x32,.google.cloud.talent.v4beta1.Job.DerivedInfoB\x03\xe0\x41\x03\x12N\n\x12processing_options\x18\x1e \x01(\x0b\x32\x32.google.cloud.talent.v4beta1.Job.ProcessingOptions\x1a\x44\n\x0f\x41pplicationInfo\x12\x0e\n\x06\x65mails\x18\x01 \x03(\t\x12\x13\n\x0binstruction\x18\x02 \x01(\t\x12\x0c\n\x04uris\x18\x03 \x03(\t\x1a\x89\x01\n\x0b\x44\x65rivedInfo\x12\x38\n\tlocations\x18\x01 \x03(\x0b\x32%.google.cloud.talent.v4beta1.Location\x12@\n\x0ejob_categories\x18\x03 \x03(\x0e\x32(.google.cloud.talent.v4beta1.JobCategory\x1a\x88\x01\n\x11ProcessingOptions\x12)\n!disable_street_address_resolution\x18\x01 \x01(\x08\x12H\n\x11html_sanitization\x18\x02 \x01(\x0e\x32-.google.cloud.talent.v4beta1.HtmlSanitization\x1a\x65\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.CustomAttribute:\x02\x38\x01:k\xea\x41h\n\x17jobs.googleapis.com/Job\x12.projects/{project}/tenants/{tenant}/jobs/{job}\x12\x1dprojects/{project}/jobs/{job}B~\n\x1f\x63om.google.cloud.talent.v4beta1B\x10JobResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3" ), dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -847,7 +847,7 @@ ], enum_types=[], serialized_options=_b( - "\352Ah\n\027jobs.googleapis.com/Job\022\035projects/{project}/jobs/{job}\022.projects/{project}/tenants/{tenant}/jobs/{job}" + "\352Ah\n\027jobs.googleapis.com/Job\022.projects/{project}/tenants/{tenant}/jobs/{job}\022\035projects/{project}/jobs/{job}" ), is_extendable=False, syntax="proto3", @@ -944,8 +944,6 @@ DESCRIPTOR=_JOB_APPLICATIONINFO, __module__="google.cloud.talent_v4beta1.proto.job_pb2", __doc__="""Application related details of a job posting. - - Attributes: emails: Use this field to specify email address(es) to which resumes @@ -973,8 +971,6 @@ DESCRIPTOR=_JOB_DERIVEDINFO, __module__="google.cloud.talent_v4beta1.proto.job_pb2", __doc__="""Derived details about the job posting. - - Attributes: locations: Structured locations of the job, resolved from @@ -998,8 +994,6 @@ DESCRIPTOR=_JOB_PROCESSINGOPTIONS, __module__="google.cloud.talent_v4beta1.proto.job_pb2", __doc__="""Options for job processing. - - Attributes: disable_street_address_resolution: If set to ``true``, the service does not attempt to resolve a @@ -1026,12 +1020,10 @@ ), DESCRIPTOR=_JOB, __module__="google.cloud.talent_v4beta1.proto.job_pb2", - __doc__="""A Job resource represents a job posting (also referred to - as a "job listing" or "job requisition"). A job belongs to a + __doc__="""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.v4beta1.Company], which is the hiring entity responsible for the job. - - Attributes: name: Required during job update. The resource name for the job. diff --git a/google/cloud/talent_v4beta1/proto/job_service.proto b/google/cloud/talent_v4beta1/proto/job_service.proto index e2216aa6..148e6486 100644 --- a/google/cloud/talent_v4beta1/proto/job_service.proto +++ b/google/cloud/talent_v4beta1/proto/job_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -435,10 +434,10 @@ message SearchJobsRequest { // 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. + // 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. // @@ -648,8 +647,6 @@ message SearchJobsRequest { // // The maximum allowed value is 5000. Otherwise an error is thrown. // - // 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 diff --git a/google/cloud/talent_v4beta1/proto/job_service_pb2.py b/google/cloud/talent_v4beta1/proto/job_service_pb2.py index 014959dc..0a88e2d7 100644 --- a/google/cloud/talent_v4beta1/proto/job_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/job_service_pb2.py @@ -1706,8 +1706,6 @@ DESCRIPTOR=_CREATEJOBREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Create job request. - - Attributes: parent: Required. The resource name of the tenant under which the job @@ -1730,8 +1728,6 @@ DESCRIPTOR=_GETJOBREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Get job request. - - Attributes: name: Required. The resource name of the job to retrieve. The @@ -1753,8 +1749,6 @@ DESCRIPTOR=_UPDATEJOBREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Update job request. - - Attributes: job: Required. The Job to be updated. @@ -1779,8 +1773,6 @@ DESCRIPTOR=_DELETEJOBREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Delete job request. - - Attributes: name: Required. The resource name of the job to be deleted. The @@ -1802,8 +1794,6 @@ DESCRIPTOR=_BATCHDELETEJOBSREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Batch delete jobs request. - - Attributes: parent: Required. The resource name of the tenant under which the job @@ -1830,8 +1820,6 @@ DESCRIPTOR=_LISTJOBSREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""List jobs request. - - Attributes: parent: Required. The resource name of the tenant under which the job @@ -1879,8 +1867,6 @@ DESCRIPTOR=_LISTJOBSRESPONSE, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""List jobs response. - - Attributes: jobs: The Jobs for a given company. The maximum number of items @@ -1908,8 +1894,6 @@ __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Custom ranking information for [SearchJobsRequest][google.cloud.talent.v4beta1.SearchJobsRequest]. - - Attributes: importance_level: Required. Controls over how important the score of [CustomRank @@ -1942,8 +1926,6 @@ DESCRIPTOR=_SEARCHJOBSREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""The Request body of the ``SearchJobs`` call. - - Attributes: parent: Required. The resource name of the tenant to search within. @@ -2073,12 +2055,11 @@ as relevant) in search results. This field is only considered if [page\_token][google.cloud.talent.v4beta1.SearchJobsRequest .page\_token] is unset. The maximum allowed value is 5000. - Otherwise an error is thrown. 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). + 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). page_size: A limit on the number of jobs returned in the search results. Increasing this value above the default value of 10 can @@ -2203,8 +2184,6 @@ __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Job entry with metadata inside [SearchJobsResponse][google.cloud.talent.v4beta1.SearchJobsResponse]. - - Attributes: job: Job resource that matches the specified [SearchJobsRequest][go @@ -2238,8 +2217,6 @@ DESCRIPTOR=_SEARCHJOBSRESPONSE_COMMUTEINFO, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Commute details related to this job. - - Attributes: job_location: Location used as the destination in the commute calculation. @@ -2255,8 +2232,6 @@ DESCRIPTOR=_SEARCHJOBSRESPONSE, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Response for SearchJob method. - - Attributes: matching_jobs: The Job entities that match the specified [SearchJobsRequest][ @@ -2318,8 +2293,6 @@ DESCRIPTOR=_BATCHCREATEJOBSREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Request to create a batch of jobs. - - Attributes: parent: Required. The resource name of the tenant under which the job @@ -2342,8 +2315,6 @@ DESCRIPTOR=_BATCHUPDATEJOBSREQUEST, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Request to update a batch of jobs. - - Attributes: parent: Required. The resource name of the tenant under which the job @@ -2386,8 +2357,6 @@ DESCRIPTOR=_JOBOPERATIONRESULT_JOBRESULT, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", __doc__="""Mutation result of a job. - - Attributes: job: Here [Job][google.cloud.talent.v4beta1.Job] only contains @@ -2408,15 +2377,11 @@ ), DESCRIPTOR=_JOBOPERATIONRESULT, __module__="google.cloud.talent_v4beta1.proto.job_service_pb2", - __doc__="""The result of - [JobService.BatchCreateJobs][google.cloud.talent.v4beta1.JobService.BatchCreateJobs] - or - [JobService.BatchUpdateJobs][google.cloud.talent.v4beta1.JobService.BatchUpdateJobs] - APIs. It's used to replace - [google.longrunning.Operation.response][google.longrunning.Operation.response] - in case of success. - - + __doc__="""The result of [JobService.BatchCreateJobs][google.cloud.talent.v4beta1 + .JobService.BatchCreateJobs] or [JobService.BatchUpdateJobs][google.cl + oud.talent.v4beta1.JobService.BatchUpdateJobs] APIs. It's used to + replace [google.longrunning.Operation.response][google.longrunning.Ope + ration.response] in case of success. Attributes: job_results: List of job mutation results from a batch mutate operation. It diff --git a/google/cloud/talent_v4beta1/proto/profile.proto b/google/cloud/talent_v4beta1/proto/profile.proto index 16d4e714..e087a8cd 100644 --- a/google/cloud/talent_v4beta1/proto/profile.proto +++ b/google/cloud/talent_v4beta1/proto/profile.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/profile_pb2.py b/google/cloud/talent_v4beta1/proto/profile_pb2.py index eea799af..91c3e47e 100644 --- a/google/cloud/talent_v4beta1/proto/profile_pb2.py +++ b/google/cloud/talent_v4beta1/proto/profile_pb2.py @@ -2821,10 +2821,8 @@ ), DESCRIPTOR=_PROFILE, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""A resource that represents the profile for a job candidate - (also referred to as a "single-source profile"). - - + __doc__="""A resource that represents the profile for a job candidate (also + referred to as a "single-source profile"). Attributes: name: Required during profile update. Resource name assigned to a @@ -3044,8 +3042,6 @@ DESCRIPTOR=_AVAILABILITYSIGNAL, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Candidate availability signal. - - Attributes: type: Type of signal. @@ -3076,8 +3072,6 @@ DESCRIPTOR=_RESUME, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a resume. - - Attributes: structured_resume: Users can create a profile with only this field field, if [res @@ -3111,8 +3105,6 @@ DESCRIPTOR=_PERSONNAME_PERSONSTRUCTUREDNAME, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a person's structured name. - - Attributes: given_name: Given/first name. It's derived from [formatted\_name][google. @@ -3140,8 +3132,6 @@ DESCRIPTOR=_PERSONNAME, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents the name of a person. - - Attributes: person_name: The name of a person. It can be one of [formatted\_name][googl @@ -3172,8 +3162,6 @@ DESCRIPTOR=_ADDRESS, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a address. - - Attributes: usage: The usage of the address. For example, SCHOOL, WORK, PERSONAL. @@ -3204,8 +3192,6 @@ DESCRIPTOR=_EMAIL, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a person's email address. - - Attributes: usage: The usage of the email address. For example, SCHOOL, WORK, @@ -3225,8 +3211,6 @@ DESCRIPTOR=_PHONE, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a person's telephone number. - - Attributes: usage: The usage of the phone. For example, SCHOOL, WORK, PERSONAL. @@ -3254,8 +3238,6 @@ DESCRIPTOR=_PERSONALURI, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", __doc__="""Resource that represents a valid URI for a personal use. - - Attributes: uri: The personal URI. Number of characters allowed is 4,000. @@ -3271,10 +3253,8 @@ dict( DESCRIPTOR=_ADDITIONALCONTACTINFO, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents contact information other than - phone, email, URI and addresses. - - + __doc__="""Resource that represents contact information other than phone, email, + URI and addresses. Attributes: usage: The usage of this contact method. For example, SCHOOL, WORK, @@ -3296,10 +3276,7 @@ dict( DESCRIPTOR=_EMPLOYMENTRECORD, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents an employment record of a - candidate. - - + __doc__="""Resource that represents an employment record of a candidate. Attributes: start_date: Start date of the employment. @@ -3358,10 +3335,7 @@ dict( DESCRIPTOR=_EDUCATIONRECORD, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents an education record of a - candidate. - - + __doc__="""Resource that represents an education record of a candidate. Attributes: start_date: The start date of the education. @@ -3415,10 +3389,7 @@ dict( DESCRIPTOR=_DEGREE, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents a degree pursuing or acquired by - a candidate. - - + __doc__="""Resource that represents a degree pursuing or acquired by a candidate. Attributes: degree_type: ISCED degree type. @@ -3440,11 +3411,9 @@ dict( DESCRIPTOR=_ACTIVITY, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents an individual or collaborative - activity participated in by a candidate, for example, an open-source - project, a class assignment, and so on. - - + __doc__="""Resource that represents an individual or collaborative activity + participated in by a candidate, for example, an open-source project, a + class assignment, and so on. Attributes: display_name: Activity display name. Number of characters allowed is 100. @@ -3494,10 +3463,7 @@ dict( DESCRIPTOR=_PUBLICATION, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents a publication resource of a - candidate. - - + __doc__="""Resource that represents a publication resource of a candidate. Attributes: authors: A list of author names. Number of characters allowed is 100. @@ -3533,10 +3499,7 @@ dict( DESCRIPTOR=_PATENT, __module__="google.cloud.talent_v4beta1.proto.profile_pb2", - __doc__="""Resource that represents the patent acquired by a - candidate. - - + __doc__="""Resource that represents the patent acquired by a candidate. Attributes: display_name: Name of the patent. Number of characters allowed is 100. diff --git a/google/cloud/talent_v4beta1/proto/profile_service.proto b/google/cloud/talent_v4beta1/proto/profile_service.proto index f443511e..4a153fd2 100644 --- a/google/cloud/talent_v4beta1/proto/profile_service.proto +++ b/google/cloud/talent_v4beta1/proto/profile_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -109,7 +108,12 @@ message ListProfilesRequest { // // The format is "projects/{project_id}/tenants/{tenant_id}". For example, // "projects/foo/tenants/bar". - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "jobs.googleapis.com/Profile" + } + ]; // The filter string specifies the profiles to be enumerated. // @@ -200,55 +204,6 @@ message UpdateProfileRequest { // A field mask to specify the profile fields to update. // // A full update is performed if it is unset. - // - // Valid values are: - // - // * external_id - // * source - // * source_types - // * uri - // * is_hirable - // * create_time - // * update_time - // * candidate_update_time - // * resume_update_time - // * resume - // * person_names - // * addresses - // * email_addresses - // * phone_numbers - // * personal_uris - // * additional_contact_info - // * employment_records - // * education_records - // * skills - // * activities - // * publications - // * patents - // * certifications - // * recruiting_notes - // * custom_attributes - // * group_id - // * external_system - // * source_note - // * primary_responsibilities - // * citizenships - // * work_authorizations - // * employee_types - // * language_code - // * qualification_summary - // * allowed_contact_types - // * preferred_contact_types - // * contact_availability - // * language_fluencies - // * work_preference - // * industry_experiences - // * work_environment_experiences - // * work_availability - // * security_clearances - // * references - // * assessments - // * interviews google.protobuf.FieldMask update_mask = 2; } diff --git a/google/cloud/talent_v4beta1/proto/profile_service_pb2.py b/google/cloud/talent_v4beta1/proto/profile_service_pb2.py index d471c3ed..6e75800f 100644 --- a/google/cloud/talent_v4beta1/proto/profile_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/profile_service_pb2.py @@ -48,7 +48,7 @@ "\n\037com.google.cloud.talent.v4beta1B\023ProfileServiceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n7google/cloud/talent_v4beta1/proto/profile_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a/google/cloud/talent_v4beta1/proto/filters.proto\x1a\x31google/cloud/talent_v4beta1/proto/histogram.proto\x1a/google/cloud/talent_v4beta1/proto/profile.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto"\x90\x01\n\x13ListProfilesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12-\n\tread_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"g\n\x14ListProfilesResponse\x12\x36\n\x08profiles\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Profile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x86\x01\n\x14\x43reateProfileRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\x12:\n\x07profile\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.ProfileB\x03\xe0\x41\x02"F\n\x11GetProfileRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Profile"\x83\x01\n\x14UpdateProfileRequest\x12:\n\x07profile\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.ProfileB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"I\n\x14\x44\x65leteProfileRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Profile"\xdc\x03\n\x15SearchProfilesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\x12K\n\x10request_metadata\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.RequestMetadataB\x03\xe0\x41\x02\x12@\n\rprofile_query\x18\x03 \x01(\x0b\x32).google.cloud.talent.v4beta1.ProfileQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x1b\n\x13\x64isable_spell_check\x18\x07 \x01(\x08\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12\x1b\n\x13\x63\x61se_sensitive_sort\x18\t \x01(\x08\x12\x46\n\x11histogram_queries\x18\n \x03(\x0b\x32+.google.cloud.talent.v4beta1.HistogramQuery\x12\x15\n\rresult_set_id\x18\x0c \x01(\t\x12\x1e\n\x16strict_keywords_search\x18\r \x01(\x08"\x93\x03\n\x16SearchProfilesResponse\x12\x1c\n\x14\x65stimated_total_size\x18\x01 \x01(\x03\x12I\n\x10spell_correction\x18\x02 \x01(\x0b\x32/.google.cloud.talent.v4beta1.SpellingCorrection\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\t\x12R\n\x17histogram_query_results\x18\x05 \x03(\x0b\x32\x31.google.cloud.talent.v4beta1.HistogramQueryResult\x12K\n\x13summarized_profiles\x18\x06 \x03(\x0b\x32..google.cloud.talent.v4beta1.SummarizedProfile\x12\x15\n\rresult_set_id\x18\x07 \x01(\t"\x82\x01\n\x11SummarizedProfile\x12\x36\n\x08profiles\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Profile\x12\x35\n\x07summary\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.Profile2\x9f\t\n\x0eProfileService\x12\xb5\x01\n\x0cListProfiles\x12\x30.google.cloud.talent.v4beta1.ListProfilesRequest\x1a\x31.google.cloud.talent.v4beta1.ListProfilesResponse"@\x82\xd3\xe4\x93\x02\x31\x12//v4beta1/{parent=projects/*/tenants/*}/profiles\xda\x41\x06parent\x12\xb5\x01\n\rCreateProfile\x12\x31.google.cloud.talent.v4beta1.CreateProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile"K\x82\xd3\xe4\x93\x02\x34"//v4beta1/{parent=projects/*/tenants/*}/profiles:\x01*\xda\x41\x0eparent,profile\x12\xa2\x01\n\nGetProfile\x12..google.cloud.talent.v4beta1.GetProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile">\x82\xd3\xe4\x93\x02\x31\x12//v4beta1/{name=projects/*/tenants/*/profiles/*}\xda\x41\x04name\x12\xb6\x01\n\rUpdateProfile\x12\x31.google.cloud.talent.v4beta1.UpdateProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile"L\x82\xd3\xe4\x93\x02<27/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}:\x01*\xda\x41\x07profile\x12\x9a\x01\n\rDeleteProfile\x12\x31.google.cloud.talent.v4beta1.DeleteProfileRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x31*//v4beta1/{name=projects/*/tenants/*/profiles/*}\xda\x41\x04name\x12\xb3\x01\n\x0eSearchProfiles\x12\x32.google.cloud.talent.v4beta1.SearchProfilesRequest\x1a\x33.google.cloud.talent.v4beta1.SearchProfilesResponse"8\x82\xd3\xe4\x93\x02\x32"-/v4beta1/{parent=projects/*/tenants/*}:search:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x81\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13ProfileServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' + '\n7google/cloud/talent_v4beta1/proto/profile_service.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/talent_v4beta1/proto/common.proto\x1a/google/cloud/talent_v4beta1/proto/filters.proto\x1a\x31google/cloud/talent_v4beta1/proto/histogram.proto\x1a/google/cloud/talent_v4beta1/proto/profile.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto"\xb0\x01\n\x13ListProfilesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bjobs.googleapis.com/Profile\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12-\n\tread_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"g\n\x14ListProfilesResponse\x12\x36\n\x08profiles\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Profile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x86\x01\n\x14\x43reateProfileRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\x12:\n\x07profile\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.ProfileB\x03\xe0\x41\x02"F\n\x11GetProfileRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Profile"\x83\x01\n\x14UpdateProfileRequest\x12:\n\x07profile\x18\x01 \x01(\x0b\x32$.google.cloud.talent.v4beta1.ProfileB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"I\n\x14\x44\x65leteProfileRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bjobs.googleapis.com/Profile"\xdc\x03\n\x15SearchProfilesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1ajobs.googleapis.com/Tenant\x12K\n\x10request_metadata\x18\x02 \x01(\x0b\x32,.google.cloud.talent.v4beta1.RequestMetadataB\x03\xe0\x41\x02\x12@\n\rprofile_query\x18\x03 \x01(\x0b\x32).google.cloud.talent.v4beta1.ProfileQuery\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x0e\n\x06offset\x18\x06 \x01(\x05\x12\x1b\n\x13\x64isable_spell_check\x18\x07 \x01(\x08\x12\x10\n\x08order_by\x18\x08 \x01(\t\x12\x1b\n\x13\x63\x61se_sensitive_sort\x18\t \x01(\x08\x12\x46\n\x11histogram_queries\x18\n \x03(\x0b\x32+.google.cloud.talent.v4beta1.HistogramQuery\x12\x15\n\rresult_set_id\x18\x0c \x01(\t\x12\x1e\n\x16strict_keywords_search\x18\r \x01(\x08"\x93\x03\n\x16SearchProfilesResponse\x12\x1c\n\x14\x65stimated_total_size\x18\x01 \x01(\x03\x12I\n\x10spell_correction\x18\x02 \x01(\x0b\x32/.google.cloud.talent.v4beta1.SpellingCorrection\x12?\n\x08metadata\x18\x03 \x01(\x0b\x32-.google.cloud.talent.v4beta1.ResponseMetadata\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\t\x12R\n\x17histogram_query_results\x18\x05 \x03(\x0b\x32\x31.google.cloud.talent.v4beta1.HistogramQueryResult\x12K\n\x13summarized_profiles\x18\x06 \x03(\x0b\x32..google.cloud.talent.v4beta1.SummarizedProfile\x12\x15\n\rresult_set_id\x18\x07 \x01(\t"\x82\x01\n\x11SummarizedProfile\x12\x36\n\x08profiles\x18\x01 \x03(\x0b\x32$.google.cloud.talent.v4beta1.Profile\x12\x35\n\x07summary\x18\x02 \x01(\x0b\x32$.google.cloud.talent.v4beta1.Profile2\x9f\t\n\x0eProfileService\x12\xb5\x01\n\x0cListProfiles\x12\x30.google.cloud.talent.v4beta1.ListProfilesRequest\x1a\x31.google.cloud.talent.v4beta1.ListProfilesResponse"@\x82\xd3\xe4\x93\x02\x31\x12//v4beta1/{parent=projects/*/tenants/*}/profiles\xda\x41\x06parent\x12\xb5\x01\n\rCreateProfile\x12\x31.google.cloud.talent.v4beta1.CreateProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile"K\x82\xd3\xe4\x93\x02\x34"//v4beta1/{parent=projects/*/tenants/*}/profiles:\x01*\xda\x41\x0eparent,profile\x12\xa2\x01\n\nGetProfile\x12..google.cloud.talent.v4beta1.GetProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile">\x82\xd3\xe4\x93\x02\x31\x12//v4beta1/{name=projects/*/tenants/*/profiles/*}\xda\x41\x04name\x12\xb6\x01\n\rUpdateProfile\x12\x31.google.cloud.talent.v4beta1.UpdateProfileRequest\x1a$.google.cloud.talent.v4beta1.Profile"L\x82\xd3\xe4\x93\x02<27/v4beta1/{profile.name=projects/*/tenants/*/profiles/*}:\x01*\xda\x41\x07profile\x12\x9a\x01\n\rDeleteProfile\x12\x31.google.cloud.talent.v4beta1.DeleteProfileRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x31*//v4beta1/{name=projects/*/tenants/*/profiles/*}\xda\x41\x04name\x12\xb3\x01\n\x0eSearchProfiles\x12\x32.google.cloud.talent.v4beta1.SearchProfilesRequest\x1a\x33.google.cloud.talent.v4beta1.SearchProfilesResponse"8\x82\xd3\xe4\x93\x02\x32"-/v4beta1/{parent=projects/*/tenants/*}:search:\x01*\x1al\xca\x41\x13jobs.googleapis.com\xd2\x41Shttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsB\x81\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13ProfileServiceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -90,7 +90,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=_b( + "\340A\002\372A\035\022\033jobs.googleapis.com/Profile" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -175,7 +177,7 @@ extension_ranges=[], oneofs=[], serialized_start=553, - serialized_end=697, + serialized_end=729, ) @@ -231,8 +233,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=699, - serialized_end=802, + serialized_start=731, + serialized_end=834, ) @@ -288,8 +290,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=805, - serialized_end=939, + serialized_start=837, + serialized_end=971, ) @@ -329,8 +331,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=941, - serialized_end=1011, + serialized_start=973, + serialized_end=1043, ) @@ -386,8 +388,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1014, - serialized_end=1145, + serialized_start=1046, + serialized_end=1177, ) @@ -427,8 +429,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1147, - serialized_end=1220, + serialized_start=1179, + serialized_end=1252, ) @@ -664,8 +666,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1223, - serialized_end=1699, + serialized_start=1255, + serialized_end=1731, ) @@ -811,8 +813,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1702, - serialized_end=2105, + serialized_start=1734, + serialized_end=2137, ) @@ -868,8 +870,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2108, - serialized_end=2238, + serialized_start=2140, + serialized_end=2270, ) _LISTPROFILESREQUEST.fields_by_name[ @@ -954,8 +956,6 @@ DESCRIPTOR=_LISTPROFILESREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""List profiles request. - - Attributes: parent: Required. The resource name of the tenant under which the @@ -996,8 +996,6 @@ DESCRIPTOR=_LISTPROFILESRESPONSE, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""The List profiles response object. - - Attributes: profiles: Profiles for the specific tenant. @@ -1017,8 +1015,6 @@ DESCRIPTOR=_CREATEPROFILEREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""Create profile request. - - Attributes: parent: Required. The name of the tenant this profile belongs to. The @@ -1039,8 +1035,6 @@ DESCRIPTOR=_GETPROFILEREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""Get profile request. - - Attributes: name: Required. Resource name of the profile to get. The format is @@ -1059,30 +1053,12 @@ DESCRIPTOR=_UPDATEPROFILEREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""Update profile request - - Attributes: profile: Required. Profile to be updated. update_mask: A field mask to specify the profile fields to update. A full - update is performed if it is unset. Valid values are: - - external\_id - source - source\_types - uri - is\_hirable - - create\_time - update\_time - candidate\_update\_time - - resume\_update\_time - resume - person\_names - addresses - - email\_addresses - phone\_numbers - personal\_uris - - additional\_contact\_info - employment\_records - - education\_records - skills - activities - publications - - patents - certifications - recruiting\_notes - - custom\_attributes - group\_id - external\_system - - source\_note - primary\_responsibilities - citizenships - - work\_authorizations - employee\_types - language\_code - - qualification\_summary - allowed\_contact\_types - - preferred\_contact\_types - contact\_availability - - language\_fluencies - work\_preference - - industry\_experiences - work\_environment\_experiences - - work\_availability - security\_clearances - references - - assessments - interviews + update is performed if it is unset. """, # @@protoc_insertion_point(class_scope:google.cloud.talent.v4beta1.UpdateProfileRequest) ), @@ -1096,8 +1072,6 @@ DESCRIPTOR=_DELETEPROFILEREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""Delete profile request. - - Attributes: name: Required. Resource name of the profile to be deleted. The @@ -1117,8 +1091,6 @@ DESCRIPTOR=_SEARCHPROFILESREQUEST, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""The request body of the ``SearchProfiles`` call. - - Attributes: parent: Required. The resource name of the tenant to search within. @@ -1308,8 +1280,6 @@ DESCRIPTOR=_SEARCHPROFILESRESPONSE, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", __doc__="""Response of SearchProfiles method. - - Attributes: estimated_total_size: An estimation of the number of profiles that match the @@ -1345,10 +1315,8 @@ dict( DESCRIPTOR=_SUMMARIZEDPROFILE, __module__="google.cloud.talent_v4beta1.proto.profile_service_pb2", - __doc__="""Profile entry with metadata inside - [SearchProfilesResponse][google.cloud.talent.v4beta1.SearchProfilesResponse]. - - + __doc__="""Profile entry with metadata inside [SearchProfilesResponse][google.clo + ud.talent.v4beta1.SearchProfilesResponse]. Attributes: profiles: A list of profiles that are linked by [Profile.group\_id][goog @@ -1392,8 +1360,8 @@ serialized_options=_b( "\312A\023jobs.googleapis.com\322AShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobs" ), - serialized_start=2241, - serialized_end=3424, + serialized_start=2273, + serialized_end=3456, methods=[ _descriptor.MethodDescriptor( name="ListProfiles", diff --git a/google/cloud/talent_v4beta1/proto/tenant.proto b/google/cloud/talent_v4beta1/proto/tenant.proto index d0e7d585..0328c143 100644 --- a/google/cloud/talent_v4beta1/proto/tenant.proto +++ b/google/cloud/talent_v4beta1/proto/tenant.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; @@ -27,11 +26,6 @@ option java_multiple_files = true; option java_outer_classname = "TenantResourceProto"; option java_package = "com.google.cloud.talent.v4beta1"; option objc_class_prefix = "CTS"; -option (google.api.resource_definition) = { - type: "jobs.googleapis.com/TenantOrProject" - pattern: "projects/{project}/tenants/{tenant}" - pattern: "projects/{project}" -}; // 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 diff --git a/google/cloud/talent_v4beta1/proto/tenant_pb2.py b/google/cloud/talent_v4beta1/proto/tenant_pb2.py index e59556c1..0deb09de 100644 --- a/google/cloud/talent_v4beta1/proto/tenant_pb2.py +++ b/google/cloud/talent_v4beta1/proto/tenant_pb2.py @@ -26,10 +26,10 @@ package="google.cloud.talent.v4beta1", syntax="proto3", serialized_options=_b( - "\n\037com.google.cloud.talent.v4beta1B\023TenantResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS\352A^\n#jobs.googleapis.com/TenantOrProject\022#projects/{project}/tenants/{tenant}\022\022projects/{project}" + "\n\037com.google.cloud.talent.v4beta1B\023TenantResourceProtoP\001ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\242\002\003CTS" ), serialized_pb=_b( - '\n.google/cloud/talent_v4beta1/proto/tenant.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xc3\x02\n\x06Tenant\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nusage_type\x18\x03 \x01(\x0e\x32\x31.google.cloud.talent.v4beta1.Tenant.DataUsageType\x12\x34\n,keyword_searchable_profile_custom_attributes\x18\x04 \x03(\t"N\n\rDataUsageType\x12\x1f\n\x1b\x44\x41TA_USAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nAGGREGATED\x10\x01\x12\x0c\n\x08ISOLATED\x10\x02:D\xea\x41\x41\n\x1ajobs.googleapis.com/Tenant\x12#projects/{project}/tenants/{tenant}B\xe2\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13TenantResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TS\xea\x41^\n#jobs.googleapis.com/TenantOrProject\x12#projects/{project}/tenants/{tenant}\x12\x12projects/{project}b\x06proto3' + '\n.google/cloud/talent_v4beta1/proto/tenant.proto\x12\x1bgoogle.cloud.talent.v4beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xc3\x02\n\x06Tenant\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x65xternal_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\nusage_type\x18\x03 \x01(\x0e\x32\x31.google.cloud.talent.v4beta1.Tenant.DataUsageType\x12\x34\n,keyword_searchable_profile_custom_attributes\x18\x04 \x03(\t"N\n\rDataUsageType\x12\x1f\n\x1b\x44\x41TA_USAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nAGGREGATED\x10\x01\x12\x0c\n\x08ISOLATED\x10\x02:D\xea\x41\x41\n\x1ajobs.googleapis.com/Tenant\x12#projects/{project}/tenants/{tenant}B\x81\x01\n\x1f\x63om.google.cloud.talent.v4beta1B\x13TenantResourceProtoP\x01ZAgoogle.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent\xa2\x02\x03\x43TSb\x06proto3' ), dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -173,12 +173,10 @@ dict( DESCRIPTOR=_TENANT, __module__="google.cloud.talent_v4beta1.proto.tenant_pb2", - __doc__="""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 profiles. Customer may create multiple - tenants to provide data isolation for different groups. - - + __doc__="""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 profiles. Customer may create multiple tenants to + provide data isolation for different groups. Attributes: name: Required during tenant update. The resource name for a diff --git a/google/cloud/talent_v4beta1/proto/tenant_service.proto b/google/cloud/talent_v4beta1/proto/tenant_service.proto index ab1dd2f5..3eb260d8 100644 --- a/google/cloud/talent_v4beta1/proto/tenant_service.proto +++ b/google/cloud/talent_v4beta1/proto/tenant_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // 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"; diff --git a/google/cloud/talent_v4beta1/proto/tenant_service_pb2.py b/google/cloud/talent_v4beta1/proto/tenant_service_pb2.py index e78c087c..ca761c6f 100644 --- a/google/cloud/talent_v4beta1/proto/tenant_service_pb2.py +++ b/google/cloud/talent_v4beta1/proto/tenant_service_pb2.py @@ -429,8 +429,6 @@ DESCRIPTOR=_CREATETENANTREQUEST, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""The Request of the CreateTenant method. - - Attributes: parent: Required. Resource name of the project under which the tenant @@ -451,8 +449,6 @@ DESCRIPTOR=_GETTENANTREQUEST, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""Request for getting a tenant by name. - - Attributes: name: Required. The resource name of the tenant to be retrieved. @@ -471,8 +467,6 @@ DESCRIPTOR=_UPDATETENANTREQUEST, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""Request for updating a specified tenant. - - Attributes: tenant: Required. The tenant resource to replace the current resource @@ -499,8 +493,6 @@ DESCRIPTOR=_DELETETENANTREQUEST, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""Request to delete a tenant. - - Attributes: name: Required. The resource name of the tenant to be deleted. The @@ -519,8 +511,6 @@ DESCRIPTOR=_LISTTENANTSREQUEST, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""List tenants for which the client has ACL visibility. - - Attributes: parent: Required. Resource name of the project under which the tenant @@ -544,8 +534,6 @@ DESCRIPTOR=_LISTTENANTSRESPONSE, __module__="google.cloud.talent_v4beta1.proto.tenant_service_pb2", __doc__="""The List tenants response object. - - Attributes: tenants: Tenants for the current client. diff --git a/noxfile.py b/noxfile.py index 27cdbc51..50ae41bf 100644 --- a/noxfile.py +++ b/noxfile.py @@ -72,6 +72,7 @@ def default(session): session.run( "py.test", "--quiet", + "--cov=google.cloud.talent", "--cov=google.cloud", "--cov=tests.unit", "--cov-append", @@ -109,8 +110,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install("mock", "pytest") - + session.install("mock", "pytest", "google-cloud-testutils") session.install("-e", ".") # Run py.test against the system tests. @@ -138,7 +138,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/setup.cfg b/setup.cfg index 3bd55550..c3a2b39f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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 synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/synth.metadata b/synth.metadata index e3924de6..d37d2e20 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,32 @@ { - "updateTime": "2020-02-01T05:12:59.985982Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/python-talent", + "sha": "820ed8b6dcb94f08b45563872009c55cf52012a5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b5cbe4a4ba64ab19e6627573ff52057a1657773d", - "internalRef": "292647187", - "log": "b5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\n" + "sha": "756b174de4a122461993c1c583345533d819936d", + "internalRef": "308824110" } }, { - "template": { - "name": "python_split_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "01b6f23d24b27878b48667ce597876d66b59780e" } } ], diff --git a/synth.py b/synth.py index 538917af..d145da5f 100644 --- a/synth.py +++ b/synth.py @@ -34,7 +34,7 @@ # ---------------------------------------------------------------------------- # Add templated files # ---------------------------------------------------------------------------- -templated_files = common.py_library(unit_cov_level=97, cov_level=100) +templated_files = common.py_library(cov_level=83) s.move(templated_files) s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/tests/unit/gapic/v4beta1/test_application_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_application_service_client_v4beta1.py index f4b617e0..d2d75eda 100644 --- a/tests/unit/gapic/v4beta1/test_application_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_application_service_client_v4beta1.py @@ -62,6 +62,41 @@ class CustomException(Exception): class TestApplicationServiceClient(object): + def test_delete_application(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ApplicationServiceClient() + + # Setup Request + name = client.application_path( + "[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]" + ) + + client.delete_application(name) + + assert len(channel.requests) == 1 + expected_request = application_service_pb2.DeleteApplicationRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_application_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ApplicationServiceClient() + + # Setup request + name = client.application_path( + "[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]" + ) + + with pytest.raises(CustomException): + client.delete_application(name) + def test_create_application(self): # Setup Expected Response name = "name3373707" @@ -228,41 +263,6 @@ def test_update_application_exception(self): with pytest.raises(CustomException): client.update_application(application) - def test_delete_application(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ApplicationServiceClient() - - # Setup Request - name = client.application_path( - "[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]" - ) - - client.delete_application(name) - - assert len(channel.requests) == 1 - expected_request = application_service_pb2.DeleteApplicationRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_application_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ApplicationServiceClient() - - # Setup request - name = client.application_path( - "[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]" - ) - - with pytest.raises(CustomException): - client.delete_application(name) - def test_list_applications(self): # Setup Expected Response next_page_token = "" diff --git a/tests/unit/gapic/v4beta1/test_company_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_company_service_client_v4beta1.py index 0d2259a2..54eaf6f0 100644 --- a/tests/unit/gapic/v4beta1/test_company_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_company_service_client_v4beta1.py @@ -62,6 +62,37 @@ class CustomException(Exception): class TestCompanyServiceClient(object): + def test_delete_company(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.CompanyServiceClient() + + # Setup Request + name = client.company_path("[PROJECT]", "[TENANT]", "[COMPANY]") + + client.delete_company(name) + + assert len(channel.requests) == 1 + expected_request = company_service_pb2.DeleteCompanyRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_company_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.CompanyServiceClient() + + # Setup request + name = client.company_path("[PROJECT]", "[TENANT]", "[COMPANY]") + + with pytest.raises(CustomException): + client.delete_company(name) + def test_create_company(self): # Setup Expected Response name = "name3373707" @@ -96,7 +127,7 @@ def test_create_company(self): client = talent_v4beta1.CompanyServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") company = {} response = client.create_company(parent, company) @@ -118,7 +149,7 @@ def test_create_company_exception(self): client = talent_v4beta1.CompanyServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") company = {} with pytest.raises(CustomException): @@ -240,37 +271,6 @@ def test_update_company_exception(self): with pytest.raises(CustomException): client.update_company(company) - def test_delete_company(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.CompanyServiceClient() - - # Setup Request - name = client.company_path("[PROJECT]", "[TENANT]", "[COMPANY]") - - client.delete_company(name) - - assert len(channel.requests) == 1 - expected_request = company_service_pb2.DeleteCompanyRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_company_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.CompanyServiceClient() - - # Setup request - name = client.company_path("[PROJECT]", "[TENANT]", "[COMPANY]") - - with pytest.raises(CustomException): - client.delete_company(name) - def test_list_companies(self): # Setup Expected Response next_page_token = "" @@ -289,7 +289,7 @@ def test_list_companies(self): client = talent_v4beta1.CompanyServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") paged_list_response = client.list_companies(parent) resources = list(paged_list_response) @@ -310,7 +310,7 @@ def test_list_companies_exception(self): client = talent_v4beta1.CompanyServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") paged_list_response = client.list_companies(parent) with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v4beta1/test_completion_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_completion_client_v4beta1.py index 0e66aff0..839fdd46 100644 --- a/tests/unit/gapic/v4beta1/test_completion_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_completion_client_v4beta1.py @@ -75,7 +75,7 @@ def test_complete_query(self): client = talent_v4beta1.CompletionClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") query = "query107944136" page_size = 883849137 @@ -98,7 +98,7 @@ def test_complete_query_exception(self): client = talent_v4beta1.CompletionClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") query = "query107944136" page_size = 883849137 diff --git a/tests/unit/gapic/v4beta1/test_event_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_event_service_client_v4beta1.py index ca2b4336..fd61a053 100644 --- a/tests/unit/gapic/v4beta1/test_event_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_event_service_client_v4beta1.py @@ -81,7 +81,7 @@ def test_create_client_event(self): client = talent_v4beta1.EventServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") client_event = {} response = client.create_client_event(parent, client_event) @@ -103,7 +103,7 @@ def test_create_client_event_exception(self): client = talent_v4beta1.EventServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") client_event = {} with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v4beta1/test_job_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_job_service_client_v4beta1.py index 98272c5d..13798f9b 100644 --- a/tests/unit/gapic/v4beta1/test_job_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_job_service_client_v4beta1.py @@ -66,6 +66,37 @@ class CustomException(Exception): class TestJobServiceClient(object): + def test_delete_job(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.JobServiceClient() + + # Setup Request + name = client.job_path("[PROJECT]", "[TENANT]", "[JOB]") + + client.delete_job(name) + + assert len(channel.requests) == 1 + expected_request = job_service_pb2.DeleteJobRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_job_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.JobServiceClient() + + # Setup request + name = client.job_path("[PROJECT]", "[TENANT]", "[JOB]") + + with pytest.raises(CustomException): + client.delete_job(name) + def test_create_job(self): # Setup Expected Response name = "name3373707" @@ -104,7 +135,7 @@ def test_create_job(self): client = talent_v4beta1.JobServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") job = {} response = client.create_job(parent, job) @@ -124,12 +155,66 @@ def test_create_job_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") job = {} with pytest.raises(CustomException): client.create_job(parent, job) + def test_batch_create_jobs(self): + # Setup Expected Response + expected_response = {} + expected_response = job_service_pb2.JobOperationResult(**expected_response) + operation = operations_pb2.Operation( + name="operations/test_batch_create_jobs", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.JobServiceClient() + + # Setup Request + parent = client.project_path("[PROJECT]") + jobs = [] + + response = client.batch_create_jobs(parent, jobs) + result = response.result() + assert expected_response == result + + assert len(channel.requests) == 1 + expected_request = job_service_pb2.BatchCreateJobsRequest( + parent=parent, jobs=jobs + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_batch_create_jobs_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_batch_create_jobs_exception", done=True + ) + operation.error.CopyFrom(error) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.JobServiceClient() + + # Setup Request + parent = client.project_path("[PROJECT]") + jobs = [] + + response = client.batch_create_jobs(parent, jobs) + exception = response.exception() + assert exception.errors[0] == error + def test_get_job(self): # Setup Expected Response name_2 = "name2-1052831874" @@ -168,7 +253,7 @@ def test_get_job(self): client = talent_v4beta1.JobServiceClient() # Setup Request - name = client.job_path("[PROJECT]", "[TENANT]", "[JOBS]") + name = client.job_path("[PROJECT]", "[TENANT]", "[JOB]") response = client.get_job(name) assert expected_response == response @@ -187,7 +272,7 @@ def test_get_job_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - name = client.job_path("[PROJECT]", "[TENANT]", "[JOBS]") + name = client.job_path("[PROJECT]", "[TENANT]", "[JOB]") with pytest.raises(CustomException): client.get_job(name) @@ -254,70 +339,82 @@ def test_update_job_exception(self): with pytest.raises(CustomException): client.update_job(job) - def test_delete_job(self): - channel = ChannelStub() + def test_batch_update_jobs(self): + # Setup Expected Response + expected_response = {} + expected_response = job_service_pb2.JobOperationResult(**expected_response) + operation = operations_pb2.Operation( + name="operations/test_batch_update_jobs", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = talent_v4beta1.JobServiceClient() # Setup Request - name = client.job_path("[PROJECT]", "[TENANT]", "[JOBS]") + parent = client.project_path("[PROJECT]") + jobs = [] - client.delete_job(name) + response = client.batch_update_jobs(parent, jobs) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = job_service_pb2.DeleteJobRequest(name=name) + expected_request = job_service_pb2.BatchUpdateJobsRequest( + parent=parent, jobs=jobs + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_job_exception(self): + def test_batch_update_jobs_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_batch_update_jobs_exception", done=True + ) + operation.error.CopyFrom(error) + # Mock the API response - channel = ChannelStub(responses=[CustomException()]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = talent_v4beta1.JobServiceClient() - # Setup request - name = client.job_path("[PROJECT]", "[TENANT]", "[JOBS]") - - with pytest.raises(CustomException): - client.delete_job(name) + # Setup Request + parent = client.project_path("[PROJECT]") + jobs = [] - def test_list_jobs(self): - # Setup Expected Response - next_page_token = "" - jobs_element = {} - jobs = [jobs_element] - expected_response = {"next_page_token": next_page_token, "jobs": jobs} - expected_response = job_service_pb2.ListJobsResponse(**expected_response) + response = client.batch_update_jobs(parent, jobs) + exception = response.exception() + assert exception.errors[0] == error - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_batch_delete_jobs(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = talent_v4beta1.JobServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") filter_ = "filter-1274492040" - paged_list_response = client.list_jobs(parent, filter_) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.jobs[0] == resources[0] + client.batch_delete_jobs(parent, filter_) assert len(channel.requests) == 1 - expected_request = job_service_pb2.ListJobsRequest( + expected_request = job_service_pb2.BatchDeleteJobsRequest( parent=parent, filter=filter_ ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_jobs_exception(self): + def test_batch_delete_jobs_exception(self): + # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -325,35 +422,45 @@ def test_list_jobs_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") filter_ = "filter-1274492040" - paged_list_response = client.list_jobs(parent, filter_) with pytest.raises(CustomException): - list(paged_list_response) + client.batch_delete_jobs(parent, filter_) - def test_batch_delete_jobs(self): - channel = ChannelStub() + def test_list_jobs(self): + # Setup Expected Response + next_page_token = "" + jobs_element = {} + jobs = [jobs_element] + expected_response = {"next_page_token": next_page_token, "jobs": jobs} + expected_response = job_service_pb2.ListJobsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = talent_v4beta1.JobServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") filter_ = "filter-1274492040" - client.batch_delete_jobs(parent, filter_) + paged_list_response = client.list_jobs(parent, filter_) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.jobs[0] == resources[0] assert len(channel.requests) == 1 - expected_request = job_service_pb2.BatchDeleteJobsRequest( + expected_request = job_service_pb2.ListJobsRequest( parent=parent, filter=filter_ ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_batch_delete_jobs_exception(self): - # Mock the API response + def test_list_jobs_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -361,11 +468,12 @@ def test_batch_delete_jobs_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") filter_ = "filter-1274492040" + paged_list_response = client.list_jobs(parent, filter_) with pytest.raises(CustomException): - client.batch_delete_jobs(parent, filter_) + list(paged_list_response) def test_search_jobs(self): # Setup Expected Response @@ -392,7 +500,7 @@ def test_search_jobs(self): client = talent_v4beta1.JobServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") request_metadata = {} paged_list_response = client.search_jobs(parent, request_metadata) @@ -416,7 +524,7 @@ def test_search_jobs_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") request_metadata = {} paged_list_response = client.search_jobs(parent, request_metadata) @@ -448,7 +556,7 @@ def test_search_jobs_for_alert(self): client = talent_v4beta1.JobServiceClient() # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") request_metadata = {} paged_list_response = client.search_jobs_for_alert(parent, request_metadata) @@ -472,117 +580,9 @@ def test_search_jobs_for_alert_exception(self): client = talent_v4beta1.JobServiceClient() # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") + parent = client.project_path("[PROJECT]") request_metadata = {} paged_list_response = client.search_jobs_for_alert(parent, request_metadata) with pytest.raises(CustomException): list(paged_list_response) - - def test_batch_create_jobs(self): - # Setup Expected Response - expected_response = {} - expected_response = job_service_pb2.JobOperationResult(**expected_response) - operation = operations_pb2.Operation( - name="operations/test_batch_create_jobs", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.JobServiceClient() - - # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - jobs = [] - - response = client.batch_create_jobs(parent, jobs) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = job_service_pb2.BatchCreateJobsRequest( - parent=parent, jobs=jobs - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_batch_create_jobs_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_batch_create_jobs_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.JobServiceClient() - - # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - jobs = [] - - response = client.batch_create_jobs(parent, jobs) - exception = response.exception() - assert exception.errors[0] == error - - def test_batch_update_jobs(self): - # Setup Expected Response - expected_response = {} - expected_response = job_service_pb2.JobOperationResult(**expected_response) - operation = operations_pb2.Operation( - name="operations/test_batch_update_jobs", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.JobServiceClient() - - # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - jobs = [] - - response = client.batch_update_jobs(parent, jobs) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = job_service_pb2.BatchUpdateJobsRequest( - parent=parent, jobs=jobs - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_batch_update_jobs_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_batch_update_jobs_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.JobServiceClient() - - # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - jobs = [] - - response = client.batch_update_jobs(parent, jobs) - exception = response.exception() - assert exception.errors[0] == error diff --git a/tests/unit/gapic/v4beta1/test_profile_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_profile_service_client_v4beta1.py index 5e7c1529..b8dde29c 100644 --- a/tests/unit/gapic/v4beta1/test_profile_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_profile_service_client_v4beta1.py @@ -63,6 +63,93 @@ class CustomException(Exception): class TestProfileServiceClient(object): + def test_delete_profile(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ProfileServiceClient() + + # Setup Request + name = client.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]") + + client.delete_profile(name) + + assert len(channel.requests) == 1 + expected_request = profile_service_pb2.DeleteProfileRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_profile_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ProfileServiceClient() + + # Setup request + name = client.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]") + + with pytest.raises(CustomException): + client.delete_profile(name) + + def test_search_profiles(self): + # Setup Expected Response + estimated_total_size = 1882144769 + next_page_token = "" + result_set_id = "resultSetId-770306950" + summarized_profiles_element = {} + summarized_profiles = [summarized_profiles_element] + expected_response = { + "estimated_total_size": estimated_total_size, + "next_page_token": next_page_token, + "result_set_id": result_set_id, + "summarized_profiles": summarized_profiles, + } + expected_response = profile_service_pb2.SearchProfilesResponse( + **expected_response + ) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ProfileServiceClient() + + # Setup Request + parent = client.tenant_path("[PROJECT]", "[TENANT]") + request_metadata = {} + + paged_list_response = client.search_profiles(parent, request_metadata) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.summarized_profiles[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = profile_service_pb2.SearchProfilesRequest( + parent=parent, request_metadata=request_metadata + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_search_profiles_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.ProfileServiceClient() + + # Setup request + parent = client.tenant_path("[PROJECT]", "[TENANT]") + request_metadata = {} + + paged_list_response = client.search_profiles(parent, request_metadata) + with pytest.raises(CustomException): + list(paged_list_response) + def test_list_profiles(self): # Setup Expected Response next_page_token = "" @@ -267,90 +354,3 @@ def test_update_profile_exception(self): with pytest.raises(CustomException): client.update_profile(profile) - - def test_delete_profile(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ProfileServiceClient() - - # Setup Request - name = client.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]") - - client.delete_profile(name) - - assert len(channel.requests) == 1 - expected_request = profile_service_pb2.DeleteProfileRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_profile_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ProfileServiceClient() - - # Setup request - name = client.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]") - - with pytest.raises(CustomException): - client.delete_profile(name) - - def test_search_profiles(self): - # Setup Expected Response - estimated_total_size = 1882144769 - next_page_token = "" - result_set_id = "resultSetId-770306950" - summarized_profiles_element = {} - summarized_profiles = [summarized_profiles_element] - expected_response = { - "estimated_total_size": estimated_total_size, - "next_page_token": next_page_token, - "result_set_id": result_set_id, - "summarized_profiles": summarized_profiles, - } - expected_response = profile_service_pb2.SearchProfilesResponse( - **expected_response - ) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ProfileServiceClient() - - # Setup Request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - request_metadata = {} - - paged_list_response = client.search_profiles(parent, request_metadata) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.summarized_profiles[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = profile_service_pb2.SearchProfilesRequest( - parent=parent, request_metadata=request_metadata - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_search_profiles_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.ProfileServiceClient() - - # Setup request - parent = client.tenant_path("[PROJECT]", "[TENANT]") - request_metadata = {} - - paged_list_response = client.search_profiles(parent, request_metadata) - with pytest.raises(CustomException): - list(paged_list_response) diff --git a/tests/unit/gapic/v4beta1/test_tenant_service_client_v4beta1.py b/tests/unit/gapic/v4beta1/test_tenant_service_client_v4beta1.py index 3ea8c09d..13e9a236 100644 --- a/tests/unit/gapic/v4beta1/test_tenant_service_client_v4beta1.py +++ b/tests/unit/gapic/v4beta1/test_tenant_service_client_v4beta1.py @@ -62,6 +62,37 @@ class CustomException(Exception): class TestTenantServiceClient(object): + def test_delete_tenant(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.TenantServiceClient() + + # Setup Request + name = client.tenant_path("[PROJECT]", "[TENANT]") + + client.delete_tenant(name) + + assert len(channel.requests) == 1 + expected_request = tenant_service_pb2.DeleteTenantRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_tenant_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = talent_v4beta1.TenantServiceClient() + + # Setup request + name = client.tenant_path("[PROJECT]", "[TENANT]") + + with pytest.raises(CustomException): + client.delete_tenant(name) + def test_create_tenant(self): # Setup Expected Response name = "name3373707" @@ -183,37 +214,6 @@ def test_update_tenant_exception(self): with pytest.raises(CustomException): client.update_tenant(tenant) - def test_delete_tenant(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.TenantServiceClient() - - # Setup Request - name = client.tenant_path("[PROJECT]", "[TENANT]") - - client.delete_tenant(name) - - assert len(channel.requests) == 1 - expected_request = tenant_service_pb2.DeleteTenantRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_tenant_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = talent_v4beta1.TenantServiceClient() - - # Setup request - name = client.tenant_path("[PROJECT]", "[TENANT]") - - with pytest.raises(CustomException): - client.delete_tenant(name) - def test_list_tenants(self): # Setup Expected Response next_page_token = ""