Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit ce10fe2

Browse files
chore: Update gapic-generator-python to v1.6.1 (#301)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * set manifest to true in .github/release-please.yml * add release-please-config.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: marking keyword_searchable_job_custom_attributes on the company object as deprecated --- docs: marking company_size histogram facet as deprecated PiperOrigin-RevId: 486780715 Source-Link: googleapis/googleapis@737555f Source-Link: https://github.com/googleapis/googleapis-gen/commit/d4bac364a85a02e78b91d57ed0de17aaab1bc621 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDRiYWMzNjRhODVhMDJlNzhiOTFkNTdlZDBkZTE3YWFhYjFiYzYyMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: marking keyword_searchable_job_custom_attributes on the company object as deprecated --- docs: marking company_size histogram facet as deprecated PiperOrigin-RevId: 486780805 Source-Link: googleapis/googleapis@dbfdaa9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f72d409eabb57581b49d6b930fb5e684e1602258 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjcyZDQwOWVhYmI1NzU4MWI0OWQ2YjkzMGZiNWU2ODRlMTYwMjI1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use templated owlbot.py and setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent aef98c3 commit ce10fe2

File tree

94 files changed

+1618
-1231
lines changed

Some content is hidden

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

94 files changed

+1618
-1231
lines changed

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true
34
# NOTE: this section is generated by synthtool.languages.python
45
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
56
branches:

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=99
57+
coverage report --show-missing --fail-under=100

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.7.3"
3+
}

docs/talent_v4/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Talent v4 API
33

44
.. automodule:: google.cloud.talent_v4.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

docs/talent_v4beta1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Talent v4beta1 API
33

