Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ exclude_lines =
pragma: NO COVER
# Ignore debug-only repr
def __repr__
# Ignore pkg_resources exceptions.
# This is added at the module level as a safeguard for if someone
# generates the code and tries to run it without pip installing. This
# makes it virtually impossible to test properly.
except pkg_resources.DistributionNotFound
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.6.3"
}
1 change: 0 additions & 1 deletion docs/errorreporting_v1beta1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Errorreporting v1beta1 API

.. automodule:: google.cloud.errorreporting_v1beta1.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions google/cloud/error_reporting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"""Client library for Error Reporting"""


from pkg_resources import get_distribution
from google.cloud.error_reporting import gapic_version as package_version

__version__ = get_distribution("google-cloud-error-reporting").version
__version__ = package_version.__version__

from google.cloud.error_reporting.client import Client
from google.cloud.error_reporting.client import HTTPContext
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/error_reporting/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.6.3" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/errorreporting_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.errorreporting_v1beta1 import gapic_version as package_version

__version__ = package_version.__version__


from .services.error_group_service import ErrorGroupServiceClient
from .services.error_group_service import ErrorGroupServiceAsyncClient
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/errorreporting_v1beta1/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.6.3" # {x-release-please-version}
2 changes: 1 addition & 1 deletion google/cloud/errorreporting_v1beta1/py.typed
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-errorreporting package uses inline types.
# The google-cloud-error-reporting package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.cloud.errorreporting_v1beta1 import gapic_version as package_version

from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
Expand Down Expand Up @@ -160,9 +171,9 @@ def transport(self) -> ErrorGroupServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ErrorGroupServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the error group service client.
Expand Down Expand Up @@ -206,11 +217,11 @@ def __init__(

async def get_group(
self,
request: Union[error_group_service.GetGroupRequest, dict] = None,
request: Optional[Union[error_group_service.GetGroupRequest, dict]] = None,
*,
group_name: str = None,
group_name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> common.ErrorGroup:
r"""Get the specified group.
Expand Down Expand Up @@ -242,7 +253,7 @@ async def sample_get_group():
print(response)

Args:
request (Union[google.cloud.errorreporting_v1beta1.types.GetGroupRequest, dict]):
request (Optional[Union[google.cloud.errorreporting_v1beta1.types.GetGroupRequest, dict]]):
The request object. A request to return an individual
group.
group_name (:class:`str`):
Expand Down Expand Up @@ -314,11 +325,11 @@ async def sample_get_group():

async def update_group(
self,
request: Union[error_group_service.UpdateGroupRequest, dict] = None,
request: Optional[Union[error_group_service.UpdateGroupRequest, dict]] = None,
*,
group: common.ErrorGroup = None,
group: Optional[common.ErrorGroup] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> common.ErrorGroup:
r"""Replace the data for the specified group.
Expand Down Expand Up @@ -350,7 +361,7 @@ async def sample_update_group():
print(response)

Args:
request (Union[google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest, dict]):
request (Optional[Union[google.cloud.errorreporting_v1beta1.types.UpdateGroupRequest, dict]]):
The request object. A request to replace the existing
data for the given group.
group (:class:`google.cloud.errorreporting_v1beta1.types.ErrorGroup`):
Expand Down Expand Up @@ -423,14 +434,9 @@ async def __aexit__(self, exc_type, exc, tb):
await self.transport.close()


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-errorreporting",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
)


__all__ = ("ErrorGroupServiceAsyncClient",)
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)

from google.cloud.errorreporting_v1beta1 import gapic_version as package_version

from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
Expand Down Expand Up @@ -57,7 +69,7 @@ class ErrorGroupServiceClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[ErrorGroupServiceTransport]:
"""Returns an appropriate transport class.

Expand Down Expand Up @@ -327,8 +339,8 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ErrorGroupServiceTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
transport: Optional[Union[str, ErrorGroupServiceTransport]] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the error group service client.
Expand All @@ -342,7 +354,7 @@ def __init__(
transport (Union[str, ErrorGroupServiceTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
Expand Down Expand Up @@ -372,6 +384,7 @@ def __init__(
client_options = client_options_lib.from_dict(client_options)
if client_options is None:
client_options = client_options_lib.ClientOptions()
client_options = cast(client_options_lib.ClientOptions, client_options)

api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
client_options
Expand Down Expand Up @@ -424,11 +437,11 @@ def __init__(

def get_group(
self,
request: Union[error_group_service.GetGroupRequest, dict] = None,
request: Optional[Union[error_group_service.GetGroupRequest, dict]] = None,
*,
group_name: str = None,
group_name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> common.ErrorGroup:
r"""Get the specified group.
Expand Down Expand Up @@ -532,11 +545,11 @@ def sample_get_group():

def update_group(
self,
request: Union[error_group_service.UpdateGroupRequest, dict] = None,
request: Optional[Union[error_group_service.UpdateGroupRequest, dict]] = None,
*,
group: common.ErrorGroup = None,
group: Optional[common.ErrorGroup] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> common.ErrorGroup:
r"""Replace the data for the specified group.
Expand Down Expand Up @@ -648,14 +661,9 @@ def __exit__(self, type, value, traceback):
self.transport.close()


try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-errorreporting",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
)


__all__ = ("ErrorGroupServiceClient",)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#
import abc
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
import pkg_resources

from google.cloud.errorreporting_v1beta1 import gapic_version as package_version

import google.auth # type: ignore
import google.api_core
Expand All @@ -28,14 +29,9 @@
from google.cloud.errorreporting_v1beta1.types import common
from google.cloud.errorreporting_v1beta1.types import error_group_service

try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-errorreporting",
).version,
)
except pkg_resources.DistributionNotFound:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo()
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=package_version.__version__
)


class ErrorGroupServiceTransport(abc.ABC):
Expand All @@ -49,7 +45,7 @@ def __init__(
self,
*,
host: str = DEFAULT_HOST,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def __init__(
self,
*,
host: str = "clouderrorreporting.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
scopes: Sequence[str] = None,
channel: grpc.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
Expand Down Expand Up @@ -182,8 +182,8 @@ def __init__(
def create_channel(
cls,
host: str = "clouderrorreporting.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
**kwargs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ErrorGroupServiceGrpcAsyncIOTransport(ErrorGroupServiceTransport):
def create_channel(
cls,
host: str = "clouderrorreporting.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down Expand Up @@ -93,15 +93,15 @@ def __init__(
self,
*,
host: str = "clouderrorreporting.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: aio.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
channel: Optional[aio.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
Expand Down
Loading