Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
eb7e9f3
changes without context
yoshi-automation Dec 23, 2020
4e9070b
build(java): readme.sh should be executable
yoshi-automation Dec 23, 2020
f6c94c3
chore: upgrade to gapic-generator-python 0.35.6
yoshi-automation Dec 23, 2020
2144b10
feat: update types in google/type, add Interval, LocalizedText, Phone…
yoshi-automation Dec 23, 2020
8540c8f
feat: create the client for artifactregistry API.
yoshi-automation Dec 23, 2020
5599ff0
chore: upgrade to gapic-generator-python 0.35.6
yoshi-automation Dec 23, 2020
a599839
fix: switch firestore/v1 to grpc_service_config
yoshi-automation Dec 23, 2020
46baf06
docs: Update inclusive language in the documentation. Also other late…
yoshi-automation Dec 23, 2020
34a607e
fix: switch all local LRO Go GAPIC deps to remote
yoshi-automation Dec 23, 2020
b4e91c8
chore: update grpc dependency to v1.33.1
yoshi-automation Dec 23, 2020
9bcd277
feat: Added force option for Purge APIs feat: Added API service descr…
yoshi-automation Dec 23, 2020
2b8c221
chore: upgrade to gapic-generator 0.35.9
yoshi-automation Dec 23, 2020
d3669a4
fix: updating the v1 retry params name for ListInsights, GetInsight, …
yoshi-automation Dec 23, 2020
4061091
feat!: The Google Analytics Management API has been renamed to the Go…
yoshi-automation Dec 23, 2020
8531fea
fix: add Bazel targets for GAPIC libraries.
yoshi-automation Dec 23, 2020
d5d5490
chore: Set namespaces for Ruby clients
yoshi-automation Dec 23, 2020
d5a0f3e
chore: migrate java-monitoring to the Java microgenerator
yoshi-automation Dec 23, 2020
b617fd6
chore: migrate storage to the Java microgenerator
yoshi-automation Dec 23, 2020
a145418
feat: Add the `UNORDERED_LIST` enum value for `google.api.field_behav…
yoshi-automation Dec 23, 2020
c9b74f3
feat!: Remove Cloud Asset v1beta1 support.
yoshi-automation Dec 23, 2020
705068d
chore: add resource_definitions for Cluster and Service
yoshi-automation Dec 23, 2020
9eec587
fix: remove client recv msg limit fix: add enums to `types/__init__.py`
yoshi-automation Dec 23, 2020
1337deb
chore: Update client retry policy for streaming methods of the Google…
yoshi-automation Dec 23, 2020
6be1d35
feat: added field severity to findings in v1 API
yoshi-automation Dec 23, 2020
c59817e
chore: Remove unused 'package' attr from java_gapic_library rules
yoshi-automation Dec 23, 2020
67bdf77
feat: Add support for "billingAccounts" as another parent resource na…
yoshi-automation Dec 23, 2020
4a86996
docs: update comments on parameters and validation result.
yoshi-automation Dec 23, 2020
898f6be
Merge branch 'master' into autosynth-googleapis
busunkim96 Dec 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/talent_v4/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Talent v4 API

.. automodule:: google.cloud.talent_v4.types
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/talent_v4beta1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Talent v4beta1 API

.. automodule:: google.cloud.talent_v4beta1.types
:members:
:show-inheritance:
4 changes: 2 additions & 2 deletions google/cloud/talent_v4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"DeleteTenantRequest",
"DeviceInfo",
"EmploymentType",
"EventServiceClient",
"GetCompanyRequest",
"GetJobRequest",
"GetTenantRequest",
Expand Down Expand Up @@ -144,10 +143,11 @@
"SearchJobsResponse",
"SpellingCorrection",
"Tenant",
"TenantServiceClient",
"TimestampRange",
"UpdateCompanyRequest",
"UpdateJobRequest",
"UpdateTenantRequest",
"Visibility",
"TenantServiceClient",
"EventServiceClient",
)
61 changes: 53 additions & 8 deletions google/cloud/talent_v4/services/company_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,50 @@ class CompanyServiceAsyncClient:

company_path = staticmethod(CompanyServiceClient.company_path)
parse_company_path = staticmethod(CompanyServiceClient.parse_company_path)
tenant_path = staticmethod(CompanyServiceClient.tenant_path)
parse_tenant_path = staticmethod(CompanyServiceClient.parse_tenant_path)

common_billing_account_path = staticmethod(
CompanyServiceClient.common_billing_account_path
)
parse_common_billing_account_path = staticmethod(
CompanyServiceClient.parse_common_billing_account_path
)

common_folder_path = staticmethod(CompanyServiceClient.common_folder_path)
parse_common_folder_path = staticmethod(
CompanyServiceClient.parse_common_folder_path
)

common_organization_path = staticmethod(
CompanyServiceClient.common_organization_path
)
parse_common_organization_path = staticmethod(
CompanyServiceClient.parse_common_organization_path
)

common_project_path = staticmethod(CompanyServiceClient.common_project_path)
parse_common_project_path = staticmethod(
CompanyServiceClient.parse_common_project_path
)

common_location_path = staticmethod(CompanyServiceClient.common_location_path)
parse_common_location_path = staticmethod(
CompanyServiceClient.parse_common_location_path
)

from_service_account_file = CompanyServiceClient.from_service_account_file
from_service_account_json = from_service_account_file

@property
def transport(self) -> CompanyServiceTransport:
"""Return the transport used by the client instance.

Returns:
CompanyServiceTransport: The transport used by the client instance.
"""
return self._client.transport

get_transport_class = functools.partial(
type(CompanyServiceClient).get_transport_class, type(CompanyServiceClient)
)
Expand Down Expand Up @@ -159,7 +199,8 @@ async def create_company(
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
if request is not None and any([parent, company]):
has_flattened_params = any([parent, company])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
Expand Down Expand Up @@ -241,7 +282,8 @@ async def get_company(
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
if request is not None and any([name]):
has_flattened_params = any([name])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
Expand All @@ -264,7 +306,7 @@ async def get_company(
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand Down Expand Up @@ -341,7 +383,8 @@ async def update_company(
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
if request is not None and any([company, update_mask]):
has_flattened_params = any([company, update_mask])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
Expand Down Expand Up @@ -415,7 +458,8 @@ async def delete_company(
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
if request is not None and any([name]):
has_flattened_params = any([name])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
Expand All @@ -438,7 +482,7 @@ async def delete_company(
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand Down Expand Up @@ -499,7 +543,8 @@ async def list_companies(
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
if request is not None and any([parent]):
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
"the individual field arguments should be set."
Expand All @@ -522,7 +567,7 @@ async def list_companies(
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand Down
89 changes: 85 additions & 4 deletions google/cloud/talent_v4/services/company_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):

from_service_account_json = from_service_account_file

@property
def transport(self) -> CompanyServiceTransport:
"""Return the transport used by the client instance.

Returns:
CompanyServiceTransport: The transport used by the client instance.
"""
return self._transport

@staticmethod
def company_path(project: str, tenant: str, company: str,) -> str:
"""Return a fully-qualified company string."""
Expand All @@ -152,6 +161,78 @@ def parse_company_path(path: str) -> Dict[str, str]:
)
return m.groupdict() if m else {}

@staticmethod
def tenant_path(project: str, tenant: str,) -> str:
"""Return a fully-qualified tenant string."""
return "projects/{project}/tenants/{tenant}".format(
project=project, tenant=tenant,
)

@staticmethod
def parse_tenant_path(path: str) -> Dict[str, str]:
"""Parse a tenant path into its component segments."""
m = re.match(r"^projects/(?P<project>.+?)/tenants/(?P<tenant>.+?)$", path)
return m.groupdict() if m else {}

@staticmethod
def common_billing_account_path(billing_account: str,) -> str:
"""Return a fully-qualified billing_account string."""
return "billingAccounts/{billing_account}".format(
billing_account=billing_account,
)

@staticmethod
def parse_common_billing_account_path(path: str) -> Dict[str, str]:
"""Parse a billing_account path into its component segments."""
m = re.match(r"^billingAccounts/(?P<billing_account>.+?)$", path)
return m.groupdict() if m else {}

@staticmethod
def common_folder_path(folder: str,) -> str:
"""Return a fully-qualified folder string."""
return "folders/{folder}".format(folder=folder,)

@staticmethod
def parse_common_folder_path(path: str) -> Dict[str, str]:
"""Parse a folder path into its component segments."""
m = re.match(r"^folders/(?P<folder>.+?)$", path)
return m.groupdict() if m else {}

@staticmethod
def common_organization_path(organization: str,) -> str:
"""Return a fully-qualified organization string."""
return "organizations/{organization}".format(organization=organization,)

@staticmethod
def parse_common_organization_path(path: str) -> Dict[str, str]:
"""Parse a organization path into its component segments."""
m = re.match(r"^organizations/(?P<organization>.+?)$", path)
return m.groupdict() if m else {}

@staticmethod
def common_project_path(project: str,) -> str:
"""Return a fully-qualified project string."""
return "projects/{project}".format(project=project,)

@staticmethod
def parse_common_project_path(path: str) -> Dict[str, str]:
"""Parse a project path into its component segments."""
m = re.match(r"^projects/(?P<project>.+?)$", path)
return m.groupdict() if m else {}

@staticmethod
def common_location_path(project: str, location: str,) -> str:
"""Return a fully-qualified location string."""
return "projects/{project}/locations/{location}".format(
project=project, location=location,
)

@staticmethod
def parse_common_location_path(path: str) -> Dict[str, str]:
"""Parse a location path into its component segments."""
m = re.match(r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)$", path)
return m.groupdict() if m else {}

def __init__(
self,
*,
Expand Down Expand Up @@ -187,10 +268,10 @@ def __init__(
not provided, the default SSL client certificate will be used if
present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
set, no client certificate will be used.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.

Raises:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = CompanyServiceGrpcTransport
_transport_registry["grpc_asyncio"] = CompanyServiceGrpcAsyncIOTransport


__all__ = (
"CompanyServiceTransport",
"CompanyServiceGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand All @@ -136,7 +136,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand All @@ -149,7 +149,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.DeadlineExceeded,
exceptions.DeadlineExceeded, exceptions.ServiceUnavailable,
),
),
default_timeout=30.0,
Expand Down
28 changes: 18 additions & 10 deletions google/cloud/talent_v4/services/company_service/transports/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def __init__(
for grpc channel. It is ignored if ``channel`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.

Raises:
Expand All @@ -105,13 +105,16 @@ def __init__(
google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
and ``credentials_file`` are passed.
"""
self._ssl_channel_credentials = ssl_channel_credentials

if channel:
# Sanity check: Ensure that channel and credentials are not both
# provided.
credentials = False

# If a channel was explicitly provided, set it.
self._grpc_channel = channel
self._ssl_channel_credentials = None
elif api_mtls_endpoint:
warnings.warn(
"api_mtls_endpoint and client_cert_source are deprecated",
Expand Down Expand Up @@ -147,7 +150,12 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
host = host if ":" in host else host + ":443"

Expand All @@ -164,6 +172,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand All @@ -190,7 +202,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down Expand Up @@ -225,12 +237,8 @@ def create_channel(

@property
def grpc_channel(self) -> grpc.Channel:
"""Create the channel designed to connect to this service.

This property caches on the instance; repeated calls return
the same channel.
"""Return the channel designed to connect to this service.
"""
# Return the channel from cache.
return self._grpc_channel

@property
Expand Down
Loading