44
.. automodule:: google.cloud.talent_v4beta1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/talent/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.talent import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.talent_v4.services.company_service.async_client import (
1822
CompanyServiceAsyncClient,

google/cloud/talent/gapic_version.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "2.7.3" # {x-release-please-version}

google/cloud/talent_v4/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.talent import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.company_service import CompanyServiceAsyncClient, CompanyServiceClient
1822
from .services.completion import CompletionAsyncClient, CompletionClient

google/cloud/talent_v4/services/company_service/async_client.py

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030

2131
from google.api_core import exceptions as core_exceptions
2232
from google.api_core import gapic_v1
@@ -168,9 +178,9 @@ def transport(self) -> CompanyServiceTransport:
168178
def __init__(
169179
self,
170180
*,
171-
credentials: ga_credentials.Credentials = None,
181+
credentials: Optional[ga_credentials.Credentials] = None,
172182
transport: Union[str, CompanyServiceTransport] = "grpc_asyncio",
173-
client_options: ClientOptions = None,
183+
client_options: Optional[ClientOptions] = None,
174184
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
175185
) -> None:
176186
"""Instantiates the company service client.
@@ -214,12 +224,12 @@ def __init__(
214224

215225
async def create_company(
216226
self,
217-
request: Union[company_service.CreateCompanyRequest, dict] = None,
227+
request: Optional[Union[company_service.CreateCompanyRequest, dict]] = None,
218228
*,
219-
parent: str = None,
220-
company: gct_company.Company = None,
229+
parent: Optional[str] = None,
230+
company: Optional[gct_company.Company] = None,
221231
retry: OptionalRetry = gapic_v1.method.DEFAULT,
222-
timeout: float = None,
232+
timeout: Optional[float] = None,
223233
metadata: Sequence[Tuple[str, str]] = (),
224234
) -> gct_company.Company:
225235
r"""Creates a new company entity.
@@ -256,7 +266,7 @@ async def sample_create_company():
256266
print(response)
257267
258268
Args:
259-
request (Union[google.cloud.talent_v4.types.CreateCompanyRequest, dict]):
269+
request (Optional[Union[google.cloud.talent_v4.types.CreateCompanyRequest, dict]]):
260270
The request object. The Request of the CreateCompany
261271
method.
262272
parent (:class:`str`):
@@ -337,11 +347,11 @@ async def sample_create_company():
337347

338348
async def get_company(
339349
self,
340-
request: Union[company_service.GetCompanyRequest, dict] = None,
350+
request: Optional[Union[company_service.GetCompanyRequest, dict]] = None,
341351
*,
342-
name: str = None,
352+
name: Optional[str] = None,
343353
retry: OptionalRetry = gapic_v1.method.DEFAULT,
344-
timeout: float = None,
354+
timeout: Optional[float] = None,
345355
metadata: Sequence[Tuple[str, str]] = (),
346356
) -> company.Company:
347357
r"""Retrieves specified company.
@@ -373,7 +383,7 @@ async def sample_get_company():
373383
print(response)
374384
375385
Args:
376-
request (Union[google.cloud.talent_v4.types.GetCompanyRequest, dict]):
386+
request (Optional[Union[google.cloud.talent_v4.types.GetCompanyRequest, dict]]):
377387
The request object. Request for getting a company by
378388
name.
379389
name (:class:`str`):
@@ -458,12 +468,12 @@ async def sample_get_company():
458468

459469
async def update_company(
460470
self,
461-
request: Union[company_service.UpdateCompanyRequest, dict] = None,
471+
request: Optional[Union[company_service.UpdateCompanyRequest, dict]] = None,
462472
*,
463-
company: gct_company.Company = None,
464-
update_mask: field_mask_pb2.FieldMask = None,
473+
company: Optional[gct_company.Company] = None,
474+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
465475
retry: OptionalRetry = gapic_v1.method.DEFAULT,
466-
timeout: float = None,
476+
timeout: Optional[float] = None,
467477
metadata: Sequence[Tuple[str, str]] = (),
468478
) -> gct_company.Company:
469479
r"""Updates specified company.
@@ -499,7 +509,7 @@ async def sample_update_company():
499509
print(response)
500510
501511
Args:
502-
request (Union[google.cloud.talent_v4.types.UpdateCompanyRequest, dict]):
512+
request (Optional[Union[google.cloud.talent_v4.types.UpdateCompanyRequest, dict]]):
503513
The request object. Request for updating a specified
504514
company.
505515
company (:class:`google.cloud.talent_v4.types.Company`):
@@ -590,11 +600,11 @@ async def sample_update_company():
590600

591601
async def delete_company(
592602
self,
593-
request: Union[company_service.DeleteCompanyRequest, dict] = None,
603+
request: Optional[Union[company_service.DeleteCompanyRequest, dict]] = None,
594604
*,
595-
name: str = None,
605+
name: Optional[str] = None,
596606
retry: OptionalRetry = gapic_v1.method.DEFAULT,
597-
timeout: float = None,
607+
timeout: Optional[float] = None,
598608
metadata: Sequence[Tuple[str, str]] = (),
599609
) -> None:
600610
r"""Deletes specified company.
@@ -625,7 +635,7 @@ async def sample_delete_company():
625635
await client.delete_company(request=request)
626636
627637
Args:
628-
request (Union[google.cloud.talent_v4.types.DeleteCompanyRequest, dict]):
638+
request (Optional[Union[google.cloud.talent_v4.types.DeleteCompanyRequest, dict]]):
629639
The request object. Request to delete a company.
630640
name (:class:`str`):
631641
Required. The resource name of the company to be
@@ -695,11 +705,11 @@ async def sample_delete_company():
695705

696706
async def list_companies(
697707
self,
698-
request: Union[company_service.ListCompaniesRequest, dict] = None,
708+
request: Optional[Union[company_service.ListCompaniesRequest, dict]] = None,
699709
*,
700-
parent: str = None,
710+
parent: Optional[str] = None,
701711
retry: OptionalRetry = gapic_v1.method.DEFAULT,
702-
timeout: float = None,
712+
timeout: Optional[float] = None,
703713
metadata: Sequence[Tuple[str, str]] = (),
704714
) -> pagers.ListCompaniesAsyncPager:
705715
r"""Lists all companies associated with the project.
@@ -732,7 +742,7 @@ async def sample_list_companies():
732742
print(response)
733743
734744
Args:
735-
request (Union[google.cloud.talent_v4.types.ListCompaniesRequest, dict]):
745+
request (Optional[Union[google.cloud.talent_v4.types.ListCompaniesRequest, dict]]):
736746
The request object. List companies for which the client
737747
has ACL visibility.
738748
parent (:class:`str`):

google/cloud/talent_v4/services/company_service/client.py

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
cast,
30+
)
2031

2132
from google.api_core import client_options as client_options_lib
2233
from google.api_core import exceptions as core_exceptions
@@ -63,7 +74,7 @@ class CompanyServiceClientMeta(type):
6374

