diff --git a/.flake8 b/.flake8
index 20fe9bda..ed931638 100644
--- a/.flake8
+++ b/.flake8
@@ -21,6 +21,8 @@ exclude =
# Exclude generated code.
**/proto/**
**/gapic/**
+ **/services/**
+ **/types/**
*_pb2.py
# Standard linting exemptions.
diff --git a/.gitignore b/.gitignore
index 3fb06e09..b87e1ed5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
dist
build
eggs
+.eggs
parts
bin
var
@@ -49,6 +50,7 @@ bigquery/docs/generated
# Virtual environment
env/
coverage.xml
+sponge_log.xml
# System test environment variables.
system_tests/local_test_setup
diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh
index 465d235b..307339cd 100755
--- a/.kokoro/publish-docs.sh
+++ b/.kokoro/publish-docs.sh
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#!/bin/bash
-
set -eo pipefail
# Disable buffering, so that the logs stream through.
diff --git a/.kokoro/release.sh b/.kokoro/release.sh
index 7264e127..3a61da13 100755
--- a/.kokoro/release.sh
+++ b/.kokoro/release.sh
@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#!/bin/bash
-
set -eo pipefail
# Start the releasetool reporter
diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg
new file mode 100644
index 00000000..8b918a78
--- /dev/null
+++ b/.kokoro/samples/lint/common.cfg
@@ -0,0 +1,34 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Build logs will be here
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ }
+}
+
+# Specify which tests to run
+env_vars: {
+ key: "RUN_TESTS_SESSION"
+ value: "lint"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-error-reporting/.kokoro/test-samples.sh"
+}
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
+}
+
+# Download secrets for samples
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
+
+# Download trampoline resources.
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+
+# Use the trampoline script to run in docker.
+build_file: "python-error-reporting/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/lint/continuous.cfg b/.kokoro/samples/lint/continuous.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/lint/continuous.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/lint/periodic.cfg b/.kokoro/samples/lint/periodic.cfg
new file mode 100644
index 00000000..50fec964
--- /dev/null
+++ b/.kokoro/samples/lint/periodic.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "False"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/lint/presubmit.cfg b/.kokoro/samples/lint/presubmit.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/lint/presubmit.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg
new file mode 100644
index 00000000..cce0189e
--- /dev/null
+++ b/.kokoro/samples/python3.6/common.cfg
@@ -0,0 +1,34 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Build logs will be here
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ }
+}
+
+# Specify which tests to run
+env_vars: {
+ key: "RUN_TESTS_SESSION"
+ value: "py-3.6"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-error-reporting/.kokoro/test-samples.sh"
+}
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
+}
+
+# Download secrets for samples
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
+
+# Download trampoline resources.
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+
+# Use the trampoline script to run in docker.
+build_file: "python-error-reporting/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.6/continuous.cfg b/.kokoro/samples/python3.6/continuous.cfg
new file mode 100644
index 00000000..7218af14
--- /dev/null
+++ b/.kokoro/samples/python3.6/continuous.cfg
@@ -0,0 +1,7 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
+
diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg
new file mode 100644
index 00000000..50fec964
--- /dev/null
+++ b/.kokoro/samples/python3.6/periodic.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "False"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.6/presubmit.cfg b/.kokoro/samples/python3.6/presubmit.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.6/presubmit.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg
new file mode 100644
index 00000000..edcdfb90
--- /dev/null
+++ b/.kokoro/samples/python3.7/common.cfg
@@ -0,0 +1,34 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Build logs will be here
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ }
+}
+
+# Specify which tests to run
+env_vars: {
+ key: "RUN_TESTS_SESSION"
+ value: "py-3.7"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-error-reporting/.kokoro/test-samples.sh"
+}
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
+}
+
+# Download secrets for samples
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
+
+# Download trampoline resources.
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+
+# Use the trampoline script to run in docker.
+build_file: "python-error-reporting/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.7/continuous.cfg b/.kokoro/samples/python3.7/continuous.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.7/continuous.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg
new file mode 100644
index 00000000..50fec964
--- /dev/null
+++ b/.kokoro/samples/python3.7/periodic.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "False"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.7/presubmit.cfg b/.kokoro/samples/python3.7/presubmit.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.7/presubmit.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg
new file mode 100644
index 00000000..7130d05d
--- /dev/null
+++ b/.kokoro/samples/python3.8/common.cfg
@@ -0,0 +1,34 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Build logs will be here
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ }
+}
+
+# Specify which tests to run
+env_vars: {
+ key: "RUN_TESTS_SESSION"
+ value: "py-3.8"
+}
+
+env_vars: {
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/python-error-reporting/.kokoro/test-samples.sh"
+}
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
+}
+
+# Download secrets for samples
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
+
+# Download trampoline resources.
+gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
+
+# Use the trampoline script to run in docker.
+build_file: "python-error-reporting/.kokoro/trampoline.sh"
\ No newline at end of file
diff --git a/.kokoro/samples/python3.8/continuous.cfg b/.kokoro/samples/python3.8/continuous.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.8/continuous.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg
new file mode 100644
index 00000000..50fec964
--- /dev/null
+++ b/.kokoro/samples/python3.8/periodic.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "False"
+}
\ No newline at end of file
diff --git a/.kokoro/samples/python3.8/presubmit.cfg b/.kokoro/samples/python3.8/presubmit.cfg
new file mode 100644
index 00000000..a1c8d975
--- /dev/null
+++ b/.kokoro/samples/python3.8/presubmit.cfg
@@ -0,0 +1,6 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+env_vars: {
+ key: "INSTALL_LIBRARY_FROM_SOURCE"
+ value: "True"
+}
\ No newline at end of file
diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh
new file mode 100755
index 00000000..7c2e854c
--- /dev/null
+++ b/.kokoro/test-samples.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+# 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.
+
+
+# `-e` enables the script to automatically fail when a command fails
+# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero
+set -eo pipefail
+# Enables `**` to include files nested inside sub-folders
+shopt -s globstar
+
+cd github/python-error-reporting
+
+# Run periodic samples tests at latest release
+if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
+ LATEST_RELEASE=$(git describe --abbrev=0 --tags)
+ git checkout $LATEST_RELEASE
+fi
+
+# Disable buffering, so that the logs stream through.
+export PYTHONUNBUFFERED=1
+
+# Debug: show build environment
+env | grep KOKORO
+
+# Install nox
+python3.6 -m pip install --upgrade --quiet nox
+
+# Use secrets acessor service account to get secrets
+if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
+ gcloud auth activate-service-account \
+ --key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \
+ --project="cloud-devrel-kokoro-resources"
+fi
+
+# This script will create 3 files:
+# - testing/test-env.sh
+# - testing/service-account.json
+# - testing/client-secrets.json
+./scripts/decrypt-secrets.sh
+
+source ./testing/test-env.sh
+export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
+
+# For cloud-run session, we activate the service account for gcloud sdk.
+gcloud auth activate-service-account \
+ --key-file "${GOOGLE_APPLICATION_CREDENTIALS}"
+
+export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json
+
+echo -e "\n******************** TESTING PROJECTS ********************"
+
+# Switch to 'fail at end' to allow all tests to complete before exiting.
+set +e
+# Use RTN to return a non-zero value if the test fails.
+RTN=0
+ROOT=$(pwd)
+# Find all requirements.txt in the samples directory (may break on whitespace).
+for file in samples/**/requirements.txt; do
+ cd "$ROOT"
+ # Navigate to the project folder.
+ file=$(dirname "$file")
+ cd "$file"
+
+ echo "------------------------------------------------------------"
+ echo "- testing $file"
+ echo "------------------------------------------------------------"
+
+ # Use nox to execute the tests for the project.
+ python3.6 -m nox -s "$RUN_TESTS_SESSION"
+ EXIT=$?
+
+ # If this is a periodic build, send the test log to the Build Cop Bot.
+ # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop.
+ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
+ chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
+ $KOKORO_GFILE_DIR/linux_amd64/buildcop
+ fi
+
+ if [[ $EXIT -ne 0 ]]; then
+ RTN=1
+ echo -e "\n Testing failed: Nox returned a non-zero exit code. \n"
+ else
+ echo -e "\n Testing completed.\n"
+ fi
+
+done
+cd "$ROOT"
+
+# Workaround for Kokoro permissions issue: delete secrets
+rm testing/{test-env.sh,client-secrets.json,service-account.json}
+
+exit "$RTN"
\ No newline at end of file
diff --git a/MANIFEST.in b/MANIFEST.in
index 68855abc..e9e29d12 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -20,3 +20,6 @@ recursive-include google *.json *.proto
recursive-include tests *
global-exclude *.py[co]
global-exclude __pycache__
+
+# Exclude scripts for samples readmegen
+prune scripts/readme-gen
\ No newline at end of file
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 228529ef..6316a537 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -21,8 +21,8 @@
- On January 1, 2020 this library will no longer support Python 2 on the latest released version.
- Previously released library versions will continue to be available. For more information please
+ As of January 1, 2020 this library no longer supports Python 2 on the latest released version.
+ Library versions released prior to that date will continue to be available. For more information please
visit
Python 2 support on Google Cloud.
{% block body %} {% endblock %}
diff --git a/docs/conf.py b/docs/conf.py
index be56ae55..af91f6e5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -38,21 +38,18 @@
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
+ "recommonmark",
]
# autodoc/autosummary flags
autoclass_content = "both"
-autodoc_default_flags = ["members"]
+autodoc_default_options = {"members": True}
autosummary_generate = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
-# Allow markdown includes (so releases.md can include CHANGLEOG.md)
-# http://www.sphinx-doc.org/en/master/markdown.html
-source_parsers = {".md": "recommonmark.parser.CommonMarkParser"}
-
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
@@ -340,7 +337,7 @@
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
- "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None),
+ "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"grpc": ("https://grpc.io/grpc/python/", None),
}
diff --git a/docs/index.rst b/docs/index.rst
index 3fd35c32..f9772f3b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,5 +1,7 @@
.. include:: README.rst
+.. include:: multiprocessing.rst
+
Usage Documentation
-------------------
diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst
new file mode 100644
index 00000000..1cb29d4c
--- /dev/null
+++ b/docs/multiprocessing.rst
@@ -0,0 +1,7 @@
+.. note::
+
+ Because this client uses :mod:`grpcio` library, it is safe to
+ share instances across threads. In multiprocessing scenarios, the best
+ practice is to create client instances *after* the invocation of
+ :func:`os.fork` by :class:`multiprocessing.Pool` or
+ :class:`multiprocessing.Process`.
diff --git a/google/cloud/errorreporting_v1beta1/gapic/enums.py b/google/cloud/errorreporting_v1beta1/gapic/enums.py
index 890ea7e7..52002c17 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/enums.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/enums.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -45,9 +45,9 @@ class TimedCountAlignment(enum.IntEnum):
Attributes:
ERROR_COUNT_ALIGNMENT_UNSPECIFIED (int): No alignment specified.
- ALIGNMENT_EQUAL_ROUNDED (int): The time periods shall be consecutive, have width equal to the requested
- duration, and be aligned at the ``alignment_time`` provided in the
- request. The ``alignment_time`` does not have to be inside the query
+ ALIGNMENT_EQUAL_ROUNDED (int): The time periods shall be consecutive, have width equal to the
+ requested duration, and be aligned at the ``alignment_time`` provided in
+ the request. The ``alignment_time`` does not have to be inside the query
period but even if it is outside, only time periods are returned which
overlap with the query period. A rounded alignment will typically result
in a different size of the first or the last time period.
diff --git a/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py b/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py
index af60931f..98bfceef 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -40,7 +40,7 @@
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
- "google-cloud-error-reporting"
+ "google-cloud-error-reporting",
).version
@@ -76,9 +76,9 @@ def from_service_account_file(cls, filename, *args, **kwargs):
@classmethod
def group_path(cls, project, group):
- """Return a fully-qualified group string."""
+ """Return a fully-qualified error_group string."""
return google.api_core.path_template.expand(
- "projects/{project}/groups/{group}", project=project, group=group
+ "projects/{project}/groups/{group}", project=project, group=group,
)
def __init__(
@@ -168,12 +168,12 @@ def __init__(
self.transport = transport
else:
self.transport = error_group_service_grpc_transport.ErrorGroupServiceGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
+ address=api_endpoint, channel=channel, credentials=credentials,
)
if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
+ gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
@@ -184,7 +184,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
+ client_config["interfaces"][self._INTERFACE_NAME],
)
# Save a dictionary of cached API call functions.
@@ -194,31 +194,32 @@ def __init__(
self._inner_api_calls = {}
# Service calls
- def get_group(
+ def update_group(
self,
- group_name,
+ group,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
- Get the specified group.
+ Replace the data for the specified group.
+ Fails if the group does not exist.
Example:
>>> from google.cloud import errorreporting_v1beta1
>>>
>>> client = errorreporting_v1beta1.ErrorGroupServiceClient()
>>>
- >>> group_name = client.group_path('[PROJECT]', '[GROUP]')
+ >>> # TODO: Initialize `group`:
+ >>> group = {}
>>>
- >>> response = client.get_group(group_name)
+ >>> response = client.update_group(group)
Args:
- group_name (str): [Required] The group resource name. Written as
- projects/projectID/groups/group\_name. Call groupStats.list to return a
- list of groups belonging to this project.
+ group (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ErrorGroup]): Required. The group which replaces the resource on the server.
- Example: projects/my-project-123/groups/my-group
+ If a dict is provided, it must be of the same form as the protobuf
+ message :class:`~google.cloud.errorreporting_v1beta1.types.ErrorGroup`
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.
@@ -239,22 +240,22 @@ def get_group(
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
- if "get_group" not in self._inner_api_calls:
+ if "update_group" not in self._inner_api_calls:
self._inner_api_calls[
- "get_group"
+ "update_group"
] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.get_group,
- default_retry=self._method_configs["GetGroup"].retry,
- default_timeout=self._method_configs["GetGroup"].timeout,
+ self.transport.update_group,
+ default_retry=self._method_configs["UpdateGroup"].retry,
+ default_timeout=self._method_configs["UpdateGroup"].timeout,
client_info=self._client_info,
)
- request = error_group_service_pb2.GetGroupRequest(group_name=group_name)
+ request = error_group_service_pb2.UpdateGroupRequest(group=group,)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
- routing_header = [("group_name", group_name)]
+ routing_header = [("group.name", group.name)]
except AttributeError:
pass
else:
@@ -263,36 +264,36 @@ def get_group(
)
metadata.append(routing_metadata)
- return self._inner_api_calls["get_group"](
+ return self._inner_api_calls["update_group"](
request, retry=retry, timeout=timeout, metadata=metadata
)
- def update_group(
+ def get_group(
self,
- group,
+ group_name,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
- Replace the data for the specified group.
- Fails if the group does not exist.
+ Get the specified group.
Example:
>>> from google.cloud import errorreporting_v1beta1
>>>
>>> client = errorreporting_v1beta1.ErrorGroupServiceClient()
>>>
- >>> # TODO: Initialize `group`:
- >>> group = {}
+ >>> group_name = client.group_path('[PROJECT]', '[GROUP]')
>>>
- >>> response = client.update_group(group)
+ >>> response = client.get_group(group_name)
Args:
- group (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ErrorGroup]): [Required] The group which replaces the resource on the server.
+ group_name (str): The group resource name. Written as
+ ``projects/{projectID}/groups/{group_name}``. Call
+ ```groupStats.list``
`__
+ to return a list of groups belonging to this project.
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.errorreporting_v1beta1.types.ErrorGroup`
+ Example: ``projects/my-project-123/groups/my-group``
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.
@@ -313,22 +314,22 @@ def update_group(
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
- if "update_group" not in self._inner_api_calls:
+ if "get_group" not in self._inner_api_calls:
self._inner_api_calls[
- "update_group"
+ "get_group"
] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.update_group,
- default_retry=self._method_configs["UpdateGroup"].retry,
- default_timeout=self._method_configs["UpdateGroup"].timeout,
+ self.transport.get_group,
+ default_retry=self._method_configs["GetGroup"].retry,
+ default_timeout=self._method_configs["GetGroup"].timeout,
client_info=self._client_info,
)
- request = error_group_service_pb2.UpdateGroupRequest(group=group)
+ request = error_group_service_pb2.GetGroupRequest(group_name=group_name,)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
- routing_header = [("group.name", group.name)]
+ routing_header = [("group_name", group_name)]
except AttributeError:
pass
else:
@@ -337,6 +338,6 @@ def update_group(
)
metadata.append(routing_metadata)
- return self._inner_api_calls["update_group"](
+ return self._inner_api_calls["get_group"](
request, retry=retry, timeout=timeout, metadata=metadata
)
diff --git a/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client_config.py b/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client_config.py
index e70ec324..dee3d0d8 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client_config.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/error_group_service_client_config.py
@@ -17,12 +17,12 @@
}
},
"methods": {
- "GetGroup": {
+ "UpdateGroup": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
- "UpdateGroup": {
+ "GetGroup": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
diff --git a/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py b/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py
index 692f0329..88a5a29c 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -46,7 +46,7 @@
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
- "google-cloud-error-reporting"
+ "google-cloud-error-reporting",
).version
@@ -87,7 +87,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
- "projects/{project}", project=project
+ "projects/{project}", project=project,
)
def __init__(
@@ -177,12 +177,12 @@ def __init__(
self.transport = transport
else:
self.transport = error_stats_service_grpc_transport.ErrorStatsServiceGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
+ address=api_endpoint, channel=channel, credentials=credentials,
)
if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
+ gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
@@ -193,7 +193,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
+ client_config["interfaces"][self._INTERFACE_NAME],
)
# Save a dictionary of cached API call functions.
@@ -203,10 +203,84 @@ def __init__(
self._inner_api_calls = {}
# Service calls
+ def delete_events(
+ self,
+ project_name,
+ retry=google.api_core.gapic_v1.method.DEFAULT,
+ timeout=google.api_core.gapic_v1.method.DEFAULT,
+ metadata=None,
+ ):
+ """
+ Deletes all error events of a given project.
+
+ Example:
+ >>> from google.cloud import errorreporting_v1beta1
+ >>>
+ >>> client = errorreporting_v1beta1.ErrorStatsServiceClient()
+ >>>
+ >>> project_name = client.project_path('[PROJECT]')
+ >>>
+ >>> response = client.delete_events(project_name)
+
+ Args:
+ project_name (str): Required. The resource name of the Google Cloud Platform project.
+ Written as ``projects/`` plus the `Google Cloud Platform project
+ ID `__. Example:
+ ``projects/my-project-123``.
+ 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.errorreporting_v1beta1.types.DeleteEventsResponse` 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 "delete_events" not in self._inner_api_calls:
+ self._inner_api_calls[
+ "delete_events"
+ ] = google.api_core.gapic_v1.method.wrap_method(
+ self.transport.delete_events,
+ default_retry=self._method_configs["DeleteEvents"].retry,
+ default_timeout=self._method_configs["DeleteEvents"].timeout,
+ client_info=self._client_info,
+ )
+
+ request = error_stats_service_pb2.DeleteEventsRequest(
+ project_name=project_name,
+ )
+ if metadata is None:
+ metadata = []
+ metadata = list(metadata)
+ try:
+ routing_header = [("project_name", project_name)]
+ except AttributeError:
+ pass
+ else:
+ routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
+ routing_header
+ )
+ metadata.append(routing_metadata)
+
+ return self._inner_api_calls["delete_events"](
+ request, retry=retry, timeout=timeout, metadata=metadata
+ )
+
def list_group_stats(
self,
project_name,
- time_range,
+ time_range=None, # DO NOT MOVE, see synth.py
group_id=None,
service_filter=None,
timed_count_duration=None,
@@ -218,6 +292,7 @@ def list_group_stats(
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
+
"""
Lists the specified groups.
@@ -228,11 +303,8 @@ def list_group_stats(
>>>
>>> project_name = client.project_path('[PROJECT]')
>>>
- >>> # TODO: Initialize `time_range`:
- >>> time_range = {}
- >>>
>>> # Iterate over all results
- >>> for element in client.list_group_stats(project_name, time_range):
+ >>> for element in client.list_group_stats(project_name):
... # process element
... pass
>>>
@@ -240,46 +312,48 @@ def list_group_stats(
>>> # Alternatively:
>>>
>>> # Iterate over results one page at a time
- >>> for page in client.list_group_stats(project_name, time_range).pages:
+ >>> for page in client.list_group_stats(project_name).pages:
... for element in page:
... # process element
... pass
Args:
- project_name (str): [Required] The resource name of the Google Cloud Platform project.
- Written as projects/ plus the Google Cloud Platform project ID.
-
- Example: projects/my-project-123.
- time_range (Union[dict, ~google.cloud.errorreporting_v1beta1.types.QueryTimeRange]): [Optional] List data for the given time range. If not set a default time
- range is used. The field time\_range\_begin in the response will specify
- the beginning of this time range. Only ErrorGroupStats with a non-zero
- count in the given time range are returned, unless the request contains
- an explicit group\_id list. If a group\_id list is given, also
- ErrorGroupStats with zero occurrences are returned.
+ project_name (str): Required. The resource name of the Google Cloud Platform project. Written
+ as projects/
plus the
+ Google Cloud
+ Platform project ID.
- If a dict is provided, it must be of the same form as the protobuf
- message :class:`~google.cloud.errorreporting_v1beta1.types.QueryTimeRange`
- group_id (list[str]): [Optional] List all ErrorGroupStats with these IDs.
- service_filter (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter]): [Optional] List only ErrorGroupStats which belong to a service context
- that matches the filter. Data for all service contexts is returned if
- this field is not specified.
+ Example: projects/my-project-123
.
+ group_id (list[str]): Optional. List all ErrorGroupStats
with these IDs.
+ service_filter (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter]): Optional. List only ErrorGroupStats
which belong to a service
+ context that matches the filter.
+ Data for all service contexts is returned if this field is not specified.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter`
- timed_count_duration (Union[dict, ~google.cloud.errorreporting_v1beta1.types.Duration]): [Optional] The preferred duration for a single returned ``TimedCount``.
- If not set, no timed counts are returned.
+ time_range (Union[dict, ~google.cloud.errorreporting_v1beta1.types.QueryTimeRange]): Optional. List data for the given time range. If not set, a default
+ time range is used. The field time_range_begin in the response will
+ specify the beginning of this time range. Only ErrorGroupStats with a
+ non-zero count in the given time range are returned, unless the request
+ contains an explicit group_id list. If a group_id list is given, also
+ ErrorGroupStats with zero occurrences are returned.
+
+ If a dict is provided, it must be of the same form as the protobuf
+ message :class:`~google.cloud.errorreporting_v1beta1.types.QueryTimeRange`
+ timed_count_duration (Union[dict, ~google.cloud.errorreporting_v1beta1.types.Duration]): Optional. The preferred duration for a single returned
+ ``TimedCount``. If not set, no timed counts are returned.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.Duration`
- alignment (~google.cloud.errorreporting_v1beta1.types.TimedCountAlignment): [Optional] The alignment of the timed counts to be returned. Default is
- ``ALIGNMENT_EQUAL_AT_END``.
- alignment_time (Union[dict, ~google.cloud.errorreporting_v1beta1.types.Timestamp]): [Optional] Time where the timed counts shall be aligned if rounded
+ alignment (~google.cloud.errorreporting_v1beta1.types.TimedCountAlignment): Optional. The alignment of the timed counts to be returned. Default
+ is ``ALIGNMENT_EQUAL_AT_END``.
+ alignment_time (Union[dict, ~google.cloud.errorreporting_v1beta1.types.Timestamp]): Optional. Time where the timed counts shall be aligned if rounded
alignment is chosen. Default is 00:00 UTC.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.Timestamp`
- order (~google.cloud.errorreporting_v1beta1.types.ErrorGroupOrder): [Optional] The sort order in which the results are returned. Default is
- ``COUNT_DESC``.
+ order (~google.cloud.errorreporting_v1beta1.types.ErrorGroupOrder): Optional. The sort order in which the results are returned. Default
+ is ``COUNT_DESC``.
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
@@ -320,9 +394,9 @@ def list_group_stats(
request = error_stats_service_pb2.ListGroupStatsRequest(
project_name=project_name,
- time_range=time_range,
group_id=group_id,
service_filter=service_filter,
+ time_range=time_range,
timed_count_duration=timed_count_duration,
alignment=alignment,
alignment_time=alignment_time,
@@ -396,20 +470,20 @@ def list_events(
... pass
Args:
- project_name (str): [Required] The resource name of the Google Cloud Platform project.
+ project_name (str): Required. The resource name of the Google Cloud Platform project.
Written as ``projects/`` plus the `Google Cloud Platform project
ID `__. Example:
``projects/my-project-123``.
- group_id (str): [Required] The group for which events shall be returned.
- service_filter (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter]): [Optional] List only ErrorGroups which belong to a service context that
- matches the filter. Data for all service contexts is returned if this
- field is not specified.
+ group_id (str): Required. The group for which events shall be returned.
+ service_filter (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter]): Optional. List only ErrorGroups which belong to a service context that
+ matches the filter.
+ Data for all service contexts is returned if this field is not specified.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.ServiceContextFilter`
- time_range (Union[dict, ~google.cloud.errorreporting_v1beta1.types.QueryTimeRange]): [Optional] List only data for the given time range. If not set a default
- time range is used. The field time\_range\_begin in the response will
- specify the beginning of this time range.
+ time_range (Union[dict, ~google.cloud.errorreporting_v1beta1.types.QueryTimeRange]): Optional. List only data for the given time range. If not set a
+ default time range is used. The field time_range_begin in the response
+ will specify the beginning of this time range.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.QueryTimeRange`
@@ -485,75 +559,3 @@ def list_events(
response_token_field="next_page_token",
)
return iterator
-
- def delete_events(
- self,
- project_name,
- retry=google.api_core.gapic_v1.method.DEFAULT,
- timeout=google.api_core.gapic_v1.method.DEFAULT,
- metadata=None,
- ):
- """
- Deletes all error events of a given project.
-
- Example:
- >>> from google.cloud import errorreporting_v1beta1
- >>>
- >>> client = errorreporting_v1beta1.ErrorStatsServiceClient()
- >>>
- >>> project_name = client.project_path('[PROJECT]')
- >>>
- >>> response = client.delete_events(project_name)
-
- Args:
- project_name (str): [Required] The resource name of the Google Cloud Platform project.
- Written as ``projects/`` plus the `Google Cloud Platform project
- ID `__. Example:
- ``projects/my-project-123``.
- 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.errorreporting_v1beta1.types.DeleteEventsResponse` 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 "delete_events" not in self._inner_api_calls:
- self._inner_api_calls[
- "delete_events"
- ] = google.api_core.gapic_v1.method.wrap_method(
- self.transport.delete_events,
- default_retry=self._method_configs["DeleteEvents"].retry,
- default_timeout=self._method_configs["DeleteEvents"].timeout,
- client_info=self._client_info,
- )
-
- request = error_stats_service_pb2.DeleteEventsRequest(project_name=project_name)
- if metadata is None:
- metadata = []
- metadata = list(metadata)
- try:
- routing_header = [("project_name", project_name)]
- except AttributeError:
- pass
- else:
- routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
- routing_header
- )
- metadata.append(routing_metadata)
-
- return self._inner_api_calls["delete_events"](
- request, retry=retry, timeout=timeout, metadata=metadata
- )
diff --git a/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client_config.py b/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client_config.py
index fead94c5..0af98e64 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client_config.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client_config.py
@@ -17,17 +17,17 @@
}
},
"methods": {
- "ListGroupStats": {
+ "DeleteEvents": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
- "ListEvents": {
+ "ListGroupStats": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
- "DeleteEvents": {
+ "ListEvents": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
diff --git a/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py b/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py
index 7ad37cc1..9d35c6b6 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -48,7 +48,7 @@
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
- "google-cloud-error-reporting"
+ "google-cloud-error-reporting",
).version
@@ -86,7 +86,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
- "projects/{project}", project=project
+ "projects/{project}", project=project,
)
def __init__(
@@ -176,12 +176,12 @@ def __init__(
self.transport = transport
else:
self.transport = report_errors_service_grpc_transport.ReportErrorsServiceGrpcTransport(
- address=api_endpoint, channel=channel, credentials=credentials
+ address=api_endpoint, channel=channel, credentials=credentials,
)
if client_info is None:
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
- gapic_version=_GAPIC_LIBRARY_VERSION
+ gapic_version=_GAPIC_LIBRARY_VERSION,
)
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
@@ -192,7 +192,7 @@ def __init__(
# (Ordinarily, these are the defaults specified in the `*_config.py`
# file next to this one.)
self._method_configs = google.api_core.gapic_v1.config.parse_method_configs(
- client_config["interfaces"][self._INTERFACE_NAME]
+ client_config["interfaces"][self._INTERFACE_NAME],
)
# Save a dictionary of cached API call functions.
@@ -213,6 +213,13 @@ def report_error_event(
"""
Report an individual error event.
+ This endpoint accepts **either** an OAuth token, **or** an `API
+ key `__ for
+ authentication. To use an API key, append it to the URL as the value of
+ a ``key`` parameter. For example:
+
+ ``POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456``
+
Example:
>>> from google.cloud import errorreporting_v1beta1
>>>
@@ -226,11 +233,11 @@ def report_error_event(
>>> response = client.report_error_event(project_name, event)
Args:
- project_name (str): [Required] The resource name of the Google Cloud Platform project.
+ project_name (str): Required. The resource name of the Google Cloud Platform project.
Written as ``projects/`` plus the `Google Cloud Platform project
ID `__. Example:
``projects/my-project-123``.
- event (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ReportedErrorEvent]): [Required] The error event to be reported.
+ event (Union[dict, ~google.cloud.errorreporting_v1beta1.types.ReportedErrorEvent]): Required. The error event to be reported.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.errorreporting_v1beta1.types.ReportedErrorEvent`
@@ -265,7 +272,7 @@ def report_error_event(
)
request = report_errors_service_pb2.ReportErrorEventRequest(
- project_name=project_name, event=event
+ project_name=project_name, event=event,
)
if metadata is None:
metadata = []
diff --git a/google/cloud/errorreporting_v1beta1/gapic/transports/error_group_service_grpc_transport.py b/google/cloud/errorreporting_v1beta1/gapic/transports/error_group_service_grpc_transport.py
index cde299b8..b877baf4 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/transports/error_group_service_grpc_transport.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/transports/error_group_service_grpc_transport.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -56,7 +56,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
+ "The `channel` and `credentials` arguments are mutually " "exclusive.",
)
# Create the channel.
@@ -77,7 +77,7 @@ def __init__(
self._stubs = {
"error_group_service_stub": error_group_service_pb2_grpc.ErrorGroupServiceStub(
channel
- )
+ ),
}
@classmethod
@@ -116,28 +116,28 @@ def channel(self):
return self._channel
@property
- def get_group(self):
- """Return the gRPC stub for :meth:`ErrorGroupServiceClient.get_group`.
+ def update_group(self):
+ """Return the gRPC stub for :meth:`ErrorGroupServiceClient.update_group`.
- Get the specified group.
+ Replace the data for the specified group.
+ Fails if the group does not exist.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
- return self._stubs["error_group_service_stub"].GetGroup
+ return self._stubs["error_group_service_stub"].UpdateGroup
@property
- def update_group(self):
- """Return the gRPC stub for :meth:`ErrorGroupServiceClient.update_group`.
+ def get_group(self):
+ """Return the gRPC stub for :meth:`ErrorGroupServiceClient.get_group`.
- Replace the data for the specified group.
- Fails if the group does not exist.
+ Get the specified group.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
- return self._stubs["error_group_service_stub"].UpdateGroup
+ return self._stubs["error_group_service_stub"].GetGroup
diff --git a/google/cloud/errorreporting_v1beta1/gapic/transports/error_stats_service_grpc_transport.py b/google/cloud/errorreporting_v1beta1/gapic/transports/error_stats_service_grpc_transport.py
index 2ef5f212..f1e15226 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/transports/error_stats_service_grpc_transport.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/transports/error_stats_service_grpc_transport.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -56,7 +56,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
+ "The `channel` and `credentials` arguments are mutually " "exclusive.",
)
# Create the channel.
@@ -77,7 +77,7 @@ def __init__(
self._stubs = {
"error_stats_service_stub": error_stats_service_pb2_grpc.ErrorStatsServiceStub(
channel
- )
+ ),
}
@classmethod
@@ -116,40 +116,40 @@ def channel(self):
return self._channel
@property
- def list_group_stats(self):
- """Return the gRPC stub for :meth:`ErrorStatsServiceClient.list_group_stats`.
+ def delete_events(self):
+ """Return the gRPC stub for :meth:`ErrorStatsServiceClient.delete_events`.
- Lists the specified groups.
+ Deletes all error events of a given project.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
- return self._stubs["error_stats_service_stub"].ListGroupStats
+ return self._stubs["error_stats_service_stub"].DeleteEvents
@property
- def list_events(self):
- """Return the gRPC stub for :meth:`ErrorStatsServiceClient.list_events`.
+ def list_group_stats(self):
+ """Return the gRPC stub for :meth:`ErrorStatsServiceClient.list_group_stats`.
- Lists the specified events.
+ Lists the specified groups.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
- return self._stubs["error_stats_service_stub"].ListEvents
+ return self._stubs["error_stats_service_stub"].ListGroupStats
@property
- def delete_events(self):
- """Return the gRPC stub for :meth:`ErrorStatsServiceClient.delete_events`.
+ def list_events(self):
+ """Return the gRPC stub for :meth:`ErrorStatsServiceClient.list_events`.
- Deletes all error events of a given project.
+ Lists the specified events.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
- return self._stubs["error_stats_service_stub"].DeleteEvents
+ return self._stubs["error_stats_service_stub"].ListEvents
diff --git a/google/cloud/errorreporting_v1beta1/gapic/transports/report_errors_service_grpc_transport.py b/google/cloud/errorreporting_v1beta1/gapic/transports/report_errors_service_grpc_transport.py
index e367e49c..6a97b861 100644
--- a/google/cloud/errorreporting_v1beta1/gapic/transports/report_errors_service_grpc_transport.py
+++ b/google/cloud/errorreporting_v1beta1/gapic/transports/report_errors_service_grpc_transport.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -56,7 +56,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
- "The `channel` and `credentials` arguments are mutually " "exclusive."
+ "The `channel` and `credentials` arguments are mutually " "exclusive.",
)
# Create the channel.
@@ -77,7 +77,7 @@ def __init__(
self._stubs = {
"report_errors_service_stub": report_errors_service_pb2_grpc.ReportErrorsServiceStub(
channel
- )
+ ),
}
@classmethod
@@ -121,6 +121,13 @@ def report_error_event(self):
Report an individual error event.
+ This endpoint accepts **either** an OAuth token, **or** an `API
+ key `__ for
+ authentication. To use an API key, append it to the URL as the value of
+ a ``key`` parameter. For example:
+
+ ``POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456``
+
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
diff --git a/google/cloud/errorreporting_v1beta1/proto/common.proto b/google/cloud/errorreporting_v1beta1/proto/common.proto
index 132f1a64..7a1d2003 100644
--- a/google/cloud/errorreporting_v1beta1/proto/common.proto
+++ b/google/cloud/errorreporting_v1beta1/proto/common.proto
@@ -1,4 +1,4 @@
-// Copyright 2016 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -17,18 +17,25 @@ syntax = "proto3";
package google.devtools.clouderrorreporting.v1beta1;
import "google/api/annotations.proto";
-import "google/api/monitored_resource.proto";
+import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
+option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+option ruby_package = "Google::Cloud::ErrorReporting::V1beta1";
// Description of a group of similar error events.
message ErrorGroup {
+ option (google.api.resource) = {
+ type: "clouderrorreporting.googleapis.com/ErrorGroup"
+ pattern: "projects/{project}/groups/{group}"
+ };
+
// The group resource name.
// Example: projects/my-project-123/groups/my-groupid
string name = 1;
@@ -44,7 +51,7 @@ message ErrorGroup {
// Information related to tracking the progress on resolving the error.
message TrackingIssue {
// A URL pointing to a related entry in an issue tracking system.
- // Example: https://github.com/user/project/issues/4
+ // Example: `https://github.com/user/project/issues/4`
string url = 1;
}
@@ -79,6 +86,8 @@ message ServiceContext {
// Represents the source code version that the developer provided,
// which could represent a version label or a Git SHA-1 hash, for example.
+ // For App Engine standard environment, the version is set to the version of
+ // the app.
string version = 3;
// Type of the MonitoredResource. List of possible values:
@@ -112,8 +121,7 @@ message ErrorContext {
// report the error, usually the place where it was logged.
// For a logged exception this would be the source line where the
// exception is logged, usually close to the place where it was
- // caught. This value is in contrast to `Exception.cause_location`,
- // which describes the source line where the exception was thrown.
+ // caught.
SourceLocation report_location = 3;
}
@@ -144,11 +152,10 @@ message HttpRequestContext {
string remote_ip = 6;
}
-// Indicates a location in the source code of the service for which
-// errors are reported.
-// This data should be provided by the application when reporting an error,
-// unless the error report has been generated automatically from Google App
-// Engine logs. All fields are optional.
+// Indicates a location in the source code of the service for which errors are
+// reported. `functionName` must be provided by the application when reporting
+// an error, unless the error report contains a `message` with a supported
+// exception stack trace. All fields are optional for the later case.
message SourceLocation {
// The source code filename, which can include a truncated relative
// path, or a full path from a production machine.
diff --git a/google/cloud/errorreporting_v1beta1/proto/common_pb2.py b/google/cloud/errorreporting_v1beta1/proto/common_pb2.py
index c9ebc4c6..76efff19 100644
--- a/google/cloud/errorreporting_v1beta1/proto/common_pb2.py
+++ b/google/cloud/errorreporting_v1beta1/proto/common_pb2.py
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/devtools/clouderrorreporting_v1beta1/proto/common.proto
-
-import sys
-
-_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
+# source: google/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto
+"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
@@ -16,25 +13,20 @@
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from google.api import (
- monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2,
-)
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/devtools/clouderrorreporting_v1beta1/proto/common.proto",
+ name="google/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto",
package="google.devtools.clouderrorreporting.v1beta1",
syntax="proto3",
- serialized_options=_b(
- "\n/com.google.devtools.clouderrorreporting.v1beta1B\013CommonProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1"
- ),
- serialized_pb=_b(
- '\n>google/devtools/clouderrorreporting_v1beta1/proto/common.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/api/monitored_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x81\x01\n\nErrorGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12S\n\x0ftracking_issues\x18\x03 \x03(\x0b\x32:.google.devtools.clouderrorreporting.v1beta1.TrackingIssue"\x1c\n\rTrackingIssue\x12\x0b\n\x03url\x18\x01 \x01(\t"\xef\x01\n\nErrorEvent\x12.\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fservice_context\x18\x02 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x0f\n\x07message\x18\x03 \x01(\t\x12J\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x39.google.devtools.clouderrorreporting.v1beta1.ErrorContext"I\n\x0eServiceContext\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t"\xc9\x01\n\x0c\x45rrorContext\x12U\n\x0chttp_request\x18\x01 \x01(\x0b\x32?.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext\x12\x0c\n\x04user\x18\x02 \x01(\t\x12T\n\x0freport_location\x18\x03 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.SourceLocation"\x88\x01\n\x12HttpRequestContext\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x12\n\nuser_agent\x18\x03 \x01(\t\x12\x10\n\x08referrer\x18\x04 \x01(\t\x12\x1c\n\x14response_status_code\x18\x05 \x01(\x05\x12\x11\n\tremote_ip\x18\x06 \x01(\t"O\n\x0eSourceLocation\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x13\n\x0bline_number\x18\x02 \x01(\x05\x12\x15\n\rfunction_name\x18\x04 \x01(\tB\xec\x01\n/com.google.devtools.clouderrorreporting.v1beta1B\x0b\x43ommonProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1b\x06proto3'
- ),
+ serialized_options=b"\n/com.google.devtools.clouderrorreporting.v1beta1B\013CommonProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\370\001\001\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1\352\002&Google::Cloud::ErrorReporting::V1beta1",
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\nDgoogle/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xd8\x01\n\nErrorGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12S\n\x0ftracking_issues\x18\x03 \x03(\x0b\x32:.google.devtools.clouderrorreporting.v1beta1.TrackingIssue:U\xea\x41R\n-clouderrorreporting.googleapis.com/ErrorGroup\x12!projects/{project}/groups/{group}"\x1c\n\rTrackingIssue\x12\x0b\n\x03url\x18\x01 \x01(\t"\xef\x01\n\nErrorEvent\x12.\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fservice_context\x18\x02 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x0f\n\x07message\x18\x03 \x01(\t\x12J\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x39.google.devtools.clouderrorreporting.v1beta1.ErrorContext"I\n\x0eServiceContext\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t"\xc9\x01\n\x0c\x45rrorContext\x12U\n\x0chttp_request\x18\x01 \x01(\x0b\x32?.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext\x12\x0c\n\x04user\x18\x02 \x01(\t\x12T\n\x0freport_location\x18\x03 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.SourceLocation"\x88\x01\n\x12HttpRequestContext\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x12\n\nuser_agent\x18\x03 \x01(\t\x12\x10\n\x08referrer\x18\x04 \x01(\t\x12\x1c\n\x14response_status_code\x18\x05 \x01(\x05\x12\x11\n\tremote_ip\x18\x06 \x01(\t"O\n\x0eSourceLocation\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x13\n\x0bline_number\x18\x02 \x01(\x05\x12\x15\n\rfunction_name\x18\x04 \x01(\tB\x98\x02\n/com.google.devtools.clouderrorreporting.v1beta1B\x0b\x43ommonProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xf8\x01\x01\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xea\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3',
dependencies=[
google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,
+ google_dot_api_dot_resource__pb2.DESCRIPTOR,
google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,
],
)
@@ -46,6 +38,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="name",
@@ -56,7 +49,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -64,6 +57,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="group_id",
@@ -74,7 +68,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -82,6 +76,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="tracking_issues",
@@ -100,18 +95,19 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
nested_types=[],
enum_types=[],
- serialized_options=None,
+ serialized_options=b"\352AR\n-clouderrorreporting.googleapis.com/ErrorGroup\022!projects/{project}/groups/{group}",
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=212,
- serialized_end=341,
+ serialized_start=208,
+ serialized_end=424,
)
@@ -121,6 +117,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="url",
@@ -131,7 +128,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -139,7 +136,8 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
- )
+ create_key=_descriptor._internal_create_key,
+ ),
],
extensions=[],
nested_types=[],
@@ -149,8 +147,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=343,
- serialized_end=371,
+ serialized_start=426,
+ serialized_end=454,
)
@@ -160,6 +158,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="event_time",
@@ -178,6 +177,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="service_context",
@@ -196,6 +196,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="message",
@@ -206,7 +207,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -214,6 +215,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="context",
@@ -232,6 +234,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -242,8 +245,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=374,
- serialized_end=613,
+ serialized_start=457,
+ serialized_end=696,
)
@@ -253,6 +256,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="service",
@@ -263,7 +267,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -271,6 +275,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="version",
@@ -281,7 +286,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -289,6 +294,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="resource_type",
@@ -299,7 +305,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -307,6 +313,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -317,8 +324,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=615,
- serialized_end=688,
+ serialized_start=698,
+ serialized_end=771,
)
@@ -328,6 +335,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="http_request",
@@ -346,6 +354,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="user",
@@ -356,7 +365,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -364,6 +373,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="report_location",
@@ -382,6 +392,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -392,8 +403,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=691,
- serialized_end=892,
+ serialized_start=774,
+ serialized_end=975,
)
@@ -403,6 +414,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="method",
@@ -413,7 +425,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -421,6 +433,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="url",
@@ -431,7 +444,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -439,6 +452,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="user_agent",
@@ -449,7 +463,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -457,6 +471,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="referrer",
@@ -467,7 +482,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -475,6 +490,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="response_status_code",
@@ -493,6 +509,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="remote_ip",
@@ -503,7 +520,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -511,6 +528,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -521,8 +539,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=895,
- serialized_end=1031,
+ serialized_start=978,
+ serialized_end=1114,
)
@@ -532,6 +550,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="file_path",
@@ -542,7 +561,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -550,6 +569,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="line_number",
@@ -568,6 +588,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="function_name",
@@ -578,7 +599,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -586,6 +607,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -596,8 +618,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=1033,
- serialized_end=1112,
+ serialized_start=1116,
+ serialized_end=1195,
)
_ERRORGROUP.fields_by_name["tracking_issues"].message_type = _TRACKINGISSUE
@@ -620,11 +642,10 @@
ErrorGroup = _reflection.GeneratedProtocolMessageType(
"ErrorGroup",
(_message.Message,),
- dict(
- DESCRIPTOR=_ERRORGROUP,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""Description of a group of similar error events.
-
+ {
+ "DESCRIPTOR": _ERRORGROUP,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """Description of a group of similar error events.
Attributes:
name:
@@ -638,37 +659,35 @@
Associated tracking issues.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorGroup)
- ),
+ },
)
_sym_db.RegisterMessage(ErrorGroup)
TrackingIssue = _reflection.GeneratedProtocolMessageType(
"TrackingIssue",
(_message.Message,),
- dict(
- DESCRIPTOR=_TRACKINGISSUE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""Information related to tracking the progress on resolving the error.
-
+ {
+ "DESCRIPTOR": _TRACKINGISSUE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """Information related to tracking the progress on resolving the error.
Attributes:
url:
A URL pointing to a related entry in an issue tracking system.
- Example: https://github.com/user/project/issues/4
+ Example: ``https://github.com/user/project/issues/4``
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.TrackingIssue)
- ),
+ },
)
_sym_db.RegisterMessage(TrackingIssue)
ErrorEvent = _reflection.GeneratedProtocolMessageType(
"ErrorEvent",
(_message.Message,),
- dict(
- DESCRIPTOR=_ERROREVENT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""An error event which is returned by the Error Reporting system.
-
+ {
+ "DESCRIPTOR": _ERROREVENT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """An error event which is returned by the Error Reporting system.
Attributes:
event_time:
@@ -683,19 +702,18 @@
Data about the context in which the error occurred.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorEvent)
- ),
+ },
)
_sym_db.RegisterMessage(ErrorEvent)
ServiceContext = _reflection.GeneratedProtocolMessageType(
"ServiceContext",
(_message.Message,),
- dict(
- DESCRIPTOR=_SERVICECONTEXT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""Describes a running service that sends errors. Its version changes over
- time and multiple versions can run in parallel.
-
+ {
+ "DESCRIPTOR": _SERVICECONTEXT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """Describes a running service that sends errors. Its version changes
+ over time and multiple versions can run in parallel.
Attributes:
service:
@@ -709,7 +727,8 @@
version:
Represents the source code version that the developer
provided, which could represent a version label or a Git SHA-1
- hash, for example.
+ hash, for example. For App Engine standard environment, the
+ version is set to the version of the app.
resource_type:
Type of the MonitoredResource. List of possible values:
https://cloud.google.com/monitoring/api/resources Value is
@@ -717,21 +736,20 @@
reporting errors.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ServiceContext)
- ),
+ },
)
_sym_db.RegisterMessage(ServiceContext)
ErrorContext = _reflection.GeneratedProtocolMessageType(
"ErrorContext",
(_message.Message,),
- dict(
- DESCRIPTOR=_ERRORCONTEXT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""A description of the context in which an error occurred. This data
+ {
+ "DESCRIPTOR": _ERRORCONTEXT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """A description of the context in which an error occurred. This data
should be provided by the application when reporting an error, unless
- the error report has been generated automatically from Google App Engine
- logs.
-
+ the error report has been generated automatically from Google App
+ Engine logs.
Attributes:
http_request:
@@ -750,25 +768,23 @@
report the error, usually the place where it was logged. For a
logged exception this would be the source line where the
exception is logged, usually close to the place where it was
- caught. This value is in contrast to
- ``Exception.cause_location``, which describes the source line
- where the exception was thrown.
+ caught.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorContext)
- ),
+ },
)
_sym_db.RegisterMessage(ErrorContext)
HttpRequestContext = _reflection.GeneratedProtocolMessageType(
"HttpRequestContext",
(_message.Message,),
- dict(
- DESCRIPTOR=_HTTPREQUESTCONTEXT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""HTTP request data that is related to a reported error. This data should
- be provided by the application when reporting an error, unless the error
- report has been generated automatically from Google App Engine logs.
-
+ {
+ "DESCRIPTOR": _HTTPREQUESTCONTEXT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """HTTP request data that is related to a reported error. This data
+ should be provided by the application when reporting an error, unless
+ the error report has been generated automatically from Google App
+ Engine logs.
Attributes:
method:
@@ -788,21 +804,21 @@
report.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.HttpRequestContext)
- ),
+ },
)
_sym_db.RegisterMessage(HttpRequestContext)
SourceLocation = _reflection.GeneratedProtocolMessageType(
"SourceLocation",
(_message.Message,),
- dict(
- DESCRIPTOR=_SOURCELOCATION,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
- __doc__="""Indicates a location in the source code of the service for which errors
- are reported. This data should be provided by the application when
- reporting an error, unless the error report has been generated
- automatically from Google App Engine logs. All fields are optional.
-
+ {
+ "DESCRIPTOR": _SOURCELOCATION,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.common_pb2",
+ "__doc__": """Indicates a location in the source code of the service for which
+ errors are reported. ``functionName`` must be provided by the
+ application when reporting an error, unless the error report contains
+ a ``message`` with a supported exception stack trace. All fields are
+ optional for the later case.
Attributes:
file_path:
@@ -816,10 +832,11 @@
example, ``my.package.MyClass.method`` in case of Java.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.SourceLocation)
- ),
+ },
)
_sym_db.RegisterMessage(SourceLocation)
DESCRIPTOR._options = None
+_ERRORGROUP._options = None
# @@protoc_insertion_point(module_scope)
diff --git a/google/cloud/errorreporting_v1beta1/proto/common_pb2_grpc.py b/google/cloud/errorreporting_v1beta1/proto/common_pb2_grpc.py
index 07cb78fe..8a939394 100644
--- a/google/cloud/errorreporting_v1beta1/proto/common_pb2_grpc.py
+++ b/google/cloud/errorreporting_v1beta1/proto/common_pb2_grpc.py
@@ -1,2 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
import grpc
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_group_service.proto b/google/cloud/errorreporting_v1beta1/proto/error_group_service.proto
index 15086a9e..18182729 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_group_service.proto
+++ b/google/cloud/errorreporting_v1beta1/proto/error_group_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2016 Google Inc.
+// Copyright 2019 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,28 +11,38 @@
// 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.devtools.clouderrorreporting.v1beta1;
import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
import "google/devtools/clouderrorreporting/v1beta1/common.proto";
+option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
option java_multiple_files = true;
option java_outer_classname = "ErrorGroupServiceProto";
option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+option ruby_package = "Google::Cloud::ErrorReporting::V1beta1";
// Service for retrieving and updating individual error groups.
service ErrorGroupService {
+ option (google.api.default_host) = "clouderrorreporting.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
// Get the specified group.
rpc GetGroup(GetGroupRequest) returns (ErrorGroup) {
option (google.api.http) = {
get: "/v1beta1/{group_name=projects/*/groups/*}"
};
+ option (google.api.method_signature) = "group_name";
}
// Replace the data for the specified group.
@@ -42,24 +52,28 @@ service ErrorGroupService {
put: "/v1beta1/{group.name=projects/*/groups/*}"
body: "group"
};
+ option (google.api.method_signature) = "group";
}
}
// A request to return an individual group.
message GetGroupRequest {
- // [Required] The group resource name. Written as
- // projects/projectID/groups/group_name
.
- // Call
- //
- // groupStats.list
to return a list of groups belonging to
- // this project.
+ // The group resource name. Written as
+ // `projects/{projectID}/groups/{group_name}`. Call
+ // [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list)
+ // to return a list of groups belonging to this project.
//
- // Example: projects/my-project-123/groups/my-group
- string group_name = 1;
+ // Example: `projects/my-project-123/groups/my-group`
+ string group_name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "clouderrorreporting.googleapis.com/ErrorGroup"
+ }
+ ];
}
// A request to replace the existing data for the given group.
message UpdateGroupRequest {
- // [Required] The group which replaces the resource on the server.
- ErrorGroup group = 1;
+ // Required. The group which replaces the resource on the server.
+ ErrorGroup group = 1 [(google.api.field_behavior) = REQUIRED];
}
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2.py b/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2.py
index a6406ab0..49358c4c 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2.py
+++ b/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2.py
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto
-
-import sys
-
-_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
+# source: google/cloud/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto
+"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
@@ -16,24 +13,27 @@
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from google.api import client_pb2 as google_dot_api_dot_client__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.errorreporting_v1beta1.proto import (
- common_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
+ common_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
)
DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto",
+ name="google/cloud/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto",
package="google.devtools.clouderrorreporting.v1beta1",
syntax="proto3",
- serialized_options=_b(
- "\n/com.google.devtools.clouderrorreporting.v1beta1B\026ErrorGroupServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1"
- ),
- serialized_pb=_b(
- '\nKgoogle/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a>google/devtools/clouderrorreporting_v1beta1/proto/common.proto"%\n\x0fGetGroupRequest\x12\x12\n\ngroup_name\x18\x01 \x01(\t"\\\n\x12UpdateGroupRequest\x12\x46\n\x05group\x18\x01 \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup2\x8e\x03\n\x11\x45rrorGroupService\x12\xb4\x01\n\x08GetGroup\x12<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest\x1a\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"1\x82\xd3\xe4\x93\x02+\x12)/v1beta1/{group_name=projects/*/groups/*}\x12\xc1\x01\n\x0bUpdateGroup\x12?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest\x1a\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"8\x82\xd3\xe4\x93\x02\x32\x1a)/v1beta1/{group.name=projects/*/groups/*}:\x05groupB\xf7\x01\n/com.google.devtools.clouderrorreporting.v1beta1B\x16\x45rrorGroupServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1b\x06proto3'
- ),
+ serialized_options=b"\n/com.google.devtools.clouderrorreporting.v1beta1B\026ErrorGroupServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\370\001\001\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1\352\002&Google::Cloud::ErrorReporting::V1beta1",
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\nQgoogle/cloud/devtools/clouderrorreporting_v1beta1/proto/error_group_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x44google/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto"\\\n\x0fGetGroupRequest\x12I\n\ngroup_name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-clouderrorreporting.googleapis.com/ErrorGroup"a\n\x12UpdateGroupRequest\x12K\n\x05group\x18\x01 \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroupB\x03\xe0\x41\x02\x32\xfb\x03\n\x11\x45rrorGroupService\x12\xc1\x01\n\x08GetGroup\x12<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest\x1a\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup">\x82\xd3\xe4\x93\x02+\x12)/v1beta1/{group_name=projects/*/groups/*}\xda\x41\ngroup_name\x12\xc9\x01\n\x0bUpdateGroup\x12?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest\x1a\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"@\x82\xd3\xe4\x93\x02\x32\x1a)/v1beta1/{group.name=projects/*/groups/*}:\x05group\xda\x41\x05group\x1aV\xca\x41"clouderrorreporting.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa3\x02\n/com.google.devtools.clouderrorreporting.v1beta1B\x16\x45rrorGroupServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xf8\x01\x01\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xea\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3',
dependencies=[
google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
+ google_dot_api_dot_client__pb2.DESCRIPTOR,
+ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
+ google_dot_api_dot_resource__pb2.DESCRIPTOR,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
],
)
@@ -44,6 +44,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="group_name",
@@ -54,15 +55,16 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002\372A/\n-clouderrorreporting.googleapis.com/ErrorGroup",
file=DESCRIPTOR,
- )
+ create_key=_descriptor._internal_create_key,
+ ),
],
extensions=[],
nested_types=[],
@@ -72,8 +74,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=218,
- serialized_end=255,
+ serialized_start=315,
+ serialized_end=407,
)
@@ -83,6 +85,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="group",
@@ -99,9 +102,10 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002",
file=DESCRIPTOR,
- )
+ create_key=_descriptor._internal_create_key,
+ ),
],
extensions=[],
nested_types=[],
@@ -111,14 +115,14 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=257,
- serialized_end=349,
+ serialized_start=409,
+ serialized_end=506,
)
_UPDATEGROUPREQUEST.fields_by_name[
"group"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP
)
DESCRIPTOR.message_types_by_name["GetGroupRequest"] = _GETGROUPREQUEST
DESCRIPTOR.message_types_by_name["UpdateGroupRequest"] = _UPDATEGROUPREQUEST
@@ -127,54 +131,56 @@
GetGroupRequest = _reflection.GeneratedProtocolMessageType(
"GetGroupRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_GETGROUPREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_group_service_pb2",
- __doc__="""A request to return an individual group.
-
+ {
+ "DESCRIPTOR": _GETGROUPREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_group_service_pb2",
+ "__doc__": """A request to return an individual group.
Attributes:
group_name:
- [Required] The group resource name. Written as
- projects/projectID/groups/group\_name. Call groupStats.list to
- return a list of groups belonging to this project. Example:
- projects/my-project-123/groups/my-group
+ The group resource name. Written as
+ ``projects/{projectID}/groups/{group_name}``. Call
+ ```groupStats.list`` `__
+ to return a list of groups belonging to this project.
+ Example: ``projects/my-project-123/groups/my-group``
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.GetGroupRequest)
- ),
+ },
)
_sym_db.RegisterMessage(GetGroupRequest)
UpdateGroupRequest = _reflection.GeneratedProtocolMessageType(
"UpdateGroupRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_UPDATEGROUPREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_group_service_pb2",
- __doc__="""A request to replace the existing data for the given group.
-
+ {
+ "DESCRIPTOR": _UPDATEGROUPREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_group_service_pb2",
+ "__doc__": """A request to replace the existing data for the given group.
Attributes:
group:
- [Required] The group which replaces the resource on the
- server.
+ Required. The group which replaces the resource on the server.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest)
- ),
+ },
)
_sym_db.RegisterMessage(UpdateGroupRequest)
DESCRIPTOR._options = None
+_GETGROUPREQUEST.fields_by_name["group_name"]._options = None
+_UPDATEGROUPREQUEST.fields_by_name["group"]._options = None
_ERRORGROUPSERVICE = _descriptor.ServiceDescriptor(
name="ErrorGroupService",
full_name="google.devtools.clouderrorreporting.v1beta1.ErrorGroupService",
file=DESCRIPTOR,
index=0,
- serialized_options=None,
- serialized_start=352,
- serialized_end=750,
+ serialized_options=b'\312A"clouderrorreporting.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform',
+ create_key=_descriptor._internal_create_key,
+ serialized_start=509,
+ serialized_end=1016,
methods=[
_descriptor.MethodDescriptor(
name="GetGroup",
@@ -182,10 +188,9 @@
index=0,
containing_service=None,
input_type=_GETGROUPREQUEST,
- output_type=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP,
- serialized_options=_b(
- "\202\323\344\223\002+\022)/v1beta1/{group_name=projects/*/groups/*}"
- ),
+ output_type=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP,
+ serialized_options=b"\202\323\344\223\002+\022)/v1beta1/{group_name=projects/*/groups/*}\332A\ngroup_name",
+ create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name="UpdateGroup",
@@ -193,10 +198,9 @@
index=1,
containing_service=None,
input_type=_UPDATEGROUPREQUEST,
- output_type=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP,
- serialized_options=_b(
- "\202\323\344\223\0022\032)/v1beta1/{group.name=projects/*/groups/*}:\005group"
- ),
+ output_type=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP,
+ serialized_options=b"\202\323\344\223\0022\032)/v1beta1/{group.name=projects/*/groups/*}:\005group\332A\005group",
+ create_key=_descriptor._internal_create_key,
),
],
)
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2_grpc.py b/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2_grpc.py
index 3849772f..9e9af29e 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2_grpc.py
+++ b/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2_grpc.py
@@ -1,51 +1,52 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.cloud.errorreporting_v1beta1.proto import (
- common_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
+ common_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
)
from google.cloud.errorreporting_v1beta1.proto import (
- error_group_service_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2,
+ error_group_service_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2,
)
class ErrorGroupServiceStub(object):
"""Service for retrieving and updating individual error groups.
- """
+ """
def __init__(self, channel):
"""Constructor.
- Args:
- channel: A grpc.Channel.
- """
+ Args:
+ channel: A grpc.Channel.
+ """
self.GetGroup = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.GetGroupRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.GetGroupRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
)
self.UpdateGroup = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.UpdateGroupRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.UpdateGroupRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
)
class ErrorGroupServiceServicer(object):
"""Service for retrieving and updating individual error groups.
- """
+ """
def GetGroup(self, request, context):
"""Get the specified group.
- """
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def UpdateGroup(self, request, context):
"""Replace the data for the specified group.
- Fails if the group does not exist.
- """
+ Fails if the group does not exist.
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
@@ -55,13 +56,13 @@ def add_ErrorGroupServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
"GetGroup": grpc.unary_unary_rpc_method_handler(
servicer.GetGroup,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.GetGroupRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.SerializeToString,
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.GetGroupRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.SerializeToString,
),
"UpdateGroup": grpc.unary_unary_rpc_method_handler(
servicer.UpdateGroup,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.UpdateGroupRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.SerializeToString,
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.UpdateGroupRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
@@ -69,3 +70,63 @@ def add_ErrorGroupServiceServicer_to_server(servicer, server):
rpc_method_handlers,
)
server.add_generic_rpc_handlers((generic_handler,))
+
+
+# This class is part of an EXPERIMENTAL API.
+class ErrorGroupService(object):
+ """Service for retrieving and updating individual error groups.
+ """
+
+ @staticmethod
+ def GetGroup(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.GetGroupRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
+
+ @staticmethod
+ def UpdateGroup(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__group__service__pb2.UpdateGroupRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.ErrorGroup.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_stats_service.proto b/google/cloud/errorreporting_v1beta1/proto/error_stats_service.proto
index ffb25b2b..0773f488 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_stats_service.proto
+++ b/google/cloud/errorreporting_v1beta1/proto/error_stats_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2016 Google Inc.
+// Copyright 2019 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,31 +11,41 @@
// 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.devtools.clouderrorreporting.v1beta1;
import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
import "google/devtools/clouderrorreporting/v1beta1/common.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
+option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
option java_multiple_files = true;
option java_outer_classname = "ErrorStatsServiceProto";
option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+option ruby_package = "Google::Cloud::ErrorReporting::V1beta1";
// An API for retrieving and managing error statistics as well as data for
// individual events.
service ErrorStatsService {
+ option (google.api.default_host) = "clouderrorreporting.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
// Lists the specified groups.
rpc ListGroupStats(ListGroupStatsRequest) returns (ListGroupStatsResponse) {
option (google.api.http) = {
get: "/v1beta1/{project_name=projects/*}/groupStats"
};
+ option (google.api.method_signature) = "project_name,time_range";
}
// Lists the specified events.
@@ -43,6 +53,7 @@ service ErrorStatsService {
option (google.api.http) = {
get: "/v1beta1/{project_name=projects/*}/events"
};
+ option (google.api.method_signature) = "project_name,group_id";
}
// Deletes all error events of a given project.
@@ -50,60 +61,67 @@ service ErrorStatsService {
option (google.api.http) = {
delete: "/v1beta1/{project_name=projects/*}/events"
};
+ option (google.api.method_signature) = "project_name";
}
}
// Specifies a set of `ErrorGroupStats` to return.
message ListGroupStatsRequest {
- // [Required] The resource name of the Google Cloud Platform project. Written
+ // Required. The resource name of the Google Cloud Platform project. Written
// as projects/
plus the
// Google Cloud
// Platform project ID.
//
// Example: projects/my-project-123
.
- string project_name = 1;
+ string project_name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
- // [Optional] List all ErrorGroupStats
with these IDs.
- repeated string group_id = 2;
+ // Optional. List all ErrorGroupStats
with these IDs.
+ repeated string group_id = 2 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] List only ErrorGroupStats
which belong to a service
+ // Optional. List only ErrorGroupStats
which belong to a service
// context that matches the filter.
// Data for all service contexts is returned if this field is not specified.
- ServiceContextFilter service_filter = 3;
+ ServiceContextFilter service_filter = 3 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] List data for the given time range.
- // If not set a default time range is used. The field time_range_begin
- // in the response will specify the beginning of this time range.
+ // Optional. List data for the given time range.
+ // If not set, a default time range is used. The field
+ // time_range_begin
in the response will specify the beginning
+ // of this time range.
// Only ErrorGroupStats
with a non-zero count in the given time
- // range are returned, unless the request contains an explicit group_id list.
- // If a group_id list is given, also ErrorGroupStats
with zero
- // occurrences are returned.
- QueryTimeRange time_range = 5;
+ // range are returned, unless the request contains an explicit
+ // group_id
list. If a group_id
list is given, also
+ // ErrorGroupStats
with zero occurrences are returned.
+ QueryTimeRange time_range = 5 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The preferred duration for a single returned `TimedCount`.
+ // Optional. The preferred duration for a single returned `TimedCount`.
// If not set, no timed counts are returned.
- google.protobuf.Duration timed_count_duration = 6;
+ google.protobuf.Duration timed_count_duration = 6 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The alignment of the timed counts to be returned.
+ // Optional. The alignment of the timed counts to be returned.
// Default is `ALIGNMENT_EQUAL_AT_END`.
- TimedCountAlignment alignment = 7;
+ TimedCountAlignment alignment = 7 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] Time where the timed counts shall be aligned if rounded
+ // Optional. Time where the timed counts shall be aligned if rounded
// alignment is chosen. Default is 00:00 UTC.
- google.protobuf.Timestamp alignment_time = 8;
+ google.protobuf.Timestamp alignment_time = 8 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The sort order in which the results are returned.
+ // Optional. The sort order in which the results are returned.
// Default is `COUNT_DESC`.
- ErrorGroupOrder order = 9;
+ ErrorGroupOrder order = 9 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The maximum number of results to return per response.
+ // Optional. The maximum number of results to return per response.
// Default is 20.
- int32 page_size = 11;
+ int32 page_size = 11 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] A `next_page_token` provided by a previous response. To view
+ // Optional. A `next_page_token` provided by a previous response. To view
// additional results, pass this token along with the identical query
// parameters as the first request.
- string page_token = 12;
+ string page_token = 12 [(google.api.field_behavior) = OPTIONAL];
}
// Contains a set of requested error group stats.
@@ -196,33 +214,79 @@ message TimedCount {
google.protobuf.Timestamp end_time = 3;
}
+// Specifies how the time periods of error group counts are aligned.
+enum TimedCountAlignment {
+ // No alignment specified.
+ ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0;
+
+ // The time periods shall be consecutive, have width equal to the
+ // requested duration, and be aligned at the `alignment_time` provided in
+ // the request.
+ // The `alignment_time` does not have to be inside the query period but
+ // even if it is outside, only time periods are returned which overlap
+ // with the query period.
+ // A rounded alignment will typically result in a
+ // different size of the first or the last time period.
+ ALIGNMENT_EQUAL_ROUNDED = 1;
+
+ // The time periods shall be consecutive, have width equal to the
+ // requested duration, and be aligned at the end of the requested time
+ // period. This can result in a different size of the
+ // first time period.
+ ALIGNMENT_EQUAL_AT_END = 2;
+}
+
+// A sorting order of error groups.
+enum ErrorGroupOrder {
+ // No group order specified.
+ GROUP_ORDER_UNSPECIFIED = 0;
+
+ // Total count of errors in the given time window in descending order.
+ COUNT_DESC = 1;
+
+ // Timestamp when the group was last seen in the given time window
+ // in descending order.
+ LAST_SEEN_DESC = 2;
+
+ // Timestamp when the group was created in descending order.
+ CREATED_DESC = 3;
+
+ // Number of affected users in the given time window in descending order.
+ AFFECTED_USERS_DESC = 4;
+}
+
// Specifies a set of error events to return.
message ListEventsRequest {
- // [Required] The resource name of the Google Cloud Platform project. Written
+ // Required. The resource name of the Google Cloud Platform project. Written
// as `projects/` plus the
// [Google Cloud Platform project
// ID](https://support.google.com/cloud/answer/6158840).
// Example: `projects/my-project-123`.
- string project_name = 1;
+ string project_name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
- // [Required] The group for which events shall be returned.
- string group_id = 2;
+ // Required. The group for which events shall be returned.
+ string group_id = 2 [(google.api.field_behavior) = REQUIRED];
- // [Optional] List only ErrorGroups which belong to a service context that
+ // Optional. List only ErrorGroups which belong to a service context that
// matches the filter.
// Data for all service contexts is returned if this field is not specified.
- ServiceContextFilter service_filter = 3;
+ ServiceContextFilter service_filter = 3 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] List only data for the given time range.
+ // Optional. List only data for the given time range.
// If not set a default time range is used. The field time_range_begin
// in the response will specify the beginning of this time range.
- QueryTimeRange time_range = 4;
+ QueryTimeRange time_range = 4 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The maximum number of results to return per response.
- int32 page_size = 6;
+ // Optional. The maximum number of results to return per response.
+ int32 page_size = 6 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] A `next_page_token` provided by a previous response.
- string page_token = 7;
+ // Optional. A `next_page_token` provided by a previous response.
+ string page_token = 7 [(google.api.field_behavior) = OPTIONAL];
}
// Contains a set of requested error events.
@@ -277,69 +341,35 @@ message QueryTimeRange {
// Only exact, case-sensitive matches are supported.
// If a field is unset or empty, it matches arbitrary values.
message ServiceContextFilter {
- // [Optional] The exact value to match against
+ // Optional. The exact value to match against
// [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).
- string service = 2;
+ string service = 2 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The exact value to match against
+ // Optional. The exact value to match against
// [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).
- string version = 3;
+ string version = 3 [(google.api.field_behavior) = OPTIONAL];
- // [Optional] The exact value to match against
+ // Optional. The exact value to match against
// [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).
- string resource_type = 4;
+ string resource_type = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Deletes all events in the project.
message DeleteEventsRequest {
- // [Required] The resource name of the Google Cloud Platform project. Written
+ // Required. The resource name of the Google Cloud Platform project. Written
// as `projects/` plus the
// [Google Cloud Platform project
// ID](https://support.google.com/cloud/answer/6158840).
// Example: `projects/my-project-123`.
- string project_name = 1;
+ string project_name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
}
// Response message for deleting error events.
-message DeleteEventsResponse {}
-
-// Specifies how the time periods of error group counts are aligned.
-enum TimedCountAlignment {
- // No alignment specified.
- ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0;
-
- // The time periods shall be consecutive, have width equal to the
- // requested duration, and be aligned at the `alignment_time` provided in
- // the request.
- // The `alignment_time` does not have to be inside the query period but
- // even if it is outside, only time periods are returned which overlap
- // with the query period.
- // A rounded alignment will typically result in a
- // different size of the first or the last time period.
- ALIGNMENT_EQUAL_ROUNDED = 1;
-
- // The time periods shall be consecutive, have width equal to the
- // requested duration, and be aligned at the end of the requested time
- // period. This can result in a different size of the
- // first time period.
- ALIGNMENT_EQUAL_AT_END = 2;
-}
+message DeleteEventsResponse {
-// A sorting order of error groups.
-enum ErrorGroupOrder {
- // No group order specified.
- GROUP_ORDER_UNSPECIFIED = 0;
-
- // Total count of errors in the given time window in descending order.
- COUNT_DESC = 1;
-
- // Timestamp when the group was last seen in the given time window
- // in descending order.
- LAST_SEEN_DESC = 2;
-
- // Timestamp when the group was created in descending order.
- CREATED_DESC = 3;
-
- // Number of affected users in the given time window in descending order.
- AFFECTED_USERS_DESC = 4;
}
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2.py b/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2.py
index a8fe60bd..de0efed3 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2.py
+++ b/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2.py
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto
-
-import sys
-
-_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
+# source: google/cloud/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto
+"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
@@ -17,26 +14,29 @@
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from google.api import client_pb2 as google_dot_api_dot_client__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.errorreporting_v1beta1.proto import (
- common_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
+ common_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
)
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto",
+ name="google/cloud/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto",
package="google.devtools.clouderrorreporting.v1beta1",
syntax="proto3",
- serialized_options=_b(
- "\n/com.google.devtools.clouderrorreporting.v1beta1B\026ErrorStatsServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1"
- ),
- serialized_pb=_b(
- '\nKgoogle/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a>google/devtools/clouderrorreporting_v1beta1/proto/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xa1\x04\n\x15ListGroupStatsRequest\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x03(\t\x12Y\n\x0eservice_filter\x18\x03 \x01(\x0b\x32\x41.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter\x12O\n\ntime_range\x18\x05 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange\x12\x37\n\x14timed_count_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12S\n\talignment\x18\x07 \x01(\x0e\x32@.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment\x12\x32\n\x0e\x61lignment_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\x05order\x18\t \x01(\x0e\x32<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder\x12\x11\n\tpage_size\x18\x0b \x01(\x05\x12\x12\n\npage_token\x18\x0c \x01(\t"\xc0\x01\n\x16ListGroupStatsResponse\x12W\n\x11\x65rror_group_stats\x18\x01 \x03(\x0b\x32<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x34\n\x10time_range_begin\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x86\x04\n\x0f\x45rrorGroupStats\x12\x46\n\x05group\x18\x01 \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1c\n\x14\x61\x66\x66\x65\x63ted_users_count\x18\x03 \x01(\x03\x12M\n\x0ctimed_counts\x18\x04 \x03(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.TimedCount\x12\x33\n\x0f\x66irst_seen_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_seen_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x11\x61\x66\x66\x65\x63ted_services\x18\x07 \x03(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x1d\n\x15num_affected_services\x18\x08 \x01(\x05\x12O\n\x0erepresentative\x18\t \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorEvent"y\n\nTimedCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8e\x02\n\x11ListEventsRequest\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12Y\n\x0eservice_filter\x18\x03 \x01(\x0b\x32\x41.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter\x12O\n\ntime_range\x18\x04 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange\x12\x11\n\tpage_size\x18\x06 \x01(\x05\x12\x12\n\npage_token\x18\x07 \x01(\t"\xb2\x01\n\x12ListEventsResponse\x12M\n\x0c\x65rror_events\x18\x01 \x03(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x34\n\x10time_range_begin\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xe7\x01\n\x0eQueryTimeRange\x12R\n\x06period\x18\x01 \x01(\x0e\x32\x42.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period"\x80\x01\n\x06Period\x12\x16\n\x12PERIOD_UNSPECIFIED\x10\x00\x12\x11\n\rPERIOD_1_HOUR\x10\x01\x12\x12\n\x0ePERIOD_6_HOURS\x10\x02\x12\x10\n\x0cPERIOD_1_DAY\x10\x03\x12\x11\n\rPERIOD_1_WEEK\x10\x04\x12\x12\n\x0ePERIOD_30_DAYS\x10\x05"O\n\x14ServiceContextFilter\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t"+\n\x13\x44\x65leteEventsRequest\x12\x14\n\x0cproject_name\x18\x01 \x01(\t"\x16\n\x14\x44\x65leteEventsResponse*u\n\x13TimedCountAlignment\x12%\n!ERROR_COUNT_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LIGNMENT_EQUAL_ROUNDED\x10\x01\x12\x1a\n\x16\x41LIGNMENT_EQUAL_AT_END\x10\x02*}\n\x0f\x45rrorGroupOrder\x12\x1b\n\x17GROUP_ORDER_UNSPECIFIED\x10\x00\x12\x0e\n\nCOUNT_DESC\x10\x01\x12\x12\n\x0eLAST_SEEN_DESC\x10\x02\x12\x10\n\x0c\x43REATED_DESC\x10\x03\x12\x17\n\x13\x41\x46\x46\x45\x43TED_USERS_DESC\x10\x04\x32\xf2\x04\n\x11\x45rrorStatsService\x12\xd0\x01\n\x0eListGroupStats\x12\x42.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest\x1a\x43.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse"5\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{project_name=projects/*}/groupStats\x12\xc0\x01\n\nListEvents\x12>.google.devtools.clouderrorreporting.v1beta1.ListEventsRequest\x1a?.google.devtools.clouderrorreporting.v1beta1.ListEventsResponse"1\x82\xd3\xe4\x93\x02+\x12)/v1beta1/{project_name=projects/*}/events\x12\xc6\x01\n\x0c\x44\x65leteEvents\x12@.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest\x1a\x41.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse"1\x82\xd3\xe4\x93\x02+*)/v1beta1/{project_name=projects/*}/eventsB\xf7\x01\n/com.google.devtools.clouderrorreporting.v1beta1B\x16\x45rrorStatsServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1b\x06proto3'
- ),
+ serialized_options=b"\n/com.google.devtools.clouderrorreporting.v1beta1B\026ErrorStatsServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\370\001\001\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1\352\002&Google::Cloud::ErrorReporting::V1beta1",
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\nQgoogle/cloud/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x44google/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x83\x05\n\x15ListGroupStatsRequest\x12I\n\x0cproject_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x15\n\x08group_id\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12^\n\x0eservice_filter\x18\x03 \x01(\x0b\x32\x41.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xe0\x41\x01\x12T\n\ntime_range\x18\x05 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xe0\x41\x01\x12<\n\x14timed_count_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12X\n\talignment\x18\x07 \x01(\x0e\x32@.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignmentB\x03\xe0\x41\x01\x12\x37\n\x0e\x61lignment_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12P\n\x05order\x18\t \x01(\x0e\x32<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrderB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x0c \x01(\tB\x03\xe0\x41\x01"\xc0\x01\n\x16ListGroupStatsResponse\x12W\n\x11\x65rror_group_stats\x18\x01 \x03(\x0b\x32<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x34\n\x10time_range_begin\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x86\x04\n\x0f\x45rrorGroupStats\x12\x46\n\x05group\x18\x01 \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x1c\n\x14\x61\x66\x66\x65\x63ted_users_count\x18\x03 \x01(\x03\x12M\n\x0ctimed_counts\x18\x04 \x03(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.TimedCount\x12\x33\n\x0f\x66irst_seen_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0elast_seen_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x11\x61\x66\x66\x65\x63ted_services\x18\x07 \x03(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x1d\n\x15num_affected_services\x18\x08 \x01(\x05\x12O\n\x0erepresentative\x18\t \x01(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorEvent"y\n\nTimedCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xdc\x02\n\x11ListEventsRequest\x12I\n\x0cproject_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x15\n\x08group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12^\n\x0eservice_filter\x18\x03 \x01(\x0b\x32\x41.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xe0\x41\x01\x12T\n\ntime_range\x18\x04 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x07 \x01(\tB\x03\xe0\x41\x01"\xb2\x01\n\x12ListEventsResponse\x12M\n\x0c\x65rror_events\x18\x01 \x03(\x0b\x32\x37.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x34\n\x10time_range_begin\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xe7\x01\n\x0eQueryTimeRange\x12R\n\x06period\x18\x01 \x01(\x0e\x32\x42.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period"\x80\x01\n\x06Period\x12\x16\n\x12PERIOD_UNSPECIFIED\x10\x00\x12\x11\n\rPERIOD_1_HOUR\x10\x01\x12\x12\n\x0ePERIOD_6_HOURS\x10\x02\x12\x10\n\x0cPERIOD_1_DAY\x10\x03\x12\x11\n\rPERIOD_1_WEEK\x10\x04\x12\x12\n\x0ePERIOD_30_DAYS\x10\x05"^\n\x14ServiceContextFilter\x12\x14\n\x07service\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_type\x18\x04 \x01(\tB\x03\xe0\x41\x01"`\n\x13\x44\x65leteEventsRequest\x12I\n\x0cproject_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project"\x16\n\x14\x44\x65leteEventsResponse*u\n\x13TimedCountAlignment\x12%\n!ERROR_COUNT_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41LIGNMENT_EQUAL_ROUNDED\x10\x01\x12\x1a\n\x16\x41LIGNMENT_EQUAL_AT_END\x10\x02*}\n\x0f\x45rrorGroupOrder\x12\x1b\n\x17GROUP_ORDER_UNSPECIFIED\x10\x00\x12\x0e\n\nCOUNT_DESC\x10\x01\x12\x12\n\x0eLAST_SEEN_DESC\x10\x02\x12\x10\n\x0c\x43REATED_DESC\x10\x03\x12\x17\n\x13\x41\x46\x46\x45\x43TED_USERS_DESC\x10\x04\x32\x8b\x06\n\x11\x45rrorStatsService\x12\xea\x01\n\x0eListGroupStats\x12\x42.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest\x1a\x43.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse"O\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{project_name=projects/*}/groupStats\xda\x41\x17project_name,time_range\x12\xd8\x01\n\nListEvents\x12>.google.devtools.clouderrorreporting.v1beta1.ListEventsRequest\x1a?.google.devtools.clouderrorreporting.v1beta1.ListEventsResponse"I\x82\xd3\xe4\x93\x02+\x12)/v1beta1/{project_name=projects/*}/events\xda\x41\x15project_name,group_id\x12\xd5\x01\n\x0c\x44\x65leteEvents\x12@.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest\x1a\x41.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse"@\x82\xd3\xe4\x93\x02+*)/v1beta1/{project_name=projects/*}/events\xda\x41\x0cproject_name\x1aV\xca\x41"clouderrorreporting.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa3\x02\n/com.google.devtools.clouderrorreporting.v1beta1B\x16\x45rrorStatsServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xf8\x01\x01\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xea\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3',
dependencies=[
google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
+ google_dot_api_dot_client__pb2.DESCRIPTOR,
+ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
+ google_dot_api_dot_resource__pb2.DESCRIPTOR,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,
google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,
],
@@ -47,6 +47,7 @@
full_name="google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment",
filename=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name="ERROR_COUNT_ALIGNMENT_UNSPECIFIED",
@@ -54,6 +55,7 @@
number=0,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
name="ALIGNMENT_EQUAL_ROUNDED",
@@ -61,6 +63,7 @@
number=1,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
name="ALIGNMENT_EQUAL_AT_END",
@@ -68,12 +71,13 @@
number=2,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
],
containing_type=None,
serialized_options=None,
- serialized_start=2508,
- serialized_end=2625,
+ serialized_start=2849,
+ serialized_end=2966,
)
_sym_db.RegisterEnumDescriptor(_TIMEDCOUNTALIGNMENT)
@@ -83,6 +87,7 @@
full_name="google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder",
filename=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name="GROUP_ORDER_UNSPECIFIED",
@@ -90,15 +95,31 @@
number=0,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="COUNT_DESC", index=1, number=1, serialized_options=None, type=None
+ name="COUNT_DESC",
+ index=1,
+ number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="LAST_SEEN_DESC", index=2, number=2, serialized_options=None, type=None
+ name="LAST_SEEN_DESC",
+ index=2,
+ number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="CREATED_DESC", index=3, number=3, serialized_options=None, type=None
+ name="CREATED_DESC",
+ index=3,
+ number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
name="AFFECTED_USERS_DESC",
@@ -106,12 +127,13 @@
number=4,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
],
containing_type=None,
serialized_options=None,
- serialized_start=2627,
- serialized_end=2752,
+ serialized_start=2968,
+ serialized_end=3093,
)
_sym_db.RegisterEnumDescriptor(_ERRORGROUPORDER)
@@ -131,6 +153,7 @@
full_name="google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period",
filename=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name="PERIOD_UNSPECIFIED",
@@ -138,27 +161,53 @@
number=0,
serialized_options=None,
type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="PERIOD_1_HOUR", index=1, number=1, serialized_options=None, type=None
+ name="PERIOD_1_HOUR",
+ index=1,
+ number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="PERIOD_6_HOURS", index=2, number=2, serialized_options=None, type=None
+ name="PERIOD_6_HOURS",
+ index=2,
+ number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="PERIOD_1_DAY", index=3, number=3, serialized_options=None, type=None
+ name="PERIOD_1_DAY",
+ index=3,
+ number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="PERIOD_1_WEEK", index=4, number=4, serialized_options=None, type=None
+ name="PERIOD_1_WEEK",
+ index=4,
+ number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor(
- name="PERIOD_30_DAYS", index=5, number=5, serialized_options=None, type=None
+ name="PERIOD_30_DAYS",
+ index=5,
+ number=5,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key,
),
],
containing_type=None,
serialized_options=None,
- serialized_start=2228,
- serialized_end=2356,
+ serialized_start=2501,
+ serialized_end=2629,
)
_sym_db.RegisterEnumDescriptor(_QUERYTIMERANGE_PERIOD)
@@ -169,6 +218,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="project_name",
@@ -179,14 +229,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="group_id",
@@ -203,8 +254,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="service_filter",
@@ -221,8 +273,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="time_range",
@@ -239,8 +292,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="timed_count_duration",
@@ -257,8 +311,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="alignment",
@@ -275,8 +330,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="alignment_time",
@@ -293,8 +349,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="order",
@@ -311,8 +368,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="page_size",
@@ -329,8 +387,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="page_token",
@@ -341,14 +400,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -359,8 +419,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=284,
- serialized_end=829,
+ serialized_start=381,
+ serialized_end=1024,
)
@@ -370,6 +430,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="error_group_stats",
@@ -388,6 +449,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="next_page_token",
@@ -398,7 +460,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -406,6 +468,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="time_range_begin",
@@ -424,6 +487,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -434,8 +498,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=832,
- serialized_end=1024,
+ serialized_start=1027,
+ serialized_end=1219,
)
@@ -445,6 +509,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="group",
@@ -463,6 +528,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="count",
@@ -481,6 +547,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="affected_users_count",
@@ -499,6 +566,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="timed_counts",
@@ -517,6 +585,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="first_seen_time",
@@ -535,6 +604,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="last_seen_time",
@@ -553,6 +623,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="affected_services",
@@ -571,6 +642,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="num_affected_services",
@@ -589,6 +661,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="representative",
@@ -607,6 +680,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -617,8 +691,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=1027,
- serialized_end=1545,
+ serialized_start=1222,
+ serialized_end=1740,
)
@@ -628,6 +702,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="count",
@@ -646,6 +721,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="start_time",
@@ -664,6 +740,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="end_time",
@@ -682,6 +759,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -692,8 +770,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=1547,
- serialized_end=1668,
+ serialized_start=1742,
+ serialized_end=1863,
)
@@ -703,6 +781,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="project_name",
@@ -713,14 +792,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="group_id",
@@ -731,14 +811,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="service_filter",
@@ -755,8 +836,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="time_range",
@@ -773,8 +855,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="page_size",
@@ -791,8 +874,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="page_token",
@@ -803,14 +887,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -821,8 +906,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=1671,
- serialized_end=1941,
+ serialized_start=1866,
+ serialized_end=2214,
)
@@ -832,6 +917,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="error_events",
@@ -850,6 +936,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="next_page_token",
@@ -860,7 +947,7 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
@@ -868,6 +955,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="time_range_begin",
@@ -886,6 +974,7 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -896,8 +985,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=1944,
- serialized_end=2122,
+ serialized_start=2217,
+ serialized_end=2395,
)
@@ -907,6 +996,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="period",
@@ -925,18 +1015,19 @@
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
- )
+ create_key=_descriptor._internal_create_key,
+ ),
],
extensions=[],
nested_types=[],
- enum_types=[_QUERYTIMERANGE_PERIOD],
+ enum_types=[_QUERYTIMERANGE_PERIOD,],
serialized_options=None,
is_extendable=False,
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=2125,
- serialized_end=2356,
+ serialized_start=2398,
+ serialized_end=2629,
)
@@ -946,6 +1037,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="service",
@@ -956,14 +1048,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="version",
@@ -974,14 +1067,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="resource_type",
@@ -992,14 +1086,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -1010,8 +1105,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=2358,
- serialized_end=2437,
+ serialized_start=2631,
+ serialized_end=2725,
)
@@ -1021,6 +1116,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="project_name",
@@ -1031,15 +1127,16 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project",
file=DESCRIPTOR,
- )
+ create_key=_descriptor._internal_create_key,
+ ),
],
extensions=[],
nested_types=[],
@@ -1049,8 +1146,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=2439,
- serialized_end=2482,
+ serialized_start=2727,
+ serialized_end=2823,
)
@@ -1060,6 +1157,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[],
extensions=[],
nested_types=[],
@@ -1069,8 +1167,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=2484,
- serialized_end=2506,
+ serialized_start=2825,
+ serialized_end=2847,
)
_LISTGROUPSTATSREQUEST.fields_by_name[
@@ -1094,7 +1192,7 @@
_ERRORGROUPSTATS.fields_by_name[
"group"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORGROUP
)
_ERRORGROUPSTATS.fields_by_name["timed_counts"].message_type = _TIMEDCOUNT
_ERRORGROUPSTATS.fields_by_name[
@@ -1106,12 +1204,12 @@
_ERRORGROUPSTATS.fields_by_name[
"affected_services"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._SERVICECONTEXT
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._SERVICECONTEXT
)
_ERRORGROUPSTATS.fields_by_name[
"representative"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERROREVENT
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERROREVENT
)
_TIMEDCOUNT.fields_by_name[
"start_time"
@@ -1124,7 +1222,7 @@
_LISTEVENTSRESPONSE.fields_by_name[
"error_events"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERROREVENT
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERROREVENT
)
_LISTEVENTSRESPONSE.fields_by_name[
"time_range_begin"
@@ -1148,64 +1246,62 @@
ListGroupStatsRequest = _reflection.GeneratedProtocolMessageType(
"ListGroupStatsRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_LISTGROUPSTATSREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Specifies a set of ``ErrorGroupStats`` to return.
-
+ {
+ "DESCRIPTOR": _LISTGROUPSTATSREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Specifies a set of ``ErrorGroupStats`` to return.
Attributes:
project_name:
- [Required] The resource name of the Google Cloud Platform
+ Required. The resource name of the Google Cloud Platform
project. Written as projects/ plus the Google Cloud Platform
project ID. Example: projects/my-project-123.
group_id:
- [Optional] List all ErrorGroupStats with these IDs.
+ Optional. List all ErrorGroupStats with these IDs.
service_filter:
- [Optional] List only ErrorGroupStats which belong to a service
+ Optional. List only ErrorGroupStats which belong to a service
context that matches the filter. Data for all service contexts
is returned if this field is not specified.
time_range:
- [Optional] List data for the given time range. If not set a
- default time range is used. The field time\_range\_begin in
- the response will specify the beginning of this time range.
- Only ErrorGroupStats with a non-zero count in the given time
- range are returned, unless the request contains an explicit
- group\_id list. If a group\_id list is given, also
- ErrorGroupStats with zero occurrences are returned.
+ Optional. List data for the given time range. If not set, a
+ default time range is used. The field time_range_begin in the
+ response will specify the beginning of this time range. Only
+ ErrorGroupStats with a non-zero count in the given time range
+ are returned, unless the request contains an explicit group_id
+ list. If a group_id list is given, also ErrorGroupStats with
+ zero occurrences are returned.
timed_count_duration:
- [Optional] The preferred duration for a single returned
+ Optional. The preferred duration for a single returned
``TimedCount``. If not set, no timed counts are returned.
alignment:
- [Optional] The alignment of the timed counts to be returned.
+ Optional. The alignment of the timed counts to be returned.
Default is ``ALIGNMENT_EQUAL_AT_END``.
alignment_time:
- [Optional] Time where the timed counts shall be aligned if
+ Optional. Time where the timed counts shall be aligned if
rounded alignment is chosen. Default is 00:00 UTC.
order:
- [Optional] The sort order in which the results are returned.
+ Optional. The sort order in which the results are returned.
Default is ``COUNT_DESC``.
page_size:
- [Optional] The maximum number of results to return per
+ Optional. The maximum number of results to return per
response. Default is 20.
page_token:
- [Optional] A ``next_page_token`` provided by a previous
+ Optional. A ``next_page_token`` provided by a previous
response. To view additional results, pass this token along
with the identical query parameters as the first request.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)
- ),
+ },
)
_sym_db.RegisterMessage(ListGroupStatsRequest)
ListGroupStatsResponse = _reflection.GeneratedProtocolMessageType(
"ListGroupStatsResponse",
(_message.Message,),
- dict(
- DESCRIPTOR=_LISTGROUPSTATSRESPONSE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Contains a set of requested error group stats.
-
+ {
+ "DESCRIPTOR": _LISTGROUPSTATSRESPONSE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Contains a set of requested error group stats.
Attributes:
error_group_stats:
@@ -1222,20 +1318,19 @@
deleted.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse)
- ),
+ },
)
_sym_db.RegisterMessage(ListGroupStatsResponse)
ErrorGroupStats = _reflection.GeneratedProtocolMessageType(
"ErrorGroupStats",
(_message.Message,),
- dict(
- DESCRIPTOR=_ERRORGROUPSTATS,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Data extracted for a specific group based on certain filter criteria,
+ {
+ "DESCRIPTOR": _ERRORGROUPSTATS,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Data extracted for a specific group based on certain filter criteria,
such as a given time period and/or service filter.
-
Attributes:
group:
Group data that is independent of the filter criteria.
@@ -1262,11 +1357,11 @@
first_seen_time:
Approximate first occurrence that was ever seen for this group
and which matches the given filter criteria, ignoring the
- time\_range that was specified in the request.
+ time_range that was specified in the request.
last_seen_time:
Approximate last occurrence that was ever seen for this group
and which matches the given filter criteria, ignoring the
- time\_range that was specified in the request.
+ time_range that was specified in the request.
affected_services:
Service contexts with a non-zero error count for the given
filter criteria. This list can be truncated if multiple
@@ -1284,19 +1379,18 @@
characteristics of the group as a whole.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
- ),
+ },
)
_sym_db.RegisterMessage(ErrorGroupStats)
TimedCount = _reflection.GeneratedProtocolMessageType(
"TimedCount",
(_message.Message,),
- dict(
- DESCRIPTOR=_TIMEDCOUNT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""The number of errors in a given time period. All numbers are approximate
- since the error events are sampled before counting them.
-
+ {
+ "DESCRIPTOR": _TIMEDCOUNT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """The number of errors in a given time period. All numbers are
+ approximate since the error events are sampled before counting them.
Attributes:
count:
@@ -1307,56 +1401,54 @@
End of the time period to which ``count`` refers (excluded).
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.TimedCount)
- ),
+ },
)
_sym_db.RegisterMessage(TimedCount)
ListEventsRequest = _reflection.GeneratedProtocolMessageType(
"ListEventsRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_LISTEVENTSREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Specifies a set of error events to return.
-
+ {
+ "DESCRIPTOR": _LISTEVENTSREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Specifies a set of error events to return.
Attributes:
project_name:
- [Required] The resource name of the Google Cloud Platform
+ Required. The resource name of the Google Cloud Platform
project. Written as ``projects/`` plus the `Google Cloud
Platform project ID
`__. Example:
``projects/my-project-123``.
group_id:
- [Required] The group for which events shall be returned.
+ Required. The group for which events shall be returned.
service_filter:
- [Optional] List only ErrorGroups which belong to a service
+ Optional. List only ErrorGroups which belong to a service
context that matches the filter. Data for all service contexts
is returned if this field is not specified.
time_range:
- [Optional] List only data for the given time range. If not set
- a default time range is used. The field time\_range\_begin in
+ Optional. List only data for the given time range. If not set
+ a default time range is used. The field time_range_begin in
the response will specify the beginning of this time range.
page_size:
- [Optional] The maximum number of results to return per
+ Optional. The maximum number of results to return per
response.
page_token:
- [Optional] A ``next_page_token`` provided by a previous
+ Optional. A ``next_page_token`` provided by a previous
response.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ListEventsRequest)
- ),
+ },
)
_sym_db.RegisterMessage(ListEventsRequest)
ListEventsResponse = _reflection.GeneratedProtocolMessageType(
"ListEventsResponse",
(_message.Message,),
- dict(
- DESCRIPTOR=_LISTEVENTSRESPONSE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Contains a set of requested error events.
-
+ {
+ "DESCRIPTOR": _LISTEVENTSRESPONSE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Contains a set of requested error events.
Attributes:
error_events:
@@ -1370,106 +1462,123 @@
was restricted.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ListEventsResponse)
- ),
+ },
)
_sym_db.RegisterMessage(ListEventsResponse)
QueryTimeRange = _reflection.GeneratedProtocolMessageType(
"QueryTimeRange",
(_message.Message,),
- dict(
- DESCRIPTOR=_QUERYTIMERANGE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Requests might be rejected or the resulting timed count durations might
- be adjusted for lower durations.
-
+ {
+ "DESCRIPTOR": _QUERYTIMERANGE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Requests might be rejected or the resulting timed count durations
+ might be adjusted for lower durations.
Attributes:
period:
Restricts the query to the specified time range.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.QueryTimeRange)
- ),
+ },
)
_sym_db.RegisterMessage(QueryTimeRange)
ServiceContextFilter = _reflection.GeneratedProtocolMessageType(
"ServiceContextFilter",
(_message.Message,),
- dict(
- DESCRIPTOR=_SERVICECONTEXTFILTER,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Specifies criteria for filtering a subset of service contexts. The
+ {
+ "DESCRIPTOR": _SERVICECONTEXTFILTER,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Specifies criteria for filtering a subset of service contexts. The
fields in the filter correspond to the fields in ``ServiceContext``.
- Only exact, case-sensitive matches are supported. If a field is unset or
- empty, it matches arbitrary values.
-
+ Only exact, case-sensitive matches are supported. If a field is unset
+ or empty, it matches arbitrary values.
Attributes:
service:
- [Optional] The exact value to match against
+ Optional. The exact value to match against
```ServiceContext.service`` `__.
version:
- [Optional] The exact value to match against
+ Optional. The exact value to match against
```ServiceContext.version`` `__.
resource_type:
- [Optional] The exact value to match against
+ Optional. The exact value to match against
```ServiceContext.resource_type`` `__.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter)
- ),
+ },
)
_sym_db.RegisterMessage(ServiceContextFilter)
DeleteEventsRequest = _reflection.GeneratedProtocolMessageType(
"DeleteEventsRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_DELETEEVENTSREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Deletes all events in the project.
-
+ {
+ "DESCRIPTOR": _DELETEEVENTSREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Deletes all events in the project.
Attributes:
project_name:
- [Required] The resource name of the Google Cloud Platform
+ Required. The resource name of the Google Cloud Platform
project. Written as ``projects/`` plus the `Google Cloud
Platform project ID
`__. Example:
``projects/my-project-123``.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest)
- ),
+ },
)
_sym_db.RegisterMessage(DeleteEventsRequest)
DeleteEventsResponse = _reflection.GeneratedProtocolMessageType(
"DeleteEventsResponse",
(_message.Message,),
- dict(
- DESCRIPTOR=_DELETEEVENTSRESPONSE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
- __doc__="""Response message for deleting error events.
- """,
+ {
+ "DESCRIPTOR": _DELETEEVENTSRESPONSE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.error_stats_service_pb2",
+ "__doc__": """Response message for deleting error events.""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse)
- ),
+ },
)
_sym_db.RegisterMessage(DeleteEventsResponse)
DESCRIPTOR._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["project_name"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["group_id"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["service_filter"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["time_range"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["timed_count_duration"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["alignment"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["alignment_time"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["order"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["page_size"]._options = None
+_LISTGROUPSTATSREQUEST.fields_by_name["page_token"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["project_name"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["group_id"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["service_filter"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["time_range"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["page_size"]._options = None
+_LISTEVENTSREQUEST.fields_by_name["page_token"]._options = None
+_SERVICECONTEXTFILTER.fields_by_name["service"]._options = None
+_SERVICECONTEXTFILTER.fields_by_name["version"]._options = None
+_SERVICECONTEXTFILTER.fields_by_name["resource_type"]._options = None
+_DELETEEVENTSREQUEST.fields_by_name["project_name"]._options = None
_ERRORSTATSSERVICE = _descriptor.ServiceDescriptor(
name="ErrorStatsService",
full_name="google.devtools.clouderrorreporting.v1beta1.ErrorStatsService",
file=DESCRIPTOR,
index=0,
- serialized_options=None,
- serialized_start=2755,
- serialized_end=3381,
+ serialized_options=b'\312A"clouderrorreporting.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform',
+ create_key=_descriptor._internal_create_key,
+ serialized_start=3096,
+ serialized_end=3875,
methods=[
_descriptor.MethodDescriptor(
name="ListGroupStats",
@@ -1478,9 +1587,8 @@
containing_service=None,
input_type=_LISTGROUPSTATSREQUEST,
output_type=_LISTGROUPSTATSRESPONSE,
- serialized_options=_b(
- "\202\323\344\223\002/\022-/v1beta1/{project_name=projects/*}/groupStats"
- ),
+ serialized_options=b"\202\323\344\223\002/\022-/v1beta1/{project_name=projects/*}/groupStats\332A\027project_name,time_range",
+ create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name="ListEvents",
@@ -1489,9 +1597,8 @@
containing_service=None,
input_type=_LISTEVENTSREQUEST,
output_type=_LISTEVENTSRESPONSE,
- serialized_options=_b(
- "\202\323\344\223\002+\022)/v1beta1/{project_name=projects/*}/events"
- ),
+ serialized_options=b"\202\323\344\223\002+\022)/v1beta1/{project_name=projects/*}/events\332A\025project_name,group_id",
+ create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name="DeleteEvents",
@@ -1500,9 +1607,8 @@
containing_service=None,
input_type=_DELETEEVENTSREQUEST,
output_type=_DELETEEVENTSRESPONSE,
- serialized_options=_b(
- "\202\323\344\223\002+*)/v1beta1/{project_name=projects/*}/events"
- ),
+ serialized_options=b"\202\323\344\223\002+*)/v1beta1/{project_name=projects/*}/events\332A\014project_name",
+ create_key=_descriptor._internal_create_key,
),
],
)
diff --git a/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2_grpc.py b/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2_grpc.py
index 06944055..e6bb94fc 100644
--- a/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2_grpc.py
+++ b/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2_grpc.py
@@ -1,61 +1,62 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.cloud.errorreporting_v1beta1.proto import (
- error_stats_service_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2,
+ error_stats_service_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2,
)
class ErrorStatsServiceStub(object):
"""An API for retrieving and managing error statistics as well as data for
- individual events.
- """
+ individual events.
+ """
def __init__(self, channel):
"""Constructor.
- Args:
- channel: A grpc.Channel.
- """
+ Args:
+ channel: A grpc.Channel.
+ """
self.ListGroupStats = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsResponse.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsResponse.FromString,
)
self.ListEvents = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsResponse.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsResponse.FromString,
)
self.DeleteEvents = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsResponse.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsResponse.FromString,
)
class ErrorStatsServiceServicer(object):
"""An API for retrieving and managing error statistics as well as data for
- individual events.
- """
+ individual events.
+ """
def ListGroupStats(self, request, context):
"""Lists the specified groups.
- """
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def ListEvents(self, request, context):
"""Lists the specified events.
- """
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def DeleteEvents(self, request, context):
"""Deletes all error events of a given project.
- """
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
@@ -65,18 +66,18 @@ def add_ErrorStatsServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
"ListGroupStats": grpc.unary_unary_rpc_method_handler(
servicer.ListGroupStats,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsResponse.SerializeToString,
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsResponse.SerializeToString,
),
"ListEvents": grpc.unary_unary_rpc_method_handler(
servicer.ListEvents,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsResponse.SerializeToString,
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsResponse.SerializeToString,
),
"DeleteEvents": grpc.unary_unary_rpc_method_handler(
servicer.DeleteEvents,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsResponse.SerializeToString,
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
@@ -84,3 +85,91 @@ def add_ErrorStatsServiceServicer_to_server(servicer, server):
rpc_method_handlers,
)
server.add_generic_rpc_handlers((generic_handler,))
+
+
+# This class is part of an EXPERIMENTAL API.
+class ErrorStatsService(object):
+ """An API for retrieving and managing error statistics as well as data for
+ individual events.
+ """
+
+ @staticmethod
+ def ListGroupStats(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListGroupStatsResponse.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
+
+ @staticmethod
+ def ListEvents(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.ListEventsResponse.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
+
+ @staticmethod
+ def DeleteEvents(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_error__stats__service__pb2.DeleteEventsResponse.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
diff --git a/google/cloud/errorreporting_v1beta1/proto/report_errors_service.proto b/google/cloud/errorreporting_v1beta1/proto/report_errors_service.proto
index d77f646c..f46f546d 100644
--- a/google/cloud/errorreporting_v1beta1/proto/report_errors_service.proto
+++ b/google/cloud/errorreporting_v1beta1/proto/report_errors_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2016 Google Inc.
+// Copyright 2019 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,75 +11,111 @@
// 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.devtools.clouderrorreporting.v1beta1;
import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
import "google/devtools/clouderrorreporting/v1beta1/common.proto";
import "google/protobuf/timestamp.proto";
+option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.ErrorReporting.V1Beta1";
option go_package = "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting";
option java_multiple_files = true;
option java_outer_classname = "ReportErrorsServiceProto";
option java_package = "com.google.devtools.clouderrorreporting.v1beta1";
option php_namespace = "Google\\Cloud\\ErrorReporting\\V1beta1";
+option ruby_package = "Google::Cloud::ErrorReporting::V1beta1";
// An API for reporting error events.
service ReportErrorsService {
+ option (google.api.default_host) = "clouderrorreporting.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
// Report an individual error event.
//
- // This endpoint accepts either an OAuth token,
- // or an
- // API key
+ // This endpoint accepts **either** an OAuth token,
+ // **or** an [API key](https://support.google.com/cloud/answer/6158862)
// for authentication. To use an API key, append it to the URL as the value of
// a `key` parameter. For example:
- // POST
- // https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
- rpc ReportErrorEvent(ReportErrorEventRequest)
- returns (ReportErrorEventResponse) {
+ //
+ // `POST
+ // https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456`
+ rpc ReportErrorEvent(ReportErrorEventRequest) returns (ReportErrorEventResponse) {
option (google.api.http) = {
post: "/v1beta1/{project_name=projects/*}/events:report"
body: "event"
};
+ option (google.api.method_signature) = "project_name,event";
}
}
// A request for reporting an individual error event.
message ReportErrorEventRequest {
- // [Required] The resource name of the Google Cloud Platform project. Written
+ // Required. The resource name of the Google Cloud Platform project. Written
// as `projects/` plus the
// [Google Cloud Platform project
// ID](https://support.google.com/cloud/answer/6158840). Example:
// `projects/my-project-123`.
- string project_name = 1;
+ string project_name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
- // [Required] The error event to be reported.
- ReportedErrorEvent event = 2;
+ // Required. The error event to be reported.
+ ReportedErrorEvent event = 2 [(google.api.field_behavior) = REQUIRED];
}
// Response for reporting an individual error event.
// Data may be added to this message in the future.
-message ReportErrorEventResponse {}
+message ReportErrorEventResponse {
+
+}
// An error event which is reported to the Error Reporting system.
message ReportedErrorEvent {
- // [Optional] Time when the event occurred.
+ // Optional. Time when the event occurred.
// If not provided, the time when the event was received by the
// Error Reporting system will be used.
- google.protobuf.Timestamp event_time = 1;
+ google.protobuf.Timestamp event_time = 1 [(google.api.field_behavior) = OPTIONAL];
- // [Required] The service context in which this error has occurred.
- ServiceContext service_context = 2;
+ // Required. The service context in which this error has occurred.
+ ServiceContext service_context = 2 [(google.api.field_behavior) = REQUIRED];
- // [Required] A message describing the error. The message can contain an
- // exception stack in one of the supported programming languages and formats.
- // In that case, the message is parsed and detailed exception information
- // is returned when retrieving the error event again.
- string message = 3;
+ // Required. The error message.
+ // If no `context.reportLocation` is provided, the message must contain a
+ // header (typically consisting of the exception type name and an error
+ // message) and an exception stack trace in one of the supported programming
+ // languages and formats.
+ // Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
+ // Supported stack trace formats are:
+ //
+ // * **Java**: Must be the return value of
+ // [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).
+ // * **Python**: Must be the return value of
+ // [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).
+ // * **JavaScript**: Must be the value of
+ // [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned
+ // by V8.
+ // * **Ruby**: Must contain frames returned by
+ // [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).
+ // * **C#**: Must be the return value of
+ // [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).
+ // * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)`
+ // and contain the result of
+ // [`(string)$exception`](http://php.net/manual/en/exception.tostring.php).
+ // * **Go**: Must be the return value of
+ // [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).
+ string message = 3 [(google.api.field_behavior) = REQUIRED];
- // [Optional] A description of the context in which the error occurred.
- ErrorContext context = 4;
+ // Optional. A description of the context in which the error occurred.
+ ErrorContext context = 4 [(google.api.field_behavior) = OPTIONAL];
}
diff --git a/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2.py b/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2.py
index 9562dd34..6c836995 100644
--- a/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2.py
+++ b/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2.py
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: google/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto
-
-import sys
-
-_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
+# source: google/cloud/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto
+"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
@@ -16,25 +13,28 @@
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from google.api import client_pb2 as google_dot_api_dot_client__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.errorreporting_v1beta1.proto import (
- common_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
+ common_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2,
)
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
- name="google/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto",
+ name="google/cloud/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto",
package="google.devtools.clouderrorreporting.v1beta1",
syntax="proto3",
- serialized_options=_b(
- "\n/com.google.devtools.clouderrorreporting.v1beta1B\030ReportErrorsServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1"
- ),
- serialized_pb=_b(
- '\nMgoogle/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a>google/devtools/clouderrorreporting_v1beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x7f\n\x17ReportErrorEventRequest\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12N\n\x05\x65vent\x18\x02 \x01(\x0b\x32?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"\x1a\n\x18ReportErrorEventResponse"\xf7\x01\n\x12ReportedErrorEvent\x12.\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x0fservice_context\x18\x02 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x0f\n\x07message\x18\x03 \x01(\t\x12J\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x39.google.devtools.clouderrorreporting.v1beta1.ErrorContext2\xf8\x01\n\x13ReportErrorsService\x12\xe0\x01\n\x10ReportErrorEvent\x12\x44.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest\x1a\x45.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"?\x82\xd3\xe4\x93\x02\x39"0/v1beta1/{project_name=projects/*}/events:report:\x05\x65ventB\xf9\x01\n/com.google.devtools.clouderrorreporting.v1beta1B\x18ReportErrorsServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1b\x06proto3'
- ),
+ serialized_options=b"\n/com.google.devtools.clouderrorreporting.v1beta1B\030ReportErrorsServiceProtoP\001Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\370\001\001\252\002#Google.Cloud.ErrorReporting.V1Beta1\312\002#Google\\Cloud\\ErrorReporting\\V1beta1\352\002&Google::Cloud::ErrorReporting::V1beta1",
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\nSgoogle/cloud/devtools/clouderrorreporting_v1beta1/proto/report_errors_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x44google/cloud/devtools/clouderrorreporting_v1beta1/proto/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xb9\x01\n\x17ReportErrorEventRequest\x12I\n\x0cproject_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12S\n\x05\x65vent\x18\x02 \x01(\x0b\x32?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventB\x03\xe0\x41\x02"\x1a\n\x18ReportErrorEventResponse"\x8b\x02\n\x12ReportedErrorEvent\x12\x33\n\nevent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x0fservice_context\x18\x02 \x01(\x0b\x32;.google.devtools.clouderrorreporting.v1beta1.ServiceContextB\x03\xe0\x41\x02\x12\x14\n\x07message\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12O\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x39.google.devtools.clouderrorreporting.v1beta1.ErrorContextB\x03\xe0\x41\x01\x32\xe5\x02\n\x13ReportErrorsService\x12\xf5\x01\n\x10ReportErrorEvent\x12\x44.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest\x1a\x45.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"T\x82\xd3\xe4\x93\x02\x39"0/v1beta1/{project_name=projects/*}/events:report:\x05\x65vent\xda\x41\x12project_name,event\x1aV\xca\x41"clouderrorreporting.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n/com.google.devtools.clouderrorreporting.v1beta1B\x18ReportErrorsServiceProtoP\x01Z^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreporting\xf8\x01\x01\xaa\x02#Google.Cloud.ErrorReporting.V1Beta1\xca\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xea\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3',
dependencies=[
google_dot_api_dot_annotations__pb2.DESCRIPTOR,
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
+ google_dot_api_dot_client__pb2.DESCRIPTOR,
+ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,
+ google_dot_api_dot_resource__pb2.DESCRIPTOR,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2.DESCRIPTOR,
google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,
],
)
@@ -46,6 +46,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="project_name",
@@ -56,14 +57,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="event",
@@ -80,8 +82,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -92,8 +95,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=253,
- serialized_end=380,
+ serialized_start=351,
+ serialized_end=536,
)
@@ -103,6 +106,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[],
extensions=[],
nested_types=[],
@@ -112,8 +116,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=382,
- serialized_end=408,
+ serialized_start=538,
+ serialized_end=564,
)
@@ -123,6 +127,7 @@
filename=None,
file=DESCRIPTOR,
containing_type=None,
+ create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name="event_time",
@@ -139,8 +144,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="service_context",
@@ -157,8 +163,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="message",
@@ -169,14 +176,15 @@
cpp_type=9,
label=1,
has_default_value=False,
- default_value=_b("").decode("utf-8"),
+ default_value=b"".decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\002",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor(
name="context",
@@ -193,8 +201,9 @@
containing_type=None,
is_extension=False,
extension_scope=None,
- serialized_options=None,
+ serialized_options=b"\340A\001",
file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
),
],
extensions=[],
@@ -205,8 +214,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=411,
- serialized_end=658,
+ serialized_start=567,
+ serialized_end=834,
)
_REPORTERROREVENTREQUEST.fields_by_name["event"].message_type = _REPORTEDERROREVENT
@@ -216,12 +225,12 @@
_REPORTEDERROREVENT.fields_by_name[
"service_context"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._SERVICECONTEXT
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._SERVICECONTEXT
)
_REPORTEDERROREVENT.fields_by_name[
"context"
].message_type = (
- google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORCONTEXT
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2._ERRORCONTEXT
)
DESCRIPTOR.message_types_by_name["ReportErrorEventRequest"] = _REPORTERROREVENTREQUEST
DESCRIPTOR.message_types_by_name["ReportErrorEventResponse"] = _REPORTERROREVENTRESPONSE
@@ -231,84 +240,109 @@
ReportErrorEventRequest = _reflection.GeneratedProtocolMessageType(
"ReportErrorEventRequest",
(_message.Message,),
- dict(
- DESCRIPTOR=_REPORTERROREVENTREQUEST,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
- __doc__="""A request for reporting an individual error event.
-
+ {
+ "DESCRIPTOR": _REPORTERROREVENTREQUEST,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
+ "__doc__": """A request for reporting an individual error event.
Attributes:
project_name:
- [Required] The resource name of the Google Cloud Platform
+ Required. The resource name of the Google Cloud Platform
project. Written as ``projects/`` plus the `Google Cloud
Platform project ID
`__. Example:
``projects/my-project-123``.
event:
- [Required] The error event to be reported.
+ Required. The error event to be reported.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest)
- ),
+ },
)
_sym_db.RegisterMessage(ReportErrorEventRequest)
ReportErrorEventResponse = _reflection.GeneratedProtocolMessageType(
"ReportErrorEventResponse",
(_message.Message,),
- dict(
- DESCRIPTOR=_REPORTERROREVENTRESPONSE,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
- __doc__="""Response for reporting an individual error event. Data may be added to
- this message in the future.
- """,
+ {
+ "DESCRIPTOR": _REPORTERROREVENTRESPONSE,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
+ "__doc__": """Response for reporting an individual error event. Data may be added to
+ this message in the future.""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse)
- ),
+ },
)
_sym_db.RegisterMessage(ReportErrorEventResponse)
ReportedErrorEvent = _reflection.GeneratedProtocolMessageType(
"ReportedErrorEvent",
(_message.Message,),
- dict(
- DESCRIPTOR=_REPORTEDERROREVENT,
- __module__="google.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
- __doc__="""An error event which is reported to the Error Reporting system.
-
+ {
+ "DESCRIPTOR": _REPORTEDERROREVENT,
+ "__module__": "google.cloud.devtools.clouderrorreporting_v1beta1.proto.report_errors_service_pb2",
+ "__doc__": """An error event which is reported to the Error Reporting system.
Attributes:
event_time:
- [Optional] Time when the event occurred. If not provided, the
+ Optional. Time when the event occurred. If not provided, the
time when the event was received by the Error Reporting system
will be used.
service_context:
- [Required] The service context in which this error has
+ Required. The service context in which this error has
occurred.
message:
- [Required] A message describing the error. The message can
- contain an exception stack in one of the supported programming
- languages and formats. In that case, the message is parsed and
- detailed exception information is returned when retrieving the
- error event again.
+ Required. The error message. If no ``context.reportLocation``
+ is provided, the message must contain a header (typically
+ consisting of the exception type name and an error message)
+ and an exception stack trace in one of the supported
+ programming languages and formats. Supported languages are
+ Java, Python, JavaScript, Ruby, C#, PHP, and Go. Supported
+ stack trace formats are: - **Java**: Must be the return
+ value of ```Throwable.printStackTrace()`` `__. - **Python**: Must be the return value of
+ ```traceback.format_exc()`` `__. - **JavaScript**:
+ Must be the value of ```error.stack``
+ `__ as
+ returned by V8. - **Ruby**: Must contain frames returned by
+ ```Exception.backtrace`` `__. -
+ **C#**: Must be the return value of
+ ```Exception.ToString()`` `__. - **PHP**:
+ Must start with ``PHP (Notice|Parse error|Fatal
+ error|Warning)`` and contain the result of
+ ```(string)$exception``
+ `__. -
+ **Go**: Must be the return value of ```runtime.Stack()``
+ `__.
context:
- [Optional] A description of the context in which the error
+ Optional. A description of the context in which the error
occurred.
""",
# @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent)
- ),
+ },
)
_sym_db.RegisterMessage(ReportedErrorEvent)
DESCRIPTOR._options = None
+_REPORTERROREVENTREQUEST.fields_by_name["project_name"]._options = None
+_REPORTERROREVENTREQUEST.fields_by_name["event"]._options = None
+_REPORTEDERROREVENT.fields_by_name["event_time"]._options = None
+_REPORTEDERROREVENT.fields_by_name["service_context"]._options = None
+_REPORTEDERROREVENT.fields_by_name["message"]._options = None
+_REPORTEDERROREVENT.fields_by_name["context"]._options = None
_REPORTERRORSSERVICE = _descriptor.ServiceDescriptor(
name="ReportErrorsService",
full_name="google.devtools.clouderrorreporting.v1beta1.ReportErrorsService",
file=DESCRIPTOR,
index=0,
- serialized_options=None,
- serialized_start=661,
- serialized_end=909,
+ serialized_options=b'\312A"clouderrorreporting.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform',
+ create_key=_descriptor._internal_create_key,
+ serialized_start=837,
+ serialized_end=1194,
methods=[
_descriptor.MethodDescriptor(
name="ReportErrorEvent",
@@ -317,10 +351,9 @@
containing_service=None,
input_type=_REPORTERROREVENTREQUEST,
output_type=_REPORTERROREVENTRESPONSE,
- serialized_options=_b(
- '\202\323\344\223\0029"0/v1beta1/{project_name=projects/*}/events:report:\005event'
- ),
- )
+ serialized_options=b'\202\323\344\223\0029"0/v1beta1/{project_name=projects/*}/events:report:\005event\332A\022project_name,event',
+ create_key=_descriptor._internal_create_key,
+ ),
],
)
_sym_db.RegisterServiceDescriptor(_REPORTERRORSSERVICE)
diff --git a/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2_grpc.py b/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2_grpc.py
index 12f6e08e..521deb28 100644
--- a/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2_grpc.py
+++ b/google/cloud/errorreporting_v1beta1/proto/report_errors_service_pb2_grpc.py
@@ -1,43 +1,44 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.cloud.errorreporting_v1beta1.proto import (
- report_errors_service_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2,
+ report_errors_service_pb2 as google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2,
)
class ReportErrorsServiceStub(object):
"""An API for reporting error events.
- """
+ """
def __init__(self, channel):
"""Constructor.
- Args:
- channel: A grpc.Channel.
- """
+ Args:
+ channel: A grpc.Channel.
+ """
self.ReportErrorEvent = channel.unary_unary(
"/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent",
- request_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventRequest.SerializeToString,
- response_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventResponse.FromString,
+ request_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventRequest.SerializeToString,
+ response_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventResponse.FromString,
)
class ReportErrorsServiceServicer(object):
"""An API for reporting error events.
- """
+ """
def ReportErrorEvent(self, request, context):
"""Report an individual error event.
- This endpoint accepts either an OAuth token,
- or an
- API key
- for authentication. To use an API key, append it to the URL as the value of
- a `key` parameter. For example:
- POST
- https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456
- """
+ This endpoint accepts **either** an OAuth token,
+ **or** an [API key](https://support.google.com/cloud/answer/6158862)
+ for authentication. To use an API key, append it to the URL as the value of
+ a `key` parameter. For example:
+
+ `POST
+ https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456`
+ """
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
@@ -47,12 +48,45 @@ def add_ReportErrorsServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
"ReportErrorEvent": grpc.unary_unary_rpc_method_handler(
servicer.ReportErrorEvent,
- request_deserializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventRequest.FromString,
- response_serializer=google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventResponse.SerializeToString,
- )
+ request_deserializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventRequest.FromString,
+ response_serializer=google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventResponse.SerializeToString,
+ ),
}
generic_handler = grpc.method_handlers_generic_handler(
"google.devtools.clouderrorreporting.v1beta1.ReportErrorsService",
rpc_method_handlers,
)
server.add_generic_rpc_handlers((generic_handler,))
+
+
+# This class is part of an EXPERIMENTAL API.
+class ReportErrorsService(object):
+ """An API for reporting error events.
+ """
+
+ @staticmethod
+ def ReportErrorEvent(
+ request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None,
+ ):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ "/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent",
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventRequest.SerializeToString,
+ google_dot_cloud_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2.ReportErrorEventResponse.FromString,
+ options,
+ channel_credentials,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ )
diff --git a/noxfile.py b/noxfile.py
index 9e8112b9..0b2e586f 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -23,14 +23,15 @@
import nox
-BLACK_VERSION = "black==19.3b0"
+BLACK_VERSION = "black==19.10b0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
-if os.path.exists("samples"):
- BLACK_PATHS.append("samples")
+DEFAULT_PYTHON_VERSION = ""
+SYSTEM_TEST_PYTHON_VERSIONS = []
+UNIT_TEST_PYTHON_VERSIONS = []
-@nox.session(python="3.7")
+@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
"""Run linters.
@@ -38,7 +39,9 @@ def lint(session):
serious code quality issues.
"""
session.install("flake8", BLACK_VERSION)
- session.run("black", "--check", *BLACK_PATHS)
+ session.run(
+ "black", "--check", *BLACK_PATHS,
+ )
session.run("flake8", "google", "tests")
@@ -53,10 +56,12 @@ def blacken(session):
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
"""
session.install(BLACK_VERSION)
- session.run("black", *BLACK_PATHS)
+ session.run(
+ "black", *BLACK_PATHS,
+ )
-@nox.session(python="3.7")
+@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.install("docutils", "pygments")
@@ -84,13 +89,13 @@ def default(session):
)
-@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
+@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
def unit(session):
"""Run the unit test suite."""
default(session)
-@nox.session(python=["2.7", "3.7"])
+@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
def system(session):
"""Run the system test suite."""
system_test_path = os.path.join("tests", "system.py")
@@ -110,7 +115,9 @@ def system(session):
# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
- session.install("mock", "pytest", "google-cloud-testutils")
+ session.install(
+ "mock", "pytest", "google-cloud-testutils",
+ )
session.install("-e", "test_utils")
session.install("-e", ".")
@@ -121,7 +128,7 @@ def system(session):
session.run("py.test", "--quiet", system_test_folder_path, *session.posargs)
-@nox.session(python="3.7")
+@nox.session(python=DEFAULT_PYTHON_VERSION)
def cover(session):
"""Run the final coverage report.
@@ -134,7 +141,7 @@ def cover(session):
session.run("coverage", "erase")
-@nox.session(python="3.7")
+@nox.session(python=DEFAULT_PYTHON_VERSION)
def docs(session):
"""Build the docs for this library."""
diff --git a/samples/AUTHORING_GUIDE.md b/samples/AUTHORING_GUIDE.md
new file mode 100644
index 00000000..55c97b32
--- /dev/null
+++ b/samples/AUTHORING_GUIDE.md
@@ -0,0 +1 @@
+See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
\ No newline at end of file
diff --git a/samples/CONTRIBUTING.md b/samples/CONTRIBUTING.md
new file mode 100644
index 00000000..34c882b6
--- /dev/null
+++ b/samples/CONTRIBUTING.md
@@ -0,0 +1 @@
+See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
\ No newline at end of file
diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh
new file mode 100755
index 00000000..ff599eb2
--- /dev/null
+++ b/scripts/decrypt-secrets.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Copyright 2015 Google Inc. All rights reserved.
+#
+# 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.
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+ROOT=$( dirname "$DIR" )
+
+# Work from the project root.
+cd $ROOT
+
+# Use SECRET_MANAGER_PROJECT if set, fallback to cloud-devrel-kokoro-resources.
+PROJECT_ID="${SECRET_MANAGER_PROJECT:-cloud-devrel-kokoro-resources}"
+
+gcloud secrets versions access latest --secret="python-docs-samples-test-env" \
+ > testing/test-env.sh
+gcloud secrets versions access latest \
+ --secret="python-docs-samples-service-account" \
+ > testing/service-account.json
+gcloud secrets versions access latest \
+ --secret="python-docs-samples-client-secrets" \
+ > testing/client-secrets.json
\ No newline at end of file
diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py
new file mode 100644
index 00000000..d309d6e9
--- /dev/null
+++ b/scripts/readme-gen/readme_gen.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+
+# Copyright 2016 Google Inc
+#
+# 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.
+
+"""Generates READMEs using configuration defined in yaml."""
+
+import argparse
+import io
+import os
+import subprocess
+
+import jinja2
+import yaml
+
+
+jinja_env = jinja2.Environment(
+ trim_blocks=True,
+ loader=jinja2.FileSystemLoader(
+ os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates'))))
+
+README_TMPL = jinja_env.get_template('README.tmpl.rst')
+
+
+def get_help(file):
+ return subprocess.check_output(['python', file, '--help']).decode()
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('source')
+ parser.add_argument('--destination', default='README.rst')
+
+ args = parser.parse_args()
+
+ source = os.path.abspath(args.source)
+ root = os.path.dirname(source)
+ destination = os.path.join(root, args.destination)
+
+ jinja_env.globals['get_help'] = get_help
+
+ with io.open(source, 'r') as f:
+ config = yaml.load(f)
+
+ # This allows get_help to execute in the right directory.
+ os.chdir(root)
+
+ output = README_TMPL.render(config)
+
+ with io.open(destination, 'w') as f:
+ f.write(output)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst
new file mode 100644
index 00000000..4fd23976
--- /dev/null
+++ b/scripts/readme-gen/templates/README.tmpl.rst
@@ -0,0 +1,87 @@
+{# The following line is a lie. BUT! Once jinja2 is done with it, it will
+ become truth! #}
+.. This file is automatically generated. Do not edit this file directly.
+
+{{product.name}} Python Samples
+===============================================================================
+
+.. image:: https://gstatic.com/cloudssh/images/open-btn.png
+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/README.rst
+
+
+This directory contains samples for {{product.name}}. {{product.description}}
+
+{{description}}
+
+.. _{{product.name}}: {{product.url}}
+
+{% if required_api_url %}
+To run the sample, you need to enable the API at: {{required_api_url}}
+{% endif %}
+
+{% if required_role %}
+To run the sample, you need to have `{{required_role}}` role.
+{% endif %}
+
+{{other_required_steps}}
+
+{% if setup %}
+Setup
+-------------------------------------------------------------------------------
+
+{% for section in setup %}
+
+{% include section + '.tmpl.rst' %}
+
+{% endfor %}
+{% endif %}
+
+{% if samples %}
+Samples
+-------------------------------------------------------------------------------
+
+{% for sample in samples %}
+{{sample.name}}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+{% if not sample.hide_cloudshell_button %}
+.. image:: https://gstatic.com/cloudssh/images/open-btn.png
+ :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}},{{folder}}/README.rst
+{% endif %}
+
+
+{{sample.description}}
+
+To run this sample:
+
+.. code-block:: bash
+
+ $ python {{sample.file}}
+{% if sample.show_help %}
+
+ {{get_help(sample.file)|indent}}
+{% endif %}
+
+
+{% endfor %}
+{% endif %}
+
+{% if cloud_client_library %}
+
+The client library
+-------------------------------------------------------------------------------
+
+This sample uses the `Google Cloud Client Library for Python`_.
+You can read the documentation for more details on API usage and use GitHub
+to `browse the source`_ and `report issues`_.
+
+.. _Google Cloud Client Library for Python:
+ https://googlecloudplatform.github.io/google-cloud-python/
+.. _browse the source:
+ https://github.com/GoogleCloudPlatform/google-cloud-python
+.. _report issues:
+ https://github.com/GoogleCloudPlatform/google-cloud-python/issues
+
+{% endif %}
+
+.. _Google Cloud SDK: https://cloud.google.com/sdk/
\ No newline at end of file
diff --git a/scripts/readme-gen/templates/auth.tmpl.rst b/scripts/readme-gen/templates/auth.tmpl.rst
new file mode 100644
index 00000000..1446b94a
--- /dev/null
+++ b/scripts/readme-gen/templates/auth.tmpl.rst
@@ -0,0 +1,9 @@
+Authentication
+++++++++++++++
+
+This sample requires you to have authentication setup. Refer to the
+`Authentication Getting Started Guide`_ for instructions on setting up
+credentials for applications.
+
+.. _Authentication Getting Started Guide:
+ https://cloud.google.com/docs/authentication/getting-started
diff --git a/scripts/readme-gen/templates/auth_api_key.tmpl.rst b/scripts/readme-gen/templates/auth_api_key.tmpl.rst
new file mode 100644
index 00000000..11957ce2
--- /dev/null
+++ b/scripts/readme-gen/templates/auth_api_key.tmpl.rst
@@ -0,0 +1,14 @@
+Authentication
+++++++++++++++
+
+Authentication for this service is done via an `API Key`_. To obtain an API
+Key:
+
+1. Open the `Cloud Platform Console`_
+2. Make sure that billing is enabled for your project.
+3. From the **Credentials** page, create a new **API Key** or use an existing
+ one for your project.
+
+.. _API Key:
+ https://developers.google.com/api-client-library/python/guide/aaa_apikeys
+.. _Cloud Console: https://console.cloud.google.com/project?_
diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst
new file mode 100644
index 00000000..a0406dba
--- /dev/null
+++ b/scripts/readme-gen/templates/install_deps.tmpl.rst
@@ -0,0 +1,29 @@
+Install Dependencies
+++++++++++++++++++++
+
+#. Clone python-docs-samples and change directory to the sample directory you want to use.
+
+ .. code-block:: bash
+
+ $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
+
+#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions.
+
+ .. _Python Development Environment Setup Guide:
+ https://cloud.google.com/python/setup
+
+#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
+
+ .. code-block:: bash
+
+ $ virtualenv env
+ $ source env/bin/activate
+
+#. Install the dependencies needed to run the samples.
+
+ .. code-block:: bash
+
+ $ pip install -r requirements.txt
+
+.. _pip: https://pip.pypa.io/
+.. _virtualenv: https://virtualenv.pypa.io/
diff --git a/scripts/readme-gen/templates/install_portaudio.tmpl.rst b/scripts/readme-gen/templates/install_portaudio.tmpl.rst
new file mode 100644
index 00000000..5ea33d18
--- /dev/null
+++ b/scripts/readme-gen/templates/install_portaudio.tmpl.rst
@@ -0,0 +1,35 @@
+Install PortAudio
++++++++++++++++++
+
+Install `PortAudio`_. This is required by the `PyAudio`_ library to stream
+audio from your computer's microphone. PyAudio depends on PortAudio for cross-platform compatibility, and is installed differently depending on the
+platform.
+
+* For Mac OS X, you can use `Homebrew`_::
+
+ brew install portaudio
+
+ **Note**: if you encounter an error when running `pip install` that indicates
+ it can't find `portaudio.h`, try running `pip install` with the following
+ flags::
+
+ pip install --global-option='build_ext' \
+ --global-option='-I/usr/local/include' \
+ --global-option='-L/usr/local/lib' \
+ pyaudio
+
+* For Debian / Ubuntu Linux::
+
+ apt-get install portaudio19-dev python-all-dev
+
+* Windows may work without having to install PortAudio explicitly (it will get
+ installed with PyAudio).
+
+For more details, see the `PyAudio installation`_ page.
+
+
+.. _PyAudio: https://people.csail.mit.edu/hubert/pyaudio/
+.. _PortAudio: http://www.portaudio.com/
+.. _PyAudio installation:
+ https://people.csail.mit.edu/hubert/pyaudio/#downloads
+.. _Homebrew: http://brew.sh
diff --git a/synth.metadata b/synth.metadata
index 8ea0204f..4822d784 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,32 +1,25 @@
{
"sources": [
- {
- "generator": {
- "name": "artman",
- "version": "2.0.0",
- "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098"
- }
- },
{
"git": {
"name": ".",
"remote": "git@github.com:googleapis/python-error-reporting.git",
- "sha": "ff63d75f476e1eb3ff30f35b70d2dfa77dc17504"
+ "sha": "98a2c71f717cca54fe8d8dc192d2b497058ae297"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "756b174de4a122461993c1c583345533d819936d",
- "internalRef": "308824110"
+ "sha": "5202cfe3e5c2907a1a21a4c6d4bd0812029b6aa3",
+ "internalRef": "319247865"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "01b6f23d24b27878b48667ce597876d66b59780e"
+ "sha": "303271797a360f8a439203413f13a160f2f5b3b4"
}
}
],
@@ -37,8 +30,7 @@
"apiName": "errorreporting",
"apiVersion": "v1beta1",
"language": "python",
- "generator": "gapic",
- "config": "google/devtools/clouderrorreporting/artman_errorreporting.yaml"
+ "generator": "bazel"
}
}
]
diff --git a/synth.py b/synth.py
index d554697b..dc6e7550 100644
--- a/synth.py
+++ b/synth.py
@@ -37,11 +37,7 @@
s.move(library / "tests/system/gapic/v1beta1")
s.replace(
- [
- "google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py",
- "google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py",
- "google/cloud/errorreporting_v1beta1/gapic/ereport_errors_service_client.py",
- ],
+ "google/cloud/**/*py",
"google-cloud-devtools-clouderrorreporting",
"google-cloud-error-reporting",
)
@@ -71,6 +67,52 @@
s.replace(targets, DISCARD_AUTH_BOILERPLATE, r"")
+# TODO(busunkim): Remove during microgenerator transition
+s.replace(
+ ["google/cloud/**/*.py", "tests/**/*.py"],
+ "error_group_path",
+ "group_path"
+)
+
+# TODO(busunkim) Remove during microgenerator transition
+# Keeps the previous param order to avoid breaking existing
+# code
+n = s.replace(
+ "google/cloud/**/error_stats_service_client.py",
+"""def list_group_stats\(
+\s+self,
+\s+project_name,
+\s+group_id=None,
+\s+service_filter=None,
+\s+time_range=None,
+\s+timed_count_duration=None,
+\s+alignment=None,
+\s+alignment_time=None,
+\s+order=None,
+\s+page_size=None,
+\s+retry=google\.api_core\.gapic_v1\.method\.DEFAULT,
+\s+timeout=google\.api_core\.gapic_v1\.method\.DEFAULT,
+\s+metadata=None\):""",
+"""def list_group_stats(
+ self,
+ project_name,
+ time_range=None, # DO NOT MOVE, see synth.py
+ group_id=None,
+ service_filter=None,
+ timed_count_duration=None,
+ alignment=None,
+ alignment_time=None,
+ order=None,
+ page_size=None,
+ retry=google.api_core.gapic_v1.method.DEFAULT,
+ timeout=google.api_core.gapic_v1.method.DEFAULT,
+ metadata=None,
+ ):
+"""
+)
+
+if n != 1:
+ raise Exception("Required replacement not made.")
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
@@ -79,4 +121,8 @@
)
s.move(templated_files)
+# TODO(busunkim): Use latest sphinx after microgenerator transition
+s.replace("noxfile.py", """['"]sphinx['"]""", '"sphinx<3.0.0"')
+
+
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
diff --git a/testing/.gitignore b/testing/.gitignore
new file mode 100644
index 00000000..b05fbd63
--- /dev/null
+++ b/testing/.gitignore
@@ -0,0 +1,3 @@
+test-env.sh
+service-account.json
+client-secrets.json
\ No newline at end of file
diff --git a/tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py b/tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py
index bb423928..6b9106bf 100644
--- a/tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py
+++ b/tests/system/gapic/v1beta1/test_system_report_errors_service_v1beta1.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
diff --git a/tests/unit/gapic/v1beta1/test_error_group_service_client_v1beta1.py b/tests/unit/gapic/v1beta1/test_error_group_service_client_v1beta1.py
index d65f3f1f..5feb9c2c 100644
--- a/tests/unit/gapic/v1beta1/test_error_group_service_client_v1beta1.py
+++ b/tests/unit/gapic/v1beta1/test_error_group_service_client_v1beta1.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -61,7 +61,7 @@ class CustomException(Exception):
class TestErrorGroupServiceClient(object):
- def test_get_group(self):
+ def test_update_group(self):
# Setup Expected Response
name = "name3373707"
group_id = "groupId506361563"
@@ -76,19 +76,17 @@ def test_get_group(self):
client = errorreporting_v1beta1.ErrorGroupServiceClient()
# Setup Request
- group_name = client.group_path("[PROJECT]", "[GROUP]")
+ group = {}
- response = client.get_group(group_name)
+ response = client.update_group(group)
assert expected_response == response
assert len(channel.requests) == 1
- expected_request = error_group_service_pb2.GetGroupRequest(
- group_name=group_name
- )
+ expected_request = error_group_service_pb2.UpdateGroupRequest(group=group)
actual_request = channel.requests[0][1]
assert expected_request == actual_request
- def test_get_group_exception(self):
+ def test_update_group_exception(self):
# Mock the API response
channel = ChannelStub(responses=[CustomException()])
patch = mock.patch("google.api_core.grpc_helpers.create_channel")
@@ -97,12 +95,12 @@ def test_get_group_exception(self):
client = errorreporting_v1beta1.ErrorGroupServiceClient()
# Setup request
- group_name = client.group_path("[PROJECT]", "[GROUP]")
+ group = {}
with pytest.raises(CustomException):
- client.get_group(group_name)
+ client.update_group(group)
- def test_update_group(self):
+ def test_get_group(self):
# Setup Expected Response
name = "name3373707"
group_id = "groupId506361563"
@@ -117,17 +115,19 @@ def test_update_group(self):
client = errorreporting_v1beta1.ErrorGroupServiceClient()
# Setup Request
- group = {}
+ group_name = client.group_path("[PROJECT]", "[GROUP]")
- response = client.update_group(group)
+ response = client.get_group(group_name)
assert expected_response == response
assert len(channel.requests) == 1
- expected_request = error_group_service_pb2.UpdateGroupRequest(group=group)
+ expected_request = error_group_service_pb2.GetGroupRequest(
+ group_name=group_name
+ )
actual_request = channel.requests[0][1]
assert expected_request == actual_request
- def test_update_group_exception(self):
+ def test_get_group_exception(self):
# Mock the API response
channel = ChannelStub(responses=[CustomException()])
patch = mock.patch("google.api_core.grpc_helpers.create_channel")
@@ -136,7 +136,7 @@ def test_update_group_exception(self):
client = errorreporting_v1beta1.ErrorGroupServiceClient()
# Setup request
- group = {}
+ group_name = client.group_path("[PROJECT]", "[GROUP]")
with pytest.raises(CustomException):
- client.update_group(group)
+ client.get_group(group_name)
diff --git a/tests/unit/gapic/v1beta1/test_error_stats_service_client_v1beta1.py b/tests/unit/gapic/v1beta1/test_error_stats_service_client_v1beta1.py
index dc09b13f..7c15ac22 100644
--- a/tests/unit/gapic/v1beta1/test_error_stats_service_client_v1beta1.py
+++ b/tests/unit/gapic/v1beta1/test_error_stats_service_client_v1beta1.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.
@@ -61,16 +61,10 @@ class CustomException(Exception):
class TestErrorStatsServiceClient(object):
- def test_list_group_stats(self):
+ def test_delete_events(self):
# Setup Expected Response
- next_page_token = ""
- error_group_stats_element = {}
- error_group_stats = [error_group_stats_element]
- expected_response = {
- "next_page_token": next_page_token,
- "error_group_stats": error_group_stats,
- }
- expected_response = error_stats_service_pb2.ListGroupStatsResponse(
+ expected_response = {}
+ expected_response = error_stats_service_pb2.DeleteEventsResponse(
**expected_response
)
@@ -83,22 +77,19 @@ def test_list_group_stats(self):
# Setup Request
project_name = client.project_path("[PROJECT]")
- time_range = {}
-
- paged_list_response = client.list_group_stats(project_name, time_range)
- resources = list(paged_list_response)
- assert len(resources) == 1
- assert expected_response.error_group_stats[0] == resources[0]
+ response = client.delete_events(project_name)
+ assert expected_response == response
assert len(channel.requests) == 1
- expected_request = error_stats_service_pb2.ListGroupStatsRequest(
- project_name=project_name, time_range=time_range
+ expected_request = error_stats_service_pb2.DeleteEventsRequest(
+ project_name=project_name
)
actual_request = channel.requests[0][1]
assert expected_request == actual_request
- def test_list_group_stats_exception(self):
+ def test_delete_events_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:
@@ -107,22 +98,20 @@ def test_list_group_stats_exception(self):
# Setup request
project_name = client.project_path("[PROJECT]")
- time_range = {}
- paged_list_response = client.list_group_stats(project_name, time_range)
with pytest.raises(CustomException):
- list(paged_list_response)
+ client.delete_events(project_name)
- def test_list_events(self):
+ def test_list_group_stats(self):
# Setup Expected Response
next_page_token = ""
- error_events_element = {}
- error_events = [error_events_element]
+ error_group_stats_element = {}
+ error_group_stats = [error_group_stats_element]
expected_response = {
"next_page_token": next_page_token,
- "error_events": error_events,
+ "error_group_stats": error_group_stats,
}
- expected_response = error_stats_service_pb2.ListEventsResponse(
+ expected_response = error_stats_service_pb2.ListGroupStatsResponse(
**expected_response
)
@@ -135,22 +124,21 @@ def test_list_events(self):
# Setup Request
project_name = client.project_path("[PROJECT]")
- group_id = "groupId506361563"
- paged_list_response = client.list_events(project_name, group_id)
+ paged_list_response = client.list_group_stats(project_name)
resources = list(paged_list_response)
assert len(resources) == 1
- assert expected_response.error_events[0] == resources[0]
+ assert expected_response.error_group_stats[0] == resources[0]
assert len(channel.requests) == 1
- expected_request = error_stats_service_pb2.ListEventsRequest(
- project_name=project_name, group_id=group_id
+ expected_request = error_stats_service_pb2.ListGroupStatsRequest(
+ project_name=project_name
)
actual_request = channel.requests[0][1]
assert expected_request == actual_request
- def test_list_events_exception(self):
+ def test_list_group_stats_exception(self):
channel = ChannelStub(responses=[CustomException()])
patch = mock.patch("google.api_core.grpc_helpers.create_channel")
with patch as create_channel:
@@ -159,16 +147,21 @@ def test_list_events_exception(self):
# Setup request
project_name = client.project_path("[PROJECT]")
- group_id = "groupId506361563"
- paged_list_response = client.list_events(project_name, group_id)
+ paged_list_response = client.list_group_stats(project_name)
with pytest.raises(CustomException):
list(paged_list_response)
- def test_delete_events(self):
+ def test_list_events(self):
# Setup Expected Response
- expected_response = {}
- expected_response = error_stats_service_pb2.DeleteEventsResponse(
+ next_page_token = ""
+ error_events_element = {}
+ error_events = [error_events_element]
+ expected_response = {
+ "next_page_token": next_page_token,
+ "error_events": error_events,
+ }
+ expected_response = error_stats_service_pb2.ListEventsResponse(
**expected_response
)
@@ -181,19 +174,22 @@ def test_delete_events(self):
# Setup Request
project_name = client.project_path("[PROJECT]")
+ group_id = "groupId506361563"
- response = client.delete_events(project_name)
- assert expected_response == response
+ paged_list_response = client.list_events(project_name, group_id)
+ resources = list(paged_list_response)
+ assert len(resources) == 1
+
+ assert expected_response.error_events[0] == resources[0]
assert len(channel.requests) == 1
- expected_request = error_stats_service_pb2.DeleteEventsRequest(
- project_name=project_name
+ expected_request = error_stats_service_pb2.ListEventsRequest(
+ project_name=project_name, group_id=group_id
)
actual_request = channel.requests[0][1]
assert expected_request == actual_request
- def test_delete_events_exception(self):
- # Mock the API response
+ def test_list_events_exception(self):
channel = ChannelStub(responses=[CustomException()])
patch = mock.patch("google.api_core.grpc_helpers.create_channel")
with patch as create_channel:
@@ -202,6 +198,8 @@ def test_delete_events_exception(self):
# Setup request
project_name = client.project_path("[PROJECT]")
+ group_id = "groupId506361563"
+ paged_list_response = client.list_events(project_name, group_id)
with pytest.raises(CustomException):
- client.delete_events(project_name)
+ list(paged_list_response)
diff --git a/tests/unit/gapic/v1beta1/test_report_errors_service_client_v1beta1.py b/tests/unit/gapic/v1beta1/test_report_errors_service_client_v1beta1.py
index ef85fa15..8806285f 100644
--- a/tests/unit/gapic/v1beta1/test_report_errors_service_client_v1beta1.py
+++ b/tests/unit/gapic/v1beta1/test_report_errors_service_client_v1beta1.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# 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.