6475
def get_transport_class(
6576
cls,
66-
label: str = None,
77+
label: Optional[str] = None,
6778
) -> Type[CompanyServiceTransport]:
6879
"""Returns an appropriate transport class.
6980
@@ -357,8 +368,8 @@ def __init__(
357368
self,
358369
*,
359370
credentials: Optional[ga_credentials.Credentials] = None,
360-
transport: Union[str, CompanyServiceTransport, None] = None,
361-
client_options: Optional[client_options_lib.ClientOptions] = None,
371+
transport: Optional[Union[str, CompanyServiceTransport]] = None,
372+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
362373
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
363374
) -> None:
364375
"""Instantiates the company service client.
@@ -372,7 +383,7 @@ def __init__(
372383
transport (Union[str, CompanyServiceTransport]): The
373384
transport to use. If set to None, a transport is chosen
374385
automatically.
375-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
386+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
376387
client. It won't take effect if a ``transport`` instance is provided.
377388
(1) The ``api_endpoint`` property can be used to override the
378389
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -402,6 +413,7 @@ def __init__(
402413
client_options = client_options_lib.from_dict(client_options)
403414
if client_options is None:
404415
client_options = client_options_lib.ClientOptions()
416+
client_options = cast(client_options_lib.ClientOptions, client_options)
405417

406418
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
407419
client_options
@@ -454,12 +466,12 @@ def __init__(
454466

455467
def create_company(
456468
self,
457-
request: Union[company_service.CreateCompanyRequest, dict] = None,
469+
request: Optional[Union[company_service.CreateCompanyRequest, dict]] = None,
458470
*,
459-
parent: str = None,
460-
company: gct_company.Company = None,
471+
parent: Optional[str] = None,
472+
company: Optional[gct_company.Company] = None,
461473
retry: OptionalRetry = gapic_v1.method.DEFAULT,
462-
timeout: float = None,
474+
timeout: Optional[float] = None,
463475
metadata: Sequence[Tuple[str, str]] = (),
464476
) -> gct_company.Company:
465477
r"""Creates a new company entity.
@@ -577,11 +589,11 @@ def sample_create_company():
577589

578590
def get_company(
579591
self,
580-
request: Union[company_service.GetCompanyRequest, dict] = None,
592+
request: Optional[Union[company_service.GetCompanyRequest, dict]] = None,
581593
*,
582-
name: str = None,
594+
name: Optional[str] = None,
583595
retry: OptionalRetry = gapic_v1.method.DEFAULT,
584-
timeout: float = None,
596+
timeout: Optional[float] = None,
585597
metadata: Sequence[Tuple[str, str]] = (),
586598
) -> company.Company:
587599
r"""Retrieves specified company.
@@ -688,12 +700,12 @@ def sample_get_company():
688700

689701
def update_company(
690702
self,
691-
request: Union[company_service.UpdateCompanyRequest, dict] = None,
703+
request: Optional[Union[company_service.UpdateCompanyRequest, dict]] = None,
692704
*,
693-
company: gct_company.Company = None,
694-
update_mask: field_mask_pb2.FieldMask = None,
705+
company: Optional[gct_company.Company] = None,
706+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
695707
retry: OptionalRetry = gapic_v1.method.DEFAULT,
696-
timeout: float = None,
708+
timeout: Optional[float] = None,
697709
metadata: Sequence[Tuple[str, str]] = (),
698710
) -> gct_company.Company:
699711
r"""Updates specified company.
@@ -820,11 +832,11 @@ def sample_update_company():
820832

821833
def delete_company(
822834
self,
823-
request: Union[company_service.DeleteCompanyRequest, dict] = None,
835+
request: Optional[Union[company_service.DeleteCompanyRequest, dict]] = None,
824836
*,
825-
name: str = None,
837+
name: Optional[str] = None,
826838
retry: OptionalRetry = gapic_v1.method.DEFAULT,
827-
timeout: float = None,
839+
timeout: Optional[float] = None,
828840
metadata: Sequence[Tuple[str, str]] = (),
829841
) -> None:
830842
r"""Deletes specified company.
@@ -915,11 +927,11 @@ def sample_delete_company():
915927

916928
def list_companies(
917929
self,
918-
request: Union[company_service.ListCompaniesRequest, dict] = None,
930+
request: Optional[Union[company_service.ListCompaniesRequest, dict]] = None,
919931
*,
920-
parent: str = None,
932+
parent: Optional[str] = None,
921933
retry: OptionalRetry = gapic_v1.method.DEFAULT,
922-
timeout: float = None,
934+
timeout: Optional[float] = None,
923935
metadata: Sequence[Tuple[str, str]] = (),
924936
) -> pagers.ListCompaniesPager:
925937
r"""Lists all companies associated with the project.

0 commit comments

Comments
 (0)