From 9ea7ef67d5524e294876e3bea93d26fbc653973b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 05:58:50 -0700 Subject: [PATCH 01/39] Integrate Python GAPIC Microgenerator in googleapis. This PR uses using documentai as an example. Depends on https://github.com/googleapis/gapic-generator-python/pull/402 PiperOrigin-RevId: 309824146 Source-Author: Google APIs Source-Date: Mon May 4 15:06:44 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb Source-Link: https://github.com/googleapis/googleapis/commit/e0f9d9e1f9de890db765be46f45ca8490723e3eb --- .kokoro/build.sh | 8 +- .kokoro/docs/common.cfg | 21 +- .kokoro/publish-docs.sh | 41 +- .kokoro/release.sh | 2 + .../gapic/config_service_v2_client.py | 580 +++++-- .../gapic/config_service_v2_client_config.py | 41 +- google/cloud/logging_v2/gapic/enums.py | 34 +- .../gapic/logging_service_v2_client.py | 272 ++-- .../gapic/logging_service_v2_client_config.py | 27 +- .../gapic/metrics_service_v2_client.py | 44 +- .../gapic/metrics_service_v2_client_config.py | 6 +- .../config_service_v2_grpc_transport.py | 61 +- .../logging_service_v2_grpc_transport.py | 32 +- google/cloud/logging_v2/proto/log_entry.proto | 100 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 236 ++- google/cloud/logging_v2/proto/logging.proto | 77 +- .../logging_v2/proto/logging_config.proto | 431 ++++-- .../logging_v2/proto/logging_config_pb2.py | 1378 ++++++++++++----- .../proto/logging_config_pb2_grpc.py | 63 +- .../logging_v2/proto/logging_metrics.proto | 39 +- .../logging_v2/proto/logging_metrics_pb2.py | 260 ++-- google/cloud/logging_v2/proto/logging_pb2.py | 371 ++--- .../logging_v2/proto/logging_pb2_grpc.py | 2 +- synth.metadata | 82 +- .../v2/test_config_service_v2_client_v2.py | 197 ++- .../v2/test_logging_service_v2_client_v2.py | 44 +- .../v2/test_metrics_service_v2_client_v2.py | 12 +- 27 files changed, 2873 insertions(+), 1588 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a194a9ead..8df566562 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -36,10 +36,4 @@ python3.6 -m pip uninstall --yes --quiet nox-automation python3.6 -m pip install --upgrade --quiet nox python3.6 -m nox --version -# If NOX_SESSION is set, it only runs the specified session, -# otherwise run all the sessions. -if [[ -n "${NOX_SESSION:-}" ]]; then - python3.6 -m nox -s "${NOX_SESSION:-}" -else - python3.6 -m nox -fi +python3.6 -m nox diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 4206e8ac4..01a16ec85 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -11,12 +11,12 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-logging/.kokoro/trampoline_v2.sh" +build_file: "python-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" @@ -28,23 +28,6 @@ env_vars: { value: "docs-staging" } -env_vars: { - key: "V2_STAGING_BUCKET" - value: "docs-staging-v2-staging" -} - -# It will upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} - -# It will always build the docker image. -env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/docs/Dockerfile" -} - # Fetch the token needed for reporting release status to GitHub before_action { fetch_keystore { diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 8acb14e80..d01483d2d 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -13,42 +13,35 @@ # 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. export PYTHONUNBUFFERED=1 -export PATH="${HOME}/.local/bin:${PATH}" +cd github/python-logging + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation # Install nox -python3 -m pip install --user --upgrade --quiet nox -python3 -m nox --version +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version # build docs nox -s docs -python3 -m pip install --user gcp-docuploader +python3 -m pip install gcp-docuploader -# create metadata -python3 -m docuploader create-metadata \ - --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ - --version=$(python3 setup.py --version) \ - --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ - --distribution-name=$(python3 setup.py --name) \ - --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ - --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ - --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) +# install a json parser +sudo apt-get update +sudo apt-get -y install software-properties-common +sudo add-apt-repository universe +sudo apt-get update +sudo apt-get -y install jq -cat docs.metadata - -# upload docs -python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}" - - -# docfx yaml files -nox -s docfx - -# create metadata. +# create metadata python3 -m docuploader create-metadata \ --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ --version=$(python3 setup.py --version) \ @@ -61,4 +54,4 @@ python3 -m docuploader create-metadata \ cat docs.metadata # upload docs -python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}" +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 2ef944a00..c9b0928ba 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -13,6 +13,8 @@ # 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/google/cloud/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index d3d08370e..c368c6387 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -76,38 +76,28 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" + def billing_account_path(cls, billing_account): + """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) @classmethod - def billing_exclusion_path(cls, billing_account, exclusion): - """Return a fully-qualified billing_exclusion string.""" + def billing_account_location_path(cls, billing_account, location): + """Return a fully-qualified billing_account_location string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/exclusions/{exclusion}", + "billingAccounts/{billing_account}/locations/{location}", billing_account=billing_account, - exclusion=exclusion, + location=location, ) @classmethod - def billing_sink_path(cls, billing_account, sink): - """Return a fully-qualified billing_sink string.""" + def cmek_settings_path(cls, project): + """Return a fully-qualified cmek_settings string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/sinks/{sink}", - billing_account=billing_account, - sink=sink, - ) - - @classmethod - def exclusion_path(cls, project, exclusion): - """Return a fully-qualified exclusion string.""" - return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", + "projects/{project}/cmekSettings", project=project, - exclusion=exclusion, ) @classmethod @@ -119,64 +109,74 @@ def folder_path(cls, folder): ) @classmethod - def folder_exclusion_path(cls, folder, exclusion): - """Return a fully-qualified folder_exclusion string.""" + def folder_location_path(cls, folder, location): + """Return a fully-qualified folder_location string.""" return google.api_core.path_template.expand( - "folders/{folder}/exclusions/{exclusion}", + "folders/{folder}/locations/{location}", folder=folder, - exclusion=exclusion, + location=location, ) @classmethod - def folder_sink_path(cls, folder, sink): - """Return a fully-qualified folder_sink string.""" + def location_path(cls, project, location): + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( - "folders/{folder}/sinks/{sink}", - folder=folder, - sink=sink, + "projects/{project}/locations/{location}", + project=project, + location=location, ) @classmethod - def organization_path(cls, organization): - """Return a fully-qualified organization string.""" + def log_bucket_path(cls, project, location, bucket): + """Return a fully-qualified log_bucket string.""" return google.api_core.path_template.expand( - "organizations/{organization}", - organization=organization, + "projects/{project}/locations/{location}/buckets/{bucket}", + project=project, + location=location, + bucket=bucket, ) @classmethod - def organization_exclusion_path(cls, organization, exclusion): - """Return a fully-qualified organization_exclusion string.""" + def log_exclusion_path(cls, project, exclusion): + """Return a fully-qualified log_exclusion string.""" return google.api_core.path_template.expand( - "organizations/{organization}/exclusions/{exclusion}", - organization=organization, + "projects/{project}/exclusions/{exclusion}", + project=project, exclusion=exclusion, ) @classmethod - def organization_sink_path(cls, organization, sink): - """Return a fully-qualified organization_sink string.""" + def log_sink_path(cls, project, sink): + """Return a fully-qualified log_sink string.""" return google.api_core.path_template.expand( - "organizations/{organization}/sinks/{sink}", - organization=organization, + "projects/{project}/sinks/{sink}", + project=project, sink=sink, ) @classmethod - def project_path(cls, project): - """Return a fully-qualified project string.""" + def organization_path(cls, organization): + """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - "projects/{project}", - project=project, + "organizations/{organization}", + organization=organization, ) @classmethod - def sink_path(cls, project, sink): - """Return a fully-qualified sink string.""" + def organization_location_path(cls, organization, location): + """Return a fully-qualified organization_location string.""" return google.api_core.path_template.expand( - "projects/{project}/sinks/{sink}", + "organizations/{organization}/locations/{location}", + organization=organization, + location=location, + ) + + @classmethod + def project_path(cls, project): + """Return a fully-qualified project string.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project, - sink=sink, ) def __init__( @@ -296,6 +296,323 @@ def __init__( self._inner_api_calls = {} # Service calls + def list_buckets( + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists buckets (Beta). + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') + >>> + >>> # Iterate over all results + >>> for element in client.list_buckets(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_buckets(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The parent resource whose buckets are to be listed: + + :: + + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the resource must be specified, but + supplying the character ``-`` in place of [LOCATION_ID] will return all + buckets. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + 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.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogBucket` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + 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 "list_buckets" not in self._inner_api_calls: + self._inner_api_calls[ + "list_buckets" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_buckets, + default_retry=self._method_configs["ListBuckets"].retry, + default_timeout=self._method_configs["ListBuckets"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.ListBucketsRequest( + parent=parent, + page_size=page_size, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_buckets"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="buckets", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def get_bucket( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets a bucket (Beta). + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> response = client.get_bucket(name) + + Args: + name (str): Required. The resource name of the bucket: + + :: + + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + + Example: + ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. + 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.logging_v2.types.LogBucket` 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 "get_bucket" not in self._inner_api_calls: + self._inner_api_calls[ + "get_bucket" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_bucket, + default_retry=self._method_configs["GetBucket"].retry, + default_timeout=self._method_configs["GetBucket"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.GetBucketRequest( + name=name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["get_bucket"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def update_bucket( + self, + name, + bucket, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: ``retention_period`` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, + FAILED_PRECONDITION will be returned. + + A buckets region may not be modified after it is created. This method is + in Beta. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> # TODO: Initialize `bucket`: + >>> bucket = {} + >>> + >>> # TODO: Initialize `update_mask`: + >>> update_mask = {} + >>> + >>> response = client.update_bucket(name, bucket, update_mask) + + Args: + name (str): Required. The full resource name of the bucket to update. + + :: + + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + + Example: + ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. + Also requires permission "resourcemanager.projects.updateLiens" to set + the locked property + bucket (Union[dict, ~google.cloud.logging_v2.types.LogBucket]): Required. The updated bucket. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogBucket` + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. Field mask that specifies the fields in ``bucket`` that + need an update. A bucket field will be overwritten if, and only if, it + is in the update mask. ``name`` and output only fields cannot be + updated. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=retention_days``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.logging_v2.types.LogBucket` 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 "update_bucket" not in self._inner_api_calls: + self._inner_api_calls[ + "update_bucket" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_bucket, + default_retry=self._method_configs["UpdateBucket"].retry, + default_timeout=self._method_configs["UpdateBucket"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.UpdateBucketRequest( + name=name, + bucket=bucket, + update_mask=update_mask, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["update_bucket"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def list_sinks( self, parent, @@ -333,10 +650,10 @@ def list_sinks( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -422,7 +739,8 @@ def get_sink( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' >>> >>> response = client.get_sink(sink_name) @@ -431,10 +749,10 @@ def get_sink( :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -497,8 +815,8 @@ def create_sink( metadata=None, ): """ - Creates a sink that exports specified log entries to a destination. The - export of newly-ingested log entries begins immediately, unless the + Creates a sink that exports specified log entries to a destination. + The export of newly-ingested log entries begins immediately, unless the sink's ``writer_identity`` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. @@ -519,15 +837,15 @@ def create_sink( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging-project"``, ``"organizations/123456789"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink identifier - that is not already in use. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink + identifier that is not already in use. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogSink` @@ -617,7 +935,8 @@ def update_sink( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' >>> >>> # TODO: Initialize `sink`: >>> sink = {} @@ -625,15 +944,15 @@ def update_sink( >>> response = client.update_sink(sink_name, sink) Args: - sink_name (str): Required. The full resource name of the sink to update, including the - parent resource and the sink identifier: + sink_name (str): Required. The full resource name of the sink to update, including + the parent resource and the sink identifier: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that @@ -652,9 +971,9 @@ def update_sink( ``writer_identity`` is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or defaulted to false. - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need an - update. A sink field will be overwritten if, and only if, it is in the - update mask. ``name`` and output only fields cannot be updated. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need + an update. A sink field will be overwritten if, and only if, it is in + the update mask. ``name`` and output only fields cannot be updated. An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren @@ -729,28 +1048,29 @@ def delete_sink( metadata=None, ): """ - Deletes a sink. If the sink has a unique ``writer_identity``, then that - service account is also deleted. + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' >>> >>> client.delete_sink(sink_name) Args: - sink_name (str): Required. The full resource name of the sink to delete, including the - parent resource and the sink identifier: + sink_name (str): Required. The full resource name of the sink to delete, including + the parent resource and the sink identifier: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -837,10 +1157,10 @@ def list_exclusions( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -926,7 +1246,8 @@ def get_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_exclusion(name) @@ -935,10 +1256,10 @@ def get_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1021,15 +1342,15 @@ def create_exclusion( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging-project"``, ``"organizations/123456789"``. - exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an exclusion - name that is not already used in the parent resource. + exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an + exclusion name that is not already used in the parent resource. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogExclusion` @@ -1101,7 +1422,8 @@ def update_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> # TODO: Initialize `exclusion`: >>> exclusion = {} @@ -1116,10 +1438,10 @@ def update_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. New values for the existing exclusion. Only the fields @@ -1205,7 +1527,8 @@ def delete_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_exclusion(name) @@ -1214,10 +1537,10 @@ def delete_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1269,7 +1592,7 @@ def delete_exclusion( def get_cmek_settings( self, - name=None, + name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -1290,17 +1613,20 @@ def get_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> response = client.get_cmek_settings() + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> response = client.get_cmek_settings(name) Args: name (str): Required. The resource for which to retrieve CMEK settings. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. @@ -1359,8 +1685,8 @@ def get_cmek_settings( def update_cmek_settings( self, - name=None, - cmek_settings=None, + name, + cmek_settings, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, @@ -1376,9 +1702,7 @@ def update_cmek_settings( ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or - - 3) access to the key is disabled. + key, or 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ @@ -1389,17 +1713,23 @@ def update_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> response = client.update_cmek_settings() + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> # TODO: Initialize `cmek_settings`: + >>> cmek_settings = {} + >>> + >>> response = client.update_cmek_settings(name, cmek_settings) Args: name (str): Required. The resource name for the CMEK settings to update. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 00c7146e2..d16e72238 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,9 +2,8 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], - "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { "default": { @@ -15,18 +14,24 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000, - }, - "write_sink": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - }, + } }, "methods": { + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, "ListSinks": { "timeout_millis": 60000, "retry_codes_name": "idempotent", @@ -38,18 +43,18 @@ "retry_params_name": "default", }, "CreateSink": { - "timeout_millis": 120000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateSink": { - "timeout_millis": 120000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListExclusions": { @@ -74,12 +79,12 @@ }, "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", + "retry_codes_name": "idempotent", "retry_params_name": "default", }, "UpdateCmekSettings": { diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index ee1a098a5..1c6690a4d 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -47,8 +47,8 @@ class LaunchStage(enum.IntEnum): limited production use cases. GA (int): GA features are open to all developers and are considered stable and fully qualified for production use. - DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more - information, see the “Deprecation Policy” section of our `Terms of + DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For + more information, see the “Deprecation Policy” section of our `Terms of Service `__ and the `Google Cloud Platform Subject to the Deprecation Policy `__ documentation. @@ -62,10 +62,26 @@ class LaunchStage(enum.IntEnum): DEPRECATED = 5 +class LifecycleState(enum.IntEnum): + """ + LogBucket lifecycle states (Beta). + + Attributes: + LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing + unset values. + ACTIVE (int): The normal and active state. + DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. + """ + + LIFECYCLE_STATE_UNSPECIFIED = 0 + ACTIVE = 1 + DELETE_REQUESTED = 2 + + class LogSeverity(enum.IntEnum): """ - The severity of the event described in a log entry, expressed as one of - the standard severity levels listed below. For your reference, the + The severity of the event described in a log entry, expressed as one + of the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined. @@ -75,7 +91,7 @@ class LogSeverity(enum.IntEnum): :: - severity > DEBUG AND severity <= WARNING + severity > DEBUG AND severity <= WARNING If you are writing log entries, you should map other severity encodings to one of these standard levels. For example, you might map all of @@ -109,8 +125,8 @@ class LogSeverity(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value for - the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value + for the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -196,8 +212,8 @@ class ValueType(enum.IntEnum): Attributes: VALUE_TYPE_UNSPECIFIED (int): Do not use this default value. - BOOL (int): The value is a boolean. This value type can be used only if the metric - kind is ``GAUGE``. + BOOL (int): The value is a boolean. This value type can be used only if the + metric kind is ``GAUGE``. INT64 (int): The value is a signed 64-bit integer. DOUBLE (int): The value is a double precision floating point number. STRING (int): The value is a text string. This value type can be used only if the diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index c823deacb..3a1cb38a5 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -80,22 +80,13 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" + def billing_account_path(cls, billing_account): + """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) - @classmethod - def billing_log_path(cls, billing_account, log): - """Return a fully-qualified billing_log string.""" - return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/logs/{log}", - billing_account=billing_account, - log=log, - ) - @classmethod def folder_path(cls, folder): """Return a fully-qualified folder string.""" @@ -104,15 +95,6 @@ def folder_path(cls, folder): folder=folder, ) - @classmethod - def folder_log_path(cls, folder, log): - """Return a fully-qualified folder_log string.""" - return google.api_core.path_template.expand( - "folders/{folder}/logs/{log}", - folder=folder, - log=log, - ) - @classmethod def log_path(cls, project, log): """Return a fully-qualified log string.""" @@ -130,15 +112,6 @@ def organization_path(cls, organization): organization=organization, ) - @classmethod - def organization_log_path(cls, organization, log): - """Return a fully-qualified organization_log string.""" - return google.api_core.path_template.expand( - "organizations/{organization}/logs/{log}", - organization=organization, - log=log, - ) - @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -264,89 +237,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def delete_log( - self, - log_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes all the log entries in a log. The log reappears if it receives new - entries. Log entries written shortly before the delete operation might not - be deleted. Entries received after the delete operation with a timestamp - before the operation will be deleted. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.LoggingServiceV2Client() - >>> - >>> log_name = client.log_path('[PROJECT]', '[LOG]') - >>> - >>> client.delete_log(log_name) - - Args: - log_name (str): Required. The resource name of the log to delete: - - :: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"``. - For more information about log names, see ``LogEntry``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_log" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_log" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_log, - default_retry=self._method_configs["DeleteLog"].retry, - default_timeout=self._method_configs["DeleteLog"].timeout, - client_info=self._client_info, - ) - - request = logging_pb2.DeleteLogRequest( - log_name=log_name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("log_name", log_name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_log"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def write_log_entries( self, entries, @@ -379,8 +269,8 @@ def write_log_entries( >>> response = client.write_log_entries(entries) Args: - entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log entries - in this list does not matter. Values supplied in this method's + entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log + entries in this list does not matter. Values supplied in this method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the ``LogEntry`` type. @@ -410,46 +300,45 @@ def write_log_entries( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example: :: - "projects/my-project-id/logs/syslog" - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + "projects/my-project-id/logs/syslog" + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - The permission logging.logEntries.create is needed on each project, + The permission ``logging.logEntries.create`` is needed on each project, organization, billing account, or folder that is receiving new log - entries, whether the resource is specified in logName or in an + entries, whether the resource is specified in ``logName`` or in an individual log entry. - resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to all - log entries in ``entries`` that do not specify a value for ``resource``. - Example: + resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to + all log entries in ``entries`` that do not specify a value for + ``resource``. Example: :: - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + { "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See ``LogEntry``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.MonitoredResource` - labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of all - log entries in ``entries``. If a log entry already has a label with the - same key as a label in this parameter, then the log entry's label is not - changed. See ``LogEntry``. + labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of + all log entries in ``entries``. If a log entry already has a label with + the same key as a label in this parameter, then the log entry's label is + not changed. See ``LogEntry``. partial_success (bool): Optional. Whether valid entries should be written even if some other - entries fail due to INVALID\_ARGUMENT or PERMISSION\_DENIED errors. If - any entry is not written, then the response status is the error - associated with one of the failed entries and the response includes - error details keyed by the entries' zero-based index in the - ``entries.write`` method. + entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any + entry is not written, then the response status is the error associated + with one of the failed entries and the response includes error details + keyed by the entries' zero-based index in the ``entries.write`` method. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. @@ -495,10 +384,93 @@ def write_log_entries( request, retry=retry, timeout=timeout, metadata=metadata ) + def delete_log( + self, + log_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes all the log entries in a log. The log reappears if it receives new + entries. Log entries written shortly before the delete operation might not + be deleted. Entries received after the delete operation with a timestamp + before the operation will be deleted. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.LoggingServiceV2Client() + >>> + >>> # TODO: Initialize `log_name`: + >>> log_name = '' + >>> + >>> client.delete_log(log_name) + + Args: + log_name (str): Required. The resource name of the log to delete: + + :: + + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" + + ``[LOG_ID]`` must be URL-encoded. For example, + ``"projects/my-project-id/logs/syslog"``, + ``"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"``. + For more information about log names, see ``LogEntry``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_log" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_log" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_log, + default_retry=self._method_configs["DeleteLog"].retry, + default_timeout=self._method_configs["DeleteLog"].timeout, + client_info=self._client_info, + ) + + request = logging_pb2.DeleteLogRequest( + log_name=log_name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("log_name", log_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_log"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def list_log_entries( self, resource_names, - project_ids=None, filter_=None, order_by=None, page_size=None, @@ -535,20 +507,17 @@ def list_log_entries( ... pass Args: - resource_names (list[str]): Required. Names of one or more parent resources from which to retrieve - log entries: + resource_names (list[str]): Required. Names of one or more parent resources from which to + retrieve log entries: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Projects listed in the ``project_ids`` field are added to this list. - project_ids (list[str]): Deprecated. Use ``resource_names`` instead. One or more project - identifiers or project numbers from which to retrieve log entries. - Example: ``"my-project-1A"``. filter_ (str): Optional. A filter that chooses which log entries to return. See `Advanced Logs Queries `__. @@ -604,7 +573,6 @@ def list_log_entries( request = logging_pb2.ListLogEntriesRequest( resource_names=resource_names, - project_ids=project_ids, filter=filter_, order_by=order_by, page_size=page_size, @@ -752,10 +720,10 @@ def list_logs( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index b3da612f6..68ac87af4 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,7 +2,7 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { @@ -14,26 +14,12 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000, - }, - "list": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - }, + } }, "methods": { - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, @@ -41,9 +27,14 @@ "delay_threshold_millis": 50, }, }, + "DeleteLog": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, "ListLogEntries": { "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListMonitoredResourceDescriptors": { diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index 87cf5b89d..b777054ba 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -82,38 +82,14 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" - return google.api_core.path_template.expand( - "billingAccounts/{billing_account}", - billing_account=billing_account, - ) - - @classmethod - def folder_path(cls, folder): - """Return a fully-qualified folder string.""" - return google.api_core.path_template.expand( - "folders/{folder}", - folder=folder, - ) - - @classmethod - def metric_path(cls, project, metric): - """Return a fully-qualified metric string.""" + def log_metric_path(cls, project, metric): + """Return a fully-qualified log_metric string.""" return google.api_core.path_template.expand( "projects/{project}/metrics/{metric}", project=project, metric=metric, ) - @classmethod - def organization_path(cls, organization): - """Return a fully-qualified organization string.""" - return google.api_core.path_template.expand( - "organizations/{organization}", - organization=organization, - ) - @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -276,7 +252,7 @@ def list_log_metrics( :: - "projects/[PROJECT_ID]" + "projects/[PROJECT_ID]" 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 @@ -362,7 +338,7 @@ def get_log_metric( >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> >>> response = client.get_log_metric(metric_name) @@ -371,7 +347,7 @@ def get_log_metric( :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -451,7 +427,7 @@ def create_log_metric( :: - "projects/[PROJECT_ID]" + "projects/[PROJECT_ID]" The new metric must be provided in the request. metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that @@ -526,7 +502,7 @@ def update_log_metric( >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> >>> # TODO: Initialize `metric`: >>> metric = {} @@ -538,7 +514,7 @@ def update_log_metric( :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's ``name`` field must be the same as ``[METRIC_ID]`` If the metric does not exist @@ -613,7 +589,7 @@ def delete_log_metric( >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> >>> client.delete_log_metric(metric_name) @@ -622,7 +598,7 @@ def delete_log_metric( :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index 133abec23..0c6414a23 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,7 +2,7 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], }, "retry_params": { @@ -34,12 +34,12 @@ }, "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, }, diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index f3132ede0..69c1d992a 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -115,6 +115,55 @@ def channel(self): """ return self._channel + @property + def list_buckets(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_buckets`. + + Lists buckets (Beta). + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].ListBuckets + + @property + def get_bucket(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_bucket`. + + Gets a bucket (Beta). + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].GetBucket + + @property + def update_bucket(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_bucket`. + + Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: ``retention_period`` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, + FAILED_PRECONDITION will be returned. + + A buckets region may not be modified after it is created. This method is + in Beta. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].UpdateBucket + @property def list_sinks(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. @@ -145,8 +194,8 @@ def get_sink(self): def create_sink(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. - Creates a sink that exports specified log entries to a destination. The - export of newly-ingested log entries begins immediately, unless the + Creates a sink that exports specified log entries to a destination. + The export of newly-ingested log entries begins immediately, unless the sink's ``writer_identity`` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. @@ -179,8 +228,8 @@ def update_sink(self): def delete_sink(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - Deletes a sink. If the sink has a unique ``writer_identity``, then that - service account is also deleted. + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. Returns: Callable: A callable which accepts the appropriate @@ -290,9 +339,7 @@ def update_cmek_settings(self): ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or - - 3) access to the key is disabled. + key, or 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 4cf843caf..4ee5baa5b 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -113,22 +113,6 @@ def channel(self): """ return self._channel - @property - def delete_log(self): - """Return the gRPC stub for :meth:`LoggingServiceV2Client.delete_log`. - - Deletes all the log entries in a log. The log reappears if it receives new - entries. Log entries written shortly before the delete operation might not - be deleted. Entries received after the delete operation with a timestamp - before the operation will be deleted. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["logging_service_v2_stub"].DeleteLog - @property def write_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. @@ -148,6 +132,22 @@ def write_log_entries(self): """ return self._stubs["logging_service_v2_stub"].WriteLogEntries + @property + def delete_log(self): + """Return the gRPC stub for :meth:`LoggingServiceV2Client.delete_log`. + + Deletes all the log entries in a log. The log reappears if it receives new + entries. Log entries written shortly before the delete operation might not + be deleted. Entries received after the delete operation with a timestamp + before the operation will be deleted. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["logging_service_v2_stub"].DeleteLog + @property def list_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. diff --git a/google/cloud/logging_v2/proto/log_entry.proto b/google/cloud/logging_v2/proto/log_entry.proto index 3f9c3d51d..351f9e632 100644 --- a/google/cloud/logging_v2/proto/log_entry.proto +++ b/google/cloud/logging_v2/proto/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // 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.logging.v2; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; @@ -55,9 +55,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The project - // number is translated to its corresponding PROJECT_ID internally and the - // `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may be used in place of PROJECT_ID. The project number is + // translated to its corresponding PROJECT_ID internally and the `log_name` + // field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -70,16 +70,16 @@ message LogEntry { // forward-slash is removed. Listing the log entry will not show the leading // slash and filtering for a log name with a leading slash will never return // any results. - string log_name = 12; + string log_name = 12 [(google.api.field_behavior) = REQUIRED]; // Required. The monitored resource that produced this log entry. // // Example: a log entry that reports a database error would be associated with // the monitored resource designating the particular database that reported // the error. - google.api.MonitoredResource resource = 8; + google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The log entry payload, which can be one of multiple types. + // The log entry payload, which can be one of multiple types. oneof payload { // The log entry payload, represented as a protocol buffer. Some Google // Cloud Platform services use this field for their log entry payloads. @@ -99,29 +99,27 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This - // time is used to compute the log entry's age and to enforce the logs - // retention period. If this field is omitted in a new log entry, then Logging - // assigns it the current time. Timestamps have nanosecond accuracy, but - // trailing zeros in the fractional seconds might be omitted when the - // timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time is used + // to compute the log entry's age and to enforce the logs retention period. + // If this field is omitted in a new log entry, then Logging assigns it the + // current time. Timestamps have nanosecond accuracy, but trailing zeros in + // the fractional seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than the [logs - // retention period](/logging/quotas) in the past, and no more than 24 hours + // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours // in the future. Log entries outside those time boundaries will not be // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). - google.protobuf.Timestamp timestamp = 9; + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24; + google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; + // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, then + // Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -131,43 +129,32 @@ message LogEntry { // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. - string insert_id = 4; + string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this log - // entry, if applicable. - google.logging.type.HttpRequest http_request = 7; + // Optional. Information about the HTTP request associated with this log entry, if + // applicable. + google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11; - - // Deprecated. Output only. Additional metadata about the monitored resource. - // - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated for GKE versions older than 1.12.6. For GKE versions - // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes - // pod labels that used to be in `metadata.userLabels` will now be present in - // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system - // labels that were present in the `metadata.systemLabels` field will no - // longer be available in the LogEntry. - google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15; + LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Resource name of the trace associated with the log entry, if any. - // If it contains a relative resource name, the name is assumed to be relative - // to `//tracing.googleapis.com`. Example: + // Optional. Resource name of the trace associated with the log entry, if any. If it + // contains a relative resource name, the name is assumed to be relative to + // `//tracing.googleapis.com`. Example: // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - string trace = 22; + string trace = 22 [(google.api.field_behavior) = OPTIONAL]; // Optional. The span ID within the trace associated with the log entry. // // For Trace spans, this is the same format that the Trace API v2 uses: a // 16-character hexadecimal encoding of an 8-byte array, such as - // "000000000000004a". - string span_id = 27; + // `000000000000004a`. + string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. // @@ -176,11 +163,10 @@ message LogEntry { // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30; + bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, - // if any. - LogEntrySourceLocation source_location = 23; + // Optional. Source code location information associated with the log entry, if any. + LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which @@ -188,18 +174,18 @@ message LogEntry { message LogEntryOperation { // Optional. An arbitrary operation identifier. Log entries with the same // identifier are assumed to be part of the same operation. - string id = 1; + string id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. An arbitrary producer identifier. The combination of `id` and // `producer` must be globally unique. Examples for `producer`: // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - string producer = 2; + string producer = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; + bool first = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; + bool last = 4 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about the source code location that produced the log @@ -207,11 +193,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1; + string file = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2; + int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Human-readable name of the function or method being invoked, with // optional context such as the class or package name. This information may be @@ -219,5 +205,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3; + string function = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index 9b0ef2205..d65408c48 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -2,9 +2,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.proto -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -15,6 +12,7 @@ _sym_db = _symbol_database.Default() +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) @@ -36,13 +34,10 @@ name="google/cloud/logging_v2/proto/log_entry.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xce\x07\n\x08LogEntry\x12\x10\n\x08log_name\x18\x0c \x01(\t\x12/\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12-\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverity\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x36\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequest\x12\x37\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntry\x12;\n\x08metadata\x18\x19 \x01(\x0b\x32%.google.api.MonitoredResourceMetadataB\x02\x18\x01\x12\x37\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperation\x12\r\n\x05trace\x18\x16 \x01(\t\x12\x0f\n\x07span_id\x18\x1b \x01(\t\x12\x15\n\rtrace_sampled\x18\x1e \x01(\x08\x12\x42\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, @@ -72,7 +67,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, @@ -90,7 +85,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, @@ -103,13 +98,13 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1084, - serialized_end=1129, + serialized_start=1121, + serialized_end=1166, ) _LOGENTRY = _descriptor.Descriptor( @@ -128,13 +123,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -152,7 +147,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -182,7 +177,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, @@ -224,7 +219,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -242,7 +237,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -260,7 +255,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -272,13 +267,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -296,7 +291,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -314,31 +309,13 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="metadata", - full_name="google.logging.v2.LogEntry.metadata", - index=11, - number=25, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="operation", full_name="google.logging.v2.LogEntry.operation", - index=12, + index=11, number=15, type=11, cpp_type=10, @@ -350,49 +327,49 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="trace", full_name="google.logging.v2.LogEntry.trace", - index=13, + index=12, number=22, type=9, 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, ), _descriptor.FieldDescriptor( name="span_id", full_name="google.logging.v2.LogEntry.span_id", - index=14, + index=13, number=27, type=9, 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, ), _descriptor.FieldDescriptor( name="trace_sampled", full_name="google.logging.v2.LogEntry.trace_sampled", - index=15, + index=14, number=30, type=8, cpp_type=7, @@ -404,13 +381,13 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="source_location", full_name="google.logging.v2.LogEntry.source_location", - index=16, + index=15, number=23, type=11, cpp_type=10, @@ -422,7 +399,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -431,9 +408,7 @@ _LOGENTRY_LABELSENTRY, ], enum_types=[], - serialized_options=_b( - "\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name" - ), + serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -446,8 +421,8 @@ fields=[], ), ], - serialized_start=358, - serialized_end=1332, + serialized_start=391, + serialized_end=1369, ) @@ -467,13 +442,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -485,13 +460,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -509,7 +484,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -527,7 +502,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -539,8 +514,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1334, - serialized_end=1412, + serialized_start=1371, + serialized_end=1469, ) @@ -560,13 +535,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -584,7 +559,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -596,13 +571,13 @@ 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, ), ], @@ -614,8 +589,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1414, - serialized_end=1484, + serialized_start=1471, + serialized_end=1556, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY @@ -641,9 +616,6 @@ "http_request" ].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST _LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY -_LOGENTRY.fields_by_name[ - "metadata" -].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEMETADATA _LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION _LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION _LOGENTRY.oneofs_by_name["payload"].fields.append( @@ -672,31 +644,31 @@ LogEntry = _reflection.GeneratedProtocolMessageType( "LogEntry", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRY_LABELSENTRY, - __module__="google.cloud.logging_v2.proto.log_entry_pb2" + { + "DESCRIPTOR": _LOGENTRY_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - ), + }, ), - DESCRIPTOR=_LOGENTRY, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""An individual entry in a log. + "DESCRIPTOR": _LOGENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """An individual entry in a log. Attributes: log_name: Required. The resource name of the log to which this log entry - belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may - optionally be used in place of PROJECT\_ID. The project number - is translated to its corresponding PROJECT\_ID internally and - the ``log_name`` field will contain PROJECT\_ID in queries and + "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be + used in place of PROJECT_ID. The project number is translated + to its corresponding PROJECT_ID internally and the + ``log_name`` field will contain PROJECT_ID in queries and exports. ``[LOG_ID]`` must be URL-encoded within ``log_name``. Example: ``"organizations/1234567890/logs/cloudr esourcemanager.googleapis.com%2Factivity"``. ``[LOG_ID]`` must @@ -715,15 +687,14 @@ associated with the monitored resource designating the particular database that reported the error. payload: - Optional. The log entry payload, which can be one of multiple - types. + The log entry payload, which can be one of multiple types. proto_payload: The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. The following protocol buffer types are supported; user-defined types are not supported: - "type.googleapis.com/google.cloud.audit.AuditLog" - "type.googleapis.com/google.appengine.logging.v1.RequestLog" + “type.googleapis.com/google.cloud.audit.AuditLog” + “type.googleapis.com/google.appengine.logging.v1.RequestLog” text_payload: The log entry payload, represented as a Unicode string (UTF-8). @@ -732,18 +703,20 @@ expressed as a JSON object. timestamp: Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry's age and + occurred. This time is used to compute the log entry’s age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed. Incoming log entries should have timestamps that are no more than the `logs retention period - `__ in the past, and no more than 24 hours in - the future. Log entries outside those time boundaries will not - be available when calling ``entries.list``, but those log - entries can still be `exported with LogSinks - `__. + `__ in the past, and + no more than 24 hours in the future. Log entries outside those + time boundaries will not be available when calling + ``entries.list``, but those log entries can still be `exported + with LogSinks + `__. receive_timestamp: Output only. The time the log entry was received by Logging. severity: @@ -766,18 +739,6 @@ labels: Optional. A set of user-defined (key, value) data that provides additional information about the log entry. - metadata: - Deprecated. Output only. Additional metadata about the - monitored resource. Only ``k8s_container``, ``k8s_pod``, and - ``k8s_node`` MonitoredResources have this field populated for - GKE versions older than 1.12.6. For GKE versions 1.12.6 and - above, the ``metadata`` field has been deprecated. The - Kubernetes pod labels that used to be in - ``metadata.userLabels`` will now be present in the ``labels`` - field with a key prefix of ``k8s-pod/``. The Stackdriver - system labels that were present in the - ``metadata.systemLabels`` field will no longer be available in - the LogEntry. operation: Optional. Information about an operation associated with the log entry, if applicable. @@ -791,7 +752,7 @@ Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an - 8-byte array, such as "000000000000004a". + 8-byte array, such as ``000000000000004a``. trace_sampled: Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the @@ -806,7 +767,7 @@ log entry, if any. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - ), + }, ) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) @@ -814,10 +775,10 @@ LogEntryOperation = _reflection.GeneratedProtocolMessageType( "LogEntryOperation", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRYOPERATION, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""Additional information about a potentially long-running + { + "DESCRIPTOR": _LOGENTRYOPERATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about a potentially long-running operation with which a log entry is associated. @@ -839,18 +800,18 @@ the operation. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - ), + }, ) _sym_db.RegisterMessage(LogEntryOperation) LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( "LogEntrySourceLocation", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRYSOURCELOCATION, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""Additional information about the source code location that - produced the log entry. + { + "DESCRIPTOR": _LOGENTRYSOURCELOCATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about the source code location that produced the + log entry. Attributes: @@ -871,13 +832,32 @@ (Go), ``function`` (Python). """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - ), + }, ) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name["metadata"]._options = None +_LOGENTRY.fields_by_name["log_name"]._options = None +_LOGENTRY.fields_by_name["resource"]._options = None +_LOGENTRY.fields_by_name["timestamp"]._options = None +_LOGENTRY.fields_by_name["receive_timestamp"]._options = None +_LOGENTRY.fields_by_name["severity"]._options = None +_LOGENTRY.fields_by_name["insert_id"]._options = None +_LOGENTRY.fields_by_name["http_request"]._options = None +_LOGENTRY.fields_by_name["labels"]._options = None +_LOGENTRY.fields_by_name["operation"]._options = None +_LOGENTRY.fields_by_name["trace"]._options = None +_LOGENTRY.fields_by_name["span_id"]._options = None +_LOGENTRY.fields_by_name["trace_sampled"]._options = None +_LOGENTRY.fields_by_name["source_location"]._options = None _LOGENTRY._options = None +_LOGENTRYOPERATION.fields_by_name["id"]._options = None +_LOGENTRYOPERATION.fields_by_name["producer"]._options = None +_LOGENTRYOPERATION.fields_by_name["first"]._options = None +_LOGENTRYOPERATION.fields_by_name["last"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging.proto b/google/cloud/logging_v2/proto/logging.proto index c3a524633..36a81dcc2 100644 --- a/google/cloud/logging_v2/proto/logging.proto +++ b/google/cloud/logging_v2/proto/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // 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.logging.v2; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -28,6 +26,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -87,7 +86,7 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](/logging/docs/export). + // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -142,7 +141,7 @@ message DeleteLogRequest { string log_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" + type: "logging.googleapis.com/Log" } ]; } @@ -162,13 +161,16 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - string log_name = 1 [(google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - }]; + // The permission `logging.logEntries.create` is needed on each project, + // organization, billing account, or folder that is receiving new log + // entries, whether the resource is specified in `logName` or in an + // individual log entry. + string log_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -178,13 +180,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2; + google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Default labels that are added to the `labels` field of all log // entries in `entries`. If a log entry already has a label with the same key // as a label in this parameter, then the log entry's label is not changed. // See [LogEntry][google.logging.v2.LogEntry]. - map labels = 3; + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -200,13 +202,13 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than + // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. // However, those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, // you should try to include several log entries in this list, // rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; @@ -216,19 +218,16 @@ message WriteLogEntriesRequest { // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5; + bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6; + bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from WriteLogEntries. -// empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -243,11 +242,6 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. - repeated string project_ids = 1 [deprecated = true]; - // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -266,13 +260,13 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](/logging/docs/view/advanced-queries). Only log entries that + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that // match the filter are returned. An empty filter matches all log entries in // the resources listed in `resource_names`. Referencing a parent resource // that is not listed in `resource_names` will cause the filter to return no // results. // The maximum length of the filter is 20000 characters. - string filter = 2; + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -280,18 +274,18 @@ message ListLogEntriesRequest { // `LogEntry.timestamp` (oldest first), and the second option returns entries // in order of decreasing timestamps (newest first). Entries with equal // timestamps are returned in order of their `insert_id` values. - string order_by = 3; + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListLogEntries`. @@ -319,13 +313,13 @@ message ListMonitoredResourceDescriptorsRequest { // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListMonitoredResourceDescriptors. @@ -347,20 +341,23 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1 [(google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" - }]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. diff --git a/google/cloud/logging_v2/proto/logging_config.proto b/google/cloud/logging_v2/proto/logging_config.proto index 7fb830ded..b7cb9c94a 100644 --- a/google/cloud/logging_v2/proto/logging_config.proto +++ b/google/cloud/logging_v2/proto/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -33,6 +32,18 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/BillingAccountLocation" + pattern: "billingAccounts/{billing_account}/locations/{location}" +}; // Service for configuring sinks used to route log entries. service ConfigServiceV2 { @@ -43,6 +54,79 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; + // Lists buckets (Beta). + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*}/buckets" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a bucket (Beta). + rpc GetBucket(GetBucketRequest) returns (LogBucket) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*}" + } + }; + } + + // Updates a bucket. This method replaces the following fields in the + // existing bucket with values from the new bucket: `retention_period` + // + // If the retention period is decreased and the bucket is locked, + // FAILED_PRECONDITION will be returned. + // + // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + // will be returned. + // + // A buckets region may not be modified after it is created. + // This method is in Beta. + rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*}" + body: "bucket" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + body: "bucket" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -297,7 +381,7 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -320,7 +404,7 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -333,6 +417,48 @@ service ConfigServiceV2 { } } +// Describes a repository of logs (Beta). +message LogBucket { + option (google.api.resource) = { + type: "logging.googleapis.com/LogBucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }; + + // The resource name of the bucket. + // For example: + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + // supported locations are: + // "global" + // "us-central1" + // + // For the location of `global` it is unspecified where logs are actually + // stored. + // Once a bucket has been created, the location can not be changed. + string name = 1; + + // Describes this bucket. + string description = 3; + + // Output only. The creation timestamp of the bucket. This is not set for any of the + // default buckets. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the bucket. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Logs will be retained by default for this amount of time, after which they + // will automatically be deleted. The minimum retention period is 1 day. + // If this value is set to zero at bucket creation time, the default time of + // 30 days will be used. + int32 retention_days = 11; + + // Output only. The bucket lifecycle state. + LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -340,7 +466,7 @@ service ConfigServiceV2 { // folder. message LogSink { option (google.api.resource) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" pattern: "projects/{project}/sinks/{sink}" pattern: "organizations/{organization}/sinks/{sink}" pattern: "folders/{folder}/sinks/{sink}" @@ -361,12 +487,12 @@ message LogSink { V1 = 2; } - // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are - // limited to 100 characters and can include only the following characters: - // upper and lower-case alphanumeric characters, underscores, hyphens, and - // periods. First character has to be alphanumeric. - string name = 1; + // Required. The client-assigned sink identifier, unique within the project. Example: + // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100 + // characters and can include only the following characters: upper and + // lower-case alphanumeric characters, underscores, hyphens, and periods. + // First character has to be alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The export destination: // @@ -377,42 +503,43 @@ message LogSink { // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log // entries are not exported. For more information, see - // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). - string destination = 3 [(google.api.resource_reference) = { - type: "*" - }]; + // [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + string destination = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; - // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only + // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of this sink. // The maximum length of the description is 8000 characters. - string description = 18; + string description = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set to True, then this sink is disabled and it does not // export any log entries. - bool disabled = 19; + bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's destination. - // This field is set by - // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - // and - // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - // based on the value of `unique_writer_identity` in those methods. + // Output only. An IAM identity–a service account or group—under which Logging + // writes the exported log entries to the sink's destination. This field is + // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + // value of `unique_writer_identity` in those methods. // // Until you grant this identity write-access to the destination, log entry // exports from this sink will fail. For more information, // see [Granting Access for a - // Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -430,12 +557,12 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9; + bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Destination dependent options. + // Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12; + BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The creation timestamp of the sink. @@ -447,24 +574,18 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](/bigquery/docs/partitioned-tables). By default, Logging + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging // creates dated tables based on the log entries' timestamps, e.g. // syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. // In both cases, tables are sharded based on UTC timezone. - bool use_partitioned_tables = 1; + bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, // false if legacy ingestion-time partitioning is in use. @@ -475,6 +596,113 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states (Beta). +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// The parameters to `ListBuckets` (Beta). +message ListBucketsRequest { + // Required. The parent resource whose buckets are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + // + // Note: The locations portion of the resource must be specified, but + // supplying the character `-` in place of [LOCATION_ID] will return all + // buckets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + }]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to return from this request. + // Non-positive values are ignored. The presence of `nextPageToken` in the + // response indicates that more results might be available. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListBuckets (Beta). +message ListBucketsResponse { + // A list of buckets. + repeated LogBucket buckets = 1; + + // If there might be more results than appear in this response, then + // `nextPageToken` is included. To get the next set of results, call the same + // method again using the value of `nextPageToken` as `pageToken`. + string next_page_token = 2; +} + +// The parameters to `UpdateBucket` (Beta). +message UpdateBucketRequest { + // Required. The full resource name of the bucket to update. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + // requires permission "resourcemanager.projects.updateLiens" to set the + // locked property + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. The updated bucket. + LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask that specifies the fields in `bucket` that need an update. A + // bucket field will be overwritten if, and only if, it is in the update + // mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=retention_days`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `GetBucket` (Beta). +message GetBucketRequest { + // Required. The resource name of the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: @@ -486,7 +714,7 @@ message ListSinksRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -494,12 +722,12 @@ message ListSinksRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListSinks`. @@ -526,7 +754,7 @@ message GetSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -544,7 +772,7 @@ message CreateSinkRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -563,13 +791,13 @@ message CreateSinkRequest { // resource such as an organization, then the value of `writer_identity` will // be a unique service account used only for exports from the new sink. For // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to update, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -580,12 +808,12 @@ message UpdateSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears as part + // of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -599,7 +827,7 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is @@ -615,13 +843,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to delete, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -632,7 +860,7 @@ message DeleteSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -645,47 +873,47 @@ message DeleteSinkRequest { // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { option (google.api.resource) = { - type: "logging.googleapis.com/Exclusion" + type: "logging.googleapis.com/LogExclusion" pattern: "projects/{project}/exclusions/{exclusion}" pattern: "organizations/{organization}/exclusions/{exclusion}" pattern: "folders/{folder}/exclusions/{exclusion}" pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - // First character has to be alphanumeric. - string name = 1; + // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + // Identifiers are limited to 100 characters and can include only letters, + // digits, underscores, hyphens, and periods. First character has to be + // alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced-queries#sample), + // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: // // `"resource.type=gcs_bucket severity\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsH\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\nstart_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x30\n\x08\x65nd_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbc\x01\xea\x41\xb8\x01\n\x1blogging.googleapis.com/Sink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"b\n\x0f\x42igQueryOptions\x12\x1e\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"n\n\x10ListSinksRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x0eGetSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\x97\x01\n\x11\x43reateSinkRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08"\xcb\x01\n\x11UpdateSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x11\x44\x65leteSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\xa1\x03\n\x0cLogExclusion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe9\x01\xea\x41\xe5\x01\n logging.googleapis.com/Exclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"x\n\x15ListExclusionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"M\n\x13GetExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"\x86\x01\n\x16\x43reateExclusionRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion"\xbf\x01\n\x16UpdateExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"P\n\x16\x44\x65leteExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"&\n\x16GetCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x92\x01\n\x19UpdateCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"N\n\x0c\x43mekSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1a\n\x12service_account_id\x18\x03 \x01(\t2\x9e\x1f\n\x0f\x43onfigServiceV2\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\x9e\x01\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", + serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xbc\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -47,6 +41,42 @@ ], ) +_LIFECYCLESTATE = _descriptor.EnumDescriptor( + name="LifecycleState", + full_name="google.logging.v2.LifecycleState", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="LIFECYCLE_STATE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="ACTIVE", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DELETE_REQUESTED", + index=2, + number=2, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=4659, + serialized_end=4742, +) +_sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) + +LifecycleState = enum_type_wrapper.EnumTypeWrapper(_LIFECYCLESTATE) +LIFECYCLE_STATE_UNSPECIFIED = 0 +ACTIVE = 1 +DELETE_REQUESTED = 2 + _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( name="VersionFormat", @@ -70,12 +100,141 @@ ], containing_type=None, serialized_options=None, - serialized_start=833, - serialized_end=896, + serialized_start=1306, + serialized_end=1369, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) +_LOGBUCKET = _descriptor.Descriptor( + name="LogBucket", + full_name="google.logging.v2.LogBucket", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogBucket.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogBucket.description", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogBucket.create_time", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogBucket.update_time", + index=3, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="retention_days", + full_name="google.logging.v2.LogBucket.retention_days", + index=4, + number=11, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="lifecycle_state", + full_name="google.logging.v2.LogBucket.lifecycle_state", + index=5, + number=12, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=317, + serialized_end=856, +) + + _LOGSINK = _descriptor.Descriptor( name="LogSink", full_name="google.logging.v2.LogSink", @@ -92,13 +251,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -110,13 +269,13 @@ 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=_b("\372A\003\n\001*"), + serialized_options=b"\340A\002\372A\003\n\001*", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -128,13 +287,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -146,13 +305,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -170,7 +329,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -188,7 +347,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -200,13 +359,13 @@ 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=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -224,7 +383,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -242,7 +401,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -260,7 +419,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -278,43 +437,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="start_time", - full_name="google.logging.v2.LogSink.start_time", - index=11, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="end_time", - full_name="google.logging.v2.LogSink.end_time", - index=12, - number=11, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\340A\003", file=DESCRIPTOR, ), ], @@ -323,9 +446,7 @@ enum_types=[ _LOGSINK_VERSIONFORMAT, ], - serialized_options=_b( - "\352A\270\001\n\033logging.googleapis.com/Sink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}" - ), + serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -338,8 +459,8 @@ fields=[], ), ], - serialized_start=317, - serialized_end=1098, + serialized_start=859, + serialized_end=1574, ) @@ -365,7 +486,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -383,7 +504,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, ), ], @@ -395,8 +516,254 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1100, - serialized_end=1198, + serialized_start=1576, + serialized_end=1679, +) + + +_LISTBUCKETSREQUEST = _descriptor.Descriptor( + name="ListBucketsRequest", + full_name="google.logging.v2.ListBucketsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListBucketsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListBucketsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListBucketsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1681, + serialized_end=1808, +) + + +_LISTBUCKETSRESPONSE = _descriptor.Descriptor( + name="ListBucketsResponse", + full_name="google.logging.v2.ListBucketsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="buckets", + full_name="google.logging.v2.ListBucketsResponse.buckets", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListBucketsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1810, + serialized_end=1903, +) + + +_UPDATEBUCKETREQUEST = _descriptor.Descriptor( + name="UpdateBucketRequest", + full_name="google.logging.v2.UpdateBucketRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.UpdateBucketRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="bucket", + full_name="google.logging.v2.UpdateBucketRequest.bucket", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateBucketRequest.update_mask", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1906, + serialized_end=2088, +) + + +_GETBUCKETREQUEST = _descriptor.Descriptor( + name="GetBucketRequest", + full_name="google.logging.v2.GetBucketRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.GetBucketRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2090, + serialized_end=2164, ) @@ -416,15 +783,13 @@ 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=_b( - "\340A\002\372A\035\022\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -436,13 +801,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -460,7 +825,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -472,8 +837,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1200, - serialized_end=1310, + serialized_start=2166, + serialized_end=2289, ) @@ -511,7 +876,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, @@ -529,8 +894,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1312, - serialized_end=1399, + serialized_start=2291, + serialized_end=2378, ) @@ -550,15 +915,13 @@ 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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, ), ], @@ -570,8 +933,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1401, - serialized_end=1473, + serialized_start=2380, + serialized_end=2455, ) @@ -591,15 +954,13 @@ 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=_b( - "\340A\002\372A\035\022\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -617,7 +978,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -635,7 +996,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -647,8 +1008,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1476, - serialized_end=1627, + serialized_start=2458, + serialized_end=2617, ) @@ -668,15 +1029,13 @@ 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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -694,7 +1053,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -712,7 +1071,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -730,7 +1089,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -742,8 +1101,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1630, - serialized_end=1833, + serialized_start=2620, + serialized_end=2836, ) @@ -763,15 +1122,13 @@ 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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, ), ], @@ -783,8 +1140,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1835, - serialized_end=1910, + serialized_start=2838, + serialized_end=2916, ) @@ -804,13 +1161,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -822,13 +1179,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -840,13 +1197,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -864,7 +1221,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -882,7 +1239,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -900,22 +1257,20 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352A\345\001\n logging.googleapis.com/Exclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}" - ), + serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1913, - serialized_end=2330, + serialized_start=2919, + serialized_end=3369, ) @@ -935,15 +1290,13 @@ 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=_b( - '\340A\002\372A"\022 logging.googleapis.com/Exclusion' - ), + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -955,13 +1308,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -979,7 +1332,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -991,8 +1344,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2332, - serialized_end=2452, + serialized_start=3372, + serialized_end=3505, ) @@ -1030,7 +1383,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, @@ -1048,8 +1401,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2454, - serialized_end=2556, + serialized_start=3507, + serialized_end=3609, ) @@ -1069,13 +1422,13 @@ 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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, ), ], @@ -1087,8 +1440,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2558, - serialized_end=2635, + serialized_start=3611, + serialized_end=3691, ) @@ -1108,15 +1461,13 @@ 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=_b( - '\340A\002\372A"\022 logging.googleapis.com/Exclusion' - ), + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1134,7 +1485,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -1146,8 +1497,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2638, - serialized_end=2772, + serialized_start=3694, + serialized_end=3836, ) @@ -1167,13 +1518,13 @@ 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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1191,7 +1542,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1209,7 +1560,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -1221,8 +1572,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2775, - serialized_end=2966, + serialized_start=3839, + serialized_end=4033, ) @@ -1242,13 +1593,13 @@ 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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, ), ], @@ -1260,8 +1611,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2968, - serialized_end=3048, + serialized_start=4035, + serialized_end=4118, ) @@ -1281,13 +1632,13 @@ 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#logging.googleapis.com/CmekSettings", file=DESCRIPTOR, ), ], @@ -1299,8 +1650,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3050, - serialized_end=3088, + serialized_start=4120, + serialized_end=4203, ) @@ -1320,13 +1671,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -1344,7 +1695,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1362,7 +1713,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -1374,8 +1725,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3091, - serialized_end=3237, + serialized_start=4206, + serialized_end=4367, ) @@ -1395,13 +1746,13 @@ 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\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1413,7 +1764,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, @@ -1431,41 +1782,42 @@ 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\003", file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3239, - serialized_end=3317, + serialized_start=4370, + serialized_end=4657, ) -_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT -_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS -_LOGSINK.fields_by_name[ +_LOGBUCKET.fields_by_name[ "create_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGSINK.fields_by_name[ +_LOGBUCKET.fields_by_name[ "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE +_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT +_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS _LOGSINK.fields_by_name[ - "start_time" + "create_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK.fields_by_name[ - "end_time" + "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK _LOGSINK.oneofs_by_name["options"].fields.append( @@ -1474,6 +1826,11 @@ _LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ "options" ] +_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK _CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK _UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK @@ -1496,8 +1853,13 @@ _UPDATECMEKSETTINGSREQUEST.fields_by_name[ "update_mask" ].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS +DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST +DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE +DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST +DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST @@ -1516,15 +1878,54 @@ "UpdateCmekSettingsRequest" ] = _UPDATECMEKSETTINGSREQUEST DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS +DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) +LogBucket = _reflection.GeneratedProtocolMessageType( + "LogBucket", + (_message.Message,), + { + "DESCRIPTOR": _LOGBUCKET, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a repository of logs (Beta). + + + Attributes: + name: + The resource name of the bucket. For example: “projects/my- + project-id/locations/my-location/buckets/my-bucket-id The + supported locations are:”global" “us-central1” For the + location of ``global`` it is unspecified where logs are + actually stored. Once a bucket has been created, the location + can not be changed. + description: + Describes this bucket. + create_time: + Output only. The creation timestamp of the bucket. This is not + set for any of the default buckets. + update_time: + Output only. The last update timestamp of the bucket. + retention_days: + Logs will be retained by default for this amount of time, + after which they will automatically be deleted. The minimum + retention period is 1 day. If this value is set to zero at + bucket creation time, the default time of 30 days will be + used. + lifecycle_state: + Output only. The bucket lifecycle state. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) + }, +) +_sym_db.RegisterMessage(LogBucket) + LogSink = _reflection.GeneratedProtocolMessageType( "LogSink", (_message.Message,), - dict( - DESCRIPTOR=_LOGSINK, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Describes a sink used to export log entries to one of the + { + "DESCRIPTOR": _LOGSINK, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, @@ -1541,20 +1942,22 @@ has to be alphanumeric. destination: Required. The export destination: :: - "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis - .com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.goo - gleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The - sink's ``writer_identity``, set when the sink is created, must - have permission to write to the destination or else the log - entries are not exported. For more information, see `Exporting - Logs with Sinks `__. + "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis. + com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.googl + eapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink’s + ``writer_identity``, set when the sink is created, must have + permission to write to the destination or else the log entries + are not exported. For more information, see `Exporting Logs + with Sinks + `__. filter: Optional. An `advanced logs filter - `__. The only exported - log entries are those that are in the resource owning the sink - and that match the filter. For example: :: - logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND - severity>=ERROR + `__. The only exported log entries are those that are + in the resource owning the sink and that match the filter. For + example: :: logName="projects/[PROJECT_ID]/logs/[LOG_ID]" + AND severity>=ERROR description: Optional. A description of this sink. The maximum length of the description is 8000 characters. @@ -1562,12 +1965,12 @@ Optional. If set to True, then this sink is disabled and it does not export any log entries. output_version_format: - Deprecated. The log entry format to use for this sink's + Deprecated. The log entry format to use for this sink’s exported log entries. The v2 format is used by default and cannot be changed. writer_identity: - Output only. An IAM identity—a service account or group—under - which Logging writes the exported log entries to the sink's + Output only. An IAM identity–a service account or group—under + which Logging writes the exported log entries to the sink’s destination. This field is set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and @@ -1576,27 +1979,27 @@ methods. Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see `Granting Access for a Resource - `__. Consult the - destination service's documentation to determine the - appropriate IAM roles to assign to the identity. + `_ + _. Consult the destination service’s documentation to + determine the appropriate IAM roles to assign to the identity. include_children: Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, - only the logs owned by the sink's parent resource are + only the logs owned by the sink’s parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the - sink's parent resource are also available for export. Whether + sink’s parent resource are also available for export. Whether a particular log entry from the children is exported depends - on the sink's filter expression. For example, if this field is + on the sink’s filter expression. For example, if this field is true, then the filter ``resource.type=gce_instance`` would export all Compute Engine VM instance log entries from all - projects in the sink's parent. To only export entries from + projects in the sink’s parent. To only export entries from certain child projects, filter on the project part of the log - name: :: logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + name: :: logName:("projects/test-project1/" OR + "projects/test-project2/") AND resource.type=gce_instance options: - Optional. Destination dependent options. + Destination dependent options. bigquery_options: Optional. Options that affect sinks exporting data to BigQuery. @@ -1606,63 +2009,181 @@ update_time: Output only. The last update timestamp of the sink. This field may not be present for older sinks. - start_time: - Do not use. This field is ignored. - end_time: - Do not use. This field is ignored. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - ), + }, ) _sym_db.RegisterMessage(LogSink) BigQueryOptions = _reflection.GeneratedProtocolMessageType( "BigQueryOptions", (_message.Message,), - dict( - DESCRIPTOR=_BIGQUERYOPTIONS, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Options that change functionality of a sink exporting data + { + "DESCRIPTOR": _BIGQUERYOPTIONS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Options that change functionality of a sink exporting data to BigQuery. Attributes: use_partitioned_tables: - Optional. Whether to use `BigQuery's partition tables - `__. By default, Logging - creates dated tables based on the log entries' timestamps, - e.g. syslog\_20170523. With partitioned tables the date suffix - is no longer present and `special query syntax - `__ has to be used - instead. In both cases, tables are sharded based on UTC - timezone. + Optional. Whether to use `BigQuery’s partition tables + `__. By default, Logging creates dated tables based on + the log entries’ timestamps, e.g. syslog_20170523. With + partitioned tables the date suffix is no longer present and + `special query syntax + `__ has to be used instead. In both cases, tables are + sharded based on UTC timezone. uses_timestamp_column_partitioning: Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use. All new sinks will have this field set true and will use - timestamp column based partitioning. If - use\_partitioned\_tables is false, this value has no meaning - and will be false. Legacy sinks using partitioned tables will - have this field set to false. + timestamp column based partitioning. If use_partitioned_tables + is false, this value has no meaning and will be false. Legacy + sinks using partitioned tables will have this field set to + false. """, # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - ), + }, ) _sym_db.RegisterMessage(BigQueryOptions) +ListBucketsRequest = _reflection.GeneratedProtocolMessageType( + "ListBucketsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListBuckets`` (Beta). + + + Attributes: + parent: + Required. The parent resource whose buckets are to be listed: + :: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The + locations portion of the resource must be specified, but + supplying the character ``-`` in place of [LOCATION_ID] will + return all buckets. + page_token: + Optional. If present, then retrieve the next batch of results + from the preceding call to this method. ``pageToken`` must be + the value of ``nextPageToken`` from the previous response. The + values of other method parameters should be identical to those + in the previous call. + page_size: + Optional. The maximum number of results to return from this + request. Non-positive values are ignored. The presence of + ``nextPageToken`` in the response indicates that more results + might be available. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) + }, +) +_sym_db.RegisterMessage(ListBucketsRequest) + +ListBucketsResponse = _reflection.GeneratedProtocolMessageType( + "ListBucketsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The response from ListBuckets (Beta). + + + Attributes: + buckets: + A list of buckets. + next_page_token: + If there might be more results than appear in this response, + then ``nextPageToken`` is included. To get the next set of + results, call the same method again using the value of + ``nextPageToken`` as ``pageToken``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) + }, +) +_sym_db.RegisterMessage(ListBucketsResponse) + +UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( + "UpdateBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATEBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateBucket`` (Beta). + + + Attributes: + name: + Required. The full resource name of the bucket to update. :: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET + _ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ + ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ + ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[ + FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Example: ``"projects/my-project-id/locations/my- + location/buckets/my-bucket-id"``. Also requires permission + “resourcemanager.projects.updateLiens” to set the locked + property + bucket: + Required. The updated bucket. + update_mask: + Required. Field mask that specifies the fields in ``bucket`` + that need an update. A bucket field will be overwritten if, + and only if, it is in the update mask. ``name`` and output + only fields cannot be updated. For a detailed ``FieldMask`` + definition, see https://developers.google.com/protocol-buffers + /docs/reference/google.protobuf#google.protobuf.FieldMask + Example: ``updateMask=retention_days``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) + }, +) +_sym_db.RegisterMessage(UpdateBucketRequest) + +GetBucketRequest = _reflection.GeneratedProtocolMessageType( + "GetBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetBucket`` (Beta). + + + Attributes: + name: + Required. The resource name of the bucket: :: "projects/[ + PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "o + rganizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets + /[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locatio + ns/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/ + locations/[LOCATION_ID]/buckets/[BUCKET_ID]" Example: + ``"projects/my-project-id/locations/my-location/buckets/my- + bucket-id"``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) + }, +) +_sym_db.RegisterMessage(GetBucketRequest) + ListSinksRequest = _reflection.GeneratedProtocolMessageType( "ListSinksRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTSINKSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``ListSinks``. + { + "DESCRIPTOR": _LISTSINKSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListSinks``. Attributes: parent: Required. The parent resource whose sinks are to be listed: - :: "projects/[PROJECT_ID]" + :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" @@ -1679,17 +2200,17 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - ), + }, ) _sym_db.RegisterMessage(ListSinksRequest) ListSinksResponse = _reflection.GeneratedProtocolMessageType( "ListSinksResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTSINKSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Result returned from ``ListSinks``. + { + "DESCRIPTOR": _LISTSINKSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Result returned from ``ListSinks``. Attributes: @@ -1702,17 +2223,17 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - ), + }, ) _sym_db.RegisterMessage(ListSinksResponse) GetSinkRequest = _reflection.GeneratedProtocolMessageType( "GetSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``GetSink``. + { + "DESCRIPTOR": _GETSINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetSink``. Attributes: @@ -1725,23 +2246,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - ), + }, ) _sym_db.RegisterMessage(GetSinkRequest) CreateSinkRequest = _reflection.GeneratedProtocolMessageType( "CreateSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``CreateSink``. + { + "DESCRIPTOR": _CREATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``CreateSink``. Attributes: parent: Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Examples: ``"projects/my-logging- project"``, ``"organizations/123456789"``. @@ -1751,10 +2272,10 @@ unique_writer_identity: Optional. Determines the kind of IAM identity returned as ``writer_identity`` in the new sink. If this value is omitted - or set to false, and if the sink's parent is a project, then + or set to false, and if the sink’s parent is a project, then the value returned as ``writer_identity`` is the same group or service account used by Logging before the addition of writer - identities to this API. The sink's destination must be in the + identities to this API. The sink’s destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of ``writer_identity`` will @@ -1763,17 +2284,17 @@ [LogSink][google.logging.v2.LogSink]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - ), + }, ) _sym_db.RegisterMessage(CreateSinkRequest) UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( "UpdateSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``UpdateSink``. + { + "DESCRIPTOR": _UPDATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateSink``. Attributes: @@ -1796,7 +2317,7 @@ the updated sink depends on both the old and new values of this field: - If the old and new values of this field are both false or both true, then there is no change to the - sink's ``writer_identity``. - If the old value is false and + sink’s ``writer_identity``. - If the old value is false and the new value is true, then ``writer_identity`` is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or @@ -1816,17 +2337,17 @@ ``updateMask=filter``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateSinkRequest) DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( "DeleteSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``DeleteSink``. + { + "DESCRIPTOR": _DELETESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``DeleteSink``. Attributes: @@ -1840,22 +2361,22 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteSinkRequest) LogExclusion = _reflection.GeneratedProtocolMessageType( "LogExclusion", (_message.Message,), - dict( - DESCRIPTOR=_LOGEXCLUSION, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Specifies a set of log entries that are not to be stored + { + "DESCRIPTOR": _LOGEXCLUSION, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Specifies a set of log entries that are not to be stored in Logging. If your GCP resource receives a large volume of logs, you can use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are - excluded. Note that organization-level and folder-level exclusions don't - apply to child resources, and that you can't exclude audit log entries. + excluded. Note that organization-level and folder-level exclusions don’t + apply to child resources, and that you can’t exclude audit log entries. Attributes: @@ -1868,14 +2389,15 @@ Optional. A description of this exclusion. filter: Required. An `advanced logs filter - `__ that matches the log - entries to be excluded. By using the `sample function - `__, you can - exclude less than 100% of the matching log entries. For - example, the following query matches 99% of low-severity log - entries from Google Cloud Storage buckets: - ``"resource.type=gcs_bucket severity`__ that matches the log entries to be excluded. By + using the `sample function + `__, you can exclude less than 100% of the + matching log entries. For example, the following query matches + 99% of low-severity log entries from Google Cloud Storage + buckets: ``"resource.type=gcs_bucket severity`__ for more - information. + Router `__ + for more information. Attributes: name: Required. The resource for which to retrieve CMEK settings. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2088,28 +2610,28 @@ folders in the GCP organization. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - ), + }, ) _sym_db.RegisterMessage(GetCmekSettingsRequest) UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( "UpdateCmekSettingsRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATECMEKSETTINGSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to + { + "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. See `Enabling CMEK for Logs - Router `__ for more - information. + Router `__ + for more information. Attributes: name: Required. The resource name for the CMEK settings to update. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2119,8 +2641,9 @@ folders in the GCP organization. cmek_settings: Required. The CMEK settings to update. See `Enabling CMEK for - Logs Router `__ for - more information. + Logs Router + `__ for more information. update_mask: Optional. Field mask identifying which fields from ``cmek_settings`` should be updated. A field will be @@ -2130,17 +2653,17 @@ Example: ``"updateMask=kmsKeyName"`` """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) CmekSettings = _reflection.GeneratedProtocolMessageType( "CmekSettings", (_message.Message,), - dict( - DESCRIPTOR=_CMEKSETTINGS, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Describes the customer-managed encryption key (CMEK) + { + "DESCRIPTOR": _CMEKSETTINGS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource. @@ -2149,17 +2672,17 @@ in the GCP organization. See `Enabling CMEK for Logs - Router `__ for more - information. + Router `__ + for more information. Attributes: name: - Output Only. The resource name of the CMEK settings. + Output only. The resource name of the CMEK settings. kms_key_name: The resource name for the configured Cloud KMS key. KMS key - name format: "projects/[PROJECT\_ID]/locations/[LOCATION]/keyR - ings/[KEYRING]/cryptoKeys/[KEY]" For example: ``"projects/my- + name format: “projects/[PROJECT_ID]/locations/[LOCATION]/keyRi + ngs/[KEYRING]/cryptoKeys/[KEY]” For example: ``"projects/my- project-id/locations/my-region/keyRings/key-ring- name/cryptoKeys/key-name"`` To enable CMEK for the Logs Router, set this field to a valid ``kms_key_name`` for which @@ -2173,193 +2696,232 @@ used at the time of encryption unless access to that key has been revoked. To disable CMEK for the Logs Router, set this field to an empty string. See `Enabling CMEK for Logs Router - `__ for more - information. + `__ for more information. service_account_id: - Output Only. The service account that will be used by the Logs + Output only. The service account that will be used by the Logs Router to access your Cloud KMS key. Before enabling CMEK for Logs Router, you must first assign the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to the service account that the Logs Router will use to access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.G etCmekSettings] to obtain the service account ID. See - `Enabling CMEK for Logs Router `__ for more information. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - ), + }, ) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None +_LOGBUCKET.fields_by_name["create_time"]._options = None +_LOGBUCKET.fields_by_name["update_time"]._options = None +_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None +_LOGBUCKET._options = None +_LOGSINK.fields_by_name["name"]._options = None _LOGSINK.fields_by_name["destination"]._options = None +_LOGSINK.fields_by_name["filter"]._options = None +_LOGSINK.fields_by_name["description"]._options = None +_LOGSINK.fields_by_name["disabled"]._options = None _LOGSINK.fields_by_name["output_version_format"]._options = None _LOGSINK.fields_by_name["writer_identity"]._options = None +_LOGSINK.fields_by_name["include_children"]._options = None +_LOGSINK.fields_by_name["bigquery_options"]._options = None _LOGSINK.fields_by_name["create_time"]._options = None _LOGSINK.fields_by_name["update_time"]._options = None -_LOGSINK.fields_by_name["start_time"]._options = None -_LOGSINK.fields_by_name["end_time"]._options = None _LOGSINK._options = None +_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None _BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None +_GETBUCKETREQUEST.fields_by_name["name"]._options = None _LISTSINKSREQUEST.fields_by_name["parent"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None _GETSINKREQUEST.fields_by_name["sink_name"]._options = None _CREATESINKREQUEST.fields_by_name["parent"]._options = None _CREATESINKREQUEST.fields_by_name["sink"]._options = None +_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None _UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None _UPDATESINKREQUEST.fields_by_name["sink"]._options = None +_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None +_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None _DELETESINKREQUEST.fields_by_name["sink_name"]._options = None +_LOGEXCLUSION.fields_by_name["name"]._options = None +_LOGEXCLUSION.fields_by_name["description"]._options = None +_LOGEXCLUSION.fields_by_name["filter"]._options = None +_LOGEXCLUSION.fields_by_name["disabled"]._options = None +_LOGEXCLUSION.fields_by_name["create_time"]._options = None +_LOGEXCLUSION.fields_by_name["update_time"]._options = None _LOGEXCLUSION._options = None _LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None _GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None _CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None _DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None +_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None +_CMEKSETTINGS.fields_by_name["name"]._options = None +_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None +_CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( name="ConfigServiceV2", full_name="google.logging.v2.ConfigServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" - ), - serialized_start=3320, - serialized_end=7318, + serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", + serialized_start=4745, + serialized_end=9784, methods=[ + _descriptor.MethodDescriptor( + name="ListBuckets", + full_name="google.logging.v2.ConfigServiceV2.ListBuckets", + index=0, + containing_service=None, + input_type=_LISTBUCKETSREQUEST, + output_type=_LISTBUCKETSRESPONSE, + serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", + ), + _descriptor.MethodDescriptor( + name="GetBucket", + full_name="google.logging.v2.ConfigServiceV2.GetBucket", + index=1, + containing_service=None, + input_type=_GETBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", + ), + _descriptor.MethodDescriptor( + name="UpdateBucket", + full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", + index=2, + containing_service=None, + input_type=_UPDATEBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", + ), _descriptor.MethodDescriptor( name="ListSinks", full_name="google.logging.v2.ConfigServiceV2.ListSinks", - index=0, + index=3, containing_service=None, input_type=_LISTSINKSREQUEST, output_type=_LISTSINKSRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent' - ), + serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', ), _descriptor.MethodDescriptor( name="GetSink", full_name="google.logging.v2.ConfigServiceV2.GetSink", - index=1, + index=4, containing_service=None, input_type=_GETSINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", ), _descriptor.MethodDescriptor( name="CreateSink", full_name="google.logging.v2.ConfigServiceV2.CreateSink", - index=2, + index=5, containing_service=None, input_type=_CREATESINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - '\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink' - ), + serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', ), _descriptor.MethodDescriptor( name="UpdateSink", full_name="google.logging.v2.ConfigServiceV2.UpdateSink", - index=3, + index=6, containing_service=None, input_type=_UPDATESINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - "\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink" - ), + serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", ), _descriptor.MethodDescriptor( name="DeleteSink", full_name="google.logging.v2.ConfigServiceV2.DeleteSink", - index=4, + index=7, containing_service=None, input_type=_DELETESINKREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" - ), + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", ), _descriptor.MethodDescriptor( name="ListExclusions", full_name="google.logging.v2.ConfigServiceV2.ListExclusions", - index=5, + index=8, containing_service=None, input_type=_LISTEXCLUSIONSREQUEST, output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", ), _descriptor.MethodDescriptor( name="GetExclusion", full_name="google.logging.v2.ConfigServiceV2.GetExclusion", - index=6, + index=9, containing_service=None, input_type=_GETEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", ), _descriptor.MethodDescriptor( name="CreateExclusion", full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", - index=7, + index=10, containing_service=None, input_type=_CREATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - '\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion' - ), + serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', ), _descriptor.MethodDescriptor( name="UpdateExclusion", full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", - index=8, + index=11, containing_service=None, input_type=_UPDATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - "\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask" - ), + serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", ), _descriptor.MethodDescriptor( name="DeleteExclusion", full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", - index=9, + index=12, containing_service=None, input_type=_DELETEEXCLUSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", ), _descriptor.MethodDescriptor( name="GetCmekSettings", full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", - index=10, + index=13, containing_service=None, input_type=_GETCMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=_b( - "\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings" - ), + serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", ), _descriptor.MethodDescriptor( name="UpdateCmekSettings", full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - index=11, + index=14, containing_service=None, input_type=_UPDATECMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=_b( - "\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings" - ), + serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index 62e751bf5..ca49dc344 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -16,6 +16,21 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.ListBuckets = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/ListBuckets", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + ) + self.GetBucket = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/GetBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) + self.UpdateBucket = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/UpdateBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.ListSinks = channel.unary_unary( "/google.logging.v2.ConfigServiceV2/ListSinks", request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, @@ -81,6 +96,35 @@ def __init__(self, channel): class ConfigServiceV2Servicer(object): """Service for configuring sinks used to route log entries.""" + def ListBuckets(self, request, context): + """Lists buckets (Beta).""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetBucket(self, request, context): + """Gets a bucket (Beta).""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateBucket(self, request, context): + """Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: `retention_period` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + will be returned. + + A buckets region may not be modified after it is created. + This method is in Beta. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def ListSinks(self, request, context): """Lists sinks.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -163,7 +207,7 @@ def GetCmekSettings(self, request, context): the GCP organization. See [Enabling CMEK for Logs - Router](/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -183,7 +227,7 @@ def UpdateCmekSettings(self, request, context): 3) access to the key is disabled. See [Enabling CMEK for Logs - Router](/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -192,6 +236,21 @@ def UpdateCmekSettings(self, request, context): def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { + "ListBuckets": grpc.unary_unary_rpc_method_handler( + servicer.ListBuckets, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, + ), + "GetBucket": grpc.unary_unary_rpc_method_handler( + servicer.GetBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + "UpdateBucket": grpc.unary_unary_rpc_method_handler( + servicer.UpdateBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), "ListSinks": grpc.unary_unary_rpc_method_handler( servicer.ListSinks, request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, diff --git a/google/cloud/logging_v2/proto/logging_metrics.proto b/google/cloud/logging_v2/proto/logging_metrics.proto index 582c067e6..518b6f691 100644 --- a/google/cloud/logging_v2/proto/logging_metrics.proto +++ b/google/cloud/logging_v2/proto/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -98,7 +97,7 @@ service MetricsServiceV2 { // by the bucket options. message LogMetric { option (google.api.resource) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" pattern: "projects/{project}/metrics/{metric}" }; @@ -124,20 +123,20 @@ message LogMetric { // However, when the metric identifier appears as the `[METRIC_ID]` part of a // `metric_name` API parameter, then the metric identifier must be // URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this metric, which is used in documentation. // The maximum length of the description is 8000 characters. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced_filters) - // which is used to match log entries. + // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is + // used to match log entries. // Example: // // "resource.type=gae_app AND severity>=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -160,7 +159,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5; + google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -181,7 +180,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6; + string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -197,22 +196,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7; + map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8; + google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9; + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10; + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -235,12 +234,12 @@ message ListLogMetricsRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogMetrics. @@ -262,7 +261,7 @@ message GetLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } @@ -277,7 +276,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + child_type: "logging.googleapis.com/LogMetric" } ]; @@ -298,7 +297,7 @@ message UpdateLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; @@ -314,7 +313,7 @@ message DeleteLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index 08eaf8099..ef6f71c28 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -2,9 +2,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.proto -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -31,12 +28,8 @@ name="google/cloud/logging_v2/proto/logging_metrics.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xdc\x04\n\tLogMetric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x37\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fvalue_extractor\x18\x06 \x01(\t\x12K\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntry\x12>\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:G\xea\x41\x44\n\x1dlogging.googleapis.com/Metric\x12#projects/{project}/metrics/{metric}"\x83\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x13GetLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric"\x82\x01\n\x16\x43reateLogMetricRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x87\x01\n\x16UpdateLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"T\n\x16\x44\x65leteLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -67,8 +60,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=877, - serialized_end=905, + serialized_start=922, + serialized_end=950, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) @@ -89,7 +82,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, @@ -107,7 +100,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, @@ -120,13 +113,13 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=821, - serialized_end=875, + serialized_start=866, + serialized_end=920, ) _LOGMETRIC = _descriptor.Descriptor( @@ -145,13 +138,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -163,13 +156,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -181,13 +174,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -205,7 +198,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -217,13 +210,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -241,7 +234,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -259,7 +252,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -277,7 +270,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -295,7 +288,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -313,7 +306,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, ), ], @@ -324,15 +317,13 @@ enum_types=[ _LOGMETRIC_APIVERSION, ], - serialized_options=_b( - "\352AD\n\035logging.googleapis.com/Metric\022#projects/{project}/metrics/{metric}" - ), + serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=374, - serialized_end=978, + serialized_end=1026, ) @@ -352,15 +343,13 @@ 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=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -372,13 +361,13 @@ 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, ), _descriptor.FieldDescriptor( @@ -396,7 +385,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -408,8 +397,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=981, - serialized_end=1112, + serialized_start=1029, + serialized_end=1170, ) @@ -447,7 +436,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, @@ -465,8 +454,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1114, - serialized_end=1210, + serialized_start=1172, + serialized_end=1268, ) @@ -486,15 +475,13 @@ 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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, ), ], @@ -506,8 +493,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1212, - serialized_end=1293, + serialized_start=1270, + serialized_end=1354, ) @@ -527,15 +514,13 @@ 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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -553,7 +538,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -565,8 +550,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1296, - serialized_end=1426, + serialized_start=1357, + serialized_end=1490, ) @@ -586,15 +571,13 @@ 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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -612,7 +595,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -624,8 +607,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1429, - serialized_end=1564, + serialized_start=1493, + serialized_end=1631, ) @@ -645,15 +628,13 @@ 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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, ), ], @@ -665,8 +646,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1566, - serialized_end=1650, + serialized_start=1633, + serialized_end=1720, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC @@ -702,19 +683,19 @@ LogMetric = _reflection.GeneratedProtocolMessageType( "LogMetric", (_message.Message,), - dict( - LabelExtractorsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( "LabelExtractorsEntry", (_message.Message,), - dict( - DESCRIPTOR=_LOGMETRIC_LABELEXTRACTORSENTRY, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2" + { + "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - ), + }, ), - DESCRIPTOR=_LOGMETRIC, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""Describes a logs-based metric. The value of the metric is + "DESCRIPTOR": _LOGMETRIC, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval. @@ -744,16 +725,16 @@ documentation. The maximum length of the description is 8000 characters. filter: - Required. An `advanced logs filter - `__ which is used to - match log entries. Example: :: "resource.type=gae_app - AND severity>=ERROR" The maximum length of the filter is - 20000 characters. + Required. An `advanced logs filter `__ which is used to match + log entries. Example: :: "resource.type=gae_app AND + severity>=ERROR" The maximum length of the filter is 20000 + characters. metric_descriptor: Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and - a unit of "1". Such a metric counts the number of log entries + a unit of “1”. Such a metric counts the number of log entries matching the ``filter`` expression. The ``name``, ``type``, and ``description`` fields in the ``metric_descriptor`` are output only, and is constructed using the ``name`` and @@ -818,7 +799,7 @@ changed. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - ), + }, ) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) @@ -826,10 +807,10 @@ ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( "ListLogMetricsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGMETRICSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to ListLogMetrics. + { + "DESCRIPTOR": _LISTLOGMETRICSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to ListLogMetrics. Attributes: @@ -849,17 +830,17 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogMetricsRequest) ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( "ListLogMetricsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGMETRICSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""Result returned from ListLogMetrics. + { + "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Result returned from ListLogMetrics. Attributes: @@ -872,17 +853,17 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogMetricsResponse) GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( "GetLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETLOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to GetLogMetric. + { + "DESCRIPTOR": _GETLOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to GetLogMetric. Attributes: @@ -891,64 +872,64 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(GetLogMetricRequest) CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "CreateLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to CreateLogMetric. + { + "DESCRIPTOR": _CREATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to CreateLogMetric. Attributes: parent: Required. The resource name of the project in which to create - the metric: :: "projects/[PROJECT_ID]" The new metric + the metric: :: "projects/[PROJECT_ID]" The new metric must be provided in the request. metric: Required. The new logs-based metric, which must not have an identifier that already exists. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(CreateLogMetricRequest) UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "UpdateLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to UpdateLogMetric. + { + "DESCRIPTOR": _UPDATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to UpdateLogMetric. Attributes: metric_name: Required. The resource name of the metric to update: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated - metric must be provided in the request and it's ``name`` field + metric must be provided in the request and it’s ``name`` field must be the same as ``[METRIC_ID]`` If the metric does not exist in ``[PROJECT_ID]``, then a new metric is created. metric: Required. The updated metric. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateLogMetricRequest) DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to DeleteLogMetric. + { + "DESCRIPTOR": _DELETELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to DeleteLogMetric. Attributes: @@ -957,16 +938,27 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None +_LOGMETRIC.fields_by_name["name"]._options = None +_LOGMETRIC.fields_by_name["description"]._options = None +_LOGMETRIC.fields_by_name["filter"]._options = None +_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None +_LOGMETRIC.fields_by_name["value_extractor"]._options = None +_LOGMETRIC.fields_by_name["label_extractors"]._options = None +_LOGMETRIC.fields_by_name["bucket_options"]._options = None +_LOGMETRIC.fields_by_name["create_time"]._options = None +_LOGMETRIC.fields_by_name["update_time"]._options = None _LOGMETRIC.fields_by_name["version"]._options = None _LOGMETRIC._options = None _LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None _GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None @@ -979,11 +971,9 @@ full_name="google.logging.v2.MetricsServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - ), - serialized_start=1653, - serialized_end=2723, + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + serialized_start=1723, + serialized_end=2793, methods=[ _descriptor.MethodDescriptor( name="ListLogMetrics", @@ -992,9 +982,7 @@ containing_service=None, input_type=_LISTLOGMETRICSREQUEST, output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", ), _descriptor.MethodDescriptor( name="GetLogMetric", @@ -1003,9 +991,7 @@ containing_service=None, input_type=_GETLOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - "\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" - ), + serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", ), _descriptor.MethodDescriptor( name="CreateLogMetric", @@ -1014,9 +1000,7 @@ containing_service=None, input_type=_CREATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - '\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric' - ), + serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', ), _descriptor.MethodDescriptor( name="UpdateLogMetric", @@ -1025,9 +1009,7 @@ containing_service=None, input_type=_UPDATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - "\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric" - ), + serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", ), _descriptor.MethodDescriptor( name="DeleteLogMetric", @@ -1036,9 +1018,7 @@ containing_service=None, input_type=_DELETELOGMETRICREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" - ), + serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 08cc2b49e..433947694 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -2,9 +2,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.proto -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -15,7 +12,6 @@ _sym_db = _symbol_database.Default() -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 ( @@ -32,20 +28,16 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/logging_v2/proto/logging.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log"\xcf\x02\n\x16WriteLogEntriesRequest\x12\x31\n\x08log_name\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntry\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_success\x18\x05 \x01(\x08\x12\x0f\n\x07\x64ry_run\x18\x06 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb5\x01\n\x15ListLogEntriesRequest\x12\x17\n\x0bproject_ids\x18\x01 \x03(\tB\x02\x18\x01\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\'ListMonitoredResourceDescriptorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"i\n\x0fListLogsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ - google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, @@ -56,6 +48,7 @@ google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -76,15 +69,13 @@ 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=_b( - "\340A\002\372A\034\022\032logging.googleapis.com/Log" - ), + serialized_options=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, ), ], @@ -117,7 +108,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, @@ -135,7 +126,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, @@ -148,13 +139,13 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=801, - serialized_end=846, + serialized_start=824, + serialized_end=869, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( @@ -173,13 +164,13 @@ 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=_b("\372A\034\n\032logging.googleapis.com/Log"), + serialized_options=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -197,7 +188,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -215,7 +206,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -233,7 +224,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -251,7 +242,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -269,7 +260,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -284,7 +275,7 @@ extension_ranges=[], oneofs=[], serialized_start=511, - serialized_end=846, + serialized_end=869, ) @@ -303,8 +294,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=848, - serialized_end=873, + serialized_start=871, + serialized_end=896, ) @@ -355,13 +346,13 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1003, - serialized_end=1076, + serialized_start=1026, + serialized_end=1099, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( @@ -400,8 +391,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=876, - serialized_end=1076, + serialized_start=899, + serialized_end=1099, ) @@ -412,28 +403,10 @@ file=DESCRIPTOR, containing_type=None, fields=[ - _descriptor.FieldDescriptor( - name="project_ids", - full_name="google.logging.v2.ListLogEntriesRequest.project_ids", - index=0, - number=1, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), - file=DESCRIPTOR, - ), _descriptor.FieldDescriptor( name="resource_names", full_name="google.logging.v2.ListLogEntriesRequest.resource_names", - index=1, + index=0, number=8, type=9, cpp_type=9, @@ -445,51 +418,49 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A\034\022\032logging.googleapis.com/Log" - ), + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="filter", full_name="google.logging.v2.ListLogEntriesRequest.filter", - index=2, + index=1, number=2, type=9, 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, ), _descriptor.FieldDescriptor( name="order_by", full_name="google.logging.v2.ListLogEntriesRequest.order_by", - index=3, + index=2, number=3, type=9, 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, ), _descriptor.FieldDescriptor( name="page_size", full_name="google.logging.v2.ListLogEntriesRequest.page_size", - index=4, + index=3, number=4, type=5, cpp_type=1, @@ -501,25 +472,25 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( name="page_token", full_name="google.logging.v2.ListLogEntriesRequest.page_token", - index=5, + index=4, number=5, type=9, 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, ), ], @@ -531,8 +502,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1079, - serialized_end=1260, + serialized_start=1102, + serialized_end=1278, ) @@ -570,7 +541,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, @@ -588,8 +559,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1262, - serialized_end=1357, + serialized_start=1280, + serialized_end=1375, ) @@ -615,7 +586,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -627,13 +598,13 @@ 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, ), ], @@ -645,8 +616,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1359, - serialized_end=1439, + serialized_start=1377, + serialized_end=1467, ) @@ -684,7 +655,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, @@ -702,8 +673,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1442, - serialized_end=1580, + serialized_start=1470, + serialized_end=1608, ) @@ -723,13 +694,13 @@ 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=_b("\372A\034\022\032logging.googleapis.com/Log"), + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -747,7 +718,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -759,13 +730,13 @@ 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, ), ], @@ -777,8 +748,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1582, - serialized_end=1687, + serialized_start=1610, + serialized_end=1728, ) @@ -816,7 +787,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, @@ -834,8 +805,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1689, - serialized_end=1751, + serialized_start=1730, + serialized_end=1792, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -890,10 +861,10 @@ DeleteLogRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETELOGREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to DeleteLog. + { + "DESCRIPTOR": _DELETELOGREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to DeleteLog. Attributes: @@ -909,60 +880,60 @@ about log names, see [LogEntry][google.logging.v2.LogEntry]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteLogRequest) WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESREQUEST_LABELSENTRY, - __module__="google.cloud.logging_v2.proto.logging_pb2" + { + "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_WRITELOGENTRIESREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to WriteLogEntries. + "DESCRIPTOR": _WRITELOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to WriteLogEntries. Attributes: log_name: Optional. A default log resource name that is assigned to all log entries in ``entries`` that do not specify a value for - ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL- - encoded. For example: :: "projects/my-project- - id/logs/syslog" "organizations/1234567890/logs/cloudresour - cemanager.googleapis.com%2Factivity" The permission - logging.logEntries.create is needed on each project, + encoded. For example: :: "projects/my-project- + id/logs/syslog" "organizations/1234567890/logs/cloudresourc + emanager.googleapis.com%2Factivity" The permission + ``logging.logEntries.create`` is needed on each project, organization, billing account, or folder that is receiving new - log entries, whether the resource is specified in logName or - in an individual log entry. + log entries, whether the resource is specified in ``logName`` + or in an individual log entry. resource: Optional. A default monitored resource object that is assigned to all log entries in ``entries`` that do not specify a value - for ``resource``. Example: :: { "type": "gce_instance", - "labels": { "zone": "us-central1-a", "instance_id": + for ``resource``. Example: :: { "type": "gce_instance", + "labels": { "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels: Optional. Default labels that are added to the ``labels`` field of all log entries in ``entries``. If a log entry already has a label with the same key as a label in this - parameter, then the log entry's label is not changed. See + parameter, then the log entry’s label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries: Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this - method's ``log_name``, ``resource``, and ``labels`` fields are + method’s ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. If the @@ -973,31 +944,33 @@ their own values, the entries earlier in the list will sort before the entries later in the list. See the ``entries.list`` method. Log entries with timestamps that are more than the - `logs retention period `__ in the past + `logs retention period + `__ in the past or more than 24 hours in the future will not be available when calling ``entries.list``. However, those log entries can still - be `exported with LogSinks `__. To improve throughput and to avoid exceeding the - `quota limit `__ for calls to - ``entries.write``, you should try to include several log - entries in this list, rather than calling this method for each - individual log entry. + `quota limit `__ for calls to ``entries.write``, you should try to + include several log entries in this list, rather than calling + this method for each individual log entry. partial_success: Optional. Whether valid entries should be written even if some - other entries fail due to INVALID\_ARGUMENT or - PERMISSION\_DENIED errors. If any entry is not written, then + other entries fail due to INVALID_ARGUMENT or + PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed - by the entries' zero-based index in the ``entries.write`` + by the entries’ zero-based index in the ``entries.write`` method. dry_run: Optional. If true, the request should expect normal response, - but the entries won't be persisted nor exported. Useful for + but the entries won’t be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) @@ -1005,45 +978,45 @@ WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesResponse", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from WriteLogEntries. empty + { + "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from WriteLogEntries. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesResponse) WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesPartialErrors", (_message.Message,), - dict( - LogEntryErrorsEntry=_reflection.GeneratedProtocolMessageType( + { + "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( "LogEntryErrorsEntry", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - __module__="google.cloud.logging_v2.proto.logging_pb2" + { + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - ), + }, ), - DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Error details for WriteLogEntries with partial success. + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Error details for WriteLogEntries with partial success. Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, records the error status for entries that were not written due - to a permanent error, keyed by the entry's zero-based index in + to a permanent error, keyed by the entry’s zero-based index in ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) @@ -1051,27 +1024,24 @@ ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "ListLogEntriesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGENTRIESREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ``ListLogEntries``. + { + "DESCRIPTOR": _LISTLOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ``ListLogEntries``. Attributes: - project_ids: - Deprecated. Use ``resource_names`` instead. One or more - project identifiers or project numbers from which to retrieve - log entries. Example: ``"my-project-1A"``. resource_names: Required. Names of one or more parent resources from which to - retrieve log entries: :: "projects/[PROJECT_ID]" + retrieve log entries: :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Projects listed in the ``project_ids`` field are added to this list. filter: Optional. A filter that chooses which log entries to return. - See `Advanced Logs Queries `__. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in ``resource_names``. Referencing a parent @@ -1100,17 +1070,17 @@ those in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogEntriesRequest) ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "ListLogEntriesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGENTRIESRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ``ListLogEntries``. + { + "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ``ListLogEntries``. Attributes: @@ -1133,17 +1103,17 @@ search. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogEntriesResponse) ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ListMonitoredResourceDescriptors + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListMonitoredResourceDescriptors Attributes: @@ -1160,17 +1130,17 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - ), + }, ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ListMonitoredResourceDescriptors. + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListMonitoredResourceDescriptors. Attributes: @@ -1183,23 +1153,23 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - ), + }, ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) ListLogsRequest = _reflection.GeneratedProtocolMessageType( "ListLogsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ListLogs. + { + "DESCRIPTOR": _LISTLOGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListLogs. Attributes: parent: Required. The resource name that owns the logs: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" page_size: @@ -1215,17 +1185,17 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogsRequest) ListLogsResponse = _reflection.GeneratedProtocolMessageType( "ListLogsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ListLogs. + { + "DESCRIPTOR": _LISTLOGSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListLogs. Attributes: @@ -1240,7 +1210,7 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogsResponse) @@ -1249,22 +1219,31 @@ _DELETELOGREQUEST.fields_by_name["log_name"]._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None _WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None _WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["project_ids"]._options = None _LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None _LISTLOGSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( name="LoggingServiceV2", full_name="google.logging.v2.LoggingServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - ), - serialized_start=1754, - serialized_end=3127, + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + serialized_start=1795, + serialized_end=3168, methods=[ _descriptor.MethodDescriptor( name="DeleteLog", @@ -1273,9 +1252,7 @@ containing_service=None, input_type=_DELETELOGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name" - ), + serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", ), _descriptor.MethodDescriptor( name="WriteLogEntries", @@ -1284,9 +1261,7 @@ containing_service=None, input_type=_WRITELOGENTRIESREQUEST, output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries' - ), + serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', ), _descriptor.MethodDescriptor( name="ListLogEntries", @@ -1295,9 +1270,7 @@ containing_service=None, input_type=_LISTLOGENTRIESREQUEST, output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by' - ), + serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', ), _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1306,9 +1279,7 @@ containing_service=None, input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=_b( - '\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors' - ), + serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', ), _descriptor.MethodDescriptor( name="ListLogs", @@ -1317,9 +1288,7 @@ containing_service=None, input_type=_LISTLOGSREQUEST, output_type=_LISTLOGSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 2e444b925..5a81ba6e1 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -72,7 +72,7 @@ def WriteLogEntries(self, request, context): def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log - entries, see [Exporting Logs](/logging/docs/export). + entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/synth.metadata b/synth.metadata index a5616d3e5..3d2dbdca4 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-logging", - "sha": "a22a3bfdd4c8a4d6e9cc0c7d7504322ff31ad7ea" + "remote": "https://github.com/googleapis/python-logging.git", + "sha": "0a1dd94811232634fdb849cb2c85bd44e870642f" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aaff764c185e18a6c73227357c3df5fa60fec85a", - "internalRef": "309426927" + "sha": "e0f9d9e1f9de890db765be46f45ca8490723e3eb", + "internalRef": "309824146" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cdddf139b36000b3a7c65fd2a7781e253262359a" + "sha": "04cb397eb7590ea1e6c10a39fca3d8fe0fb3d256" } } ], @@ -37,9 +30,70 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "generator": "bazel" } } + ], + "generatedFiles": [ + ".coveragerc", + ".flake8", + ".github/CONTRIBUTING.md", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".gitignore", + ".kokoro/build.sh", + ".kokoro/continuous/common.cfg", + ".kokoro/continuous/continuous.cfg", + ".kokoro/docs/common.cfg", + ".kokoro/docs/docs.cfg", + ".kokoro/presubmit/common.cfg", + ".kokoro/presubmit/presubmit.cfg", + ".kokoro/publish-docs.sh", + ".kokoro/release.sh", + ".kokoro/release/common.cfg", + ".kokoro/release/release.cfg", + ".kokoro/trampoline.sh", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.rst", + "LICENSE", + "MANIFEST.in", + "docs/_static/custom.css", + "docs/_templates/layout.html", + "docs/conf.py", + "docs/gapic/v2/api.rst", + "docs/gapic/v2/types.rst", + "google/cloud/logging_v2/gapic/__init__.py", + "google/cloud/logging_v2/gapic/config_service_v2_client.py", + "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/enums.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/transports/__init__.py", + "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", + "google/cloud/logging_v2/proto/__init__.py", + "google/cloud/logging_v2/proto/log_entry.proto", + "google/cloud/logging_v2/proto/log_entry_pb2.py", + "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging.proto", + "google/cloud/logging_v2/proto/logging_config.proto", + "google/cloud/logging_v2/proto/logging_config_pb2.py", + "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_metrics.proto", + "google/cloud/logging_v2/proto/logging_metrics_pb2.py", + "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_pb2.py", + "google/cloud/logging_v2/proto/logging_pb2_grpc.py", + "renovate.json", + "setup.cfg", + "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 0483a4582..1ba78fa6e 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -62,6 +62,143 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): + def test_list_buckets(self): + # Setup Expected Response + next_page_token = "" + buckets_element = {} + buckets = [buckets_element] + expected_response = {"next_page_token": next_page_token, "buckets": buckets} + expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + + paged_list_response = client.list_buckets(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.buckets[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.ListBucketsRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_buckets_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + + paged_list_response = client.list_buckets(parent) + with pytest.raises(CustomException): + list(paged_list_response) + + def test_get_bucket(self): + # Setup Expected Response + name_2 = "name2-1052831874" + description = "description-1724546052" + retention_days = 1544391896 + expected_response = { + "name": name_2, + "description": description, + "retention_days": retention_days, + } + expected_response = logging_config_pb2.LogBucket(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = "name3373707" + + response = client.get_bucket(name) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.GetBucketRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_bucket_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = "name3373707" + + with pytest.raises(CustomException): + client.get_bucket(name) + + def test_update_bucket(self): + # Setup Expected Response + name_2 = "name2-1052831874" + description = "description-1724546052" + retention_days = 1544391896 + expected_response = { + "name": name_2, + "description": description, + "retention_days": retention_days, + } + expected_response = logging_config_pb2.LogBucket(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = "name3373707" + bucket = {} + update_mask = {} + + response = client.update_bucket(name, bucket, update_mask) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.UpdateBucketRequest( + name=name, bucket=bucket, update_mask=update_mask + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_update_bucket_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = "name3373707" + bucket = {} + update_mask = {} + + with pytest.raises(CustomException): + client.update_bucket(name, bucket, update_mask) + def test_list_sinks(self): # Setup Expected Response next_page_token = "" @@ -133,7 +270,7 @@ def test_get_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" response = client.get_sink(sink_name) assert expected_response == response @@ -152,7 +289,7 @@ def test_get_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" with pytest.raises(CustomException): client.get_sink(sink_name) @@ -241,7 +378,7 @@ def test_update_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" sink = {} response = client.update_sink(sink_name, sink) @@ -263,7 +400,7 @@ def test_update_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" sink = {} with pytest.raises(CustomException): @@ -277,7 +414,7 @@ def test_delete_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" client.delete_sink(sink_name) @@ -295,7 +432,7 @@ def test_delete_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" with pytest.raises(CustomException): client.delete_sink(sink_name) @@ -370,7 +507,7 @@ def test_get_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" response = client.get_exclusion(name) assert expected_response == response @@ -389,7 +526,7 @@ def test_get_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" with pytest.raises(CustomException): client.get_exclusion(name) @@ -466,7 +603,7 @@ def test_update_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" exclusion = {} update_mask = {} @@ -489,7 +626,7 @@ def test_update_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" exclusion = {} update_mask = {} @@ -504,7 +641,7 @@ def test_delete_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" client.delete_exclusion(name) @@ -522,18 +659,18 @@ def test_delete_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" with pytest.raises(CustomException): client.delete_exclusion(name) def test_get_cmek_settings(self): # Setup Expected Response - name = "name3373707" + name_2 = "name2-1052831874" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name, + "name": name_2, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -546,11 +683,14 @@ def test_get_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - response = client.get_cmek_settings() + # Setup Request + name = "name3373707" + + response = client.get_cmek_settings(name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetCmekSettingsRequest() + expected_request = logging_config_pb2.GetCmekSettingsRequest(name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -562,16 +702,19 @@ def test_get_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() + # Setup request + name = "name3373707" + with pytest.raises(CustomException): - client.get_cmek_settings() + client.get_cmek_settings(name) def test_update_cmek_settings(self): # Setup Expected Response - name = "name3373707" + name_2 = "name2-1052831874" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name, + "name": name_2, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -584,11 +727,17 @@ def test_update_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - response = client.update_cmek_settings() + # Setup Request + name = "name3373707" + cmek_settings = {} + + response = client.update_cmek_settings(name, cmek_settings) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest() + expected_request = logging_config_pb2.UpdateCmekSettingsRequest( + name=name, cmek_settings=cmek_settings + ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -600,5 +749,9 @@ def test_update_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() + # Setup request + name = "name3373707" + cmek_settings = {} + with pytest.raises(CustomException): - client.update_cmek_settings() + client.update_cmek_settings(name, cmek_settings) diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index ef2abc733..8fae99670 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -63,24 +63,30 @@ class CustomException(Exception): class TestLoggingServiceV2Client(object): - def test_delete_log(self): - channel = ChannelStub() + def test_write_log_entries(self): + # Setup Expected Response + expected_response = {} + expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = client.log_path("[PROJECT]", "[LOG]") + entries = [] - client.delete_log(log_name) + response = client.write_log_entries(entries) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_pb2.DeleteLogRequest(log_name=log_name) + expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_log_exception(self): + def test_write_log_entries_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -89,35 +95,29 @@ def test_delete_log_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = client.log_path("[PROJECT]", "[LOG]") + entries = [] with pytest.raises(CustomException): - client.delete_log(log_name) - - def test_write_log_entries(self): - # Setup Expected Response - expected_response = {} - expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + client.write_log_entries(entries) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_log(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - entries = [] + log_name = "logName2013526694" - response = client.write_log_entries(entries) - assert expected_response == response + client.delete_log(log_name) assert len(channel.requests) == 1 - expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) + expected_request = logging_pb2.DeleteLogRequest(log_name=log_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_write_log_entries_exception(self): + def test_delete_log_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -126,10 +126,10 @@ def test_write_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - entries = [] + log_name = "logName2013526694" with pytest.raises(CustomException): - client.write_log_entries(entries) + client.delete_log(log_name) def test_list_log_entries(self): # Setup Expected Response diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 35201f790..0ad66770c 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -128,7 +128,7 @@ def test_get_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") response = client.get_log_metric(metric_name) assert expected_response == response @@ -149,7 +149,7 @@ def test_get_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): client.get_log_metric(metric_name) @@ -226,7 +226,7 @@ def test_update_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") metric = {} response = client.update_log_metric(metric_name, metric) @@ -248,7 +248,7 @@ def test_update_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") metric = {} with pytest.raises(CustomException): @@ -262,7 +262,7 @@ def test_delete_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") client.delete_log_metric(metric_name) @@ -282,7 +282,7 @@ def test_delete_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): client.delete_log_metric(metric_name) From 2aec0903d2e0228c1ef06d2b05269fe7eec49eef Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 05:59:37 -0700 Subject: [PATCH 02/39] chore(python): create thread_safety doc This will be included in index.rst files. See https://github.com/googleapis/python-bigtable/pull/26/files Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Tue May 5 10:06:52 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 09c48461232ce929c34386259eb59018ad2d8eef Source-Link: https://github.com/googleapis/synthtool/commit/09c48461232ce929c34386259eb59018ad2d8eef --- docs/multiprocessing.rst | 7 +++++++ synth.metadata | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/multiprocessing.rst diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst new file mode 100644 index 000000000..1cb29d4ca --- /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/synth.metadata b/synth.metadata index 3d2dbdca4..bd0c59f2c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e0f9d9e1f9de890db765be46f45ca8490723e3eb", - "internalRef": "309824146" + "sha": "1b5a8d2bbb69c5a04db26bd546d2888e609c6bab", + "internalRef": "309845930" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "04cb397eb7590ea1e6c10a39fca3d8fe0fb3d256" + "sha": "09c48461232ce929c34386259eb59018ad2d8eef" } } ], @@ -65,6 +65,7 @@ "docs/conf.py", "docs/gapic/v2/api.rst", "docs/gapic/v2/types.rst", + "docs/multiprocessing.rst", "google/cloud/logging_v2/gapic/__init__.py", "google/cloud/logging_v2/gapic/config_service_v2_client.py", "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", From cf7c72f00de70bc734481b890b3ad98c1abff20b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:00:49 -0700 Subject: [PATCH 03/39] chore(python): remove extra #!/bin/bash Co-authored-by: Jeffrey Rennie Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Tue May 12 09:51:12 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 7482e79a82e353248769d819788adc1213e8c207 Source-Link: https://github.com/googleapis/synthtool/commit/7482e79a82e353248769d819788adc1213e8c207 --- .kokoro/publish-docs.sh | 2 -- synth.metadata | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index d01483d2d..e49d523ad 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/synth.metadata b/synth.metadata index bd0c59f2c..ccdfcd825 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1b5a8d2bbb69c5a04db26bd546d2888e609c6bab", - "internalRef": "309845930" + "sha": "edd3b80fb770548d6ad780105f1782de6ff73ea0", + "internalRef": "311053644" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "09c48461232ce929c34386259eb59018ad2d8eef" + "sha": "7482e79a82e353248769d819788adc1213e8c207" } } ], From 79d1eb447219dcd993d634a2cda968c9c45d1549 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:02:20 -0700 Subject: [PATCH 04/39] fix: restore GAPIC v2 retry configs Restores GAPIC v2 retry config overrides that were mistakenly removed during migration. PiperOrigin-RevId: 312088359 Source-Author: Google APIs Source-Date: Mon May 18 08:57:12 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 5a90d467aa65e7f038f87585e8fbb45d74475e7c Source-Link: https://github.com/googleapis/googleapis/commit/5a90d467aa65e7f038f87585e8fbb45d74475e7c --- .../gapic/config_service_v2_client.py | 744 +++++++++--------- .../gapic/config_service_v2_client_config.py | 43 +- .../gapic/logging_service_v2_client.py | 294 +++---- .../gapic/logging_service_v2_client_config.py | 29 +- .../gapic/metrics_service_v2_client.py | 258 +++--- .../gapic/metrics_service_v2_client_config.py | 17 +- .../config_service_v2_grpc_transport.py | 90 +-- .../logging_service_v2_grpc_transport.py | 38 +- .../metrics_service_v2_grpc_transport.py | 40 +- synth.metadata | 6 +- .../v2/test_config_service_v2_client_v2.py | 236 +++--- .../v2/test_logging_service_v2_client_v2.py | 74 +- .../v2/test_metrics_service_v2_client_v2.py | 158 ++-- 13 files changed, 1015 insertions(+), 1012 deletions(-) diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index c368c6387..e77426f1f 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -296,6 +296,292 @@ def __init__( self._inner_api_calls = {} # Service calls + def delete_sink( + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' + >>> + >>> client.delete_sink(sink_name) + + Args: + sink_name (str): Required. The full resource name of the sink to delete, including + the parent resource and the sink identifier: + + :: + + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + + Example: ``"projects/my-project-id/sinks/my-sink-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_sink" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_sink, + default_retry=self._method_configs["DeleteSink"].retry, + default_timeout=self._method_configs["DeleteSink"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteSinkRequest( + sink_name=sink_name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def update_sink( + self, + sink_name, + sink, + unique_writer_identity=None, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' + >>> + >>> # TODO: Initialize `sink`: + >>> sink = {} + >>> + >>> response = client.update_sink(sink_name, sink) + + Args: + sink_name (str): Required. The full resource name of the sink to update, including + the parent resource and the sink identifier: + + :: + + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + + Example: ``"projects/my-project-id/sinks/my-sink-id"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that + appears as part of ``sink_name``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When + updating a sink, the effect of this field on the value of + ``writer_identity`` in the updated sink depends on both the old and new + values of this field: + + - If the old and new values of this field are both false or both true, + then there is no change to the sink's ``writer_identity``. + - If the old value is false and the new value is true, then + ``writer_identity`` is changed to a unique service account. + - It is an error if the old value is true and the new value is set to + false or defaulted to false. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need + an update. A sink field will be overwritten if, and only if, it is in + the update mask. ``name`` and output only fields cannot be updated. + + An empty updateMask is temporarily treated as using the following mask + for backwards compatibility purposes: destination,filter,includeChildren + At some point in the future, behavior will be removed and specifying an + empty updateMask will be an error. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=filter``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.logging_v2.types.LogSink` 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 "update_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "update_sink" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_sink, + default_retry=self._method_configs["UpdateSink"].retry, + default_timeout=self._method_configs["UpdateSink"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, + sink=sink, + unique_writer_identity=unique_writer_identity, + update_mask=update_mask, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_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["update_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_exclusion( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes an exclusion. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> client.delete_exclusion(name) + + Args: + name (str): Required. The resource name of an existing exclusion to delete: + + :: + + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + + Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_exclusion, + default_retry=self._method_configs["DeleteExclusion"].retry, + default_timeout=self._method_configs["DeleteExclusion"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteExclusionRequest( + name=name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def list_buckets( self, parent, @@ -658,208 +944,7 @@ def list_sinks( underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number - of resources in a page. - 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.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - 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 "list_sinks" not in self._inner_api_calls: - self._inner_api_calls[ - "list_sinks" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_sinks, - default_retry=self._method_configs["ListSinks"].retry, - default_timeout=self._method_configs["ListSinks"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.ListSinksRequest( - parent=parent, - page_size=page_size, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("parent", parent)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_sinks"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="sinks", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - - def get_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets a sink. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' - >>> - >>> response = client.get_sink(sink_name) - - Args: - sink_name (str): Required. The resource name of the sink: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" - - Example: ``"projects/my-project-id/sinks/my-sink-id"``. - 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.logging_v2.types.LogSink` 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 "get_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "get_sink" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_sink, - default_retry=self._method_configs["GetSink"].retry, - default_timeout=self._method_configs["GetSink"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.GetSinkRequest( - sink_name=sink_name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("sink_name", sink_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["get_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def create_sink( - self, - parent, - sink, - unique_writer_identity=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Creates a sink that exports specified log entries to a destination. - The export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} - >>> - >>> response = client.create_sink(parent, sink) - - Args: - parent (str): Required. The resource in which to create the sink: - - :: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Examples: ``"projects/my-logging-project"``, - ``"organizations/123456789"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink - identifier that is not already in use. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is omitted or set to - false, and if the sink's parent is a project, then the value returned as - ``writer_identity`` is the same group or service account used by Logging - before the addition of writer identities to this API. The sink's - destination must be in the same project as the sink itself. - - If this field is set to true, or if the sink is owned by a non-project - resource such as an organization, then the value of ``writer_identity`` - will be a unique service account used only for exports from the new - sink. For more information, see ``writer_identity`` in ``LogSink``. + of resources in a page. 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. @@ -870,7 +955,10 @@ def create_sink( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -880,20 +968,19 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_sink" not in self._inner_api_calls: + if "list_sinks" not in self._inner_api_calls: self._inner_api_calls[ - "create_sink" + "list_sinks" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_sink, - default_retry=self._method_configs["CreateSink"].retry, - default_timeout=self._method_configs["CreateSink"].timeout, + self.transport.list_sinks, + default_retry=self._method_configs["ListSinks"].retry, + default_timeout=self._method_configs["ListSinks"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.CreateSinkRequest( + request = logging_config_pb2.ListSinksRequest( parent=parent, - sink=sink, - unique_writer_identity=unique_writer_identity, + page_size=page_size, ) if metadata is None: metadata = [] @@ -908,27 +995,30 @@ def create_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_sinks"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="sinks", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def update_sink( + def get_sink( self, sink_name, - sink, - unique_writer_identity=None, - update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. + Gets a sink. Example: >>> from google.cloud import logging_v2 @@ -938,14 +1028,10 @@ def update_sink( >>> # TODO: Initialize `sink_name`: >>> sink_name = '' >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} - >>> - >>> response = client.update_sink(sink_name, sink) + >>> response = client.get_sink(sink_name) Args: - sink_name (str): Required. The full resource name of the sink to update, including - the parent resource and the sink identifier: + sink_name (str): Required. The resource name of the sink: :: @@ -955,38 +1041,6 @@ def update_sink( "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that - appears as part of ``sink_name``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When - updating a sink, the effect of this field on the value of - ``writer_identity`` in the updated sink depends on both the old and new - values of this field: - - - If the old and new values of this field are both false or both true, - then there is no change to the sink's ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service account. - - It is an error if the old value is true and the new value is set to - false or defaulted to false. - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need - an update. A sink field will be overwritten if, and only if, it is in - the update mask. ``name`` and output only fields cannot be updated. - - An empty updateMask is temporarily treated as using the following mask - for backwards compatibility purposes: destination,filter,includeChildren - At some point in the future, behavior will be removed and specifying an - empty updateMask will be an error. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - - Example: ``updateMask=filter``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1007,21 +1061,18 @@ def update_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_sink" not in self._inner_api_calls: + if "get_sink" not in self._inner_api_calls: self._inner_api_calls[ - "update_sink" + "get_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_sink, - default_retry=self._method_configs["UpdateSink"].retry, - default_timeout=self._method_configs["UpdateSink"].timeout, + self.transport.get_sink, + default_retry=self._method_configs["GetSink"].retry, + default_timeout=self._method_configs["GetSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.UpdateSinkRequest( + request = logging_config_pb2.GetSinkRequest( sink_name=sink_name, - sink=sink, - unique_writer_identity=unique_writer_identity, - update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1036,43 +1087,65 @@ def update_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_sink"]( + return self._inner_api_calls["get_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_sink( + def create_sink( self, - sink_name, + parent, + sink, + unique_writer_identity=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. + Creates a sink that exports specified log entries to a destination. + The export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' + >>> parent = client.project_path('[PROJECT]') >>> - >>> client.delete_sink(sink_name) + >>> # TODO: Initialize `sink`: + >>> sink = {} + >>> + >>> response = client.create_sink(parent, sink) Args: - sink_name (str): Required. The full resource name of the sink to delete, including - the parent resource and the sink identifier: + parent (str): Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" - Example: ``"projects/my-project-id/sinks/my-sink-id"``. + Examples: ``"projects/my-logging-project"``, + ``"organizations/123456789"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink + identifier that is not already in use. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as + ``writer_identity`` in the new sink. If this value is omitted or set to + false, and if the sink's parent is a project, then the value returned as + ``writer_identity`` is the same group or service account used by Logging + before the addition of writer identities to this API. The sink's + destination must be in the same project as the sink itself. + + If this field is set to true, or if the sink is owned by a non-project + resource such as an organization, then the value of ``writer_identity`` + will be a unique service account used only for exports from the new + sink. For more information, see ``writer_identity`` in ``LogSink``. 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. @@ -1082,6 +1155,9 @@ def delete_sink( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogSink` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -1090,24 +1166,26 @@ def delete_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_sink" not in self._inner_api_calls: + if "create_sink" not in self._inner_api_calls: self._inner_api_calls[ - "delete_sink" + "create_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_sink, - default_retry=self._method_configs["DeleteSink"].retry, - default_timeout=self._method_configs["DeleteSink"].timeout, + self.transport.create_sink, + default_retry=self._method_configs["CreateSink"].retry, + default_timeout=self._method_configs["CreateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.DeleteSinkRequest( - sink_name=sink_name, + request = logging_config_pb2.CreateSinkRequest( + parent=parent, + sink=sink, + unique_writer_identity=unique_writer_identity, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -1116,7 +1194,7 @@ def delete_sink( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_sink"]( + return self._inner_api_calls["create_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -1512,84 +1590,6 @@ def update_exclusion( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes an exclusion. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> client.delete_exclusion(name) - - Args: - name (str): Required. The resource name of an existing exclusion to delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - - Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_exclusion, - default_retry=self._method_configs["DeleteExclusion"].retry, - default_timeout=self._method_configs["DeleteExclusion"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteExclusionRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def get_cmek_settings( self, name, diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index d16e72238..3d7bd3bdf 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,8 +2,9 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], "non_idempotent": [], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { "default": { @@ -17,54 +18,59 @@ } }, "methods": { - "ListBuckets": { + "DeleteSink": { "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "GetBucket": { + "UpdateSink": { "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "UpdateBucket": { + "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "ListSinks": { + "ListBuckets": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, - "GetSink": { + "GetBucket": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, - "CreateSink": { + "UpdateBucket": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "UpdateSink": { + "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, - "DeleteSink": { + "GetSink": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent2", + "retry_params_name": "default", + }, + "CreateSink": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, "CreateExclusion": { @@ -77,14 +83,9 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, "UpdateCmekSettings": { diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 3a1cb38a5..1882b2b8b 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -237,153 +237,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def write_log_entries( - self, - entries, - log_name=None, - resource=None, - labels=None, - partial_success=None, - dry_run=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Writes log entries to Logging. This API method is the - only way to send log entries to Logging. This method - is used, directly or indirectly, by the Logging agent - (fluentd) and all logging libraries configured to use Logging. - A single request may contain log entries for a maximum of 1000 - different resources (projects, organizations, billing accounts or - folders) - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.LoggingServiceV2Client() - >>> - >>> # TODO: Initialize `entries`: - >>> entries = [] - >>> - >>> response = client.write_log_entries(entries) - - Args: - entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log - entries in this list does not matter. Values supplied in this method's - ``log_name``, ``resource``, and ``labels`` fields are copied into those - log entries in this list that do not include values for their - corresponding fields. For more information, see the ``LogEntry`` type. - - If the ``timestamp`` or ``insert_id`` fields are missing in log entries, - then this method supplies the current time or a unique identifier, - respectively. The supplied values are chosen so that, among the log - entries that did not supply their own values, the entries earlier in the - list will sort before the entries later in the list. See the - ``entries.list`` method. - - Log entries with timestamps that are more than the `logs retention - period `__ in the past or - more than 24 hours in the future will not be available when calling - ``entries.list``. However, those log entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for calls to - ``entries.write``, you should try to include several log entries in this - list, rather than calling this method for each individual log entry. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogEntry` - log_name (str): Optional. A default log resource name that is assigned to all log - entries in ``entries`` that do not specify a value for ``log_name``: - - :: - - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" - - ``[LOG_ID]`` must be URL-encoded. For example: - - :: - - "projects/my-project-id/logs/syslog" - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - - The permission ``logging.logEntries.create`` is needed on each project, - organization, billing account, or folder that is receiving new log - entries, whether the resource is specified in ``logName`` or in an - individual log entry. - resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to - all log entries in ``entries`` that do not specify a value for - ``resource``. Example: - - :: - - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - - See ``LogEntry``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.MonitoredResource` - labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of - all log entries in ``entries``. If a log entry already has a label with - the same key as a label in this parameter, then the log entry's label is - not changed. See ``LogEntry``. - partial_success (bool): Optional. Whether valid entries should be written even if some other - entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any - entry is not written, then the response status is the error associated - with one of the failed entries and the response includes error details - keyed by the entries' zero-based index in the ``entries.write`` method. - dry_run (bool): Optional. If true, the request should expect normal response, but the - entries won't be persisted nor exported. Useful for checking whether the - logging API endpoints are working properly before sending valuable data. - 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.logging_v2.types.WriteLogEntriesResponse` 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 "write_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "write_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.write_log_entries, - default_retry=self._method_configs["WriteLogEntries"].retry, - default_timeout=self._method_configs["WriteLogEntries"].timeout, - client_info=self._client_info, - ) - - request = logging_pb2.WriteLogEntriesRequest( - entries=entries, - log_name=log_name, - resource=resource, - labels=labels, - partial_success=partial_success, - dry_run=dry_run, - ) - return self._inner_api_calls["write_log_entries"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def delete_log( self, log_name, @@ -592,6 +445,153 @@ def list_log_entries( ) return iterator + def write_log_entries( + self, + entries, + log_name=None, + resource=None, + labels=None, + partial_success=None, + dry_run=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Writes log entries to Logging. This API method is the + only way to send log entries to Logging. This method + is used, directly or indirectly, by the Logging agent + (fluentd) and all logging libraries configured to use Logging. + A single request may contain log entries for a maximum of 1000 + different resources (projects, organizations, billing accounts or + folders) + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.LoggingServiceV2Client() + >>> + >>> # TODO: Initialize `entries`: + >>> entries = [] + >>> + >>> response = client.write_log_entries(entries) + + Args: + entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log + entries in this list does not matter. Values supplied in this method's + ``log_name``, ``resource``, and ``labels`` fields are copied into those + log entries in this list that do not include values for their + corresponding fields. For more information, see the ``LogEntry`` type. + + If the ``timestamp`` or ``insert_id`` fields are missing in log entries, + then this method supplies the current time or a unique identifier, + respectively. The supplied values are chosen so that, among the log + entries that did not supply their own values, the entries earlier in the + list will sort before the entries later in the list. See the + ``entries.list`` method. + + Log entries with timestamps that are more than the `logs retention + period `__ in the past or + more than 24 hours in the future will not be available when calling + ``entries.list``. However, those log entries can still be `exported with + LogSinks `__. + + To improve throughput and to avoid exceeding the `quota + limit `__ for calls to + ``entries.write``, you should try to include several log entries in this + list, rather than calling this method for each individual log entry. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogEntry` + log_name (str): Optional. A default log resource name that is assigned to all log + entries in ``entries`` that do not specify a value for ``log_name``: + + :: + + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" + + ``[LOG_ID]`` must be URL-encoded. For example: + + :: + + "projects/my-project-id/logs/syslog" + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + + The permission ``logging.logEntries.create`` is needed on each project, + organization, billing account, or folder that is receiving new log + entries, whether the resource is specified in ``logName`` or in an + individual log entry. + resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to + all log entries in ``entries`` that do not specify a value for + ``resource``. Example: + + :: + + { "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + + See ``LogEntry``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.MonitoredResource` + labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of + all log entries in ``entries``. If a log entry already has a label with + the same key as a label in this parameter, then the log entry's label is + not changed. See ``LogEntry``. + partial_success (bool): Optional. Whether valid entries should be written even if some other + entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any + entry is not written, then the response status is the error associated + with one of the failed entries and the response includes error details + keyed by the entries' zero-based index in the ``entries.write`` method. + dry_run (bool): Optional. If true, the request should expect normal response, but the + entries won't be persisted nor exported. Useful for checking whether the + logging API endpoints are working properly before sending valuable data. + 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.logging_v2.types.WriteLogEntriesResponse` 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 "write_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "write_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.write_log_entries, + default_retry=self._method_configs["WriteLogEntries"].retry, + default_timeout=self._method_configs["WriteLogEntries"].timeout, + client_info=self._client_info, + ) + + request = logging_pb2.WriteLogEntriesRequest( + entries=entries, + log_name=log_name, + resource=resource, + labels=labels, + partial_success=partial_success, + dry_run=dry_run, + ) + return self._inner_api_calls["write_log_entries"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def list_monitored_resource_descriptors( self, page_size=None, diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 68ac87af4..421365489 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,8 +2,9 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], "non_idempotent": [], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { "default": { @@ -17,9 +18,19 @@ } }, "methods": { + "DeleteLog": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, @@ -27,24 +38,14 @@ "delay_threshold_millis": 50, }, }, - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, }, diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index b777054ba..c3d1f2f4c 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -215,49 +215,43 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_log_metrics( + def update_log_metric( self, - parent, - page_size=None, + metric_name, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists logs-based metrics. + Creates or updates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # Iterate over all results - >>> for element in client.list_log_metrics(parent): - ... # process element - ... pass - >>> + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> # Alternatively: + >>> # TODO: Initialize `metric`: + >>> metric = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_metrics(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.update_log_metric(metric_name, metric) Args: - parent (str): Required. The name of the project containing the metrics: + metric_name (str): Required. The resource name of the metric to update: :: - "projects/[PROJECT_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + + The updated metric must be provided in the request and it's ``name`` + field must be the same as ``[METRIC_ID]`` If the metric does not exist + in ``[PROJECT_ID]``, then a new metric is created. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -268,10 +262,7 @@ def list_log_metrics( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -281,25 +272,25 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_metrics" not in self._inner_api_calls: + if "update_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "list_log_metrics" + "update_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_metrics, - default_retry=self._method_configs["ListLogMetrics"].retry, - default_timeout=self._method_configs["ListLogMetrics"].timeout, + self.transport.update_log_metric, + default_retry=self._method_configs["UpdateLogMetric"].retry, + default_timeout=self._method_configs["UpdateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.ListLogMetricsRequest( - parent=parent, - page_size=page_size, + request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, + metric=metric, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: @@ -308,22 +299,11 @@ def list_log_metrics( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_metrics"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="metrics", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["update_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_log_metric( + def delete_log_metric( self, metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -331,7 +311,7 @@ def get_log_metric( metadata=None, ): """ - Gets a logs-based metric. + Deletes a logs-based metric. Example: >>> from google.cloud import logging_v2 @@ -340,10 +320,10 @@ def get_log_metric( >>> >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.get_log_metric(metric_name) + >>> client.delete_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the desired metric: + metric_name (str): Required. The resource name of the metric to delete: :: @@ -357,9 +337,6 @@ def get_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -368,17 +345,17 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_log_metric" not in self._inner_api_calls: + if "delete_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "get_log_metric" + "delete_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_log_metric, - default_retry=self._method_configs["GetLogMetric"].retry, - default_timeout=self._method_configs["GetLogMetric"].timeout, + self.transport.delete_log_metric, + default_retry=self._method_configs["DeleteLogMetric"].retry, + default_timeout=self._method_configs["DeleteLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.GetLogMetricRequest( + request = logging_metrics_pb2.DeleteLogMetricRequest( metric_name=metric_name, ) if metadata is None: @@ -394,20 +371,20 @@ def get_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_log_metric"]( + self._inner_api_calls["delete_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_log_metric( + def list_log_metrics( self, parent, - metric, + page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a logs-based metric. + Lists logs-based metrics. Example: >>> from google.cloud import logging_v2 @@ -416,25 +393,31 @@ def create_log_metric( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> # Iterate over all results + >>> for element in client.list_log_metrics(parent): + ... # process element + ... pass >>> - >>> response = client.create_log_metric(parent, metric) + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_metrics(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - parent (str): Required. The resource name of the project in which to create the - metric: + parent (str): Required. The name of the project containing the metrics: :: "projects/[PROJECT_ID]" - - The new metric must be provided in the request. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that - already exists. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. 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. @@ -445,7 +428,10 @@ def create_log_metric( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -455,19 +441,19 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_log_metric" not in self._inner_api_calls: + if "list_log_metrics" not in self._inner_api_calls: self._inner_api_calls[ - "create_log_metric" + "list_log_metrics" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_log_metric, - default_retry=self._method_configs["CreateLogMetric"].retry, - default_timeout=self._method_configs["CreateLogMetric"].timeout, + self.transport.list_log_metrics, + default_retry=self._method_configs["ListLogMetrics"].retry, + default_timeout=self._method_configs["ListLogMetrics"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.CreateLogMetricRequest( + request = logging_metrics_pb2.ListLogMetricsRequest( parent=parent, - metric=metric, + page_size=page_size, ) if metadata is None: metadata = [] @@ -482,20 +468,30 @@ def create_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_metrics"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="metrics", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def update_log_metric( + def get_log_metric( self, metric_name, - metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates or updates a logs-based metric. + Gets a logs-based metric. Example: >>> from google.cloud import logging_v2 @@ -504,25 +500,14 @@ def update_log_metric( >>> >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} - >>> - >>> response = client.update_log_metric(metric_name, metric) + >>> response = client.get_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the metric to update: + metric_name (str): Required. The resource name of the desired metric: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - - The updated metric must be provided in the request and it's ``name`` - field must be the same as ``[METRIC_ID]`` If the metric does not exist - in ``[PROJECT_ID]``, then a new metric is created. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -543,19 +528,18 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_log_metric" not in self._inner_api_calls: + if "get_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "update_log_metric" + "get_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_log_metric, - default_retry=self._method_configs["UpdateLogMetric"].retry, - default_timeout=self._method_configs["UpdateLogMetric"].timeout, + self.transport.get_log_metric, + default_retry=self._method_configs["GetLogMetric"].retry, + default_timeout=self._method_configs["GetLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.UpdateLogMetricRequest( + request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name, - metric=metric, ) if metadata is None: metadata = [] @@ -570,35 +554,47 @@ def update_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_log_metric"]( + return self._inner_api_calls["get_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_log_metric( + def create_log_metric( self, - metric_name, + parent, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes a logs-based metric. + Creates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> parent = client.project_path('[PROJECT]') >>> - >>> client.delete_log_metric(metric_name) + >>> # TODO: Initialize `metric`: + >>> metric = {} + >>> + >>> response = client.create_log_metric(parent, metric) Args: - metric_name (str): Required. The resource name of the metric to delete: + parent (str): Required. The resource name of the project in which to create the + metric: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]" + + The new metric must be provided in the request. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that + already exists. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -608,6 +604,9 @@ def delete_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -616,24 +615,25 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log_metric" not in self._inner_api_calls: + if "create_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "delete_log_metric" + "create_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_log_metric, - default_retry=self._method_configs["DeleteLogMetric"].retry, - default_timeout=self._method_configs["DeleteLogMetric"].timeout, + self.transport.create_log_metric, + default_retry=self._method_configs["CreateLogMetric"].retry, + default_timeout=self._method_configs["CreateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.DeleteLogMetricRequest( - metric_name=metric_name, + request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, + metric=metric, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -642,6 +642,6 @@ def delete_log_metric( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_log_metric"]( + return self._inner_api_calls["create_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index 0c6414a23..499329a87 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,8 +2,9 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], "non_idempotent": [], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { "default": { @@ -17,27 +18,27 @@ } }, "methods": { - "ListLogMetrics": { + "UpdateLogMetric": { "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "GetLogMetric": { + "DeleteLogMetric": { "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, - "CreateLogMetric": { + "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, - "UpdateLogMetric": { + "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent2", "retry_params_name": "default", }, - "DeleteLogMetric": { + "CreateLogMetric": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 69c1d992a..3cb7e0870 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -115,6 +115,51 @@ def channel(self): """ return self._channel + @property + def delete_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. + + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].DeleteSink + + @property + def update_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. + + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].UpdateSink + + @property + def delete_exclusion(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. + + Deletes an exclusion. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].DeleteExclusion + @property def list_buckets(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_buckets`. @@ -206,38 +251,6 @@ def create_sink(self): """ return self._stubs["config_service_v2_stub"].CreateSink - @property - def update_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].UpdateSink - - @property - def delete_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteSink - @property def list_exclusions(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_exclusions`. @@ -292,19 +305,6 @@ def update_exclusion(self): """ return self._stubs["config_service_v2_stub"].UpdateExclusion - @property - def delete_exclusion(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. - - Deletes an exclusion. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteExclusion - @property def get_cmek_settings(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_cmek_settings`. diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 4ee5baa5b..07ca0603f 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -113,25 +113,6 @@ def channel(self): """ return self._channel - @property - def write_log_entries(self): - """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. - - Writes log entries to Logging. This API method is the - only way to send log entries to Logging. This method - is used, directly or indirectly, by the Logging agent - (fluentd) and all logging libraries configured to use Logging. - A single request may contain log entries for a maximum of 1000 - different resources (projects, organizations, billing accounts or - folders) - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["logging_service_v2_stub"].WriteLogEntries - @property def delete_log(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.delete_log`. @@ -164,6 +145,25 @@ def list_log_entries(self): """ return self._stubs["logging_service_v2_stub"].ListLogEntries + @property + def write_log_entries(self): + """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. + + Writes log entries to Logging. This API method is the + only way to send log entries to Logging. This method + is used, directly or indirectly, by the Logging agent + (fluentd) and all logging libraries configured to use Logging. + A single request may contain log entries for a maximum of 1000 + different resources (projects, organizations, billing accounts or + folders) + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["logging_service_v2_stub"].WriteLogEntries + @property def list_monitored_resource_descriptors(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_monitored_resource_descriptors`. diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index 605bc118e..f1d75af56 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -116,66 +116,66 @@ def channel(self): return self._channel @property - def list_log_metrics(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. + def update_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. - Lists logs-based metrics. + Creates or updates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].ListLogMetrics + return self._stubs["metrics_service_v2_stub"].UpdateLogMetric @property - def get_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. + def delete_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. - Gets a logs-based metric. + Deletes a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].GetLogMetric + return self._stubs["metrics_service_v2_stub"].DeleteLogMetric @property - def create_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. + def list_log_metrics(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. - Creates a logs-based metric. + Lists logs-based metrics. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].CreateLogMetric + return self._stubs["metrics_service_v2_stub"].ListLogMetrics @property - def update_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. + def get_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. - Creates or updates a logs-based metric. + Gets a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].UpdateLogMetric + return self._stubs["metrics_service_v2_stub"].GetLogMetric @property - def delete_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. + def create_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. - Deletes a logs-based metric. + Creates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].DeleteLogMetric + return self._stubs["metrics_service_v2_stub"].CreateLogMetric diff --git a/synth.metadata b/synth.metadata index ccdfcd825..72c4346bc 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "edd3b80fb770548d6ad780105f1782de6ff73ea0", - "internalRef": "311053644" + "sha": "5a90d467aa65e7f038f87585e8fbb45d74475e7c", + "internalRef": "312088359" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7482e79a82e353248769d819788adc1213e8c207" + "sha": "7136daa5687f2a5bdcbba2cb25457f56fdf85d59" } } ], diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 1ba78fa6e..1b267f75c 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -62,6 +62,124 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): + def test_delete_sink(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + sink_name = "sinkName-1391757129" + + client.delete_sink(sink_name) + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_sink_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + sink_name = "sinkName-1391757129" + + with pytest.raises(CustomException): + client.delete_sink(sink_name) + + def test_update_sink(self): + # Setup Expected Response + name = "name3373707" + destination = "destination-1429847026" + filter_ = "filter-1274492040" + description = "description-1724546052" + disabled = True + writer_identity = "writerIdentity775638794" + include_children = True + expected_response = { + "name": name, + "destination": destination, + "filter": filter_, + "description": description, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, + } + expected_response = logging_config_pb2.LogSink(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + sink_name = "sinkName-1391757129" + sink = {} + + response = client.update_sink(sink_name, sink) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, sink=sink + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_update_sink_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + sink_name = "sinkName-1391757129" + sink = {} + + with pytest.raises(CustomException): + client.update_sink(sink_name, sink) + + def test_delete_exclusion(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = "name3373707" + + client.delete_exclusion(name) + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_exclusion_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = "name3373707" + + with pytest.raises(CustomException): + client.delete_exclusion(name) + def test_list_buckets(self): # Setup Expected Response next_page_token = "" @@ -350,93 +468,6 @@ def test_create_sink_exception(self): with pytest.raises(CustomException): client.create_sink(parent, sink) - def test_update_sink(self): - # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" - disabled = True - writer_identity = "writerIdentity775638794" - include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } - expected_response = logging_config_pb2.LogSink(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - sink_name = "sinkName-1391757129" - sink = {} - - response = client.update_sink(sink_name, sink) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, sink=sink - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_update_sink_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - sink_name = "sinkName-1391757129" - sink = {} - - with pytest.raises(CustomException): - client.update_sink(sink_name, sink) - - def test_delete_sink(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - sink_name = "sinkName-1391757129" - - client.delete_sink(sink_name) - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_sink_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - sink_name = "sinkName-1391757129" - - with pytest.raises(CustomException): - client.delete_sink(sink_name) - def test_list_exclusions(self): # Setup Expected Response next_page_token = "" @@ -633,37 +664,6 @@ def test_update_exclusion_exception(self): with pytest.raises(CustomException): client.update_exclusion(name, exclusion, update_mask) - def test_delete_exclusion(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = "name3373707" - - client.delete_exclusion(name) - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_exclusion_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - name = "name3373707" - - with pytest.raises(CustomException): - client.delete_exclusion(name) - def test_get_cmek_settings(self): # Setup Expected Response name_2 = "name2-1052831874" diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index 8fae99670..9ece054d7 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -63,43 +63,6 @@ class CustomException(Exception): class TestLoggingServiceV2Client(object): - def test_write_log_entries(self): - # Setup Expected Response - expected_response = {} - expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.LoggingServiceV2Client() - - # Setup Request - entries = [] - - response = client.write_log_entries(entries) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_write_log_entries_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.LoggingServiceV2Client() - - # Setup request - entries = [] - - with pytest.raises(CustomException): - client.write_log_entries(entries) - def test_delete_log(self): channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -176,6 +139,43 @@ def test_list_log_entries_exception(self): with pytest.raises(CustomException): list(paged_list_response) + def test_write_log_entries(self): + # Setup Expected Response + expected_response = {} + expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.LoggingServiceV2Client() + + # Setup Request + entries = [] + + response = client.write_log_entries(entries) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_write_log_entries_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.LoggingServiceV2Client() + + # Setup request + entries = [] + + with pytest.raises(CustomException): + client.write_log_entries(entries) + def test_list_monitored_resource_descriptors(self): # Setup Expected Response next_page_token = "" diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 0ad66770c..6baefad82 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -61,15 +61,19 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): - def test_list_log_metrics(self): + def test_update_log_metric(self): # Setup Expected Response - next_page_token = "" - metrics_element = {} - metrics = [metrics_element] - expected_response = {"next_page_token": next_page_token, "metrics": metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse( - **expected_response - ) + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -79,20 +83,21 @@ def test_list_log_metrics(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - - paged_list_response = client.list_log_metrics(parent) - resources = list(paged_list_response) - assert len(resources) == 1 + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric = {} - assert expected_response.metrics[0] == resources[0] + response = client.update_log_metric(metric_name, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) + expected_request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_metrics_exception(self): + def test_update_log_metric_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: @@ -100,28 +105,14 @@ def test_list_log_metrics_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric = {} - paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - list(paged_list_response) - - def test_get_log_metric(self): - # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + client.update_log_metric(metric_name, metric) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_log_metric(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -130,17 +121,16 @@ def test_get_log_metric(self): # Setup Request metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - response = client.get_log_metric(metric_name) - assert expected_response == response + client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest( + expected_request = logging_metrics_pb2.DeleteLogMetricRequest( metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_log_metric_exception(self): + def test_delete_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -152,21 +142,17 @@ def test_get_log_metric_exception(self): metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.get_log_metric(metric_name) + client.delete_log_metric(metric_name) - def test_create_log_metric(self): + def test_list_log_metrics(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + next_page_token = "" + metrics_element = {} + metrics = [metrics_element] + expected_response = {"next_page_token": next_page_token, "metrics": metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse( + **expected_response + ) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -177,20 +163,19 @@ def test_create_log_metric(self): # Setup Request parent = client.project_path("[PROJECT]") - metric = {} - response = client.create_log_metric(parent, metric) - assert expected_response == response + paged_list_response = client.list_log_metrics(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.metrics[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, metric=metric - ) + expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_log_metric_exception(self): - # Mock the API response + def test_list_log_metrics_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -199,12 +184,12 @@ def test_create_log_metric_exception(self): # Setup request parent = client.project_path("[PROJECT]") - metric = {} + paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - client.create_log_metric(parent, metric) + list(paged_list_response) - def test_update_log_metric(self): + def test_get_log_metric(self): # Setup Expected Response name = "name3373707" description = "description-1724546052" @@ -227,19 +212,18 @@ def test_update_log_metric(self): # Setup Request metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} - response = client.update_log_metric(metric_name, metric) + response = client.get_log_metric(metric_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, metric=metric + expected_request = logging_metrics_pb2.GetLogMetricRequest( + metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_log_metric_exception(self): + def test_get_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -249,31 +233,46 @@ def test_update_log_metric_exception(self): # Setup request metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} with pytest.raises(CustomException): - client.update_log_metric(metric_name, metric) + client.get_log_metric(metric_name) - def test_delete_log_metric(self): - channel = ChannelStub() + def test_create_log_metric(self): + # Setup Expected Response + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + parent = client.project_path("[PROJECT]") + metric = {} - client.delete_log_metric(metric_name) + response = client.create_log_metric(parent, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest( - metric_name=metric_name + expected_request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, metric=metric ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_log_metric_exception(self): + def test_create_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -282,7 +281,8 @@ def test_delete_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + parent = client.project_path("[PROJECT]") + metric = {} with pytest.raises(CustomException): - client.delete_log_metric(metric_name) + client.create_log_metric(parent, metric) From 72d84b885961b71d19a81b30492ddf4802e43e3b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:03:18 -0700 Subject: [PATCH 05/39] chore(python): remove one remaining extra bash line To avoid generating bogus PRs Co-authored-by: Jeffrey Rennie Source-Author: Carlos de la Guardia Source-Date: Tue May 19 11:57:19 2020 -0500 Source-Repo: googleapis/synthtool Source-Sha: d2364eb80b840a36136c8ce12f1c6efabcc9600e Source-Link: https://github.com/googleapis/synthtool/commit/d2364eb80b840a36136c8ce12f1c6efabcc9600e --- .kokoro/release.sh | 2 -- synth.metadata | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.kokoro/release.sh b/.kokoro/release.sh index c9b0928ba..2ef944a00 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/synth.metadata b/synth.metadata index 72c4346bc..6cd3e6405 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5a90d467aa65e7f038f87585e8fbb45d74475e7c", - "internalRef": "312088359" + "sha": "cd3ce2651c3921670217e664303976cdf76e9fe2", + "internalRef": "312123588" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7136daa5687f2a5bdcbba2cb25457f56fdf85d59" + "sha": "d2364eb80b840a36136c8ce12f1c6efabcc9600e" } } ], From 66e9e656ba71dda15ac464a097d461d39ca41276 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:04:02 -0700 Subject: [PATCH 06/39] Upgrade protoc-docs-plugin version to 0.7.0 to fix unstable docstrings. PiperOrigin-RevId: 312689208 Source-Author: Google APIs Source-Date: Thu May 21 10:00:47 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: dec3204175104cef49bf21d685d5517caaf0058f Source-Link: https://github.com/googleapis/googleapis/commit/dec3204175104cef49bf21d685d5517caaf0058f --- .../cloud/logging_v2/proto/log_entry_pb2.py | 14 +-- .../logging_v2/proto/logging_config_pb2.py | 101 +++++------------- .../logging_v2/proto/logging_metrics_pb2.py | 20 +--- google/cloud/logging_v2/proto/logging_pb2.py | 22 +--- synth.metadata | 6 +- 5 files changed, 35 insertions(+), 128 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index d65408c48..e2ce1ea41 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -657,8 +657,6 @@ "DESCRIPTOR": _LOGENTRY, "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", "__doc__": """An individual entry in a log. - - Attributes: log_name: Required. The resource name of the log to which this log entry @@ -778,10 +776,8 @@ { "DESCRIPTOR": _LOGENTRYOPERATION, "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about a potentially long-running - operation with which a log entry is associated. - - + "__doc__": """Additional information about a potentially long-running operation with + which a log entry is associated. Attributes: id: Optional. An arbitrary operation identifier. Log entries with @@ -810,10 +806,8 @@ { "DESCRIPTOR": _LOGENTRYSOURCELOCATION, "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about the source code location that produced the - log entry. - - + "__doc__": """Additional information about the source code location that produced + the log entry. Attributes: file: Optional. Source file name. Depending on the runtime diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 541854391..42981037b 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -1888,8 +1888,6 @@ "DESCRIPTOR": _LOGBUCKET, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Describes a repository of logs (Beta). - - Attributes: name: The resource name of the bucket. For example: “projects/my- @@ -1925,13 +1923,11 @@ { "DESCRIPTOR": _LOGSINK, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a sink used to export log entries to one of the - following destinations in any project: a Cloud Storage bucket, a - BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which - log entries are exported. The sink must be created within a project, + "__doc__": """Describes a sink used to export log entries to one of the following + destinations in any project: a Cloud Storage bucket, a BigQuery + dataset, or a Cloud Pub/Sub topic. A logs filter controls which log + entries are exported. The sink must be created within a project, organization, billing account, or folder. - - Attributes: name: Required. The client-assigned sink identifier, unique within @@ -2021,10 +2017,8 @@ { "DESCRIPTOR": _BIGQUERYOPTIONS, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Options that change functionality of a sink exporting data - to BigQuery. - - + "__doc__": """Options that change functionality of a sink exporting data to + BigQuery. Attributes: use_partitioned_tables: Optional. Whether to use `BigQuery’s partition tables @@ -2057,8 +2051,6 @@ "DESCRIPTOR": _LISTBUCKETSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListBuckets`` (Beta). - - Attributes: parent: Required. The parent resource whose buckets are to be listed: @@ -2093,8 +2085,6 @@ "DESCRIPTOR": _LISTBUCKETSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The response from ListBuckets (Beta). - - Attributes: buckets: A list of buckets. @@ -2116,8 +2106,6 @@ "DESCRIPTOR": _UPDATEBUCKETREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateBucket`` (Beta). - - Attributes: name: Required. The full resource name of the bucket to update. :: @@ -2153,8 +2141,6 @@ "DESCRIPTOR": _GETBUCKETREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetBucket`` (Beta). - - Attributes: name: Required. The resource name of the bucket: :: "projects/[ @@ -2178,8 +2164,6 @@ "DESCRIPTOR": _LISTSINKSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListSinks``. - - Attributes: parent: Required. The parent resource whose sinks are to be listed: @@ -2211,8 +2195,6 @@ "DESCRIPTOR": _LISTSINKSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Result returned from ``ListSinks``. - - Attributes: sinks: A list of sinks. @@ -2234,8 +2216,6 @@ "DESCRIPTOR": _GETSINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetSink``. - - Attributes: sink_name: Required. The resource name of the sink: :: @@ -2257,8 +2237,6 @@ "DESCRIPTOR": _CREATESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``CreateSink``. - - Attributes: parent: Required. The resource in which to create the sink: :: @@ -2295,8 +2273,6 @@ "DESCRIPTOR": _UPDATESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateSink``. - - Attributes: sink_name: Required. The full resource name of the sink to update, @@ -2348,8 +2324,6 @@ "DESCRIPTOR": _DELETESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``DeleteSink``. - - Attributes: sink_name: Required. The full resource name of the sink to delete, @@ -2371,14 +2345,13 @@ { "DESCRIPTOR": _LOGEXCLUSION, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Specifies a set of log entries that are not to be stored - in Logging. If your GCP resource receives a large volume of logs, you - can use exclusions to reduce your chargeable logs. Exclusions are - processed after log sinks, so you can export log entries before they are - excluded. Note that organization-level and folder-level exclusions don’t - apply to child resources, and that you can’t exclude audit log entries. - - + "__doc__": """Specifies a set of log entries that are not to be stored in Logging. + If your GCP resource receives a large volume of logs, you can use + exclusions to reduce your chargeable logs. Exclusions are processed + after log sinks, so you can export log entries before they are + excluded. Note that organization-level and folder-level exclusions + don’t apply to child resources, and that you can’t exclude audit log + entries. Attributes: name: Required. A client-assigned identifier, such as ``"load- @@ -2422,8 +2395,6 @@ "DESCRIPTOR": _LISTEXCLUSIONSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListExclusions``. - - Attributes: parent: Required. The parent resource whose exclusions are to be @@ -2455,8 +2426,6 @@ "DESCRIPTOR": _LISTEXCLUSIONSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Result returned from ``ListExclusions``. - - Attributes: exclusions: A list of exclusions. @@ -2478,8 +2447,6 @@ "DESCRIPTOR": _GETEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetExclusion``. - - Attributes: name: Required. The resource name of an existing exclusion: :: @@ -2502,8 +2469,6 @@ "DESCRIPTOR": _CREATEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``CreateExclusion``. - - Attributes: parent: Required. The parent resource in which to create the @@ -2529,8 +2494,6 @@ "DESCRIPTOR": _UPDATEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateExclusion``. - - Attributes: name: Required. The resource name of the exclusion to update: :: @@ -2565,8 +2528,6 @@ "DESCRIPTOR": _DELETEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``DeleteExclusion``. - - Attributes: name: Required. The resource name of an existing exclusion to @@ -2591,12 +2552,9 @@ "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. - - See `Enabling CMEK for Logs - Router `__ + See `Enabling CMEK for Logs Router + `__ for more information. - - Attributes: name: Required. The resource for which to retrieve CMEK settings. @@ -2620,14 +2578,10 @@ { "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to - [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - - See `Enabling CMEK for Logs - Router `__ + "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService + V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router + `__ for more information. - - Attributes: name: Required. The resource name for the CMEK settings to update. @@ -2663,19 +2617,14 @@ { "DESCRIPTOR": _CMEKSETTINGS, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes the customer-managed encryption key (CMEK) - settings associated with a project, folder, organization, billing - account, or flexible resource. - - Note: CMEK for the Logs Router can currently only be configured for GCP - organizations. Once configured, it applies to all projects and folders - in the GCP organization. - - See `Enabling CMEK for Logs - Router `__ + "__doc__": """Describes the customer-managed encryption key (CMEK) settings + associated with a project, folder, organization, billing account, or + flexible resource. Note: CMEK for the Logs Router can currently only + be configured for GCP organizations. Once configured, it applies to + all projects and folders in the GCP organization. See `Enabling CMEK + for Logs Router + `__ for more information. - - Attributes: name: Output only. The resource name of the CMEK settings. diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index ef6f71c28..704d9c4b8 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -695,16 +695,12 @@ ), "DESCRIPTOR": _LOGMETRIC, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Describes a logs-based metric. The value of the metric is - the number of log entries that match a logs filter in a given time - interval. - + "__doc__": """Describes a logs-based metric. The value of the metric is the number + of log entries that match a logs filter in a given time interval. Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. - - Attributes: name: Required. The client-assigned metric identifier. Examples: @@ -811,8 +807,6 @@ "DESCRIPTOR": _LISTLOGMETRICSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to ListLogMetrics. - - Attributes: parent: Required. The name of the project containing the metrics: :: @@ -841,8 +835,6 @@ "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """Result returned from ListLogMetrics. - - Attributes: metrics: A list of logs-based metrics. @@ -864,8 +856,6 @@ "DESCRIPTOR": _GETLOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to GetLogMetric. - - Attributes: metric_name: Required. The resource name of the desired metric: :: @@ -883,8 +873,6 @@ "DESCRIPTOR": _CREATELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to CreateLogMetric. - - Attributes: parent: Required. The resource name of the project in which to create @@ -906,8 +894,6 @@ "DESCRIPTOR": _UPDATELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to UpdateLogMetric. - - Attributes: metric_name: Required. The resource name of the metric to update: :: @@ -930,8 +916,6 @@ "DESCRIPTOR": _DELETELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to DeleteLogMetric. - - Attributes: metric_name: Required. The resource name of the metric to delete: :: diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 433947694..ed5147c1a 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -865,8 +865,6 @@ "DESCRIPTOR": _DELETELOGREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to DeleteLog. - - Attributes: log_name: Required. The resource name of the log to delete: :: @@ -900,8 +898,6 @@ "DESCRIPTOR": _WRITELOGENTRIESREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to WriteLogEntries. - - Attributes: log_name: Optional. A default log resource name that is assigned to all @@ -981,9 +977,7 @@ { "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from WriteLogEntries. - - """, + "__doc__": """Result returned from WriteLogEntries.""", # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) }, ) @@ -1005,8 +999,6 @@ "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Error details for WriteLogEntries with partial success. - - Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, @@ -1028,8 +1020,6 @@ "DESCRIPTOR": _LISTLOGENTRIESREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ``ListLogEntries``. - - Attributes: resource_names: Required. Names of one or more parent resources from which to @@ -1081,8 +1071,6 @@ "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ``ListLogEntries``. - - Attributes: entries: A list of log entries. If ``entries`` is empty, @@ -1114,8 +1102,6 @@ "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ListMonitoredResourceDescriptors - - Attributes: page_size: Optional. The maximum number of results to return from this @@ -1141,8 +1127,6 @@ "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ListMonitoredResourceDescriptors. - - Attributes: resource_descriptors: A list of resource descriptors. @@ -1164,8 +1148,6 @@ "DESCRIPTOR": _LISTLOGSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ListLogs. - - Attributes: parent: Required. The resource name that owns the logs: :: @@ -1196,8 +1178,6 @@ "DESCRIPTOR": _LISTLOGSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ListLogs. - - Attributes: log_names: A list of log names. For example, ``"projects/my- diff --git a/synth.metadata b/synth.metadata index 6cd3e6405..8a81dd124 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cd3ce2651c3921670217e664303976cdf76e9fe2", - "internalRef": "312123588" + "sha": "dec3204175104cef49bf21d685d5517caaf0058f", + "internalRef": "312689208" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d2364eb80b840a36136c8ce12f1c6efabcc9600e" + "sha": "7ee92820e64c0aea379781b82399d6b3f3c8655f" } } ], From 75e3bd59c51ce34fd1a51f877d8bb9a0737b92e7 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:10:58 -0700 Subject: [PATCH 07/39] bazel: update protobuf, rules_go, gazelle, and gapic-generator-go versions - protobuf v3.12.1 - rules_go v0.23.0 - gazelle v0.21.0 - gapic-generator-go v0.14.1 PiperOrigin-RevId: 313460921 Source-Author: Google APIs Source-Date: Wed May 27 14:10:16 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c4e37010d74071851ff24121f522e802231ac86e Source-Link: https://github.com/googleapis/googleapis/commit/c4e37010d74071851ff24121f522e802231ac86e --- .../cloud/logging_v2/proto/log_entry_pb2.py | 31 ++++ .../logging_v2/proto/logging_config_pb2.py | 134 +++++++++++++++++- .../logging_v2/proto/logging_metrics_pb2.py | 53 ++++++- google/cloud/logging_v2/proto/logging_pb2.py | 47 ++++++ synth.metadata | 6 +- 5 files changed, 263 insertions(+), 8 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index e2ce1ea41..726272de1 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -35,6 +35,7 @@ package="google.logging.v2", syntax="proto3", serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -57,6 +58,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -75,6 +77,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -93,6 +96,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -113,6 +117,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -131,6 +136,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -149,6 +155,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="proto_payload", @@ -167,6 +174,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_payload", @@ -185,6 +193,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="json_payload", @@ -203,6 +212,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="timestamp", @@ -221,6 +231,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="receive_timestamp", @@ -239,6 +250,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="severity", @@ -257,6 +269,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="insert_id", @@ -275,6 +288,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="http_request", @@ -293,6 +307,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -311,6 +326,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="operation", @@ -329,6 +345,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace", @@ -347,6 +364,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="span_id", @@ -365,6 +383,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace_sampled", @@ -383,6 +402,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_location", @@ -401,6 +421,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -418,6 +439,7 @@ full_name="google.logging.v2.LogEntry.payload", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ), ], @@ -432,6 +454,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="id", @@ -450,6 +473,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="producer", @@ -468,6 +492,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="first", @@ -486,6 +511,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="last", @@ -504,6 +530,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -525,6 +552,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="file", @@ -543,6 +571,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="line", @@ -561,6 +590,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="function", @@ -579,6 +609,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 42981037b..6a5bc8c62 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -28,6 +28,7 @@ package="google.logging.v2", syntax="proto3", serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xbc\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -46,6 +47,7 @@ full_name="google.logging.v2.LifecycleState", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="LIFECYCLE_STATE_UNSPECIFIED", @@ -53,9 +55,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="ACTIVE", index=1, number=1, serialized_options=None, type=None + name="ACTIVE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="DELETE_REQUESTED", @@ -63,6 +71,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -83,6 +92,7 @@ full_name="google.logging.v2.LogSink.VersionFormat", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="VERSION_FORMAT_UNSPECIFIED", @@ -90,12 +100,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V2", index=1, number=1, serialized_options=None, type=None + name="V2", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V1", index=2, number=2, serialized_options=None, type=None + name="V1", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -112,6 +133,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -130,6 +152,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -148,6 +171,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -166,6 +190,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -184,6 +209,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="retention_days", @@ -202,6 +228,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="lifecycle_state", @@ -220,6 +247,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -241,6 +269,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -259,6 +288,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="destination", @@ -277,6 +307,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\003\n\001*", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -295,6 +326,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -313,6 +345,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -331,6 +364,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_version_format", @@ -349,6 +383,7 @@ extension_scope=None, serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="writer_identity", @@ -367,6 +402,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="include_children", @@ -385,6 +421,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bigquery_options", @@ -403,6 +440,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -421,6 +459,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -439,6 +478,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -456,6 +496,7 @@ full_name="google.logging.v2.LogSink.options", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ), ], @@ -470,6 +511,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="use_partitioned_tables", @@ -488,6 +530,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uses_timestamp_column_partitioning", @@ -506,6 +549,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -527,6 +571,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -545,6 +590,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -563,6 +609,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -581,6 +628,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -602,6 +650,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="buckets", @@ -620,6 +669,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -638,6 +688,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -659,6 +710,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -677,6 +729,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bucket", @@ -695,6 +748,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -713,6 +767,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -734,6 +789,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -752,6 +808,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -773,6 +830,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -791,6 +849,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -809,6 +868,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -827,6 +887,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -848,6 +909,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sinks", @@ -866,6 +928,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -884,6 +947,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -905,6 +969,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -923,6 +988,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -944,6 +1010,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -962,6 +1029,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -980,6 +1048,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -998,6 +1067,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1019,6 +1089,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1037,6 +1108,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -1055,6 +1127,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -1073,6 +1146,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1091,6 +1165,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1112,6 +1187,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1130,6 +1206,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1151,6 +1228,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1169,6 +1247,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1187,6 +1266,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -1205,6 +1285,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -1223,6 +1304,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -1241,6 +1323,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -1259,6 +1342,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1280,6 +1364,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1298,6 +1383,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1316,6 +1402,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1334,6 +1421,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1355,6 +1443,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="exclusions", @@ -1373,6 +1462,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1391,6 +1481,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1412,6 +1503,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1430,6 +1522,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1451,6 +1544,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1469,6 +1563,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1487,6 +1582,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1508,6 +1604,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1526,6 +1623,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1544,6 +1642,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1562,6 +1661,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1583,6 +1683,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1601,6 +1702,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1622,6 +1724,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1640,6 +1743,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/CmekSettings", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1661,6 +1765,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1679,6 +1784,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="cmek_settings", @@ -1697,6 +1803,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1715,6 +1822,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1736,6 +1844,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1754,6 +1863,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kms_key_name", @@ -1772,6 +1882,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="service_account_id", @@ -1790,6 +1901,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2734,6 +2846,7 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", + create_key=_descriptor._internal_create_key, serialized_start=4745, serialized_end=9784, methods=[ @@ -2745,6 +2858,7 @@ input_type=_LISTBUCKETSREQUEST, output_type=_LISTBUCKETSRESPONSE, serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetBucket", @@ -2754,6 +2868,7 @@ input_type=_GETBUCKETREQUEST, output_type=_LOGBUCKET, serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateBucket", @@ -2763,6 +2878,7 @@ input_type=_UPDATEBUCKETREQUEST, output_type=_LOGBUCKET, serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListSinks", @@ -2772,6 +2888,7 @@ input_type=_LISTSINKSREQUEST, output_type=_LISTSINKSRESPONSE, serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSink", @@ -2781,6 +2898,7 @@ input_type=_GETSINKREQUEST, output_type=_LOGSINK, serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateSink", @@ -2790,6 +2908,7 @@ input_type=_CREATESINKREQUEST, output_type=_LOGSINK, serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateSink", @@ -2799,6 +2918,7 @@ input_type=_UPDATESINKREQUEST, output_type=_LOGSINK, serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteSink", @@ -2808,6 +2928,7 @@ input_type=_DELETESINKREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListExclusions", @@ -2817,6 +2938,7 @@ input_type=_LISTEXCLUSIONSREQUEST, output_type=_LISTEXCLUSIONSRESPONSE, serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetExclusion", @@ -2826,6 +2948,7 @@ input_type=_GETEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateExclusion", @@ -2835,6 +2958,7 @@ input_type=_CREATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateExclusion", @@ -2844,6 +2968,7 @@ input_type=_UPDATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteExclusion", @@ -2853,6 +2978,7 @@ input_type=_DELETEEXCLUSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetCmekSettings", @@ -2862,6 +2988,7 @@ input_type=_GETCMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateCmekSettings", @@ -2871,6 +2998,7 @@ input_type=_UPDATECMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index 704d9c4b8..a57f0767a 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -29,6 +29,7 @@ package="google.logging.v2", syntax="proto3", serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -50,12 +51,23 @@ full_name="google.logging.v2.LogMetric.ApiVersion", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="V2", index=0, number=0, serialized_options=None, type=None + name="V2", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V1", index=1, number=1, serialized_options=None, type=None + name="V1", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -72,6 +84,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -90,6 +103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -108,6 +122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -128,6 +143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -146,6 +162,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -164,6 +181,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -182,6 +200,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric_descriptor", @@ -200,6 +219,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value_extractor", @@ -218,6 +238,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_extractors", @@ -236,6 +257,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bucket_options", @@ -254,6 +276,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -272,6 +295,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -290,6 +314,7 @@ extension_scope=None, serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -308,6 +333,7 @@ extension_scope=None, serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -333,6 +359,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -351,6 +378,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -369,6 +397,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -387,6 +416,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -408,6 +438,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metrics", @@ -426,6 +457,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -444,6 +476,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -465,6 +498,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -483,6 +517,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -504,6 +539,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -522,6 +558,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -540,6 +577,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -561,6 +599,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -579,6 +618,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -597,6 +637,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -618,6 +659,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -636,6 +678,7 @@ extension_scope=None, serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -956,6 +999,7 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + create_key=_descriptor._internal_create_key, serialized_start=1723, serialized_end=2793, methods=[ @@ -967,6 +1011,7 @@ input_type=_LISTLOGMETRICSREQUEST, output_type=_LISTLOGMETRICSRESPONSE, serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetLogMetric", @@ -976,6 +1021,7 @@ input_type=_GETLOGMETRICREQUEST, output_type=_LOGMETRIC, serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateLogMetric", @@ -985,6 +1031,7 @@ input_type=_CREATELOGMETRICREQUEST, output_type=_LOGMETRIC, serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateLogMetric", @@ -994,6 +1041,7 @@ input_type=_UPDATELOGMETRICREQUEST, output_type=_LOGMETRIC, serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteLogMetric", @@ -1003,6 +1051,7 @@ input_type=_DELETELOGMETRICREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index ed5147c1a..b4db5a5cc 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -36,6 +36,7 @@ package="google.logging.v2", syntax="proto3", serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + create_key=_descriptor._internal_create_key, serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -59,6 +60,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -77,6 +79,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -98,6 +101,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -116,6 +120,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -134,6 +139,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -154,6 +160,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -172,6 +179,7 @@ extension_scope=None, serialized_options=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -190,6 +198,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -208,6 +217,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entries", @@ -226,6 +236,7 @@ extension_scope=None, serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_success", @@ -244,6 +255,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="dry_run", @@ -262,6 +274,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -285,6 +298,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -305,6 +319,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -323,6 +338,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -341,6 +357,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -361,6 +378,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_entry_errors", @@ -379,6 +397,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -402,6 +421,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="resource_names", @@ -420,6 +440,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -438,6 +459,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="order_by", @@ -456,6 +478,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -474,6 +497,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -492,6 +516,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -513,6 +538,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entries", @@ -531,6 +557,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -549,6 +576,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -570,6 +598,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="page_size", @@ -588,6 +617,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -606,6 +636,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -627,6 +658,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="resource_descriptors", @@ -645,6 +677,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -663,6 +696,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -684,6 +718,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -702,6 +737,7 @@ extension_scope=None, serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -720,6 +756,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -738,6 +775,7 @@ extension_scope=None, serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -759,6 +797,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_names", @@ -777,6 +816,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -795,6 +835,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1222,6 +1263,7 @@ file=DESCRIPTOR, index=0, serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + create_key=_descriptor._internal_create_key, serialized_start=1795, serialized_end=3168, methods=[ @@ -1233,6 +1275,7 @@ input_type=_DELETELOGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="WriteLogEntries", @@ -1242,6 +1285,7 @@ input_type=_WRITELOGENTRIESREQUEST, output_type=_WRITELOGENTRIESRESPONSE, serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListLogEntries", @@ -1251,6 +1295,7 @@ input_type=_LISTLOGENTRIESREQUEST, output_type=_LISTLOGENTRIESRESPONSE, serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1260,6 +1305,7 @@ input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListLogs", @@ -1269,6 +1315,7 @@ input_type=_LISTLOGSREQUEST, output_type=_LISTLOGSRESPONSE, serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/synth.metadata b/synth.metadata index 8a81dd124..a8d28387b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dec3204175104cef49bf21d685d5517caaf0058f", - "internalRef": "312689208" + "sha": "c4e37010d74071851ff24121f522e802231ac86e", + "internalRef": "313460921" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7ee92820e64c0aea379781b82399d6b3f3c8655f" + "sha": "470789cee75ce93c41348ad6aa4c49363a80399b" } } ], From 753984ecd6339cdb9bac27e22d84a2083f0e021e Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:14:04 -0700 Subject: [PATCH 08/39] docs: update python docs template * docs: update python docs template * sphinx change Source-Author: kolea2 <45548808+kolea2@users.noreply.github.com> Source-Date: Wed May 27 20:44:34 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 71b8a272549c06b5768d00fa48d3ae990e871bec Source-Link: https://github.com/googleapis/synthtool/commit/71b8a272549c06b5768d00fa48d3ae990e871bec --- docs/conf.py | 5 +---- synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7a03936bb..106e709e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,7 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "recommonmark", ] # autodoc/autosummary flags @@ -49,10 +50,6 @@ # 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'] diff --git a/synth.metadata b/synth.metadata index a8d28387b..ab6f091f6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "eafa840ceec23b44a5c21670288107c661252711", + "internalRef": "313488995" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "470789cee75ce93c41348ad6aa4c49363a80399b" + "sha": "71b8a272549c06b5768d00fa48d3ae990e871bec" } } ], From 35abcfa34add342f76058367de323e855c417097 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:14:31 -0700 Subject: [PATCH 09/39] feat: add templates for python samples projects These templates will be used for templates in python-docs-samples and in Python client libraries. The README generation code is a modified version of https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/scripts/readme-gen. Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Thu May 28 14:39:58 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: ffe10407ee2f261c799fb0d01bf32a8abc67ed1e Source-Link: https://github.com/googleapis/synthtool/commit/ffe10407ee2f261c799fb0d01bf32a8abc67ed1e --- .kokoro/test-samples.sh | 8 +- scripts/readme-gen/readme_gen.py | 66 ++++++++++++++ scripts/readme-gen/templates/README.tmpl.rst | 87 +++++++++++++++++++ scripts/readme-gen/templates/auth.tmpl.rst | 9 ++ .../templates/auth_api_key.tmpl.rst | 14 +++ .../templates/install_deps.tmpl.rst | 29 +++++++ .../templates/install_portaudio.tmpl.rst | 35 ++++++++ synth.metadata | 27 +++++- 8 files changed, 267 insertions(+), 8 deletions(-) create mode 100644 scripts/readme-gen/readme_gen.py create mode 100644 scripts/readme-gen/templates/README.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth_api_key.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_deps.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_portaudio.tmpl.rst diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index ba97b53d5..fee06244c 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,12 +28,6 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi -# Exit early if samples directory doesn't exist -if [ ! -d "./samples" ]; then - echo "No tests run. `./samples` not found" - exit 0 -fi - # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -107,4 +101,4 @@ cd "$ROOT" # Workaround for Kokoro permissions issue: delete secrets rm testing/{test-env.sh,client-secrets.json,service-account.json} -exit "$RTN" +exit "$RTN" \ 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 000000000..d309d6e97 --- /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 000000000..4fd239765 --- /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 000000000..1446b94a5 --- /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 000000000..11957ce27 --- /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 000000000..a0406dba8 --- /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 000000000..5ea33d18c --- /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 ab6f091f6..7038cde22 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "71b8a272549c06b5768d00fa48d3ae990e871bec" + "sha": "ffe10407ee2f261c799fb0d01bf32a8abc67ed1e" } } ], @@ -55,6 +55,23 @@ ".kokoro/release.sh", ".kokoro/release/common.cfg", ".kokoro/release/release.cfg", + ".kokoro/samples/lint/common.cfg", + ".kokoro/samples/lint/continuous.cfg", + ".kokoro/samples/lint/periodic.cfg", + ".kokoro/samples/lint/presubmit.cfg", + ".kokoro/samples/python3.6/common.cfg", + ".kokoro/samples/python3.6/continuous.cfg", + ".kokoro/samples/python3.6/periodic.cfg", + ".kokoro/samples/python3.6/presubmit.cfg", + ".kokoro/samples/python3.7/common.cfg", + ".kokoro/samples/python3.7/continuous.cfg", + ".kokoro/samples/python3.7/periodic.cfg", + ".kokoro/samples/python3.7/presubmit.cfg", + ".kokoro/samples/python3.8/common.cfg", + ".kokoro/samples/python3.8/continuous.cfg", + ".kokoro/samples/python3.8/periodic.cfg", + ".kokoro/samples/python3.8/presubmit.cfg", + ".kokoro/test-samples.sh", ".kokoro/trampoline.sh", "CODE_OF_CONDUCT.md", "CONTRIBUTING.rst", @@ -92,7 +109,15 @@ "google/cloud/logging_v2/proto/logging_pb2.py", "google/cloud/logging_v2/proto/logging_pb2_grpc.py", "renovate.json", + "scripts/decrypt-secrets.sh", + "scripts/readme-gen/readme_gen.py", + "scripts/readme-gen/templates/README.tmpl.rst", + "scripts/readme-gen/templates/auth.tmpl.rst", + "scripts/readme-gen/templates/auth_api_key.tmpl.rst", + "scripts/readme-gen/templates/install_deps.tmpl.rst", + "scripts/readme-gen/templates/install_portaudio.tmpl.rst", "setup.cfg", + "testing/.gitignore", "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" From 0b4302e4883b04787f09e30e4574962f04f85ca4 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:15:11 -0700 Subject: [PATCH 10/39] chore: update default ignores for Python libraries Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Thu May 28 14:43:37 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: e99975b6b49827b8720f0a885e218dbdb67849ca Source-Link: https://github.com/googleapis/synthtool/commit/e99975b6b49827b8720f0a885e218dbdb67849ca --- .flake8 | 2 ++ .gitignore | 2 ++ MANIFEST.in | 3 +++ synth.metadata | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 20fe9bda2..ed9316381 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 3fb06e09c..b87e1ed58 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/MANIFEST.in b/MANIFEST.in index 68855abc3..e9e29d120 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/synth.metadata b/synth.metadata index 7038cde22..71a343496 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ffe10407ee2f261c799fb0d01bf32a8abc67ed1e" + "sha": "e99975b6b49827b8720f0a885e218dbdb67849ca" } } ], From b57899445c18380b9a27ab7a0f90b0d0c281524a Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:17:24 -0700 Subject: [PATCH 11/39] Regular update of Google API service config with clarification of documentations. BREAKING CHANGE: `features` field is no longer used. It has been removed from the API runtime for awhile. PiperOrigin-RevId: 315548189 Source-Author: Google APIs Source-Date: Tue Jun 9 13:27:00 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: ca1372c6d7bcb199638ebfdb40d2b2660bab7b88 Source-Link: https://github.com/googleapis/googleapis/commit/ca1372c6d7bcb199638ebfdb40d2b2660bab7b88 --- google/cloud/logging_v2/gapic/enums.py | 4 ++++ synth.metadata | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index 1c6690a4d..f31cc5da6 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -26,6 +26,8 @@ class LaunchStage(enum.IntEnum): Attributes: LAUNCH_STAGE_UNSPECIFIED (int): Do not use this default value. + UNIMPLEMENTED (int): The feature is not yet implemented. Users can not use it. + PRELAUNCH (int): Prelaunch features are hidden from users and are only visible internally. EARLY_ACCESS (int): Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may @@ -55,6 +57,8 @@ class LaunchStage(enum.IntEnum): """ LAUNCH_STAGE_UNSPECIFIED = 0 + UNIMPLEMENTED = 6 + PRELAUNCH = 7 EARLY_ACCESS = 1 ALPHA = 2 BETA = 3 diff --git a/synth.metadata b/synth.metadata index 71a343496..4a1408654 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "eafa840ceec23b44a5c21670288107c661252711", - "internalRef": "313488995" + "sha": "ca1372c6d7bcb199638ebfdb40d2b2660bab7b88", + "internalRef": "315548189" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e99975b6b49827b8720f0a885e218dbdb67849ca" + "sha": "88645a8f6e1b1c90fed625158960ffec565b023a" } } ], From de33ccf21fb7c985d0358ed5832c5c6bcf317856 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:20:33 -0700 Subject: [PATCH 12/39] chore: set Ruby namespace in proto options PiperOrigin-RevId: 316038172 Source-Author: Google APIs Source-Date: Thu Jun 11 21:09:51 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: e0558da52e48b9f1a4bd5104e6b5e219a48f1dec Source-Link: https://github.com/googleapis/googleapis/commit/e0558da52e48b9f1a4bd5104e6b5e219a48f1dec --- google/cloud/logging_v2/proto/log_entry.proto | 1 + google/cloud/logging_v2/proto/log_entry_pb2.py | 4 ++-- google/cloud/logging_v2/proto/logging.proto | 1 + google/cloud/logging_v2/proto/logging_config.proto | 1 + google/cloud/logging_v2/proto/logging_config_pb2.py | 4 ++-- google/cloud/logging_v2/proto/logging_metrics.proto | 1 + google/cloud/logging_v2/proto/logging_metrics_pb2.py | 4 ++-- google/cloud/logging_v2/proto/logging_pb2.py | 4 ++-- synth.metadata | 6 +++--- 9 files changed, 15 insertions(+), 11 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry.proto b/google/cloud/logging_v2/proto/log_entry.proto index 351f9e632..d2a172ec2 100644 --- a/google/cloud/logging_v2/proto/log_entry.proto +++ b/google/cloud/logging_v2/proto/log_entry.proto @@ -34,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // An individual entry in a log. // diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index 726272de1..c1ee2cd98 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -34,9 +34,9 @@ name="google/cloud/logging_v2/proto/log_entry.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', + serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, diff --git a/google/cloud/logging_v2/proto/logging.proto b/google/cloud/logging_v2/proto/logging.proto index 36a81dcc2..8a2a8a580 100644 --- a/google/cloud/logging_v2/proto/logging.proto +++ b/google/cloud/logging_v2/proto/logging.proto @@ -35,6 +35,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { diff --git a/google/cloud/logging_v2/proto/logging_config.proto b/google/cloud/logging_v2/proto/logging_config.proto index b7cb9c94a..5fd8d496d 100644 --- a/google/cloud/logging_v2/proto/logging_config.proto +++ b/google/cloud/logging_v2/proto/logging_config.proto @@ -32,6 +32,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; option (google.api.resource_definition) = { type: "logging.googleapis.com/OrganizationLocation" pattern: "organizations/{organization}/locations/{location}" diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 6a5bc8c62..18c9406b5 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -27,9 +27,9 @@ name="google/cloud/logging_v2/proto/logging_config.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", + serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xbc\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', + serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, diff --git a/google/cloud/logging_v2/proto/logging_metrics.proto b/google/cloud/logging_v2/proto/logging_metrics.proto index 518b6f691..e147578a7 100644 --- a/google/cloud/logging_v2/proto/logging_metrics.proto +++ b/google/cloud/logging_v2/proto/logging_metrics.proto @@ -34,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for configuring logs-based metrics. service MetricsServiceV2 { diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index a57f0767a..f94f57653 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -28,9 +28,9 @@ name="google/cloud/logging_v2/proto/logging_metrics.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', + serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_distribution__pb2.DESCRIPTOR, diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index b4db5a5cc..333df8708 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -35,9 +35,9 @@ name="google/cloud/logging_v2/proto/logging.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2", + serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3', + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, diff --git a/synth.metadata b/synth.metadata index 4a1408654..8a25b5485 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ca1372c6d7bcb199638ebfdb40d2b2660bab7b88", - "internalRef": "315548189" + "sha": "e0558da52e48b9f1a4bd5104e6b5e219a48f1dec", + "internalRef": "316038172" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "88645a8f6e1b1c90fed625158960ffec565b023a" + "sha": "a0ee80e0492a03b9b2bfefb5cca7eaf17bf10438" } } ], From a14d351dd49c93e5155b95689b041deaea3b4e61 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:21:21 -0700 Subject: [PATCH 13/39] fix: use protoc-docs-plugin 0.8.0 Fixes issue with missing newline before 'Attributes' in Python docstrings. PiperOrigin-RevId: 316182409 Source-Author: Google APIs Source-Date: Fri Jun 12 14:52:11 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 184661793fbe3b89f2b485c303e7466cef9d21a1 Source-Link: https://github.com/googleapis/googleapis/commit/184661793fbe3b89f2b485c303e7466cef9d21a1 --- .../cloud/logging_v2/proto/log_entry_pb2.py | 3 +++ .../logging_v2/proto/logging_config_pb2.py | 23 +++++++++++++++++++ .../logging_v2/proto/logging_metrics_pb2.py | 7 ++++++ google/cloud/logging_v2/proto/logging_pb2.py | 9 ++++++++ synth.metadata | 4 ++-- 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index c1ee2cd98..7465ecd3d 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -688,6 +688,7 @@ "DESCRIPTOR": _LOGENTRY, "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", "__doc__": """An individual entry in a log. + Attributes: log_name: Required. The resource name of the log to which this log entry @@ -809,6 +810,7 @@ "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", "__doc__": """Additional information about a potentially long-running operation with which a log entry is associated. + Attributes: id: Optional. An arbitrary operation identifier. Log entries with @@ -839,6 +841,7 @@ "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", "__doc__": """Additional information about the source code location that produced the log entry. + Attributes: file: Optional. Source file name. Depending on the runtime diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 18c9406b5..e86f66ff9 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -2000,6 +2000,7 @@ "DESCRIPTOR": _LOGBUCKET, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Describes a repository of logs (Beta). + Attributes: name: The resource name of the bucket. For example: “projects/my- @@ -2040,6 +2041,7 @@ dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder. + Attributes: name: Required. The client-assigned sink identifier, unique within @@ -2131,6 +2133,7 @@ "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Options that change functionality of a sink exporting data to BigQuery. + Attributes: use_partitioned_tables: Optional. Whether to use `BigQuery’s partition tables @@ -2163,6 +2166,7 @@ "DESCRIPTOR": _LISTBUCKETSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListBuckets`` (Beta). + Attributes: parent: Required. The parent resource whose buckets are to be listed: @@ -2197,6 +2201,7 @@ "DESCRIPTOR": _LISTBUCKETSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The response from ListBuckets (Beta). + Attributes: buckets: A list of buckets. @@ -2218,6 +2223,7 @@ "DESCRIPTOR": _UPDATEBUCKETREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateBucket`` (Beta). + Attributes: name: Required. The full resource name of the bucket to update. :: @@ -2253,6 +2259,7 @@ "DESCRIPTOR": _GETBUCKETREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetBucket`` (Beta). + Attributes: name: Required. The resource name of the bucket: :: "projects/[ @@ -2276,6 +2283,7 @@ "DESCRIPTOR": _LISTSINKSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListSinks``. + Attributes: parent: Required. The parent resource whose sinks are to be listed: @@ -2307,6 +2315,7 @@ "DESCRIPTOR": _LISTSINKSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Result returned from ``ListSinks``. + Attributes: sinks: A list of sinks. @@ -2328,6 +2337,7 @@ "DESCRIPTOR": _GETSINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetSink``. + Attributes: sink_name: Required. The resource name of the sink: :: @@ -2349,6 +2359,7 @@ "DESCRIPTOR": _CREATESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``CreateSink``. + Attributes: parent: Required. The resource in which to create the sink: :: @@ -2385,6 +2396,7 @@ "DESCRIPTOR": _UPDATESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateSink``. + Attributes: sink_name: Required. The full resource name of the sink to update, @@ -2436,6 +2448,7 @@ "DESCRIPTOR": _DELETESINKREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``DeleteSink``. + Attributes: sink_name: Required. The full resource name of the sink to delete, @@ -2464,6 +2477,7 @@ excluded. Note that organization-level and folder-level exclusions don’t apply to child resources, and that you can’t exclude audit log entries. + Attributes: name: Required. A client-assigned identifier, such as ``"load- @@ -2507,6 +2521,7 @@ "DESCRIPTOR": _LISTEXCLUSIONSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``ListExclusions``. + Attributes: parent: Required. The parent resource whose exclusions are to be @@ -2538,6 +2553,7 @@ "DESCRIPTOR": _LISTEXCLUSIONSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """Result returned from ``ListExclusions``. + Attributes: exclusions: A list of exclusions. @@ -2559,6 +2575,7 @@ "DESCRIPTOR": _GETEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``GetExclusion``. + Attributes: name: Required. The resource name of an existing exclusion: :: @@ -2581,6 +2598,7 @@ "DESCRIPTOR": _CREATEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``CreateExclusion``. + Attributes: parent: Required. The parent resource in which to create the @@ -2606,6 +2624,7 @@ "DESCRIPTOR": _UPDATEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``UpdateExclusion``. + Attributes: name: Required. The resource name of the exclusion to update: :: @@ -2640,6 +2659,7 @@ "DESCRIPTOR": _DELETEEXCLUSIONREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", "__doc__": """The parameters to ``DeleteExclusion``. + Attributes: name: Required. The resource name of an existing exclusion to @@ -2667,6 +2687,7 @@ See `Enabling CMEK for Logs Router `__ for more information. + Attributes: name: Required. The resource for which to retrieve CMEK settings. @@ -2694,6 +2715,7 @@ V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router `__ for more information. + Attributes: name: Required. The resource name for the CMEK settings to update. @@ -2737,6 +2759,7 @@ for Logs Router `__ for more information. + Attributes: name: Output only. The resource name of the CMEK settings. diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index f94f57653..c840bf186 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -744,6 +744,7 @@ create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. + Attributes: name: Required. The client-assigned metric identifier. Examples: @@ -850,6 +851,7 @@ "DESCRIPTOR": _LISTLOGMETRICSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to ListLogMetrics. + Attributes: parent: Required. The name of the project containing the metrics: :: @@ -878,6 +880,7 @@ "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """Result returned from ListLogMetrics. + Attributes: metrics: A list of logs-based metrics. @@ -899,6 +902,7 @@ "DESCRIPTOR": _GETLOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to GetLogMetric. + Attributes: metric_name: Required. The resource name of the desired metric: :: @@ -916,6 +920,7 @@ "DESCRIPTOR": _CREATELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to CreateLogMetric. + Attributes: parent: Required. The resource name of the project in which to create @@ -937,6 +942,7 @@ "DESCRIPTOR": _UPDATELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to UpdateLogMetric. + Attributes: metric_name: Required. The resource name of the metric to update: :: @@ -959,6 +965,7 @@ "DESCRIPTOR": _DELETELOGMETRICREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", "__doc__": """The parameters to DeleteLogMetric. + Attributes: metric_name: Required. The resource name of the metric to delete: :: diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 333df8708..b897be981 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -906,6 +906,7 @@ "DESCRIPTOR": _DELETELOGREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to DeleteLog. + Attributes: log_name: Required. The resource name of the log to delete: :: @@ -939,6 +940,7 @@ "DESCRIPTOR": _WRITELOGENTRIESREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to WriteLogEntries. + Attributes: log_name: Optional. A default log resource name that is assigned to all @@ -1040,6 +1042,7 @@ "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Error details for WriteLogEntries with partial success. + Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, @@ -1061,6 +1064,7 @@ "DESCRIPTOR": _LISTLOGENTRIESREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ``ListLogEntries``. + Attributes: resource_names: Required. Names of one or more parent resources from which to @@ -1112,6 +1116,7 @@ "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ``ListLogEntries``. + Attributes: entries: A list of log entries. If ``entries`` is empty, @@ -1143,6 +1148,7 @@ "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ListMonitoredResourceDescriptors + Attributes: page_size: Optional. The maximum number of results to return from this @@ -1168,6 +1174,7 @@ "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ListMonitoredResourceDescriptors. + Attributes: resource_descriptors: A list of resource descriptors. @@ -1189,6 +1196,7 @@ "DESCRIPTOR": _LISTLOGSREQUEST, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """The parameters to ListLogs. + Attributes: parent: Required. The resource name that owns the logs: :: @@ -1219,6 +1227,7 @@ "DESCRIPTOR": _LISTLOGSRESPONSE, "__module__": "google.cloud.logging_v2.proto.logging_pb2", "__doc__": """Result returned from ListLogs. + Attributes: log_names: A list of log names. For example, ``"projects/my- diff --git a/synth.metadata b/synth.metadata index 8a25b5485..c6f178a61 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e0558da52e48b9f1a4bd5104e6b5e219a48f1dec", - "internalRef": "316038172" + "sha": "184661793fbe3b89f2b485c303e7466cef9d21a1", + "internalRef": "316182409" } }, { From 261e8afea0e921a56596bfc546831de38bf04ecc Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:23:42 -0700 Subject: [PATCH 14/39] fix(python): change autodoc_default_flags to autodoc_default_options Source-Author: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Source-Date: Thu Jun 18 22:50:02 2020 +0530 Source-Repo: googleapis/synthtool Source-Sha: cd522c3b4dde821766d95c80ae5aeb43d7a41170 Source-Link: https://github.com/googleapis/synthtool/commit/cd522c3b4dde821766d95c80ae5aeb43d7a41170 --- docs/conf.py | 2 +- synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 106e709e5..850861fb7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -43,7 +43,7 @@ # autodoc/autosummary flags autoclass_content = "both" -autodoc_default_flags = ["members"] +autodoc_default_options = {"members": True} autosummary_generate = True diff --git a/synth.metadata b/synth.metadata index c6f178a61..6ee3b59b2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "184661793fbe3b89f2b485c303e7466cef9d21a1", - "internalRef": "316182409" + "sha": "fa4d2ecd0804eb92f27a65fe65ce2a554a361b93", + "internalRef": "317110673" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a0ee80e0492a03b9b2bfefb5cca7eaf17bf10438" + "sha": "cd522c3b4dde821766d95c80ae5aeb43d7a41170" } } ], From b1913a457d98ef926ccf0e3c3561cc3196f6dec8 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:31:23 -0700 Subject: [PATCH 15/39] chore: update grpc to v1.30.0 PiperOrigin-RevId: 317949519 Source-Author: Google APIs Source-Date: Tue Jun 23 15:22:22 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 7157f9552747421572cf1ab3aec1105c05ebd4f9 Source-Link: https://github.com/googleapis/googleapis/commit/7157f9552747421572cf1ab3aec1105c05ebd4f9 --- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 + .../proto/logging_config_pb2_grpc.py | 413 +++++++++++++++++- .../proto/logging_metrics_pb2_grpc.py | 143 +++++- .../logging_v2/proto/logging_pb2_grpc.py | 143 +++++- synth.metadata | 6 +- 5 files changed, 700 insertions(+), 6 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_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/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index ca49dc344..81178723b 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,7 +15,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.ListBuckets = channel.unary_unary( "/google.logging.v2.ConfigServiceV2/ListBuckets", @@ -316,3 +317,413 @@ def add_ConfigServiceV2Servicer_to_server(servicer, server): "google.logging.v2.ConfigServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ConfigServiceV2(object): + """Service for configuring sinks used to route log entries.""" + + @staticmethod + def ListBuckets( + 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.logging.v2.ConfigServiceV2/ListBuckets", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetBucket( + 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.logging.v2.ConfigServiceV2/GetBucket", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateBucket( + 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.logging.v2.ConfigServiceV2/UpdateBucket", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListSinks( + 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.logging.v2.ConfigServiceV2/ListSinks", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSink( + 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.logging.v2.ConfigServiceV2/GetSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateSink( + 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.logging.v2.ConfigServiceV2/CreateSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateSink( + 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.logging.v2.ConfigServiceV2/UpdateSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteSink( + 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.logging.v2.ConfigServiceV2/DeleteSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListExclusions( + 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.logging.v2.ConfigServiceV2/ListExclusions", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetExclusion( + 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.logging.v2.ConfigServiceV2/GetExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateExclusion( + 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.logging.v2.ConfigServiceV2/CreateExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateExclusion( + 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.logging.v2.ConfigServiceV2/UpdateExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteExclusion( + 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.logging.v2.ConfigServiceV2/DeleteExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetCmekSettings( + 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.logging.v2.ConfigServiceV2/GetCmekSettings", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateCmekSettings( + 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.logging.v2.ConfigServiceV2/UpdateCmekSettings", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index a3a373368..c97379c14 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,7 +15,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( "/google.logging.v2.MetricsServiceV2/ListLogMetrics", @@ -109,3 +110,143 @@ def add_MetricsServiceV2Servicer_to_server(servicer, server): "google.logging.v2.MetricsServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class MetricsServiceV2(object): + """Service for configuring logs-based metrics.""" + + @staticmethod + def ListLogMetrics( + 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.logging.v2.MetricsServiceV2/ListLogMetrics", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetLogMetric( + 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.logging.v2.MetricsServiceV2/GetLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateLogMetric( + 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.logging.v2.MetricsServiceV2/CreateLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateLogMetric( + 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.logging.v2.MetricsServiceV2/UpdateLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteLogMetric( + 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.logging.v2.MetricsServiceV2/DeleteLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 5a81ba6e1..a5e13ae45 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,7 +15,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( "/google.logging.v2.LoggingServiceV2/DeleteLog", @@ -125,3 +126,143 @@ def add_LoggingServiceV2Servicer_to_server(servicer, server): "google.logging.v2.LoggingServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class LoggingServiceV2(object): + """Service for ingesting and querying logs.""" + + @staticmethod + def DeleteLog( + 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.logging.v2.LoggingServiceV2/DeleteLog", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def WriteLogEntries( + 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.logging.v2.LoggingServiceV2/WriteLogEntries", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListLogEntries( + 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.logging.v2.LoggingServiceV2/ListLogEntries", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListMonitoredResourceDescriptors( + 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListLogs( + 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.logging.v2.LoggingServiceV2/ListLogs", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/synth.metadata b/synth.metadata index 6ee3b59b2..9528f101d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fa4d2ecd0804eb92f27a65fe65ce2a554a361b93", - "internalRef": "317110673" + "sha": "7157f9552747421572cf1ab3aec1105c05ebd4f9", + "internalRef": "317949519" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cd522c3b4dde821766d95c80ae5aeb43d7a41170" + "sha": "2a29860e484695a07aa8670f9e750bfeeb308a43" } } ], From dc0a4117714ed1253ab73e4ccbfa414b9b90d7bb Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:39:06 -0700 Subject: [PATCH 16/39] Updates to build Google Ads API build files. PiperOrigin-RevId: 318028816 Source-Author: Google APIs Source-Date: Wed Jun 24 02:32:38 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: b882b8e6bfcd708042ff00f7adc67ce750817dd0 Source-Link: https://github.com/googleapis/googleapis/commit/b882b8e6bfcd708042ff00f7adc67ce750817dd0 --- google/cloud/logging_v2/proto/log_entry_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_config_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_metrics_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_pb2.py | 2 +- synth.metadata | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index 7465ecd3d..84e3676d3 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.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 diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index e86f66ff9..48945580c 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_config.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 diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index c840bf186..f033fb679 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.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 diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index b897be981..bb900e7c6 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.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 diff --git a/synth.metadata b/synth.metadata index 9528f101d..4381ee7de 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7157f9552747421572cf1ab3aec1105c05ebd4f9", - "internalRef": "317949519" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, { From 5f7ddbeaf5acbbd8f15da80d6481e7ba793e3736 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:40:23 -0700 Subject: [PATCH 17/39] chore: update Py2 support msg to reflect passage of time Source-Author: Dan O'Meara Source-Date: Mon Jun 29 13:20:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 303271797a360f8a439203413f13a160f2f5b3b4 Source-Link: https://github.com/googleapis/synthtool/commit/303271797a360f8a439203413f13a160f2f5b3b4 --- docs/_templates/layout.html | 4 ++-- synth.metadata | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 228529efe..6316a537f 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/synth.metadata b/synth.metadata index 4381ee7de..316df22e3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", - "internalRef": "318028816" + "sha": "7c577e89f1c84545113b393b7d7964473251d123", + "internalRef": "318542700" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "2a29860e484695a07aa8670f9e750bfeeb308a43" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], From f9b86872c48210cacfb8c6676b31c89791f2dfd0 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:42:08 -0700 Subject: [PATCH 18/39] feat: Update Logging API protos. Renames the service name from Stackdriver Logging to Cloud Logging. Specifies client retry behavior and a few other documentation updates. PiperOrigin-RevId: 320016414 Source-Author: Google APIs Source-Date: Tue Jul 7 10:52:01 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: aba9760d6abc15f724753c26d6f306e0f76dd11a Source-Link: https://github.com/googleapis/googleapis/commit/aba9760d6abc15f724753c26d6f306e0f76dd11a --- docs/gapic/v2/api.rst | 4 +- docs/gapic/v2/types.rst | 4 +- .../gapic/config_service_v2_client_config.py | 104 +++++++++++------- google/cloud/logging_v2/gapic/enums.py | 4 +- .../gapic/logging_service_v2_client_config.py | 62 ++++++++--- .../gapic/metrics_service_v2_client_config.py | 58 +++++++--- google/cloud/logging_v2/proto/log_entry.proto | 10 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 14 +-- google/cloud/logging_v2/proto/logging.proto | 34 +++--- .../logging_v2/proto/logging_config.proto | 68 +++++++----- .../logging_v2/proto/logging_config_pb2.py | 4 +- .../proto/logging_config_pb2_grpc.py | 6 +- .../logging_v2/proto/logging_metrics.proto | 6 +- google/cloud/logging_v2/proto/logging_pb2.py | 59 +++++----- .../logging_v2/proto/logging_pb2_grpc.py | 3 +- synth.metadata | 6 +- 16 files changed, 264 insertions(+), 182 deletions(-) diff --git a/docs/gapic/v2/api.rst b/docs/gapic/v2/api.rst index 2dc6bf6fc..f54ac1620 100644 --- a/docs/gapic/v2/api.rst +++ b/docs/gapic/v2/api.rst @@ -1,5 +1,5 @@ -Client for Stackdriver Logging API -================================== +Client for Cloud Logging API +============================ .. automodule:: google.cloud.logging_v2 :members: diff --git a/docs/gapic/v2/types.rst b/docs/gapic/v2/types.rst index 5521d4f9b..1060f7bc8 100644 --- a/docs/gapic/v2/types.rst +++ b/docs/gapic/v2/types.rst @@ -1,5 +1,5 @@ -Types for Stackdriver Logging API Client -======================================== +Types for Cloud Logging API Client +================================== .. automodule:: google.cloud.logging_v2.types :members: \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 3d7bd3bdf..2edc1e079 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,96 +2,118 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], - "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "no_retry_2_codes": [], + "no_retry_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], }, "retry_params": { - "default": { + "retry_policy_3_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000, + }, }, "methods": { "DeleteSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "DeleteExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "ListBuckets": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, "GetBucket": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, "UpdateBucket": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateSink": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "UpdateExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, "UpdateCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, }, } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index f31cc5da6..159669d6e 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -174,9 +174,7 @@ class ApiVersion(enum.IntEnum): class LogSink(object): class VersionFormat(enum.IntEnum): """ - Available log entry formats. Log entries can be written to - Logging in either format and can be exported in either format. - Version 2 is the preferred format. + Deprecated. This is unused. Attributes: VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2. diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 421365489..6c4e8c8e4 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,36 +2,62 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], - "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ListLogEntries": { "timeout_millis": 10000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", "bundling": { "element_count_threshold": 1000, "request_byte_threshold": 1048576, @@ -40,13 +66,13 @@ }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index 499329a87..d4bc0e960 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,46 +2,68 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], - "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_4_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, }, "methods": { "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, "CreateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/google/cloud/logging_v2/proto/log_entry.proto b/google/cloud/logging_v2/proto/log_entry.proto index d2a172ec2..3ad2cfbb5 100644 --- a/google/cloud/logging_v2/proto/log_entry.proto +++ b/google/cloud/logging_v2/proto/log_entry.proto @@ -106,11 +106,11 @@ message LogEntry { // current time. Timestamps have nanosecond accuracy, but trailing zeros in // the fractional seconds might be omitted when the timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than the [logs - // retention period](https://cloud.google.com/logging/quotas) in the past, and no more than 24 hours - // in the future. Log entries outside those time boundaries will not be - // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // Incoming log entries must have timestamps that don't exceed the + // [logs retention + // period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + // the past, and that don't exceed 24 hours in the future. Log entries outside + // those time boundaries aren't ingested by Logging. google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index 84e3676d3..bd5c29b01 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -738,15 +738,11 @@ in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is - displayed. Incoming log entries should have timestamps that - are no more than the `logs retention period - `__ in the past, and - no more than 24 hours in the future. Log entries outside those - time boundaries will not be available when calling - ``entries.list``, but those log entries can still be `exported - with LogSinks - `__. + displayed. Incoming log entries must have timestamps that + don’t exceed the `logs retention period `__ in the past, and + that don’t exceed 24 hours in the future. Log entries outside + those time boundaries aren’t ingested by Logging. receive_timestamp: Output only. The time the log entry was received by Logging. severity: diff --git a/google/cloud/logging_v2/proto/logging.proto b/google/cloud/logging_v2/proto/logging.proto index 8a2a8a580..58647b92f 100644 --- a/google/cloud/logging_v2/proto/logging.proto +++ b/google/cloud/logging_v2/proto/logging.proto @@ -24,6 +24,7 @@ import "google/logging/v2/log_entry.proto"; import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/api/annotations.proto"; @@ -87,7 +88,8 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). + // entries, see [Exporting + // Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -203,15 +205,16 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](https://cloud.google.com/logging/quota-policy) in the past or more than - // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be - // [exported with LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // [logs retention period](https://cloud.google.com/logging/quota-policy) in + // the past or more than 24 hours in the future will not be available when + // calling `entries.list`. However, those log entries can still be [exported + // with + // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to `entries.write`, - // you should try to include several log entries in this list, - // rather than calling this method for each individual log entry. + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + // `entries.write`, you should try to include several log entries in this + // list, rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other @@ -261,12 +264,12 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that - // match the filter are returned. An empty filter matches all log entries in - // the resources listed in `resource_names`. Referencing a parent resource - // that is not listed in `resource_names` will cause the filter to return no - // results. - // The maximum length of the filter is 20000 characters. + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + // Only log entries that match the filter are returned. An empty filter + // matches all log entries in the resources listed in `resource_names`. + // Referencing a parent resource that is not listed in `resource_names` will + // cause the filter to return no results. The maximum length of the filter is + // 20000 characters. string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted @@ -278,7 +281,8 @@ message ListLogEntriesRequest { string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `next_page_token` in the + // Default is 50. If the value is negative or exceeds 1000, + // the request is rejected. The presence of `next_page_token` in the // response indicates that more results might be available. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/google/cloud/logging_v2/proto/logging_config.proto b/google/cloud/logging_v2/proto/logging_config.proto index 5fd8d496d..9486f4a9a 100644 --- a/google/cloud/logging_v2/proto/logging_config.proto +++ b/google/cloud/logging_v2/proto/logging_config.proto @@ -382,7 +382,8 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -405,7 +406,8 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -474,9 +476,7 @@ message LogSink { pattern: "billingAccounts/{billing_account}/sinks/{sink}" }; - // Available log entry formats. Log entries can be written to - // Logging in either format and can be exported in either format. - // Version 2 is the preferred format. + // Deprecated. This is unused. enum VersionFormat { // An unspecified format version that will default to V2. VERSION_FORMAT_UNSPECIFIED = 0; @@ -504,7 +504,8 @@ message LogSink { // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log // entries are not exported. For more information, see - // [Exporting Logs with Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // [Exporting Logs with + // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). string destination = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -512,9 +513,10 @@ message LogSink { } ]; - // Optional. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries). The only - // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // Optional. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + // only exported log entries are those that are in the resource owning the + // sink and that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -527,8 +529,7 @@ message LogSink { // export any log entries. bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. + // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity–a service account or group—under which Logging @@ -580,12 +581,13 @@ message LogSink { // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Logging - // creates dated tables based on the log entries' timestamps, e.g. - // syslog_20170523. With partitioned tables the date suffix is no longer + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + // default, Logging creates dated tables based on the log entries' timestamps, + // e.g. syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. - // In both cases, tables are sharded based on UTC timezone. + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + // has to be used instead. In both cases, tables are sharded based on UTC + // timezone. bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, @@ -626,7 +628,8 @@ message ListBucketsRequest { (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "logging.googleapis.com/LogBucket" - }]; + } + ]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of @@ -890,9 +893,10 @@ message LogExclusion { // Optional. A description of this exclusion. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced-queries) - // that matches the log entries to be excluded. By using the - // [sample function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + // matches the log entries to be excluded. By using the [sample + // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: @@ -1047,8 +1051,9 @@ message DeleteExclusionRequest { // The parameters to // [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message GetCmekSettingsRequest { // Required. The resource for which to retrieve CMEK settings. // @@ -1073,8 +1078,9 @@ message GetCmekSettingsRequest { // The parameters to // [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message UpdateCmekSettingsRequest { // Required. The resource name for the CMEK settings to update. // @@ -1093,7 +1099,8 @@ message UpdateCmekSettingsRequest { // Required. The CMEK settings to update. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. CmekSettings cmek_settings = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Field mask identifying which fields from `cmek_settings` should @@ -1113,8 +1120,9 @@ message UpdateCmekSettingsRequest { // organizations. Once configured, it applies to all projects and folders in the // GCP organization. // -// See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption) -// for more information. +// See [Enabling CMEK for Logs +// Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for +// more information. message CmekSettings { option (google.api.resource) = { type: "logging.googleapis.com/CmekSettings" @@ -1150,7 +1158,8 @@ message CmekSettings { // To disable CMEK for the Logs Router, set this field to an empty string. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. string kms_key_name = 2; // Output only. The service account that will be used by the Logs Router to access your @@ -1163,6 +1172,7 @@ message CmekSettings { // obtain the service account ID. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. string service_account_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 48945580c..20191acac 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -2075,9 +2075,7 @@ Optional. If set to True, then this sink is disabled and it does not export any log entries. output_version_format: - Deprecated. The log entry format to use for this sink’s - exported log entries. The v2 format is used by default and - cannot be changed. + Deprecated. This field is unused. writer_identity: Output only. An IAM identity–a service account or group—under which Logging writes the exported log entries to the sink’s diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index 81178723b..d3bd11324 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -208,7 +208,8 @@ def GetCmekSettings(self, request, context): the GCP organization. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -228,7 +229,8 @@ def UpdateCmekSettings(self, request, context): 3) access to the key is disabled. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/google/cloud/logging_v2/proto/logging_metrics.proto b/google/cloud/logging_v2/proto/logging_metrics.proto index e147578a7..eb9f73ffa 100644 --- a/google/cloud/logging_v2/proto/logging_metrics.proto +++ b/google/cloud/logging_v2/proto/logging_metrics.proto @@ -130,9 +130,9 @@ message LogMetric { // The maximum length of the description is 8000 characters. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is - // used to match log entries. - // Example: + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + // is used to match log entries. Example: // // "resource.type=gae_app AND severity>=ERROR" // diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index bb900e7c6..7c4fa3929 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -26,6 +26,7 @@ ) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 @@ -37,7 +38,7 @@ syntax="proto3", serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -47,6 +48,7 @@ google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, google_dot_api_dot_annotations__pb2.DESCRIPTOR, @@ -90,8 +92,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=436, - serialized_end=508, + serialized_start=470, + serialized_end=542, ) @@ -150,8 +152,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=824, - serialized_end=869, + serialized_start=858, + serialized_end=903, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( @@ -287,8 +289,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=511, - serialized_end=869, + serialized_start=545, + serialized_end=903, ) @@ -308,8 +310,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=871, - serialized_end=896, + serialized_start=905, + serialized_end=930, ) @@ -368,8 +370,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1026, - serialized_end=1099, + serialized_start=1060, + serialized_end=1133, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( @@ -410,8 +412,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=899, - serialized_end=1099, + serialized_start=933, + serialized_end=1133, ) @@ -527,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1102, - serialized_end=1278, + serialized_start=1136, + serialized_end=1312, ) @@ -587,8 +589,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1280, - serialized_end=1375, + serialized_start=1314, + serialized_end=1409, ) @@ -647,8 +649,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1377, - serialized_end=1467, + serialized_start=1411, + serialized_end=1501, ) @@ -707,8 +709,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1470, - serialized_end=1608, + serialized_start=1504, + serialized_end=1642, ) @@ -786,8 +788,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1610, - serialized_end=1728, + serialized_start=1644, + serialized_end=1762, ) @@ -846,8 +848,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1730, - serialized_end=1792, + serialized_start=1764, + serialized_end=1826, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -1094,7 +1096,8 @@ values. page_size: Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of + request. Default is 50. If the value is negative or exceeds + 1000, the request is rejected. The presence of ``next_page_token`` in the response indicates that more results might be available. page_token: @@ -1273,8 +1276,8 @@ index=0, serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", create_key=_descriptor._internal_create_key, - serialized_start=1795, - serialized_end=3168, + serialized_start=1829, + serialized_end=3202, methods=[ _descriptor.MethodDescriptor( name="DeleteLog", diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index a5e13ae45..15c16bee0 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -73,7 +73,8 @@ def WriteLogEntries(self, request, context): def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log - entries, see [Exporting Logs](https://cloud.google.com/logging/docs/export). + entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/synth.metadata b/synth.metadata index 316df22e3..65fcaa0ae 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7c577e89f1c84545113b393b7d7964473251d123", - "internalRef": "318542700" + "sha": "aba9760d6abc15f724753c26d6f306e0f76dd11a", + "internalRef": "320016414" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "d53e4b70cf091cba04362c2fac3cda0546121641" } } ], From e0be185b354a91534a4353056f3713631e777126 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:49:42 -0700 Subject: [PATCH 19/39] Update protobuf and gapic-generator-csharp versions. PiperOrigin-RevId: 320411362 Source-Author: Google APIs Source-Date: Thu Jul 9 09:26:49 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: db69b46790b55a82ab7cfa473d031da787bc7591 Source-Link: https://github.com/googleapis/googleapis/commit/db69b46790b55a82ab7cfa473d031da787bc7591 --- google/cloud/logging_v2/proto/log_entry_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_config_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_metrics_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_pb2.py | 2 +- synth.metadata | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index bd5c29b01..d0cbb10fb 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.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 diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 20191acac..672b83523 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_config.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 diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index f033fb679..c840bf186 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.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 diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 7c4fa3929..a8a2100af 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.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 diff --git a/synth.metadata b/synth.metadata index 65fcaa0ae..ca1680a58 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aba9760d6abc15f724753c26d6f306e0f76dd11a", - "internalRef": "320016414" + "sha": "db69b46790b55a82ab7cfa473d031da787bc7591", + "internalRef": "320411362" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d53e4b70cf091cba04362c2fac3cda0546121641" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From c68b581a30f928ef361afce2c129b8680cfc5a4c Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:58:03 -0700 Subject: [PATCH 20/39] feat(python-library): changes to docs job * feat(python-library): changes to docs job * migrate to Trampoline V2 * add docs-presubmit job * create docfx yaml files and upload them to another bucket * remove redundant envvars Source-Author: Takashi Matsuo Source-Date: Wed Jul 29 16:15:18 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: f07cb4446192952f19be3056957f56d180586055 Source-Link: https://github.com/googleapis/synthtool/commit/f07cb4446192952f19be3056957f56d180586055 --- .flake8 | 2 - .gitignore | 2 - .kokoro/build.sh | 8 +- .kokoro/docs/common.cfg | 21 +- .kokoro/publish-docs.sh | 39 +- .kokoro/test-samples.sh | 8 +- MANIFEST.in | 3 - docs/_templates/layout.html | 4 +- docs/conf.py | 7 +- docs/multiprocessing.rst | 7 - .../gapic/config_service_v2_client.py | 606 ++- .../gapic/config_service_v2_client_config.py | 234 +- google/cloud/logging_v2/gapic/enums.py | 11 +- .../gapic/logging_service_v2_client.py | 256 +- .../gapic/logging_service_v2_client_config.py | 152 +- .../gapic/metrics_service_v2_client.py | 234 +- .../gapic/metrics_service_v2_client_config.py | 134 +- .../config_service_v2_grpc_transport.py | 69 +- .../logging_service_v2_grpc_transport.py | 47 +- .../metrics_service_v2_grpc_transport.py | 49 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 1038 ++--- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 + .../logging_v2/proto/logging_config_pb2.py | 3751 +++++++---------- .../proto/logging_config_pb2_grpc.py | 867 ++-- .../logging_v2/proto/logging_metrics_pb2.py | 1326 +++--- .../proto/logging_metrics_pb2_grpc.py | 308 +- google/cloud/logging_v2/proto/logging_pb2.py | 1662 +++----- .../logging_v2/proto/logging_pb2_grpc.py | 296 +- scripts/readme-gen/readme_gen.py | 66 - scripts/readme-gen/templates/README.tmpl.rst | 87 - scripts/readme-gen/templates/auth.tmpl.rst | 9 - .../templates/auth_api_key.tmpl.rst | 14 - .../templates/install_deps.tmpl.rst | 29 - .../templates/install_portaudio.tmpl.rst | 35 - synth.metadata | 108 +- .../v2/test_config_service_v2_client_v2.py | 371 +- .../v2/test_logging_service_v2_client_v2.py | 80 +- .../v2/test_metrics_service_v2_client_v2.py | 136 +- 38 files changed, 4650 insertions(+), 7427 deletions(-) delete mode 100644 docs/multiprocessing.rst delete mode 100644 scripts/readme-gen/readme_gen.py delete mode 100644 scripts/readme-gen/templates/README.tmpl.rst delete mode 100644 scripts/readme-gen/templates/auth.tmpl.rst delete mode 100644 scripts/readme-gen/templates/auth_api_key.tmpl.rst delete mode 100644 scripts/readme-gen/templates/install_deps.tmpl.rst delete mode 100644 scripts/readme-gen/templates/install_portaudio.tmpl.rst diff --git a/.flake8 b/.flake8 index ed9316381..20fe9bda2 100644 --- a/.flake8 +++ b/.flake8 @@ -21,8 +21,6 @@ exclude = # Exclude generated code. **/proto/** **/gapic/** - **/services/** - **/types/** *_pb2.py # Standard linting exemptions. diff --git a/.gitignore b/.gitignore index b87e1ed58..3fb06e09c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ dist build eggs -.eggs parts bin var @@ -50,7 +49,6 @@ bigquery/docs/generated # Virtual environment env/ coverage.xml -sponge_log.xml # System test environment variables. system_tests/local_test_setup diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 8df566562..a194a9ead 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -36,4 +36,10 @@ python3.6 -m pip uninstall --yes --quiet nox-automation python3.6 -m pip install --upgrade --quiet nox python3.6 -m nox --version -python3.6 -m nox +# If NOX_SESSION is set, it only runs the specified session, +# otherwise run all the sessions. +if [[ -n "${NOX_SESSION:-}" ]]; then + python3.6 -m nox -s "${NOX_SESSION:-}" +else + python3.6 -m nox +fi diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 01a16ec85..4206e8ac4 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -11,12 +11,12 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-logging/.kokoro/trampoline.sh" +build_file: "python-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" + value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" @@ -28,6 +28,23 @@ env_vars: { value: "docs-staging" } +env_vars: { + key: "V2_STAGING_BUCKET" + value: "docs-staging-v2-staging" +} + +# It will upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} + +# It will always build the docker image. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/docs/Dockerfile" +} + # Fetch the token needed for reporting release status to GitHub before_action { fetch_keystore { diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index e49d523ad..8acb14e80 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -18,26 +18,16 @@ set -eo pipefail # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 -cd github/python-logging - -# Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation +export PATH="${HOME}/.local/bin:${PATH}" # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +python3 -m pip install --user --upgrade --quiet nox +python3 -m nox --version # build docs nox -s docs -python3 -m pip install gcp-docuploader - -# install a json parser -sudo apt-get update -sudo apt-get -y install software-properties-common -sudo add-apt-repository universe -sudo apt-get update -sudo apt-get -y install jq +python3 -m pip install --user gcp-docuploader # create metadata python3 -m docuploader create-metadata \ @@ -52,4 +42,23 @@ python3 -m docuploader create-metadata \ cat docs.metadata # upload docs -python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}" + + +# docfx yaml files +nox -s docfx + +# create metadata. +python3 -m docuploader create-metadata \ + --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ + --version=$(python3 setup.py --version) \ + --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ + --distribution-name=$(python3 setup.py --name) \ + --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ + --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ + --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) + +cat docs.metadata + +# upload docs +python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}" diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index fee06244c..ba97b53d5 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi +# Exit early if samples directory doesn't exist +if [ ! -d "./samples" ]; then + echo "No tests run. `./samples` not found" + exit 0 +fi + # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -101,4 +107,4 @@ 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 +exit "$RTN" diff --git a/MANIFEST.in b/MANIFEST.in index e9e29d120..68855abc3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -20,6 +20,3 @@ 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 6316a537f..228529efe 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -21,8 +21,8 @@
- 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 + 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 visit Python 2 support on Google Cloud.
{% block body %} {% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 850861fb7..7a03936bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,18 +38,21 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", - "recommonmark", ] # autodoc/autosummary flags autoclass_content = "both" -autodoc_default_options = {"members": True} +autodoc_default_flags = ["members"] 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'] diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst deleted file mode 100644 index 1cb29d4ca..000000000 --- a/docs/multiprocessing.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. 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/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index e77426f1f..801a479bb 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -40,20 +40,22 @@ from google.protobuf import field_mask_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-logging", + 'google-cloud-logging', ).version class ConfigServiceV2Client(object): """Service for configuring sinks used to route log entries.""" - SERVICE_ADDRESS = "logging.googleapis.com:443" + SERVICE_ADDRESS = 'logging.googleapis.com:443' """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.logging.v2.ConfigServiceV2" + _INTERFACE_NAME = 'google.logging.v2.ConfigServiceV2' + @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -69,17 +71,19 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: ConfigServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file(filename) - kwargs["credentials"] = credentials + credentials = service_account.Credentials.from_service_account_file( + filename) + kwargs['credentials'] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file + @classmethod def billing_account_path(cls, billing_account): """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}", + 'billingAccounts/{billing_account}', billing_account=billing_account, ) @@ -87,7 +91,7 @@ def billing_account_path(cls, billing_account): def billing_account_location_path(cls, billing_account, location): """Return a fully-qualified billing_account_location string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/locations/{location}", + 'billingAccounts/{billing_account}/locations/{location}', billing_account=billing_account, location=location, ) @@ -96,7 +100,7 @@ def billing_account_location_path(cls, billing_account, location): def cmek_settings_path(cls, project): """Return a fully-qualified cmek_settings string.""" return google.api_core.path_template.expand( - "projects/{project}/cmekSettings", + 'projects/{project}/cmekSettings', project=project, ) @@ -104,7 +108,7 @@ def cmek_settings_path(cls, project): def folder_path(cls, folder): """Return a fully-qualified folder string.""" return google.api_core.path_template.expand( - "folders/{folder}", + 'folders/{folder}', folder=folder, ) @@ -112,7 +116,7 @@ def folder_path(cls, folder): def folder_location_path(cls, folder, location): """Return a fully-qualified folder_location string.""" return google.api_core.path_template.expand( - "folders/{folder}/locations/{location}", + 'folders/{folder}/locations/{location}', folder=folder, location=location, ) @@ -121,7 +125,7 @@ def folder_location_path(cls, folder, location): def location_path(cls, project, location): """Return a fully-qualified location string.""" return google.api_core.path_template.expand( - "projects/{project}/locations/{location}", + 'projects/{project}/locations/{location}', project=project, location=location, ) @@ -130,7 +134,7 @@ def location_path(cls, project, location): def log_bucket_path(cls, project, location, bucket): """Return a fully-qualified log_bucket string.""" return google.api_core.path_template.expand( - "projects/{project}/locations/{location}/buckets/{bucket}", + 'projects/{project}/locations/{location}/buckets/{bucket}', project=project, location=location, bucket=bucket, @@ -140,7 +144,7 @@ def log_bucket_path(cls, project, location, bucket): def log_exclusion_path(cls, project, exclusion): """Return a fully-qualified log_exclusion string.""" return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", + 'projects/{project}/exclusions/{exclusion}', project=project, exclusion=exclusion, ) @@ -149,7 +153,7 @@ def log_exclusion_path(cls, project, exclusion): def log_sink_path(cls, project, sink): """Return a fully-qualified log_sink string.""" return google.api_core.path_template.expand( - "projects/{project}/sinks/{sink}", + 'projects/{project}/sinks/{sink}', project=project, sink=sink, ) @@ -158,7 +162,7 @@ def log_sink_path(cls, project, sink): def organization_path(cls, organization): """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - "organizations/{organization}", + 'organizations/{organization}', organization=organization, ) @@ -166,7 +170,7 @@ def organization_path(cls, organization): def organization_location_path(cls, organization, location): """Return a fully-qualified organization_location string.""" return google.api_core.path_template.expand( - "organizations/{organization}/locations/{location}", + 'organizations/{organization}/locations/{location}', organization=organization, location=location, ) @@ -175,19 +179,12 @@ def organization_location_path(cls, organization, location): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", + 'projects/{project}', project=project, ) - def __init__( - self, - transport=None, - channel=None, - credentials=None, - client_config=None, - client_info=None, - client_options=None, - ): + def __init__(self, transport=None, channel=None, credentials=None, + client_config=None, client_info=None, client_options=None): """Constructor. Args: @@ -223,27 +220,20 @@ def __init__( """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn( - "The `client_config` argument is deprecated.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `client_config` argument is deprecated.', + PendingDeprecationWarning, stacklevel=2) else: client_config = config_service_v2_client_config.config if channel: - warnings.warn( - "The `channel` argument is deprecated; use " "`transport` instead.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `channel` argument is deprecated; use ' + '`transport` instead.', + PendingDeprecationWarning, stacklevel=2) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict( - client_options - ) + client_options = google.api_core.client_options.from_dict(client_options) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -260,17 +250,15 @@ def __init__( else: if credentials: raise ValueError( - "Received both a transport instance and " - "credentials; these are mutually exclusive." + 'Received both a transport instance and ' + 'credentials; these are mutually exclusive.' ) self.transport = transport else: - self.transport = ( - config_service_v2_grpc_transport.ConfigServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, - ) + self.transport = config_service_v2_grpc_transport.ConfigServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, ) if client_info is None: @@ -286,7 +274,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. @@ -297,12 +285,11 @@ def __init__( # Service calls def delete_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. @@ -346,13 +333,11 @@ def delete_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_sink" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'delete_sink' not in self._inner_api_calls: + self._inner_api_calls['delete_sink'] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_sink, - default_retry=self._method_configs["DeleteSink"].retry, - default_timeout=self._method_configs["DeleteSink"].timeout, + default_retry=self._method_configs['DeleteSink'].retry, + default_timeout=self._method_configs['DeleteSink'].timeout, client_info=self._client_info, ) @@ -363,29 +348,24 @@ def delete_sink( metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [('sink_name', sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - self._inner_api_calls["delete_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + self._inner_api_calls['delete_sink'](request, retry=retry, timeout=timeout, metadata=metadata) def update_sink( - self, - sink_name, - sink, - unique_writer_identity=None, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + sink_name, + sink, + unique_writer_identity=None, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: ``destination``, and @@ -471,13 +451,11 @@ def update_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "update_sink" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'update_sink' not in self._inner_api_calls: + self._inner_api_calls['update_sink'] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_sink, - default_retry=self._method_configs["UpdateSink"].retry, - default_timeout=self._method_configs["UpdateSink"].timeout, + default_retry=self._method_configs['UpdateSink'].retry, + default_timeout=self._method_configs['UpdateSink'].timeout, client_info=self._client_info, ) @@ -491,26 +469,21 @@ def update_sink( metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [('sink_name', sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["update_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['update_sink'](request, retry=retry, timeout=timeout, metadata=metadata) def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes an exclusion. @@ -552,13 +525,11 @@ def delete_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'delete_exclusion' not in self._inner_api_calls: + self._inner_api_calls['delete_exclusion'] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_exclusion, - default_retry=self._method_configs["DeleteExclusion"].retry, - default_timeout=self._method_configs["DeleteExclusion"].timeout, + default_retry=self._method_configs['DeleteExclusion'].retry, + default_timeout=self._method_configs['DeleteExclusion'].timeout, client_info=self._client_info, ) @@ -569,27 +540,22 @@ def delete_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - self._inner_api_calls["delete_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + self._inner_api_calls['delete_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) def list_buckets( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists buckets (Beta). @@ -655,13 +621,11 @@ def list_buckets( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_buckets" not in self._inner_api_calls: - self._inner_api_calls[ - "list_buckets" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_buckets' not in self._inner_api_calls: + self._inner_api_calls['list_buckets'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_buckets, - default_retry=self._method_configs["ListBuckets"].retry, - default_timeout=self._method_configs["ListBuckets"].timeout, + default_retry=self._method_configs['ListBuckets'].retry, + default_timeout=self._method_configs['ListBuckets'].timeout, client_info=self._client_info, ) @@ -673,37 +637,29 @@ def list_buckets( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_buckets"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_buckets'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="buckets", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='buckets', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def get_bucket( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Gets a bucket (Beta). @@ -749,13 +705,11 @@ def get_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_bucket" not in self._inner_api_calls: - self._inner_api_calls[ - "get_bucket" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'get_bucket' not in self._inner_api_calls: + self._inner_api_calls['get_bucket'] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_bucket, - default_retry=self._method_configs["GetBucket"].retry, - default_timeout=self._method_configs["GetBucket"].timeout, + default_retry=self._method_configs['GetBucket'].retry, + default_timeout=self._method_configs['GetBucket'].timeout, client_info=self._client_info, ) @@ -766,28 +720,23 @@ def get_bucket( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["get_bucket"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['get_bucket'](request, retry=retry, timeout=timeout, metadata=metadata) def update_bucket( - self, - name, - bucket, - update_mask, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + bucket, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates a bucket. This method replaces the following fields in the existing bucket with values from the new bucket: ``retention_period`` @@ -867,13 +816,11 @@ def update_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_bucket" not in self._inner_api_calls: - self._inner_api_calls[ - "update_bucket" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'update_bucket' not in self._inner_api_calls: + self._inner_api_calls['update_bucket'] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_bucket, - default_retry=self._method_configs["UpdateBucket"].retry, - default_timeout=self._method_configs["UpdateBucket"].timeout, + default_retry=self._method_configs['UpdateBucket'].retry, + default_timeout=self._method_configs['UpdateBucket'].timeout, client_info=self._client_info, ) @@ -886,27 +833,22 @@ def update_bucket( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["update_bucket"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['update_bucket'](request, retry=retry, timeout=timeout, metadata=metadata) def list_sinks( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists sinks. @@ -968,13 +910,11 @@ def list_sinks( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_sinks" not in self._inner_api_calls: - self._inner_api_calls[ - "list_sinks" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_sinks' not in self._inner_api_calls: + self._inner_api_calls['list_sinks'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_sinks, - default_retry=self._method_configs["ListSinks"].retry, - default_timeout=self._method_configs["ListSinks"].timeout, + default_retry=self._method_configs['ListSinks'].retry, + default_timeout=self._method_configs['ListSinks'].timeout, client_info=self._client_info, ) @@ -986,37 +926,29 @@ def list_sinks( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_sinks"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_sinks'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="sinks", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='sinks', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def get_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Gets a sink. @@ -1061,13 +993,11 @@ def get_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "get_sink" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'get_sink' not in self._inner_api_calls: + self._inner_api_calls['get_sink'] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_sink, - default_retry=self._method_configs["GetSink"].retry, - default_timeout=self._method_configs["GetSink"].timeout, + default_retry=self._method_configs['GetSink'].retry, + default_timeout=self._method_configs['GetSink'].timeout, client_info=self._client_info, ) @@ -1078,28 +1008,23 @@ def get_sink( metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [('sink_name', sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["get_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['get_sink'](request, retry=retry, timeout=timeout, metadata=metadata) def create_sink( - self, - parent, - sink, - unique_writer_identity=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + sink, + unique_writer_identity=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the @@ -1166,13 +1091,11 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "create_sink" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'create_sink' not in self._inner_api_calls: + self._inner_api_calls['create_sink'] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_sink, - default_retry=self._method_configs["CreateSink"].retry, - default_timeout=self._method_configs["CreateSink"].timeout, + default_retry=self._method_configs['CreateSink'].retry, + default_timeout=self._method_configs['CreateSink'].timeout, client_info=self._client_info, ) @@ -1185,27 +1108,22 @@ def create_sink( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["create_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['create_sink'](request, retry=retry, timeout=timeout, metadata=metadata) def list_exclusions( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists all the exclusions in a parent resource. @@ -1267,13 +1185,11 @@ def list_exclusions( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_exclusions" not in self._inner_api_calls: - self._inner_api_calls[ - "list_exclusions" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_exclusions' not in self._inner_api_calls: + self._inner_api_calls['list_exclusions'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_exclusions, - default_retry=self._method_configs["ListExclusions"].retry, - default_timeout=self._method_configs["ListExclusions"].timeout, + default_retry=self._method_configs['ListExclusions'].retry, + default_timeout=self._method_configs['ListExclusions'].timeout, client_info=self._client_info, ) @@ -1285,37 +1201,29 @@ def list_exclusions( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_exclusions"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_exclusions'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="exclusions", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='exclusions', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def get_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Gets the description of an exclusion. @@ -1360,13 +1268,11 @@ def get_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "get_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'get_exclusion' not in self._inner_api_calls: + self._inner_api_calls['get_exclusion'] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_exclusion, - default_retry=self._method_configs["GetExclusion"].retry, - default_timeout=self._method_configs["GetExclusion"].timeout, + default_retry=self._method_configs['GetExclusion'].retry, + default_timeout=self._method_configs['GetExclusion'].timeout, client_info=self._client_info, ) @@ -1377,27 +1283,22 @@ def get_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["get_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['get_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) def create_exclusion( - self, - parent, - exclusion, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + exclusion, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. @@ -1452,13 +1353,11 @@ def create_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "create_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'create_exclusion' not in self._inner_api_calls: + self._inner_api_calls['create_exclusion'] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_exclusion, - default_retry=self._method_configs["CreateExclusion"].retry, - default_timeout=self._method_configs["CreateExclusion"].timeout, + default_retry=self._method_configs['CreateExclusion'].retry, + default_timeout=self._method_configs['CreateExclusion'].timeout, client_info=self._client_info, ) @@ -1470,28 +1369,23 @@ def create_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["create_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['create_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) def update_exclusion( - self, - name, - exclusion, - update_mask, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + exclusion, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Changes one or more properties of an existing exclusion. @@ -1558,13 +1452,11 @@ def update_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "update_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'update_exclusion' not in self._inner_api_calls: + self._inner_api_calls['update_exclusion'] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_exclusion, - default_retry=self._method_configs["UpdateExclusion"].retry, - default_timeout=self._method_configs["UpdateExclusion"].timeout, + default_retry=self._method_configs['UpdateExclusion'].retry, + default_timeout=self._method_configs['UpdateExclusion'].timeout, client_info=self._client_info, ) @@ -1577,26 +1469,21 @@ def update_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["update_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['update_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) def get_cmek_settings( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Gets the Logs Router CMEK settings for the given resource. @@ -1653,13 +1540,11 @@ def get_cmek_settings( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_cmek_settings" not in self._inner_api_calls: - self._inner_api_calls[ - "get_cmek_settings" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'get_cmek_settings' not in self._inner_api_calls: + self._inner_api_calls['get_cmek_settings'] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_cmek_settings, - default_retry=self._method_configs["GetCmekSettings"].retry, - default_timeout=self._method_configs["GetCmekSettings"].timeout, + default_retry=self._method_configs['GetCmekSettings'].retry, + default_timeout=self._method_configs['GetCmekSettings'].timeout, client_info=self._client_info, ) @@ -1670,28 +1555,23 @@ def get_cmek_settings( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["get_cmek_settings"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['get_cmek_settings'](request, retry=retry, timeout=timeout, metadata=metadata) def update_cmek_settings( - self, - name, - cmek_settings, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + name, + cmek_settings, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates the Logs Router CMEK settings for the given resource. @@ -1774,13 +1654,11 @@ def update_cmek_settings( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_cmek_settings" not in self._inner_api_calls: - self._inner_api_calls[ - "update_cmek_settings" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'update_cmek_settings' not in self._inner_api_calls: + self._inner_api_calls['update_cmek_settings'] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_cmek_settings, - default_retry=self._method_configs["UpdateCmekSettings"].retry, - default_timeout=self._method_configs["UpdateCmekSettings"].timeout, + default_retry=self._method_configs['UpdateCmekSettings'].retry, + default_timeout=self._method_configs['UpdateCmekSettings'].timeout, client_info=self._client_info, ) @@ -1793,15 +1671,11 @@ def update_cmek_settings( metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [('name', name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["update_cmek_settings"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['update_cmek_settings'](request, retry=retry, timeout=timeout, metadata=metadata) diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 2edc1e079..87891764f 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -1,121 +1,121 @@ config = { - "interfaces": { - "google.logging.v2.ConfigServiceV2": { - "retry_codes": { - "no_retry_2_codes": [], - "no_retry_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - }, - "retry_params": { - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000, - }, - }, - "methods": { - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "UpdateSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "UpdateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "ListSinks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "GetSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "CreateSink": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", - }, - "ListExclusions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "GetExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "CreateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", - }, - "UpdateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", - }, - "GetCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "UpdateCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - }, + "interfaces": { + "google.logging.v2.ConfigServiceV2": { + "retry_codes": { + "no_retry_2_codes": [], + "no_retry_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + }, + "retry_params": { + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 } + }, + "methods": { + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSinks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateSink": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ListExclusions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } } + } } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index 159669d6e..8d684043b 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -55,7 +55,6 @@ class LaunchStage(enum.IntEnum): Platform Subject to the Deprecation Policy `__ documentation. """ - LAUNCH_STAGE_UNSPECIFIED = 0 UNIMPLEMENTED = 6 PRELAUNCH = 7 @@ -76,7 +75,6 @@ class LifecycleState(enum.IntEnum): ACTIVE (int): The normal and active state. DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. """ - LIFECYCLE_STATE_UNSPECIFIED = 0 ACTIVE = 1 DELETE_REQUESTED = 2 @@ -115,7 +113,6 @@ class LogSeverity(enum.IntEnum): ALERT (int): (700) A person must take an action immediately. EMERGENCY (int): (800) One or more systems are unusable. """ - DEFAULT = 0 DEBUG = 100 INFO = 200 @@ -137,7 +134,6 @@ class NullValue(enum.IntEnum): Attributes: NULL_VALUE (int): Null value. """ - NULL_VALUE = 0 @@ -151,7 +147,6 @@ class ValueType(enum.IntEnum): BOOL (int): Boolean; true or false. INT64 (int): A 64-bit signed integer. """ - STRING = 0 BOOL = 1 INT64 = 2 @@ -166,7 +161,6 @@ class ApiVersion(enum.IntEnum): V2 (int): Logging API v2. V1 (int): Logging API v1. """ - V2 = 0 V1 = 1 @@ -181,7 +175,6 @@ class VersionFormat(enum.IntEnum): V2 (int): ``LogEntry`` version 2 format. V1 (int): ``LogEntry`` version 1 format. """ - VERSION_FORMAT_UNSPECIFIED = 0 V2 = 1 V1 = 2 @@ -202,12 +195,12 @@ class MetricKind(enum.IntEnum): value to zero and sets a new start time for the following points. """ - METRIC_KIND_UNSPECIFIED = 0 GAUGE = 1 DELTA = 2 CUMULATIVE = 3 + class ValueType(enum.IntEnum): """ The value type of a metric. @@ -223,7 +216,6 @@ class ValueType(enum.IntEnum): DISTRIBUTION (int): The value is a ``Distribution``. MONEY (int): The value is money. """ - VALUE_TYPE_UNSPECIFIED = 0 BOOL = 1 INT64 = 2 @@ -231,3 +223,4 @@ class ValueType(enum.IntEnum): STRING = 4 DISTRIBUTION = 5 MONEY = 6 + \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 1882b2b8b..25af1aaa5 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -44,20 +44,22 @@ from google.protobuf import field_mask_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-logging", + 'google-cloud-logging', ).version class LoggingServiceV2Client(object): """Service for ingesting and querying logs.""" - SERVICE_ADDRESS = "logging.googleapis.com:443" + SERVICE_ADDRESS = 'logging.googleapis.com:443' """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.logging.v2.LoggingServiceV2" + _INTERFACE_NAME = 'google.logging.v2.LoggingServiceV2' + @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -73,17 +75,19 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: LoggingServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file(filename) - kwargs["credentials"] = credentials + credentials = service_account.Credentials.from_service_account_file( + filename) + kwargs['credentials'] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file + @classmethod def billing_account_path(cls, billing_account): """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}", + 'billingAccounts/{billing_account}', billing_account=billing_account, ) @@ -91,7 +95,7 @@ def billing_account_path(cls, billing_account): def folder_path(cls, folder): """Return a fully-qualified folder string.""" return google.api_core.path_template.expand( - "folders/{folder}", + 'folders/{folder}', folder=folder, ) @@ -99,7 +103,7 @@ def folder_path(cls, folder): def log_path(cls, project, log): """Return a fully-qualified log string.""" return google.api_core.path_template.expand( - "projects/{project}/logs/{log}", + 'projects/{project}/logs/{log}', project=project, log=log, ) @@ -108,7 +112,7 @@ def log_path(cls, project, log): def organization_path(cls, organization): """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - "organizations/{organization}", + 'organizations/{organization}', organization=organization, ) @@ -116,19 +120,12 @@ def organization_path(cls, organization): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", + 'projects/{project}', project=project, ) - def __init__( - self, - transport=None, - channel=None, - credentials=None, - client_config=None, - client_info=None, - client_options=None, - ): + def __init__(self, transport=None, channel=None, credentials=None, + client_config=None, client_info=None, client_options=None): """Constructor. Args: @@ -164,27 +161,20 @@ def __init__( """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn( - "The `client_config` argument is deprecated.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `client_config` argument is deprecated.', + PendingDeprecationWarning, stacklevel=2) else: client_config = logging_service_v2_client_config.config if channel: - warnings.warn( - "The `channel` argument is deprecated; use " "`transport` instead.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `channel` argument is deprecated; use ' + '`transport` instead.', + PendingDeprecationWarning, stacklevel=2) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict( - client_options - ) + client_options = google.api_core.client_options.from_dict(client_options) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -201,17 +191,15 @@ def __init__( else: if credentials: raise ValueError( - "Received both a transport instance and " - "credentials; these are mutually exclusive." + 'Received both a transport instance and ' + 'credentials; these are mutually exclusive.' ) self.transport = transport else: - self.transport = ( - logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, - ) + self.transport = logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, ) if client_info is None: @@ -227,7 +215,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. @@ -238,12 +226,11 @@ def __init__( # Service calls def delete_log( - self, - log_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + log_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not @@ -291,13 +278,11 @@ def delete_log( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_log" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'delete_log' not in self._inner_api_calls: + self._inner_api_calls['delete_log'] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_log, - default_retry=self._method_configs["DeleteLog"].retry, - default_timeout=self._method_configs["DeleteLog"].timeout, + default_retry=self._method_configs['DeleteLog'].retry, + default_timeout=self._method_configs['DeleteLog'].timeout, client_info=self._client_info, ) @@ -308,29 +293,24 @@ def delete_log( metadata = [] metadata = list(metadata) try: - routing_header = [("log_name", log_name)] + routing_header = [('log_name', log_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - self._inner_api_calls["delete_log"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + self._inner_api_calls['delete_log'](request, retry=retry, timeout=timeout, metadata=metadata) def list_log_entries( - self, - resource_names, - filter_=None, - order_by=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + resource_names, + filter_=None, + order_by=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways @@ -414,13 +394,11 @@ def list_log_entries( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "list_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_log_entries' not in self._inner_api_calls: + self._inner_api_calls['list_log_entries'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_log_entries, - default_retry=self._method_configs["ListLogEntries"].retry, - default_timeout=self._method_configs["ListLogEntries"].timeout, + default_retry=self._method_configs['ListLogEntries'].retry, + default_timeout=self._method_configs['ListLogEntries'].timeout, client_info=self._client_info, ) @@ -432,31 +410,25 @@ def list_log_entries( ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_log_entries"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_log_entries'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="entries", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='entries', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def write_log_entries( - self, - entries, - log_name=None, - resource=None, - labels=None, - partial_success=None, - dry_run=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + entries, + log_name=None, + resource=None, + labels=None, + partial_success=None, + dry_run=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method @@ -570,13 +542,11 @@ def write_log_entries( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "write_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "write_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'write_log_entries' not in self._inner_api_calls: + self._inner_api_calls['write_log_entries'] = google.api_core.gapic_v1.method.wrap_method( self.transport.write_log_entries, - default_retry=self._method_configs["WriteLogEntries"].retry, - default_timeout=self._method_configs["WriteLogEntries"].timeout, + default_retry=self._method_configs['WriteLogEntries'].retry, + default_timeout=self._method_configs['WriteLogEntries'].timeout, client_info=self._client_info, ) @@ -588,17 +558,14 @@ def write_log_entries( partial_success=partial_success, dry_run=dry_run, ) - return self._inner_api_calls["write_log_entries"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['write_log_entries'](request, retry=retry, timeout=timeout, metadata=metadata) def list_monitored_resource_descriptors( - self, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists the descriptors for monitored resource types used by Logging. @@ -650,17 +617,11 @@ def list_monitored_resource_descriptors( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_monitored_resource_descriptors" not in self._inner_api_calls: - self._inner_api_calls[ - "list_monitored_resource_descriptors" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_monitored_resource_descriptors' not in self._inner_api_calls: + self._inner_api_calls['list_monitored_resource_descriptors'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_monitored_resource_descriptors, - default_retry=self._method_configs[ - "ListMonitoredResourceDescriptors" - ].retry, - default_timeout=self._method_configs[ - "ListMonitoredResourceDescriptors" - ].timeout, + default_retry=self._method_configs['ListMonitoredResourceDescriptors'].retry, + default_timeout=self._method_configs['ListMonitoredResourceDescriptors'].timeout, client_info=self._client_info, ) @@ -669,27 +630,21 @@ def list_monitored_resource_descriptors( ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_monitored_resource_descriptors"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_monitored_resource_descriptors'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="resource_descriptors", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='resource_descriptors', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def list_logs( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. @@ -752,13 +707,11 @@ def list_logs( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_logs" not in self._inner_api_calls: - self._inner_api_calls[ - "list_logs" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_logs' not in self._inner_api_calls: + self._inner_api_calls['list_logs'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_logs, - default_retry=self._method_configs["ListLogs"].retry, - default_timeout=self._method_configs["ListLogs"].timeout, + default_retry=self._method_configs['ListLogs'].retry, + default_timeout=self._method_configs['ListLogs'].timeout, client_info=self._client_info, ) @@ -770,26 +723,19 @@ def list_logs( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_logs"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_logs'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="log_names", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='log_names', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 6c4e8c8e4..7172e8669 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -1,80 +1,80 @@ config = { - "interfaces": { - "google.logging.v2.LoggingServiceV2": { - "retry_codes": { - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - }, - "retry_params": { - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - }, - "methods": { - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - "WriteLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - "bundling": { - "element_count_threshold": 1000, - "request_byte_threshold": 1048576, - "delay_threshold_millis": 50, - }, - }, - "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - "ListLogs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - }, + "interfaces": { + "google.logging.v2.LoggingServiceV2": { + "retry_codes": { + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ], + "no_retry_codes": [], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + }, + "retry_params": { + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000 + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 } + }, + "methods": { + "DeleteLog": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "WriteLogEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + "bundling": { + "element_count_threshold": 1000, + "request_byte_threshold": 1048576, + "delay_threshold_millis": 50 + } + }, + "ListMonitoredResourceDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLogs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } } + } } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index c3d1f2f4c..67df39e59 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -46,20 +46,22 @@ from google.protobuf import field_mask_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-logging", + 'google-cloud-logging', ).version class MetricsServiceV2Client(object): """Service for configuring logs-based metrics.""" - SERVICE_ADDRESS = "logging.googleapis.com:443" + SERVICE_ADDRESS = 'logging.googleapis.com:443' """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.logging.v2.MetricsServiceV2" + _INTERFACE_NAME = 'google.logging.v2.MetricsServiceV2' + @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -75,17 +77,19 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: MetricsServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file(filename) - kwargs["credentials"] = credentials + credentials = service_account.Credentials.from_service_account_file( + filename) + kwargs['credentials'] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file + @classmethod def log_metric_path(cls, project, metric): """Return a fully-qualified log_metric string.""" return google.api_core.path_template.expand( - "projects/{project}/metrics/{metric}", + 'projects/{project}/metrics/{metric}', project=project, metric=metric, ) @@ -94,19 +98,12 @@ def log_metric_path(cls, project, metric): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", + 'projects/{project}', project=project, ) - def __init__( - self, - transport=None, - channel=None, - credentials=None, - client_config=None, - client_info=None, - client_options=None, - ): + def __init__(self, transport=None, channel=None, credentials=None, + client_config=None, client_info=None, client_options=None): """Constructor. Args: @@ -142,27 +139,20 @@ def __init__( """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn( - "The `client_config` argument is deprecated.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `client_config` argument is deprecated.', + PendingDeprecationWarning, stacklevel=2) else: client_config = metrics_service_v2_client_config.config if channel: - warnings.warn( - "The `channel` argument is deprecated; use " "`transport` instead.", - PendingDeprecationWarning, - stacklevel=2, - ) + warnings.warn('The `channel` argument is deprecated; use ' + '`transport` instead.', + PendingDeprecationWarning, stacklevel=2) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict( - client_options - ) + client_options = google.api_core.client_options.from_dict(client_options) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -179,17 +169,15 @@ def __init__( else: if credentials: raise ValueError( - "Received both a transport instance and " - "credentials; these are mutually exclusive." + 'Received both a transport instance and ' + 'credentials; these are mutually exclusive.' ) self.transport = transport else: - self.transport = ( - metrics_service_v2_grpc_transport.MetricsServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, - ) + self.transport = metrics_service_v2_grpc_transport.MetricsServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, ) if client_info is None: @@ -205,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. @@ -216,13 +204,12 @@ def __init__( # Service calls def update_log_metric( - self, - metric_name, - metric, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + metric_name, + metric, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates or updates a logs-based metric. @@ -272,13 +259,11 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_log_metric" not in self._inner_api_calls: - self._inner_api_calls[ - "update_log_metric" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'update_log_metric' not in self._inner_api_calls: + self._inner_api_calls['update_log_metric'] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_log_metric, - default_retry=self._method_configs["UpdateLogMetric"].retry, - default_timeout=self._method_configs["UpdateLogMetric"].timeout, + default_retry=self._method_configs['UpdateLogMetric'].retry, + default_timeout=self._method_configs['UpdateLogMetric'].timeout, client_info=self._client_info, ) @@ -290,26 +275,21 @@ def update_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [('metric_name', metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["update_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['update_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) def delete_log_metric( - self, - metric_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + metric_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes a logs-based metric. @@ -345,13 +325,11 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log_metric" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_log_metric" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'delete_log_metric' not in self._inner_api_calls: + self._inner_api_calls['delete_log_metric'] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_log_metric, - default_retry=self._method_configs["DeleteLogMetric"].retry, - default_timeout=self._method_configs["DeleteLogMetric"].timeout, + default_retry=self._method_configs['DeleteLogMetric'].retry, + default_timeout=self._method_configs['DeleteLogMetric'].timeout, client_info=self._client_info, ) @@ -362,27 +340,22 @@ def delete_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [('metric_name', metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - self._inner_api_calls["delete_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + self._inner_api_calls['delete_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) def list_log_metrics( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Lists logs-based metrics. @@ -441,13 +414,11 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_metrics" not in self._inner_api_calls: - self._inner_api_calls[ - "list_log_metrics" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'list_log_metrics' not in self._inner_api_calls: + self._inner_api_calls['list_log_metrics'] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_log_metrics, - default_retry=self._method_configs["ListLogMetrics"].retry, - default_timeout=self._method_configs["ListLogMetrics"].timeout, + default_retry=self._method_configs['ListLogMetrics'].retry, + default_timeout=self._method_configs['ListLogMetrics'].timeout, client_info=self._client_info, ) @@ -459,37 +430,29 @@ def list_log_metrics( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial( - self._inner_api_calls["list_log_metrics"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), + method=functools.partial(self._inner_api_calls['list_log_metrics'], retry=retry, timeout=timeout, metadata=metadata), request=request, - items_field="metrics", - request_token_field="page_token", - response_token_field="next_page_token", + items_field='metrics', + request_token_field='page_token', + response_token_field='next_page_token', ) return iterator def get_log_metric( - self, - metric_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + metric_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Gets a logs-based metric. @@ -528,13 +491,11 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_log_metric" not in self._inner_api_calls: - self._inner_api_calls[ - "get_log_metric" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'get_log_metric' not in self._inner_api_calls: + self._inner_api_calls['get_log_metric'] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_log_metric, - default_retry=self._method_configs["GetLogMetric"].retry, - default_timeout=self._method_configs["GetLogMetric"].timeout, + default_retry=self._method_configs['GetLogMetric'].retry, + default_timeout=self._method_configs['GetLogMetric'].timeout, client_info=self._client_info, ) @@ -545,27 +506,22 @@ def get_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [('metric_name', metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["get_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['get_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) def create_log_metric( - self, - parent, - metric, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): + self, + parent, + metric, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates a logs-based metric. @@ -615,13 +571,11 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_log_metric" not in self._inner_api_calls: - self._inner_api_calls[ - "create_log_metric" - ] = google.api_core.gapic_v1.method.wrap_method( + if 'create_log_metric' not in self._inner_api_calls: + self._inner_api_calls['create_log_metric'] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_log_metric, - default_retry=self._method_configs["CreateLogMetric"].retry, - default_timeout=self._method_configs["CreateLogMetric"].timeout, + default_retry=self._method_configs['CreateLogMetric'].retry, + default_timeout=self._method_configs['CreateLogMetric'].timeout, client_info=self._client_info, ) @@ -633,15 +587,11 @@ def create_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [('parent', parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) metadata.append(routing_metadata) - return self._inner_api_calls["create_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) + return self._inner_api_calls['create_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index d4bc0e960..e64984d56 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -1,71 +1,71 @@ config = { - "interfaces": { - "google.logging.v2.MetricsServiceV2": { - "retry_codes": { - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "no_retry_1_codes": [], - }, - "retry_params": { - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - }, - "methods": { - "UpdateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", - }, - "DeleteLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", - }, - "ListLogMetrics": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", - }, - "GetLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", - }, - "CreateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params", - }, - }, + "interfaces": { + "google.logging.v2.MetricsServiceV2": { + "retry_codes": { + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ], + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 } + }, + "methods": { + "UpdateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "DeleteLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListLogMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "CreateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } } + } } diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 3cb7e0870..29f9a5ce3 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -28,20 +28,18 @@ class ConfigServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ - # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read", - "https://www.googleapis.com/auth/logging.write", + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', ) - def __init__( - self, channel=None, credentials=None, address="logging.googleapis.com:443" - ): + def __init__(self, channel=None, credentials=None, + address='logging.googleapis.com:443'): """Instantiate the transport class. Args: @@ -59,7 +57,8 @@ 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. @@ -68,8 +67,8 @@ def __init__( address=address, credentials=credentials, options={ - "grpc.max_send_message_length": -1, - "grpc.max_receive_message_length": -1, + 'grpc.max_send_message_length': -1, + 'grpc.max_receive_message_length': -1, }.items(), ) @@ -78,15 +77,16 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "config_service_v2_stub": logging_config_pb2_grpc.ConfigServiceV2Stub( - channel - ), + 'config_service_v2_stub': logging_config_pb2_grpc.ConfigServiceV2Stub(channel), } + @classmethod def create_channel( - cls, address="logging.googleapis.com:443", credentials=None, **kwargs - ): + cls, + address='logging.googleapis.com:443', + credentials=None, + **kwargs): """Create and return a gRPC channel object. Args: @@ -103,7 +103,10 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + address, + credentials=credentials, + scopes=cls._OAUTH_SCOPES, + **kwargs ) @property @@ -127,7 +130,7 @@ def delete_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].DeleteSink + return self._stubs['config_service_v2_stub'].DeleteSink @property def update_sink(self): @@ -145,7 +148,7 @@ def update_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateSink + return self._stubs['config_service_v2_stub'].UpdateSink @property def delete_exclusion(self): @@ -158,7 +161,7 @@ def delete_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].DeleteExclusion + return self._stubs['config_service_v2_stub'].DeleteExclusion @property def list_buckets(self): @@ -171,7 +174,7 @@ def list_buckets(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListBuckets + return self._stubs['config_service_v2_stub'].ListBuckets @property def get_bucket(self): @@ -184,7 +187,7 @@ def get_bucket(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetBucket + return self._stubs['config_service_v2_stub'].GetBucket @property def update_bucket(self): @@ -207,7 +210,7 @@ def update_bucket(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateBucket + return self._stubs['config_service_v2_stub'].UpdateBucket @property def list_sinks(self): @@ -220,7 +223,7 @@ def list_sinks(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListSinks + return self._stubs['config_service_v2_stub'].ListSinks @property def get_sink(self): @@ -233,7 +236,7 @@ def get_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetSink + return self._stubs['config_service_v2_stub'].GetSink @property def create_sink(self): @@ -249,7 +252,7 @@ def create_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].CreateSink + return self._stubs['config_service_v2_stub'].CreateSink @property def list_exclusions(self): @@ -262,7 +265,7 @@ def list_exclusions(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListExclusions + return self._stubs['config_service_v2_stub'].ListExclusions @property def get_exclusion(self): @@ -275,7 +278,7 @@ def get_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetExclusion + return self._stubs['config_service_v2_stub'].GetExclusion @property def create_exclusion(self): @@ -290,7 +293,7 @@ def create_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].CreateExclusion + return self._stubs['config_service_v2_stub'].CreateExclusion @property def update_exclusion(self): @@ -303,7 +306,7 @@ def update_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateExclusion + return self._stubs['config_service_v2_stub'].UpdateExclusion @property def get_cmek_settings(self): @@ -324,7 +327,7 @@ def get_cmek_settings(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetCmekSettings + return self._stubs['config_service_v2_stub'].GetCmekSettings @property def update_cmek_settings(self): @@ -350,4 +353,4 @@ def update_cmek_settings(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateCmekSettings + return self._stubs['config_service_v2_stub'].UpdateCmekSettings \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 07ca0603f..8f0d57acb 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -28,20 +28,18 @@ class LoggingServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ - # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read", - "https://www.googleapis.com/auth/logging.write", + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', ) - def __init__( - self, channel=None, credentials=None, address="logging.googleapis.com:443" - ): + def __init__(self, channel=None, credentials=None, + address='logging.googleapis.com:443'): """Instantiate the transport class. Args: @@ -59,7 +57,8 @@ 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. @@ -68,8 +67,8 @@ def __init__( address=address, credentials=credentials, options={ - "grpc.max_send_message_length": -1, - "grpc.max_receive_message_length": -1, + 'grpc.max_send_message_length': -1, + 'grpc.max_receive_message_length': -1, }.items(), ) @@ -78,13 +77,16 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "logging_service_v2_stub": logging_pb2_grpc.LoggingServiceV2Stub(channel), + 'logging_service_v2_stub': logging_pb2_grpc.LoggingServiceV2Stub(channel), } + @classmethod def create_channel( - cls, address="logging.googleapis.com:443", credentials=None, **kwargs - ): + cls, + address='logging.googleapis.com:443', + credentials=None, + **kwargs): """Create and return a gRPC channel object. Args: @@ -101,7 +103,10 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + address, + credentials=credentials, + scopes=cls._OAUTH_SCOPES, + **kwargs ) @property @@ -127,7 +132,7 @@ def delete_log(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["logging_service_v2_stub"].DeleteLog + return self._stubs['logging_service_v2_stub'].DeleteLog @property def list_log_entries(self): @@ -143,7 +148,7 @@ def list_log_entries(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["logging_service_v2_stub"].ListLogEntries + return self._stubs['logging_service_v2_stub'].ListLogEntries @property def write_log_entries(self): @@ -162,7 +167,7 @@ def write_log_entries(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["logging_service_v2_stub"].WriteLogEntries + return self._stubs['logging_service_v2_stub'].WriteLogEntries @property def list_monitored_resource_descriptors(self): @@ -175,7 +180,7 @@ def list_monitored_resource_descriptors(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["logging_service_v2_stub"].ListMonitoredResourceDescriptors + return self._stubs['logging_service_v2_stub'].ListMonitoredResourceDescriptors @property def list_logs(self): @@ -189,4 +194,4 @@ def list_logs(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["logging_service_v2_stub"].ListLogs + return self._stubs['logging_service_v2_stub'].ListLogs \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index f1d75af56..ebe94f008 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -28,20 +28,18 @@ class MetricsServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ - # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/logging.admin", - "https://www.googleapis.com/auth/logging.read", - "https://www.googleapis.com/auth/logging.write", + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', ) - def __init__( - self, channel=None, credentials=None, address="logging.googleapis.com:443" - ): + def __init__(self, channel=None, credentials=None, + address='logging.googleapis.com:443'): """Instantiate the transport class. Args: @@ -59,7 +57,8 @@ 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. @@ -68,8 +67,8 @@ def __init__( address=address, credentials=credentials, options={ - "grpc.max_send_message_length": -1, - "grpc.max_receive_message_length": -1, + 'grpc.max_send_message_length': -1, + 'grpc.max_receive_message_length': -1, }.items(), ) @@ -78,15 +77,16 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "metrics_service_v2_stub": logging_metrics_pb2_grpc.MetricsServiceV2Stub( - channel - ), + 'metrics_service_v2_stub': logging_metrics_pb2_grpc.MetricsServiceV2Stub(channel), } + @classmethod def create_channel( - cls, address="logging.googleapis.com:443", credentials=None, **kwargs - ): + cls, + address='logging.googleapis.com:443', + credentials=None, + **kwargs): """Create and return a gRPC channel object. Args: @@ -103,7 +103,10 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + address, + credentials=credentials, + scopes=cls._OAUTH_SCOPES, + **kwargs ) @property @@ -126,7 +129,7 @@ def update_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].UpdateLogMetric + return self._stubs['metrics_service_v2_stub'].UpdateLogMetric @property def delete_log_metric(self): @@ -139,7 +142,7 @@ def delete_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].DeleteLogMetric + return self._stubs['metrics_service_v2_stub'].DeleteLogMetric @property def list_log_metrics(self): @@ -152,7 +155,7 @@ def list_log_metrics(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].ListLogMetrics + return self._stubs['metrics_service_v2_stub'].ListLogMetrics @property def get_log_metric(self): @@ -165,7 +168,7 @@ def get_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].GetLogMetric + return self._stubs['metrics_service_v2_stub'].GetLogMetric @property def create_log_metric(self): @@ -178,4 +181,4 @@ def create_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].CreateLogMetric + return self._stubs['metrics_service_v2_stub'].CreateLogMetric \ No newline at end of file diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index d0cbb10fb..d5c1cc208 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -6,23 +6,16 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 -from google.api import ( - monitored_resource_pb2 as google_dot_api_dot_monitored__resource__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.logging.type import ( - http_request_pb2 as google_dot_logging_dot_type_dot_http__request__pb2, -) -from google.logging.type import ( - log_severity_pb2 as google_dot_logging_dot_type_dot_log__severity__pb2, -) +from google.logging.type import http_request_pb2 as google_dot_logging_dot_type_dot_http__request__pb2 +from google.logging.type import log_severity_pb2 as google_dot_logging_dot_type_dot_log__severity__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -31,663 +24,333 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/logging_v2/proto/log_entry.proto", - package="google.logging.v2", - syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', - dependencies=[ - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, - google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, - google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, - google_dot_logging_dot_type_dot_log__severity__pb2.DESCRIPTOR, - google_dot_protobuf_dot_any__pb2.DESCRIPTOR, - google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, - ], -) + name='google/cloud/logging_v2/proto/log_entry.proto', + package='google.logging.v2', + syntax='proto3', + serialized_options=b'\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto\"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload\"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' + , + dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR,google_dot_logging_dot_type_dot_log__severity__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) + + _LOGENTRY_LABELSENTRY = _descriptor.Descriptor( - name="LabelsEntry", - full_name="google.logging.v2.LogEntry.LabelsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="google.logging.v2.LogEntry.LabelsEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="google.logging.v2.LogEntry.LabelsEntry.value", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1121, - serialized_end=1166, + name='LabelsEntry', + full_name='google.logging.v2.LogEntry.LabelsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.logging.v2.LogEntry.LabelsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='google.logging.v2.LogEntry.LabelsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1121, + serialized_end=1166, ) _LOGENTRY = _descriptor.Descriptor( - name="LogEntry", - full_name="google.logging.v2.LogEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="log_name", - full_name="google.logging.v2.LogEntry.log_name", - index=0, - number=12, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="resource", - full_name="google.logging.v2.LogEntry.resource", - index=1, - number=8, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="proto_payload", - full_name="google.logging.v2.LogEntry.proto_payload", - index=2, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="text_payload", - full_name="google.logging.v2.LogEntry.text_payload", - index=3, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="json_payload", - full_name="google.logging.v2.LogEntry.json_payload", - index=4, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="timestamp", - full_name="google.logging.v2.LogEntry.timestamp", - index=5, - number=9, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="receive_timestamp", - full_name="google.logging.v2.LogEntry.receive_timestamp", - index=6, - number=24, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="severity", - full_name="google.logging.v2.LogEntry.severity", - index=7, - number=10, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="insert_id", - full_name="google.logging.v2.LogEntry.insert_id", - index=8, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="http_request", - full_name="google.logging.v2.LogEntry.http_request", - index=9, - number=7, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="labels", - full_name="google.logging.v2.LogEntry.labels", - index=10, - number=11, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="operation", - full_name="google.logging.v2.LogEntry.operation", - index=11, - number=15, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="trace", - full_name="google.logging.v2.LogEntry.trace", - index=12, - number=22, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="span_id", - full_name="google.logging.v2.LogEntry.span_id", - index=13, - number=27, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="trace_sampled", - full_name="google.logging.v2.LogEntry.trace_sampled", - index=14, - number=30, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="source_location", - full_name="google.logging.v2.LogEntry.source_location", - index=15, - number=23, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[ - _LOGENTRY_LABELSENTRY, - ], - enum_types=[], - serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="payload", - full_name="google.logging.v2.LogEntry.payload", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=391, - serialized_end=1369, + name='LogEntry', + full_name='google.logging.v2.LogEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='log_name', full_name='google.logging.v2.LogEntry.log_name', index=0, + number=12, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='resource', full_name='google.logging.v2.LogEntry.resource', index=1, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='proto_payload', full_name='google.logging.v2.LogEntry.proto_payload', index=2, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='text_payload', full_name='google.logging.v2.LogEntry.text_payload', index=3, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='json_payload', full_name='google.logging.v2.LogEntry.json_payload', index=4, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='timestamp', full_name='google.logging.v2.LogEntry.timestamp', index=5, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='receive_timestamp', full_name='google.logging.v2.LogEntry.receive_timestamp', index=6, + number=24, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='severity', full_name='google.logging.v2.LogEntry.severity', index=7, + number=10, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='insert_id', full_name='google.logging.v2.LogEntry.insert_id', index=8, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='http_request', full_name='google.logging.v2.LogEntry.http_request', index=9, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='labels', full_name='google.logging.v2.LogEntry.labels', index=10, + number=11, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='operation', full_name='google.logging.v2.LogEntry.operation', index=11, + number=15, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='trace', full_name='google.logging.v2.LogEntry.trace', index=12, + number=22, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='span_id', full_name='google.logging.v2.LogEntry.span_id', index=13, + number=27, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='trace_sampled', full_name='google.logging.v2.LogEntry.trace_sampled', index=14, + number=30, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='source_location', full_name='google.logging.v2.LogEntry.source_location', index=15, + number=23, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LOGENTRY_LABELSENTRY, ], + enum_types=[ + ], + serialized_options=b'\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022\'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='payload', full_name='google.logging.v2.LogEntry.payload', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=391, + serialized_end=1369, ) _LOGENTRYOPERATION = _descriptor.Descriptor( - name="LogEntryOperation", - full_name="google.logging.v2.LogEntryOperation", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="id", - full_name="google.logging.v2.LogEntryOperation.id", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="producer", - full_name="google.logging.v2.LogEntryOperation.producer", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="first", - full_name="google.logging.v2.LogEntryOperation.first", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="last", - full_name="google.logging.v2.LogEntryOperation.last", - index=3, - number=4, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1371, - serialized_end=1469, + name='LogEntryOperation', + full_name='google.logging.v2.LogEntryOperation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='google.logging.v2.LogEntryOperation.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='producer', full_name='google.logging.v2.LogEntryOperation.producer', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='first', full_name='google.logging.v2.LogEntryOperation.first', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='last', full_name='google.logging.v2.LogEntryOperation.last', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1371, + serialized_end=1469, ) _LOGENTRYSOURCELOCATION = _descriptor.Descriptor( - name="LogEntrySourceLocation", - full_name="google.logging.v2.LogEntrySourceLocation", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="file", - full_name="google.logging.v2.LogEntrySourceLocation.file", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="line", - full_name="google.logging.v2.LogEntrySourceLocation.line", - index=1, - number=2, - type=3, - cpp_type=2, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="function", - full_name="google.logging.v2.LogEntrySourceLocation.function", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1471, - serialized_end=1556, + name='LogEntrySourceLocation', + full_name='google.logging.v2.LogEntrySourceLocation', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='file', full_name='google.logging.v2.LogEntrySourceLocation.file', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='line', full_name='google.logging.v2.LogEntrySourceLocation.line', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='function', full_name='google.logging.v2.LogEntrySourceLocation.function', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1471, + serialized_end=1556, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY -_LOGENTRY.fields_by_name[ - "resource" -].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE -_LOGENTRY.fields_by_name[ - "proto_payload" -].message_type = google_dot_protobuf_dot_any__pb2._ANY -_LOGENTRY.fields_by_name[ - "json_payload" -].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_LOGENTRY.fields_by_name[ - "timestamp" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGENTRY.fields_by_name[ - "receive_timestamp" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGENTRY.fields_by_name[ - "severity" -].enum_type = google_dot_logging_dot_type_dot_log__severity__pb2._LOGSEVERITY -_LOGENTRY.fields_by_name[ - "http_request" -].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST -_LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY -_LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION -_LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION -_LOGENTRY.oneofs_by_name["payload"].fields.append( - _LOGENTRY.fields_by_name["proto_payload"] -) -_LOGENTRY.fields_by_name["proto_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ - "payload" -] -_LOGENTRY.oneofs_by_name["payload"].fields.append( - _LOGENTRY.fields_by_name["text_payload"] -) -_LOGENTRY.fields_by_name["text_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ - "payload" -] -_LOGENTRY.oneofs_by_name["payload"].fields.append( - _LOGENTRY.fields_by_name["json_payload"] -) -_LOGENTRY.fields_by_name["json_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ - "payload" -] -DESCRIPTOR.message_types_by_name["LogEntry"] = _LOGENTRY -DESCRIPTOR.message_types_by_name["LogEntryOperation"] = _LOGENTRYOPERATION -DESCRIPTOR.message_types_by_name["LogEntrySourceLocation"] = _LOGENTRYSOURCELOCATION +_LOGENTRY.fields_by_name['resource'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_LOGENTRY.fields_by_name['proto_payload'].message_type = google_dot_protobuf_dot_any__pb2._ANY +_LOGENTRY.fields_by_name['json_payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_LOGENTRY.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name['receive_timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name['severity'].enum_type = google_dot_logging_dot_type_dot_log__severity__pb2._LOGSEVERITY +_LOGENTRY.fields_by_name['http_request'].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST +_LOGENTRY.fields_by_name['labels'].message_type = _LOGENTRY_LABELSENTRY +_LOGENTRY.fields_by_name['operation'].message_type = _LOGENTRYOPERATION +_LOGENTRY.fields_by_name['source_location'].message_type = _LOGENTRYSOURCELOCATION +_LOGENTRY.oneofs_by_name['payload'].fields.append( + _LOGENTRY.fields_by_name['proto_payload']) +_LOGENTRY.fields_by_name['proto_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] +_LOGENTRY.oneofs_by_name['payload'].fields.append( + _LOGENTRY.fields_by_name['text_payload']) +_LOGENTRY.fields_by_name['text_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] +_LOGENTRY.oneofs_by_name['payload'].fields.append( + _LOGENTRY.fields_by_name['json_payload']) +_LOGENTRY.fields_by_name['json_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] +DESCRIPTOR.message_types_by_name['LogEntry'] = _LOGENTRY +DESCRIPTOR.message_types_by_name['LogEntryOperation'] = _LOGENTRYOPERATION +DESCRIPTOR.message_types_by_name['LogEntrySourceLocation'] = _LOGENTRYSOURCELOCATION _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogEntry = _reflection.GeneratedProtocolMessageType( - "LogEntry", - (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( - "LabelsEntry", - (_message.Message,), - { - "DESCRIPTOR": _LOGENTRY_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - }, - ), - "DESCRIPTOR": _LOGENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """An individual entry in a log. +LogEntry = _reflection.GeneratedProtocolMessageType('LogEntry', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _LOGENTRY_LABELSENTRY, + '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) + }) + , + 'DESCRIPTOR' : _LOGENTRY, + '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' + , + '__doc__': """An individual entry in a log. Attributes: log_name: @@ -792,19 +455,16 @@ Optional. Source code location information associated with the log entry, if any. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) + }) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) -LogEntryOperation = _reflection.GeneratedProtocolMessageType( - "LogEntryOperation", - (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYOPERATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about a potentially long-running operation with +LogEntryOperation = _reflection.GeneratedProtocolMessageType('LogEntryOperation', (_message.Message,), { + 'DESCRIPTOR' : _LOGENTRYOPERATION, + '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' + , + '__doc__': """Additional information about a potentially long-running operation with which a log entry is associated. Attributes: @@ -824,18 +484,15 @@ Optional. Set this to True if this is the last log entry in the operation. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) + }) _sym_db.RegisterMessage(LogEntryOperation) -LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( - "LogEntrySourceLocation", - (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYSOURCELOCATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about the source code location that produced +LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType('LogEntrySourceLocation', (_message.Message,), { + 'DESCRIPTOR' : _LOGENTRYSOURCELOCATION, + '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' + , + '__doc__': """Additional information about the source code location that produced the log entry. Attributes: @@ -855,33 +512,32 @@ ``qual.if.ied.Class.method`` (Java), ``dir/package.func`` (Go), ``function`` (Python). """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) + }) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name["log_name"]._options = None -_LOGENTRY.fields_by_name["resource"]._options = None -_LOGENTRY.fields_by_name["timestamp"]._options = None -_LOGENTRY.fields_by_name["receive_timestamp"]._options = None -_LOGENTRY.fields_by_name["severity"]._options = None -_LOGENTRY.fields_by_name["insert_id"]._options = None -_LOGENTRY.fields_by_name["http_request"]._options = None -_LOGENTRY.fields_by_name["labels"]._options = None -_LOGENTRY.fields_by_name["operation"]._options = None -_LOGENTRY.fields_by_name["trace"]._options = None -_LOGENTRY.fields_by_name["span_id"]._options = None -_LOGENTRY.fields_by_name["trace_sampled"]._options = None -_LOGENTRY.fields_by_name["source_location"]._options = None +_LOGENTRY.fields_by_name['log_name']._options = None +_LOGENTRY.fields_by_name['resource']._options = None +_LOGENTRY.fields_by_name['timestamp']._options = None +_LOGENTRY.fields_by_name['receive_timestamp']._options = None +_LOGENTRY.fields_by_name['severity']._options = None +_LOGENTRY.fields_by_name['insert_id']._options = None +_LOGENTRY.fields_by_name['http_request']._options = None +_LOGENTRY.fields_by_name['labels']._options = None +_LOGENTRY.fields_by_name['operation']._options = None +_LOGENTRY.fields_by_name['trace']._options = None +_LOGENTRY.fields_by_name['span_id']._options = None +_LOGENTRY.fields_by_name['trace_sampled']._options = None +_LOGENTRY.fields_by_name['source_location']._options = None _LOGENTRY._options = None -_LOGENTRYOPERATION.fields_by_name["id"]._options = None -_LOGENTRYOPERATION.fields_by_name["producer"]._options = None -_LOGENTRYOPERATION.fields_by_name["first"]._options = None -_LOGENTRYOPERATION.fields_by_name["last"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None +_LOGENTRYOPERATION.fields_by_name['id']._options = None +_LOGENTRYOPERATION.fields_by_name['producer']._options = None +_LOGENTRYOPERATION.fields_by_name['first']._options = None +_LOGENTRYOPERATION.fields_by_name['last']._options = None +_LOGENTRYSOURCELOCATION.fields_by_name['file']._options = None +_LOGENTRYSOURCELOCATION.fields_by_name['line']._options = None +_LOGENTRYSOURCELOCATION.fields_by_name['function']._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 8a9393943..2daafffeb 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py @@ -1,3 +1,4 @@ # 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/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 672b83523..6f19125c2 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -7,7 +7,6 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -24,60 +23,42 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/logging_v2/proto/logging_config.proto", - package="google.logging.v2", - syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', - dependencies=[ - google_dot_api_dot_client__pb2.DESCRIPTOR, - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, - google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, - google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, - ], -) + name='google/cloud/logging_v2/proto/logging_config.proto', + package='google.logging.v2', + syntax='proto3', + serialized_options=b'\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}\"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32\".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options\"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n\"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogBucket\"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}\"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings\"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse\"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket\"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket\"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse\"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12\"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12\"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01\"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%\"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\x04sinkZ$\"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,\"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty\"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse\"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12\"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12\"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01\"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\texclusionZ4\"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ.\"!/v2/{parent=folders/*}/exclusions:\texclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty\"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings\"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings\"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3' + , + dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) _LIFECYCLESTATE = _descriptor.EnumDescriptor( - name="LifecycleState", - full_name="google.logging.v2.LifecycleState", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="LIFECYCLE_STATE_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="ACTIVE", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="DELETE_REQUESTED", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=4659, - serialized_end=4742, + name='LifecycleState', + full_name='google.logging.v2.LifecycleState', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='LIFECYCLE_STATE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ACTIVE', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='DELETE_REQUESTED', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=4659, + serialized_end=4742, ) _sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) @@ -88,1918 +69,1142 @@ _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( - name="VersionFormat", - full_name="google.logging.v2.LogSink.VersionFormat", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="VERSION_FORMAT_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="V2", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="V1", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=1306, - serialized_end=1369, + name='VersionFormat', + full_name='google.logging.v2.LogSink.VersionFormat', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='VERSION_FORMAT_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='V2', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='V1', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1306, + serialized_end=1369, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) _LOGBUCKET = _descriptor.Descriptor( - name="LogBucket", - full_name="google.logging.v2.LogBucket", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogBucket.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogBucket.description", - index=1, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogBucket.create_time", - index=2, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogBucket.update_time", - index=3, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="retention_days", - full_name="google.logging.v2.LogBucket.retention_days", - index=4, - number=11, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="lifecycle_state", - full_name="google.logging.v2.LogBucket.lifecycle_state", - index=5, - number=12, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=317, - serialized_end=856, + name='LogBucket', + full_name='google.logging.v2.LogBucket', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.LogBucket.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='google.logging.v2.LogBucket.description', index=1, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.logging.v2.LogBucket.create_time', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_time', full_name='google.logging.v2.LogBucket.update_time', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='retention_days', full_name='google.logging.v2.LogBucket.retention_days', index=4, + number=11, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='lifecycle_state', full_name='google.logging.v2.LogBucket.lifecycle_state', index=5, + number=12, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=317, + serialized_end=856, ) _LOGSINK = _descriptor.Descriptor( - name="LogSink", - full_name="google.logging.v2.LogSink", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogSink.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="destination", - full_name="google.logging.v2.LogSink.destination", - index=1, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\003\n\001*", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="google.logging.v2.LogSink.filter", - index=2, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogSink.description", - index=3, - number=18, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="disabled", - full_name="google.logging.v2.LogSink.disabled", - index=4, - number=19, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="output_version_format", - full_name="google.logging.v2.LogSink.output_version_format", - index=5, - number=6, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\030\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="writer_identity", - full_name="google.logging.v2.LogSink.writer_identity", - index=6, - number=8, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="include_children", - full_name="google.logging.v2.LogSink.include_children", - index=7, - number=9, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="bigquery_options", - full_name="google.logging.v2.LogSink.bigquery_options", - index=8, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogSink.create_time", - index=9, - number=13, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogSink.update_time", - index=10, - number=14, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _LOGSINK_VERSIONFORMAT, - ], - serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="options", - full_name="google.logging.v2.LogSink.options", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=859, - serialized_end=1574, + name='LogSink', + full_name='google.logging.v2.LogSink', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.LogSink.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='destination', full_name='google.logging.v2.LogSink.destination', index=1, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\003\n\001*', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='google.logging.v2.LogSink.filter', index=2, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='google.logging.v2.LogSink.description', index=3, + number=18, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disabled', full_name='google.logging.v2.LogSink.disabled', index=4, + number=19, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='output_version_format', full_name='google.logging.v2.LogSink.output_version_format', index=5, + number=6, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='writer_identity', full_name='google.logging.v2.LogSink.writer_identity', index=6, + number=8, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='include_children', full_name='google.logging.v2.LogSink.include_children', index=7, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bigquery_options', full_name='google.logging.v2.LogSink.bigquery_options', index=8, + number=12, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.logging.v2.LogSink.create_time', index=9, + number=13, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_time', full_name='google.logging.v2.LogSink.update_time', index=10, + number=14, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _LOGSINK_VERSIONFORMAT, + ], + serialized_options=b'\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='options', full_name='google.logging.v2.LogSink.options', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=859, + serialized_end=1574, ) _BIGQUERYOPTIONS = _descriptor.Descriptor( - name="BigQueryOptions", - full_name="google.logging.v2.BigQueryOptions", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="use_partitioned_tables", - full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", - index=0, - number=1, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="uses_timestamp_column_partitioning", - full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", - index=1, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1576, - serialized_end=1679, + name='BigQueryOptions', + full_name='google.logging.v2.BigQueryOptions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='use_partitioned_tables', full_name='google.logging.v2.BigQueryOptions.use_partitioned_tables', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='uses_timestamp_column_partitioning', full_name='google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning', index=1, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1576, + serialized_end=1679, ) _LISTBUCKETSREQUEST = _descriptor.Descriptor( - name="ListBucketsRequest", - full_name="google.logging.v2.ListBucketsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListBucketsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListBucketsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListBucketsRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1681, - serialized_end=1808, + name='ListBucketsRequest', + full_name='google.logging.v2.ListBucketsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.ListBucketsRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\022 logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListBucketsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListBucketsRequest.page_size', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1681, + serialized_end=1808, ) _LISTBUCKETSRESPONSE = _descriptor.Descriptor( - name="ListBucketsResponse", - full_name="google.logging.v2.ListBucketsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="buckets", - full_name="google.logging.v2.ListBucketsResponse.buckets", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListBucketsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1810, - serialized_end=1903, + name='ListBucketsResponse', + full_name='google.logging.v2.ListBucketsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='buckets', full_name='google.logging.v2.ListBucketsResponse.buckets', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListBucketsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1810, + serialized_end=1903, ) _UPDATEBUCKETREQUEST = _descriptor.Descriptor( - name="UpdateBucketRequest", - full_name="google.logging.v2.UpdateBucketRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.UpdateBucketRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="bucket", - full_name="google.logging.v2.UpdateBucketRequest.bucket", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateBucketRequest.update_mask", - index=2, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1906, - serialized_end=2088, + name='UpdateBucketRequest', + full_name='google.logging.v2.UpdateBucketRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.UpdateBucketRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bucket', full_name='google.logging.v2.UpdateBucketRequest.bucket', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_mask', full_name='google.logging.v2.UpdateBucketRequest.update_mask', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1906, + serialized_end=2088, ) _GETBUCKETREQUEST = _descriptor.Descriptor( - name="GetBucketRequest", - full_name="google.logging.v2.GetBucketRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.GetBucketRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2090, - serialized_end=2164, + name='GetBucketRequest', + full_name='google.logging.v2.GetBucketRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.GetBucketRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2090, + serialized_end=2164, ) _LISTSINKSREQUEST = _descriptor.Descriptor( - name="ListSinksRequest", - full_name="google.logging.v2.ListSinksRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListSinksRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListSinksRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListSinksRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2166, - serialized_end=2289, + name='ListSinksRequest', + full_name='google.logging.v2.ListSinksRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.ListSinksRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A \022\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListSinksRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListSinksRequest.page_size', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2166, + serialized_end=2289, ) _LISTSINKSRESPONSE = _descriptor.Descriptor( - name="ListSinksResponse", - full_name="google.logging.v2.ListSinksResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="sinks", - full_name="google.logging.v2.ListSinksResponse.sinks", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListSinksResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2291, - serialized_end=2378, + name='ListSinksResponse', + full_name='google.logging.v2.ListSinksResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='sinks', full_name='google.logging.v2.ListSinksResponse.sinks', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListSinksResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2291, + serialized_end=2378, ) _GETSINKREQUEST = _descriptor.Descriptor( - name="GetSinkRequest", - full_name="google.logging.v2.GetSinkRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="sink_name", - full_name="google.logging.v2.GetSinkRequest.sink_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2380, - serialized_end=2455, + name='GetSinkRequest', + full_name='google.logging.v2.GetSinkRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='sink_name', full_name='google.logging.v2.GetSinkRequest.sink_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2380, + serialized_end=2455, ) _CREATESINKREQUEST = _descriptor.Descriptor( - name="CreateSinkRequest", - full_name="google.logging.v2.CreateSinkRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.CreateSinkRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="sink", - full_name="google.logging.v2.CreateSinkRequest.sink", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="unique_writer_identity", - full_name="google.logging.v2.CreateSinkRequest.unique_writer_identity", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2458, - serialized_end=2617, + name='CreateSinkRequest', + full_name='google.logging.v2.CreateSinkRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.CreateSinkRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A \022\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='sink', full_name='google.logging.v2.CreateSinkRequest.sink', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='unique_writer_identity', full_name='google.logging.v2.CreateSinkRequest.unique_writer_identity', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2458, + serialized_end=2617, ) _UPDATESINKREQUEST = _descriptor.Descriptor( - name="UpdateSinkRequest", - full_name="google.logging.v2.UpdateSinkRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="sink_name", - full_name="google.logging.v2.UpdateSinkRequest.sink_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="sink", - full_name="google.logging.v2.UpdateSinkRequest.sink", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="unique_writer_identity", - full_name="google.logging.v2.UpdateSinkRequest.unique_writer_identity", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateSinkRequest.update_mask", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2620, - serialized_end=2836, + name='UpdateSinkRequest', + full_name='google.logging.v2.UpdateSinkRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='sink_name', full_name='google.logging.v2.UpdateSinkRequest.sink_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='sink', full_name='google.logging.v2.UpdateSinkRequest.sink', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='unique_writer_identity', full_name='google.logging.v2.UpdateSinkRequest.unique_writer_identity', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_mask', full_name='google.logging.v2.UpdateSinkRequest.update_mask', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2620, + serialized_end=2836, ) _DELETESINKREQUEST = _descriptor.Descriptor( - name="DeleteSinkRequest", - full_name="google.logging.v2.DeleteSinkRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="sink_name", - full_name="google.logging.v2.DeleteSinkRequest.sink_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2838, - serialized_end=2916, + name='DeleteSinkRequest', + full_name='google.logging.v2.DeleteSinkRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='sink_name', full_name='google.logging.v2.DeleteSinkRequest.sink_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2838, + serialized_end=2916, ) _LOGEXCLUSION = _descriptor.Descriptor( - name="LogExclusion", - full_name="google.logging.v2.LogExclusion", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogExclusion.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogExclusion.description", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="google.logging.v2.LogExclusion.filter", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="disabled", - full_name="google.logging.v2.LogExclusion.disabled", - index=3, - number=4, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogExclusion.create_time", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogExclusion.update_time", - index=5, - number=6, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2919, - serialized_end=3369, + name='LogExclusion', + full_name='google.logging.v2.LogExclusion', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.LogExclusion.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='google.logging.v2.LogExclusion.description', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='google.logging.v2.LogExclusion.filter', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='disabled', full_name='google.logging.v2.LogExclusion.disabled', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.logging.v2.LogExclusion.create_time', index=4, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_time', full_name='google.logging.v2.LogExclusion.update_time', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022\'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2919, + serialized_end=3369, ) _LISTEXCLUSIONSREQUEST = _descriptor.Descriptor( - name="ListExclusionsRequest", - full_name="google.logging.v2.ListExclusionsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListExclusionsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListExclusionsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListExclusionsRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3372, - serialized_end=3505, + name='ListExclusionsRequest', + full_name='google.logging.v2.ListExclusionsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.ListExclusionsRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\022#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListExclusionsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListExclusionsRequest.page_size', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3372, + serialized_end=3505, ) _LISTEXCLUSIONSRESPONSE = _descriptor.Descriptor( - name="ListExclusionsResponse", - full_name="google.logging.v2.ListExclusionsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="exclusions", - full_name="google.logging.v2.ListExclusionsResponse.exclusions", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListExclusionsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3507, - serialized_end=3609, + name='ListExclusionsResponse', + full_name='google.logging.v2.ListExclusionsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='exclusions', full_name='google.logging.v2.ListExclusionsResponse.exclusions', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListExclusionsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3507, + serialized_end=3609, ) _GETEXCLUSIONREQUEST = _descriptor.Descriptor( - name="GetExclusionRequest", - full_name="google.logging.v2.GetExclusionRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.GetExclusionRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3611, - serialized_end=3691, + name='GetExclusionRequest', + full_name='google.logging.v2.GetExclusionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.GetExclusionRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3611, + serialized_end=3691, ) _CREATEEXCLUSIONREQUEST = _descriptor.Descriptor( - name="CreateExclusionRequest", - full_name="google.logging.v2.CreateExclusionRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.CreateExclusionRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="exclusion", - full_name="google.logging.v2.CreateExclusionRequest.exclusion", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3694, - serialized_end=3836, + name='CreateExclusionRequest', + full_name='google.logging.v2.CreateExclusionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.CreateExclusionRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\022#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='exclusion', full_name='google.logging.v2.CreateExclusionRequest.exclusion', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3694, + serialized_end=3836, ) _UPDATEEXCLUSIONREQUEST = _descriptor.Descriptor( - name="UpdateExclusionRequest", - full_name="google.logging.v2.UpdateExclusionRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.UpdateExclusionRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="exclusion", - full_name="google.logging.v2.UpdateExclusionRequest.exclusion", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateExclusionRequest.update_mask", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3839, - serialized_end=4033, + name='UpdateExclusionRequest', + full_name='google.logging.v2.UpdateExclusionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.UpdateExclusionRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='exclusion', full_name='google.logging.v2.UpdateExclusionRequest.exclusion', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_mask', full_name='google.logging.v2.UpdateExclusionRequest.update_mask', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=3839, + serialized_end=4033, ) _DELETEEXCLUSIONREQUEST = _descriptor.Descriptor( - name="DeleteExclusionRequest", - full_name="google.logging.v2.DeleteExclusionRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.DeleteExclusionRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=4035, - serialized_end=4118, + name='DeleteExclusionRequest', + full_name='google.logging.v2.DeleteExclusionRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.DeleteExclusionRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4035, + serialized_end=4118, ) _GETCMEKSETTINGSREQUEST = _descriptor.Descriptor( - name="GetCmekSettingsRequest", - full_name="google.logging.v2.GetCmekSettingsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.GetCmekSettingsRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/CmekSettings", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=4120, - serialized_end=4203, + name='GetCmekSettingsRequest', + full_name='google.logging.v2.GetCmekSettingsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.GetCmekSettingsRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/CmekSettings', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4120, + serialized_end=4203, ) _UPDATECMEKSETTINGSREQUEST = _descriptor.Descriptor( - name="UpdateCmekSettingsRequest", - full_name="google.logging.v2.UpdateCmekSettingsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.UpdateCmekSettingsRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="cmek_settings", - full_name="google.logging.v2.UpdateCmekSettingsRequest.cmek_settings", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateCmekSettingsRequest.update_mask", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=4206, - serialized_end=4367, + name='UpdateCmekSettingsRequest', + full_name='google.logging.v2.UpdateCmekSettingsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.UpdateCmekSettingsRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='cmek_settings', full_name='google.logging.v2.UpdateCmekSettingsRequest.cmek_settings', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_mask', full_name='google.logging.v2.UpdateCmekSettingsRequest.update_mask', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4206, + serialized_end=4367, ) _CMEKSETTINGS = _descriptor.Descriptor( - name="CmekSettings", - full_name="google.logging.v2.CmekSettings", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.CmekSettings.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="kms_key_name", - full_name="google.logging.v2.CmekSettings.kms_key_name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="service_account_id", - full_name="google.logging.v2.CmekSettings.service_account_id", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=4370, - serialized_end=4657, + name='CmekSettings', + full_name='google.logging.v2.CmekSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.CmekSettings.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='kms_key_name', full_name='google.logging.v2.CmekSettings.kms_key_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='service_account_id', full_name='google.logging.v2.CmekSettings.service_account_id', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=4370, + serialized_end=4657, ) -_LOGBUCKET.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE -_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT -_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS -_LOGSINK.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGSINK.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name['lifecycle_state'].enum_type = _LIFECYCLESTATE +_LOGSINK.fields_by_name['output_version_format'].enum_type = _LOGSINK_VERSIONFORMAT +_LOGSINK.fields_by_name['bigquery_options'].message_type = _BIGQUERYOPTIONS +_LOGSINK.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK -_LOGSINK.oneofs_by_name["options"].fields.append( - _LOGSINK.fields_by_name["bigquery_options"] -) -_LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ - "options" -] -_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK -_CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK -_UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK -_UPDATESINKREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LOGEXCLUSION.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGEXCLUSION.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LISTEXCLUSIONSRESPONSE.fields_by_name["exclusions"].message_type = _LOGEXCLUSION -_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION -_UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION -_UPDATEEXCLUSIONREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"].message_type = _CMEKSETTINGS -_UPDATECMEKSETTINGSREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET -DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK -DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS -DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST -DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE -DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST -DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST -DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST -DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE -DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST -DESCRIPTOR.message_types_by_name["CreateSinkRequest"] = _CREATESINKREQUEST -DESCRIPTOR.message_types_by_name["UpdateSinkRequest"] = _UPDATESINKREQUEST -DESCRIPTOR.message_types_by_name["DeleteSinkRequest"] = _DELETESINKREQUEST -DESCRIPTOR.message_types_by_name["LogExclusion"] = _LOGEXCLUSION -DESCRIPTOR.message_types_by_name["ListExclusionsRequest"] = _LISTEXCLUSIONSREQUEST -DESCRIPTOR.message_types_by_name["ListExclusionsResponse"] = _LISTEXCLUSIONSRESPONSE -DESCRIPTOR.message_types_by_name["GetExclusionRequest"] = _GETEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name["CreateExclusionRequest"] = _CREATEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name["UpdateExclusionRequest"] = _UPDATEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name["DeleteExclusionRequest"] = _DELETEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name["GetCmekSettingsRequest"] = _GETCMEKSETTINGSREQUEST -DESCRIPTOR.message_types_by_name[ - "UpdateCmekSettingsRequest" -] = _UPDATECMEKSETTINGSREQUEST -DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS -DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE +_LOGSINK.oneofs_by_name['options'].fields.append( + _LOGSINK.fields_by_name['bigquery_options']) +_LOGSINK.fields_by_name['bigquery_options'].containing_oneof = _LOGSINK.oneofs_by_name['options'] +_LISTBUCKETSRESPONSE.fields_by_name['buckets'].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name['bucket'].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_LISTSINKSRESPONSE.fields_by_name['sinks'].message_type = _LOGSINK +_CREATESINKREQUEST.fields_by_name['sink'].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name['sink'].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_LOGEXCLUSION.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGEXCLUSION.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LISTEXCLUSIONSRESPONSE.fields_by_name['exclusions'].message_type = _LOGEXCLUSION +_CREATEEXCLUSIONREQUEST.fields_by_name['exclusion'].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name['exclusion'].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_UPDATECMEKSETTINGSREQUEST.fields_by_name['cmek_settings'].message_type = _CMEKSETTINGS +_UPDATECMEKSETTINGSREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +DESCRIPTOR.message_types_by_name['LogBucket'] = _LOGBUCKET +DESCRIPTOR.message_types_by_name['LogSink'] = _LOGSINK +DESCRIPTOR.message_types_by_name['BigQueryOptions'] = _BIGQUERYOPTIONS +DESCRIPTOR.message_types_by_name['ListBucketsRequest'] = _LISTBUCKETSREQUEST +DESCRIPTOR.message_types_by_name['ListBucketsResponse'] = _LISTBUCKETSRESPONSE +DESCRIPTOR.message_types_by_name['UpdateBucketRequest'] = _UPDATEBUCKETREQUEST +DESCRIPTOR.message_types_by_name['GetBucketRequest'] = _GETBUCKETREQUEST +DESCRIPTOR.message_types_by_name['ListSinksRequest'] = _LISTSINKSREQUEST +DESCRIPTOR.message_types_by_name['ListSinksResponse'] = _LISTSINKSRESPONSE +DESCRIPTOR.message_types_by_name['GetSinkRequest'] = _GETSINKREQUEST +DESCRIPTOR.message_types_by_name['CreateSinkRequest'] = _CREATESINKREQUEST +DESCRIPTOR.message_types_by_name['UpdateSinkRequest'] = _UPDATESINKREQUEST +DESCRIPTOR.message_types_by_name['DeleteSinkRequest'] = _DELETESINKREQUEST +DESCRIPTOR.message_types_by_name['LogExclusion'] = _LOGEXCLUSION +DESCRIPTOR.message_types_by_name['ListExclusionsRequest'] = _LISTEXCLUSIONSREQUEST +DESCRIPTOR.message_types_by_name['ListExclusionsResponse'] = _LISTEXCLUSIONSRESPONSE +DESCRIPTOR.message_types_by_name['GetExclusionRequest'] = _GETEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name['CreateExclusionRequest'] = _CREATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name['UpdateExclusionRequest'] = _UPDATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name['DeleteExclusionRequest'] = _DELETEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name['GetCmekSettingsRequest'] = _GETCMEKSETTINGSREQUEST +DESCRIPTOR.message_types_by_name['UpdateCmekSettingsRequest'] = _UPDATECMEKSETTINGSREQUEST +DESCRIPTOR.message_types_by_name['CmekSettings'] = _CMEKSETTINGS +DESCRIPTOR.enum_types_by_name['LifecycleState'] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogBucket = _reflection.GeneratedProtocolMessageType( - "LogBucket", - (_message.Message,), - { - "DESCRIPTOR": _LOGBUCKET, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a repository of logs (Beta). +LogBucket = _reflection.GeneratedProtocolMessageType('LogBucket', (_message.Message,), { + 'DESCRIPTOR' : _LOGBUCKET, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Describes a repository of logs (Beta). Attributes: name: @@ -2025,18 +1230,15 @@ lifecycle_state: Output only. The bucket lifecycle state. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) + }) _sym_db.RegisterMessage(LogBucket) -LogSink = _reflection.GeneratedProtocolMessageType( - "LogSink", - (_message.Message,), - { - "DESCRIPTOR": _LOGSINK, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a sink used to export log entries to one of the following +LogSink = _reflection.GeneratedProtocolMessageType('LogSink', (_message.Message,), { + 'DESCRIPTOR' : _LOGSINK, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, @@ -2118,18 +1320,15 @@ Output only. The last update timestamp of the sink. This field may not be present for older sinks. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) + }) _sym_db.RegisterMessage(LogSink) -BigQueryOptions = _reflection.GeneratedProtocolMessageType( - "BigQueryOptions", - (_message.Message,), - { - "DESCRIPTOR": _BIGQUERYOPTIONS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Options that change functionality of a sink exporting data to +BigQueryOptions = _reflection.GeneratedProtocolMessageType('BigQueryOptions', (_message.Message,), { + 'DESCRIPTOR' : _BIGQUERYOPTIONS, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Options that change functionality of a sink exporting data to BigQuery. Attributes: @@ -2152,18 +1351,15 @@ sinks using partitioned tables will have this field set to false. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) + }) _sym_db.RegisterMessage(BigQueryOptions) -ListBucketsRequest = _reflection.GeneratedProtocolMessageType( - "ListBucketsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListBuckets`` (Beta). +ListBucketsRequest = _reflection.GeneratedProtocolMessageType('ListBucketsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTBUCKETSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``ListBuckets`` (Beta). Attributes: parent: @@ -2187,18 +1383,15 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) + }) _sym_db.RegisterMessage(ListBucketsRequest) -ListBucketsResponse = _reflection.GeneratedProtocolMessageType( - "ListBucketsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The response from ListBuckets (Beta). +ListBucketsResponse = _reflection.GeneratedProtocolMessageType('ListBucketsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTBUCKETSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The response from ListBuckets (Beta). Attributes: buckets: @@ -2209,18 +1402,15 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) + }) _sym_db.RegisterMessage(ListBucketsResponse) -UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( - "UpdateBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateBucket`` (Beta). +UpdateBucketRequest = _reflection.GeneratedProtocolMessageType('UpdateBucketRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEBUCKETREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``UpdateBucket`` (Beta). Attributes: name: @@ -2245,18 +1435,15 @@ /docs/reference/google.protobuf#google.protobuf.FieldMask Example: ``updateMask=retention_days``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) + }) _sym_db.RegisterMessage(UpdateBucketRequest) -GetBucketRequest = _reflection.GeneratedProtocolMessageType( - "GetBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetBucket`` (Beta). +GetBucketRequest = _reflection.GeneratedProtocolMessageType('GetBucketRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETBUCKETREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``GetBucket`` (Beta). Attributes: name: @@ -2269,18 +1456,15 @@ ``"projects/my-project-id/locations/my-location/buckets/my- bucket-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) + }) _sym_db.RegisterMessage(GetBucketRequest) -ListSinksRequest = _reflection.GeneratedProtocolMessageType( - "ListSinksRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListSinks``. +ListSinksRequest = _reflection.GeneratedProtocolMessageType('ListSinksRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTSINKSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``ListSinks``. Attributes: parent: @@ -2301,18 +1485,15 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) + }) _sym_db.RegisterMessage(ListSinksRequest) -ListSinksResponse = _reflection.GeneratedProtocolMessageType( - "ListSinksResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Result returned from ``ListSinks``. +ListSinksResponse = _reflection.GeneratedProtocolMessageType('ListSinksResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTSINKSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Result returned from ``ListSinks``. Attributes: sinks: @@ -2323,18 +1504,15 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) + }) _sym_db.RegisterMessage(ListSinksResponse) -GetSinkRequest = _reflection.GeneratedProtocolMessageType( - "GetSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETSINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetSink``. +GetSinkRequest = _reflection.GeneratedProtocolMessageType('GetSinkRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETSINKREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``GetSink``. Attributes: sink_name: @@ -2345,18 +1523,15 @@ "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) + }) _sym_db.RegisterMessage(GetSinkRequest) -CreateSinkRequest = _reflection.GeneratedProtocolMessageType( - "CreateSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``CreateSink``. +CreateSinkRequest = _reflection.GeneratedProtocolMessageType('CreateSinkRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATESINKREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``CreateSink``. Attributes: parent: @@ -2382,18 +1557,15 @@ sink. For more information, see ``writer_identity`` in [LogSink][google.logging.v2.LogSink]. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) + }) _sym_db.RegisterMessage(CreateSinkRequest) -UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( - "UpdateSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateSink``. +UpdateSinkRequest = _reflection.GeneratedProtocolMessageType('UpdateSinkRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATESINKREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``UpdateSink``. Attributes: sink_name: @@ -2434,18 +1606,15 @@ google.protobuf#google.protobuf.FieldMask Example: ``updateMask=filter``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) + }) _sym_db.RegisterMessage(UpdateSinkRequest) -DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( - "DeleteSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``DeleteSink``. +DeleteSinkRequest = _reflection.GeneratedProtocolMessageType('DeleteSinkRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETESINKREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``DeleteSink``. Attributes: sink_name: @@ -2457,18 +1626,15 @@ "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) + }) _sym_db.RegisterMessage(DeleteSinkRequest) -LogExclusion = _reflection.GeneratedProtocolMessageType( - "LogExclusion", - (_message.Message,), - { - "DESCRIPTOR": _LOGEXCLUSION, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Specifies a set of log entries that are not to be stored in Logging. +LogExclusion = _reflection.GeneratedProtocolMessageType('LogExclusion', (_message.Message,), { + 'DESCRIPTOR' : _LOGEXCLUSION, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Specifies a set of log entries that are not to be stored in Logging. If your GCP resource receives a large volume of logs, you can use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are @@ -2507,18 +1673,15 @@ Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogExclusion) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogExclusion) + }) _sym_db.RegisterMessage(LogExclusion) -ListExclusionsRequest = _reflection.GeneratedProtocolMessageType( - "ListExclusionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTEXCLUSIONSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListExclusions``. +ListExclusionsRequest = _reflection.GeneratedProtocolMessageType('ListExclusionsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTEXCLUSIONSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``ListExclusions``. Attributes: parent: @@ -2539,18 +1702,15 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsRequest) + }) _sym_db.RegisterMessage(ListExclusionsRequest) -ListExclusionsResponse = _reflection.GeneratedProtocolMessageType( - "ListExclusionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTEXCLUSIONSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Result returned from ``ListExclusions``. +ListExclusionsResponse = _reflection.GeneratedProtocolMessageType('ListExclusionsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTEXCLUSIONSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Result returned from ``ListExclusions``. Attributes: exclusions: @@ -2561,18 +1721,15 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsResponse) + }) _sym_db.RegisterMessage(ListExclusionsResponse) -GetExclusionRequest = _reflection.GeneratedProtocolMessageType( - "GetExclusionRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETEXCLUSIONREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetExclusion``. +GetExclusionRequest = _reflection.GeneratedProtocolMessageType('GetExclusionRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETEXCLUSIONREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``GetExclusion``. Attributes: name: @@ -2584,18 +1741,15 @@ Example: ``"projects/my-project-id/exclusions/my-exclusion- id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetExclusionRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetExclusionRequest) + }) _sym_db.RegisterMessage(GetExclusionRequest) -CreateExclusionRequest = _reflection.GeneratedProtocolMessageType( - "CreateExclusionRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEEXCLUSIONREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``CreateExclusion``. +CreateExclusionRequest = _reflection.GeneratedProtocolMessageType('CreateExclusionRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEEXCLUSIONREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``CreateExclusion``. Attributes: parent: @@ -2610,18 +1764,15 @@ exclusion name that is not already used in the parent resource. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateExclusionRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateExclusionRequest) + }) _sym_db.RegisterMessage(CreateExclusionRequest) -UpdateExclusionRequest = _reflection.GeneratedProtocolMessageType( - "UpdateExclusionRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEEXCLUSIONREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateExclusion``. +UpdateExclusionRequest = _reflection.GeneratedProtocolMessageType('UpdateExclusionRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEEXCLUSIONREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``UpdateExclusion``. Attributes: name: @@ -2645,18 +1796,15 @@ change the filter and description of an exclusion, specify an ``update_mask`` of ``"filter,description"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateExclusionRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateExclusionRequest) + }) _sym_db.RegisterMessage(UpdateExclusionRequest) -DeleteExclusionRequest = _reflection.GeneratedProtocolMessageType( - "DeleteExclusionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEEXCLUSIONREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``DeleteExclusion``. +DeleteExclusionRequest = _reflection.GeneratedProtocolMessageType('DeleteExclusionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEEXCLUSIONREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to ``DeleteExclusion``. Attributes: name: @@ -2669,18 +1817,15 @@ Example: ``"projects/my-project-id/exclusions/my-exclusion- id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteExclusionRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteExclusionRequest) + }) _sym_db.RegisterMessage(DeleteExclusionRequest) -GetCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( - "GetCmekSettingsRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETCMEKSETTINGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to +GetCmekSettingsRequest = _reflection.GeneratedProtocolMessageType('GetCmekSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETCMEKSETTINGSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. See `Enabling CMEK for Logs Router `__ @@ -2698,18 +1843,15 @@ organizations. Once configured, it applies to all projects and folders in the GCP organization. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) + }) _sym_db.RegisterMessage(GetCmekSettingsRequest) -UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( - "UpdateCmekSettingsRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService +UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType('UpdateCmekSettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATECMEKSETTINGSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router `__ for more information. @@ -2738,18 +1880,15 @@ [FieldMask][google.protobuf.FieldMask] for more information. Example: ``"updateMask=kmsKeyName"`` """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) + }) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) -CmekSettings = _reflection.GeneratedProtocolMessageType( - "CmekSettings", - (_message.Message,), - { - "DESCRIPTOR": _CMEKSETTINGS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes the customer-managed encryption key (CMEK) settings +CmekSettings = _reflection.GeneratedProtocolMessageType('CmekSettings', (_message.Message,), { + 'DESCRIPTOR' : _CMEKSETTINGS, + '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' + , + '__doc__': """Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource. Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to @@ -2792,239 +1931,237 @@ `__ for more information. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) + }) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None -_LOGBUCKET.fields_by_name["create_time"]._options = None -_LOGBUCKET.fields_by_name["update_time"]._options = None -_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None +_LOGBUCKET.fields_by_name['create_time']._options = None +_LOGBUCKET.fields_by_name['update_time']._options = None +_LOGBUCKET.fields_by_name['lifecycle_state']._options = None _LOGBUCKET._options = None -_LOGSINK.fields_by_name["name"]._options = None -_LOGSINK.fields_by_name["destination"]._options = None -_LOGSINK.fields_by_name["filter"]._options = None -_LOGSINK.fields_by_name["description"]._options = None -_LOGSINK.fields_by_name["disabled"]._options = None -_LOGSINK.fields_by_name["output_version_format"]._options = None -_LOGSINK.fields_by_name["writer_identity"]._options = None -_LOGSINK.fields_by_name["include_children"]._options = None -_LOGSINK.fields_by_name["bigquery_options"]._options = None -_LOGSINK.fields_by_name["create_time"]._options = None -_LOGSINK.fields_by_name["update_time"]._options = None +_LOGSINK.fields_by_name['name']._options = None +_LOGSINK.fields_by_name['destination']._options = None +_LOGSINK.fields_by_name['filter']._options = None +_LOGSINK.fields_by_name['description']._options = None +_LOGSINK.fields_by_name['disabled']._options = None +_LOGSINK.fields_by_name['output_version_format']._options = None +_LOGSINK.fields_by_name['writer_identity']._options = None +_LOGSINK.fields_by_name['include_children']._options = None +_LOGSINK.fields_by_name['bigquery_options']._options = None +_LOGSINK.fields_by_name['create_time']._options = None +_LOGSINK.fields_by_name['update_time']._options = None _LOGSINK._options = None -_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None -_BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None -_GETBUCKETREQUEST.fields_by_name["name"]._options = None -_LISTSINKSREQUEST.fields_by_name["parent"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None -_GETSINKREQUEST.fields_by_name["sink_name"]._options = None -_CREATESINKREQUEST.fields_by_name["parent"]._options = None -_CREATESINKREQUEST.fields_by_name["sink"]._options = None -_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None -_UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None -_UPDATESINKREQUEST.fields_by_name["sink"]._options = None -_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None -_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None -_DELETESINKREQUEST.fields_by_name["sink_name"]._options = None -_LOGEXCLUSION.fields_by_name["name"]._options = None -_LOGEXCLUSION.fields_by_name["description"]._options = None -_LOGEXCLUSION.fields_by_name["filter"]._options = None -_LOGEXCLUSION.fields_by_name["disabled"]._options = None -_LOGEXCLUSION.fields_by_name["create_time"]._options = None -_LOGEXCLUSION.fields_by_name["update_time"]._options = None +_BIGQUERYOPTIONS.fields_by_name['use_partitioned_tables']._options = None +_BIGQUERYOPTIONS.fields_by_name['uses_timestamp_column_partitioning']._options = None +_LISTBUCKETSREQUEST.fields_by_name['parent']._options = None +_LISTBUCKETSREQUEST.fields_by_name['page_token']._options = None +_LISTBUCKETSREQUEST.fields_by_name['page_size']._options = None +_UPDATEBUCKETREQUEST.fields_by_name['name']._options = None +_UPDATEBUCKETREQUEST.fields_by_name['bucket']._options = None +_UPDATEBUCKETREQUEST.fields_by_name['update_mask']._options = None +_GETBUCKETREQUEST.fields_by_name['name']._options = None +_LISTSINKSREQUEST.fields_by_name['parent']._options = None +_LISTSINKSREQUEST.fields_by_name['page_token']._options = None +_LISTSINKSREQUEST.fields_by_name['page_size']._options = None +_GETSINKREQUEST.fields_by_name['sink_name']._options = None +_CREATESINKREQUEST.fields_by_name['parent']._options = None +_CREATESINKREQUEST.fields_by_name['sink']._options = None +_CREATESINKREQUEST.fields_by_name['unique_writer_identity']._options = None +_UPDATESINKREQUEST.fields_by_name['sink_name']._options = None +_UPDATESINKREQUEST.fields_by_name['sink']._options = None +_UPDATESINKREQUEST.fields_by_name['unique_writer_identity']._options = None +_UPDATESINKREQUEST.fields_by_name['update_mask']._options = None +_DELETESINKREQUEST.fields_by_name['sink_name']._options = None +_LOGEXCLUSION.fields_by_name['name']._options = None +_LOGEXCLUSION.fields_by_name['description']._options = None +_LOGEXCLUSION.fields_by_name['filter']._options = None +_LOGEXCLUSION.fields_by_name['disabled']._options = None +_LOGEXCLUSION.fields_by_name['create_time']._options = None +_LOGEXCLUSION.fields_by_name['update_time']._options = None _LOGEXCLUSION._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None -_GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None -_DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None -_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None -_CMEKSETTINGS.fields_by_name["name"]._options = None -_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name['parent']._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name['page_token']._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name['page_size']._options = None +_GETEXCLUSIONREQUEST.fields_by_name['name']._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name['parent']._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name['exclusion']._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name['name']._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name['exclusion']._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name['update_mask']._options = None +_DELETEEXCLUSIONREQUEST.fields_by_name['name']._options = None +_GETCMEKSETTINGSREQUEST.fields_by_name['name']._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name['name']._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name['cmek_settings']._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name['update_mask']._options = None +_CMEKSETTINGS.fields_by_name['name']._options = None +_CMEKSETTINGS.fields_by_name['service_account_id']._options = None _CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( - name="ConfigServiceV2", - full_name="google.logging.v2.ConfigServiceV2", - file=DESCRIPTOR, + name='ConfigServiceV2', + full_name='google.logging.v2.ConfigServiceV2', + file=DESCRIPTOR, + index=0, + serialized_options=b'\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read', + create_key=_descriptor._internal_create_key, + serialized_start=4745, + serialized_end=9784, + methods=[ + _descriptor.MethodDescriptor( + name='ListBuckets', + full_name='google.logging.v2.ConfigServiceV2.ListBuckets', index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", + containing_service=None, + input_type=_LISTBUCKETSREQUEST, + output_type=_LISTBUCKETSRESPONSE, + serialized_options=b'\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent', create_key=_descriptor._internal_create_key, - serialized_start=4745, - serialized_end=9784, - methods=[ - _descriptor.MethodDescriptor( - name="ListBuckets", - full_name="google.logging.v2.ConfigServiceV2.ListBuckets", - index=0, - containing_service=None, - input_type=_LISTBUCKETSREQUEST, - output_type=_LISTBUCKETSRESPONSE, - serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetBucket", - full_name="google.logging.v2.ConfigServiceV2.GetBucket", - index=1, - containing_service=None, - input_type=_GETBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateBucket", - full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", - index=2, - containing_service=None, - input_type=_UPDATEBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListSinks", - full_name="google.logging.v2.ConfigServiceV2.ListSinks", - index=3, - containing_service=None, - input_type=_LISTSINKSREQUEST, - output_type=_LISTSINKSRESPONSE, - serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetSink", - full_name="google.logging.v2.ConfigServiceV2.GetSink", - index=4, - containing_service=None, - input_type=_GETSINKREQUEST, - output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="CreateSink", - full_name="google.logging.v2.ConfigServiceV2.CreateSink", - index=5, - containing_service=None, - input_type=_CREATESINKREQUEST, - output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateSink", - full_name="google.logging.v2.ConfigServiceV2.UpdateSink", - index=6, - containing_service=None, - input_type=_UPDATESINKREQUEST, - output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="DeleteSink", - full_name="google.logging.v2.ConfigServiceV2.DeleteSink", - index=7, - containing_service=None, - input_type=_DELETESINKREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListExclusions", - full_name="google.logging.v2.ConfigServiceV2.ListExclusions", - index=8, - containing_service=None, - input_type=_LISTEXCLUSIONSREQUEST, - output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetExclusion", - full_name="google.logging.v2.ConfigServiceV2.GetExclusion", - index=9, - containing_service=None, - input_type=_GETEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="CreateExclusion", - full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", - index=10, - containing_service=None, - input_type=_CREATEEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateExclusion", - full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", - index=11, - containing_service=None, - input_type=_UPDATEEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="DeleteExclusion", - full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", - index=12, - containing_service=None, - input_type=_DELETEEXCLUSIONREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetCmekSettings", - full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", - index=13, - containing_service=None, - input_type=_GETCMEKSETTINGSREQUEST, - output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateCmekSettings", - full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - index=14, - containing_service=None, - input_type=_UPDATECMEKSETTINGSREQUEST, - output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", - create_key=_descriptor._internal_create_key, - ), - ], -) + ), + _descriptor.MethodDescriptor( + name='GetBucket', + full_name='google.logging.v2.ConfigServiceV2.GetBucket', + index=1, + containing_service=None, + input_type=_GETBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b'\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='UpdateBucket', + full_name='google.logging.v2.ConfigServiceV2.UpdateBucket', + index=2, + containing_service=None, + input_type=_UPDATEBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b'\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListSinks', + full_name='google.logging.v2.ConfigServiceV2.ListSinks', + index=3, + containing_service=None, + input_type=_LISTSINKSREQUEST, + output_type=_LISTSINKSRESPONSE, + serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022\"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetSink', + full_name='google.logging.v2.ConfigServiceV2.GetSink', + index=4, + containing_service=None, + input_type=_GETSINKREQUEST, + output_type=_LOGSINK, + serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022\'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='CreateSink', + full_name='google.logging.v2.ConfigServiceV2.CreateSink', + index=5, + containing_service=None, + input_type=_CREATESINKREQUEST, + output_type=_LOGSINK, + serialized_options=b'\202\323\344\223\002\305\001\"\026/v2/{parent=*/*}/sinks:\004sinkZ%\"\035/v2/{parent=projects/*}/sinks:\004sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\004sinkZ$\"\034/v2/{parent=folders/*}/sinks:\004sinkZ,\"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='UpdateSink', + full_name='google.logging.v2.ConfigServiceV2.UpdateSink', + index=6, + containing_service=None, + input_type=_UPDATESINKREQUEST, + output_type=_LOGSINK, + serialized_options=b'\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032\'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteSink', + full_name='google.logging.v2.ConfigServiceV2.DeleteSink', + index=7, + containing_service=None, + input_type=_DELETESINKREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b'\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListExclusions', + full_name='google.logging.v2.ConfigServiceV2.ListExclusions', + index=8, + containing_service=None, + input_type=_LISTEXCLUSIONSREQUEST, + output_type=_LISTEXCLUSIONSRESPONSE, + serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022\'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetExclusion', + full_name='google.logging.v2.ConfigServiceV2.GetExclusion', + index=9, + containing_service=None, + input_type=_GETEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022\'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='CreateExclusion', + full_name='google.logging.v2.ConfigServiceV2.CreateExclusion', + index=10, + containing_service=None, + input_type=_CREATEEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b'\202\323\344\223\002\367\001\"\033/v2/{parent=*/*}/exclusions:\texclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\texclusionZ4\"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ.\"!/v2/{parent=folders/*}/exclusions:\texclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='UpdateExclusion', + full_name='google.logging.v2.ConfigServiceV2.UpdateExclusion', + index=11, + containing_service=None, + input_type=_UPDATEEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b'\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteExclusion', + full_name='google.logging.v2.ConfigServiceV2.DeleteExclusion', + index=12, + containing_service=None, + input_type=_DELETEEXCLUSIONREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b'\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetCmekSettings', + full_name='google.logging.v2.ConfigServiceV2.GetCmekSettings', + index=13, + containing_service=None, + input_type=_GETCMEKSETTINGSREQUEST, + output_type=_CMEKSETTINGS, + serialized_options=b'\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022\'/v2/{name=organizations/*}/cmekSettings', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='UpdateCmekSettings', + full_name='google.logging.v2.ConfigServiceV2.UpdateCmekSettings', + index=14, + containing_service=None, + input_type=_UPDATECMEKSETTINGSREQUEST, + output_type=_CMEKSETTINGS, + serialized_options=b'\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings', + create_key=_descriptor._internal_create_key, + ), +]) _sym_db.RegisterServiceDescriptor(_CONFIGSERVICEV2) -DESCRIPTOR.services_by_name["ConfigServiceV2"] = _CONFIGSERVICEV2 +DESCRIPTOR.services_by_name['ConfigServiceV2'] = _CONFIGSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index d3bd11324..dba266d85 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -2,14 +2,13 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import ( - logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2, -) +from google.cloud.logging_v2.proto import logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class ConfigServiceV2Stub(object): - """Service for configuring sinks used to route log entries.""" + """Service for configuring sinks used to route log entries. + """ def __init__(self, channel): """Constructor. @@ -18,96 +17,99 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ListBuckets = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/ListBuckets", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - ) + '/google.logging.v2.ConfigServiceV2/ListBuckets', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + ) self.GetBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) + '/google.logging.v2.ConfigServiceV2/GetBucket', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.UpdateBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) + '/google.logging.v2.ConfigServiceV2/UpdateBucket', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.ListSinks = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/ListSinks", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - ) + '/google.logging.v2.ConfigServiceV2/ListSinks', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, + ) self.GetSink = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetSink", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + '/google.logging.v2.ConfigServiceV2/GetSink', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.CreateSink = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/CreateSink", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + '/google.logging.v2.ConfigServiceV2/CreateSink', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.UpdateSink = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateSink", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + '/google.logging.v2.ConfigServiceV2/UpdateSink', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.DeleteSink = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/DeleteSink", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + '/google.logging.v2.ConfigServiceV2/DeleteSink', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.ListExclusions = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/ListExclusions", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - ) + '/google.logging.v2.ConfigServiceV2/ListExclusions', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, + ) self.GetExclusion = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetExclusion", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + '/google.logging.v2.ConfigServiceV2/GetExclusion', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.CreateExclusion = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/CreateExclusion", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + '/google.logging.v2.ConfigServiceV2/CreateExclusion', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.UpdateExclusion = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateExclusion", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + '/google.logging.v2.ConfigServiceV2/UpdateExclusion', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.DeleteExclusion = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/DeleteExclusion", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + '/google.logging.v2.ConfigServiceV2/DeleteExclusion', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.GetCmekSettings = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetCmekSettings", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - ) + '/google.logging.v2.ConfigServiceV2/GetCmekSettings', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + ) self.UpdateCmekSettings = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - ) + '/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + ) class ConfigServiceV2Servicer(object): - """Service for configuring sinks used to route log entries.""" + """Service for configuring sinks used to route log entries. + """ def ListBuckets(self, request, context): - """Lists buckets (Beta).""" + """Lists buckets (Beta). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetBucket(self, request, context): - """Gets a bucket (Beta).""" + """Gets a bucket (Beta). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateBucket(self, request, context): """Updates a bucket. This method replaces the following fields in the @@ -123,20 +125,22 @@ def UpdateBucket(self, request, context): This method is in Beta. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def ListSinks(self, request, context): - """Lists sinks.""" + """Lists sinks. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetSink(self, request, context): - """Gets a sink.""" + """Gets a sink. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def CreateSink(self, request, context): """Creates a sink that exports specified log entries to a destination. The @@ -145,8 +149,8 @@ def CreateSink(self, request, context): export log entries only from the resource owning the sink. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateSink(self, request, context): """Updates a sink. This method replaces the following fields in the existing @@ -156,28 +160,30 @@ def UpdateSink(self, request, context): `unique_writer_identity` field. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def DeleteSink(self, request, context): """Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def ListExclusions(self, request, context): - """Lists all the exclusions in a parent resource.""" + """Lists all the exclusions in a parent resource. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetExclusion(self, request, context): - """Gets the description of an exclusion.""" + """Gets the description of an exclusion. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def CreateExclusion(self, request, context): """Creates a new exclusion in a specified parent resource. @@ -185,20 +191,22 @@ def CreateExclusion(self, request, context): You can have up to 10 exclusions in a resource. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateExclusion(self, request, context): - """Changes one or more properties of an existing exclusion.""" + """Changes one or more properties of an existing exclusion. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def DeleteExclusion(self, request, context): - """Deletes an exclusion.""" + """Deletes an exclusion. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetCmekSettings(self, request, context): """Gets the Logs Router CMEK settings for the given resource. @@ -212,8 +220,8 @@ def GetCmekSettings(self, request, context): for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateCmekSettings(self, request, context): """Updates the Logs Router CMEK settings for the given resource. @@ -233,499 +241,334 @@ def UpdateCmekSettings(self, request, context): for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - "ListBuckets": grpc.unary_unary_rpc_method_handler( - servicer.ListBuckets, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, - ), - "GetBucket": grpc.unary_unary_rpc_method_handler( - servicer.GetBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - "UpdateBucket": grpc.unary_unary_rpc_method_handler( - servicer.UpdateBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - "ListSinks": grpc.unary_unary_rpc_method_handler( - servicer.ListSinks, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.SerializeToString, - ), - "GetSink": grpc.unary_unary_rpc_method_handler( - servicer.GetSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - "CreateSink": grpc.unary_unary_rpc_method_handler( - servicer.CreateSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - "UpdateSink": grpc.unary_unary_rpc_method_handler( - servicer.UpdateSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - "DeleteSink": grpc.unary_unary_rpc_method_handler( - servicer.DeleteSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - "ListExclusions": grpc.unary_unary_rpc_method_handler( - servicer.ListExclusions, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.SerializeToString, - ), - "GetExclusion": grpc.unary_unary_rpc_method_handler( - servicer.GetExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - "CreateExclusion": grpc.unary_unary_rpc_method_handler( - servicer.CreateExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - "UpdateExclusion": grpc.unary_unary_rpc_method_handler( - servicer.UpdateExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - "DeleteExclusion": grpc.unary_unary_rpc_method_handler( - servicer.DeleteExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - "GetCmekSettings": grpc.unary_unary_rpc_method_handler( - servicer.GetCmekSettings, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, - ), - "UpdateCmekSettings": grpc.unary_unary_rpc_method_handler( - servicer.UpdateCmekSettings, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, - ), + 'ListBuckets': grpc.unary_unary_rpc_method_handler( + servicer.ListBuckets, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, + ), + 'GetBucket': grpc.unary_unary_rpc_method_handler( + servicer.GetBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + 'UpdateBucket': grpc.unary_unary_rpc_method_handler( + servicer.UpdateBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + 'ListSinks': grpc.unary_unary_rpc_method_handler( + servicer.ListSinks, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.SerializeToString, + ), + 'GetSink': grpc.unary_unary_rpc_method_handler( + servicer.GetSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + 'CreateSink': grpc.unary_unary_rpc_method_handler( + servicer.CreateSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + 'UpdateSink': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + 'DeleteSink': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'ListExclusions': grpc.unary_unary_rpc_method_handler( + servicer.ListExclusions, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.SerializeToString, + ), + 'GetExclusion': grpc.unary_unary_rpc_method_handler( + servicer.GetExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + 'CreateExclusion': grpc.unary_unary_rpc_method_handler( + servicer.CreateExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + 'UpdateExclusion': grpc.unary_unary_rpc_method_handler( + servicer.UpdateExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + 'DeleteExclusion': grpc.unary_unary_rpc_method_handler( + servicer.DeleteExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'GetCmekSettings': grpc.unary_unary_rpc_method_handler( + servicer.GetCmekSettings, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, + ), + 'UpdateCmekSettings': grpc.unary_unary_rpc_method_handler( + servicer.UpdateCmekSettings, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "google.logging.v2.ConfigServiceV2", rpc_method_handlers - ) + 'google.logging.v2.ConfigServiceV2', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class ConfigServiceV2(object): - """Service for configuring sinks used to route log entries.""" + """Service for configuring sinks used to route log entries. + """ @staticmethod - def ListBuckets( - 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, + def ListBuckets(request, target, - "/google.logging.v2.ConfigServiceV2/ListBuckets", + 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.logging.v2.ConfigServiceV2/ListBuckets', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetBucket( - 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, + def GetBucket(request, target, - "/google.logging.v2.ConfigServiceV2/GetBucket", + 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.logging.v2.ConfigServiceV2/GetBucket', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateBucket( - 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, + def UpdateBucket(request, target, - "/google.logging.v2.ConfigServiceV2/UpdateBucket", + 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.logging.v2.ConfigServiceV2/UpdateBucket', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ListSinks( - 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, + def ListSinks(request, target, - "/google.logging.v2.ConfigServiceV2/ListSinks", + 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.logging.v2.ConfigServiceV2/ListSinks', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetSink( - 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, + def GetSink(request, target, - "/google.logging.v2.ConfigServiceV2/GetSink", + 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.logging.v2.ConfigServiceV2/GetSink', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def CreateSink( - 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, + def CreateSink(request, target, - "/google.logging.v2.ConfigServiceV2/CreateSink", + 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.logging.v2.ConfigServiceV2/CreateSink', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateSink( - 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, + def UpdateSink(request, target, - "/google.logging.v2.ConfigServiceV2/UpdateSink", + 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.logging.v2.ConfigServiceV2/UpdateSink', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def DeleteSink( - 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, + def DeleteSink(request, target, - "/google.logging.v2.ConfigServiceV2/DeleteSink", + 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.logging.v2.ConfigServiceV2/DeleteSink', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ListExclusions( - 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, + def ListExclusions(request, target, - "/google.logging.v2.ConfigServiceV2/ListExclusions", + 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.logging.v2.ConfigServiceV2/ListExclusions', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetExclusion( - 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, + def GetExclusion(request, target, - "/google.logging.v2.ConfigServiceV2/GetExclusion", + 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.logging.v2.ConfigServiceV2/GetExclusion', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def CreateExclusion( - 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, + def CreateExclusion(request, target, - "/google.logging.v2.ConfigServiceV2/CreateExclusion", + 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.logging.v2.ConfigServiceV2/CreateExclusion', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateExclusion( - 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, + def UpdateExclusion(request, target, - "/google.logging.v2.ConfigServiceV2/UpdateExclusion", + 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.logging.v2.ConfigServiceV2/UpdateExclusion', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def DeleteExclusion( - 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, + def DeleteExclusion(request, target, - "/google.logging.v2.ConfigServiceV2/DeleteExclusion", + 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.logging.v2.ConfigServiceV2/DeleteExclusion', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetCmekSettings( - 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, + def GetCmekSettings(request, target, - "/google.logging.v2.ConfigServiceV2/GetCmekSettings", + 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.logging.v2.ConfigServiceV2/GetCmekSettings', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateCmekSettings( - 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, + def UpdateCmekSettings(request, target, - "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", + 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.logging.v2.ConfigServiceV2/UpdateCmekSettings', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index c840bf186..a8f0d0d74 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -6,7 +6,6 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -25,720 +24,435 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/logging_v2/proto/logging_metrics.proto", - package="google.logging.v2", - syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', - dependencies=[ - google_dot_api_dot_client__pb2.DESCRIPTOR, - google_dot_api_dot_distribution__pb2.DESCRIPTOR, - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, - google_dot_api_dot_metric__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, - google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, - google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, - ], -) + name='google/cloud/logging_v2/proto/logging_metrics.proto', + package='google.logging.v2', + syntax='proto3', + serialized_options=b'\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}\"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse\"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"?\x82\xd3\xe4\x93\x02)\"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' + , + dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_distribution__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_metric__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) + _LOGMETRIC_APIVERSION = _descriptor.EnumDescriptor( - name="ApiVersion", - full_name="google.logging.v2.LogMetric.ApiVersion", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="V2", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="V1", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=922, - serialized_end=950, + name='ApiVersion', + full_name='google.logging.v2.LogMetric.ApiVersion', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='V2', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='V1', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=922, + serialized_end=950, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) _LOGMETRIC_LABELEXTRACTORSENTRY = _descriptor.Descriptor( - name="LabelExtractorsEntry", - full_name="google.logging.v2.LogMetric.LabelExtractorsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.value", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=866, - serialized_end=920, + name='LabelExtractorsEntry', + full_name='google.logging.v2.LogMetric.LabelExtractorsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.logging.v2.LogMetric.LabelExtractorsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='google.logging.v2.LogMetric.LabelExtractorsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=866, + serialized_end=920, ) _LOGMETRIC = _descriptor.Descriptor( - name="LogMetric", - full_name="google.logging.v2.LogMetric", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogMetric.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogMetric.description", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="google.logging.v2.LogMetric.filter", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="metric_descriptor", - full_name="google.logging.v2.LogMetric.metric_descriptor", - index=3, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value_extractor", - full_name="google.logging.v2.LogMetric.value_extractor", - index=4, - number=6, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="label_extractors", - full_name="google.logging.v2.LogMetric.label_extractors", - index=5, - number=7, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="bucket_options", - full_name="google.logging.v2.LogMetric.bucket_options", - index=6, - number=8, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogMetric.create_time", - index=7, - number=9, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogMetric.update_time", - index=8, - number=10, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="version", - full_name="google.logging.v2.LogMetric.version", - index=9, - number=4, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\030\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[ - _LOGMETRIC_LABELEXTRACTORSENTRY, - ], - enum_types=[ - _LOGMETRIC_APIVERSION, - ], - serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=374, - serialized_end=1026, + name='LogMetric', + full_name='google.logging.v2.LogMetric', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.logging.v2.LogMetric.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='google.logging.v2.LogMetric.description', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='google.logging.v2.LogMetric.filter', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metric_descriptor', full_name='google.logging.v2.LogMetric.metric_descriptor', index=3, + number=5, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value_extractor', full_name='google.logging.v2.LogMetric.value_extractor', index=4, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='label_extractors', full_name='google.logging.v2.LogMetric.label_extractors', index=5, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='bucket_options', full_name='google.logging.v2.LogMetric.bucket_options', index=6, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='create_time', full_name='google.logging.v2.LogMetric.create_time', index=7, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='update_time', full_name='google.logging.v2.LogMetric.update_time', index=8, + number=10, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='version', full_name='google.logging.v2.LogMetric.version', index=9, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_LOGMETRIC_LABELEXTRACTORSENTRY, ], + enum_types=[ + _LOGMETRIC_APIVERSION, + ], + serialized_options=b'\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=374, + serialized_end=1026, ) _LISTLOGMETRICSREQUEST = _descriptor.Descriptor( - name="ListLogMetricsRequest", - full_name="google.logging.v2.ListLogMetricsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListLogMetricsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListLogMetricsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListLogMetricsRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1029, - serialized_end=1170, + name='ListLogMetricsRequest', + full_name='google.logging.v2.ListLogMetricsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.ListLogMetricsRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListLogMetricsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListLogMetricsRequest.page_size', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1029, + serialized_end=1170, ) _LISTLOGMETRICSRESPONSE = _descriptor.Descriptor( - name="ListLogMetricsResponse", - full_name="google.logging.v2.ListLogMetricsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="metrics", - full_name="google.logging.v2.ListLogMetricsResponse.metrics", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListLogMetricsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1172, - serialized_end=1268, + name='ListLogMetricsResponse', + full_name='google.logging.v2.ListLogMetricsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='metrics', full_name='google.logging.v2.ListLogMetricsResponse.metrics', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListLogMetricsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1172, + serialized_end=1268, ) _GETLOGMETRICREQUEST = _descriptor.Descriptor( - name="GetLogMetricRequest", - full_name="google.logging.v2.GetLogMetricRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="metric_name", - full_name="google.logging.v2.GetLogMetricRequest.metric_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1270, - serialized_end=1354, + name='GetLogMetricRequest', + full_name='google.logging.v2.GetLogMetricRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='metric_name', full_name='google.logging.v2.GetLogMetricRequest.metric_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1270, + serialized_end=1354, ) _CREATELOGMETRICREQUEST = _descriptor.Descriptor( - name="CreateLogMetricRequest", - full_name="google.logging.v2.CreateLogMetricRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.CreateLogMetricRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="metric", - full_name="google.logging.v2.CreateLogMetricRequest.metric", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1357, - serialized_end=1490, + name='CreateLogMetricRequest', + full_name='google.logging.v2.CreateLogMetricRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.CreateLogMetricRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\022 logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metric', full_name='google.logging.v2.CreateLogMetricRequest.metric', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1357, + serialized_end=1490, ) _UPDATELOGMETRICREQUEST = _descriptor.Descriptor( - name="UpdateLogMetricRequest", - full_name="google.logging.v2.UpdateLogMetricRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="metric_name", - full_name="google.logging.v2.UpdateLogMetricRequest.metric_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="metric", - full_name="google.logging.v2.UpdateLogMetricRequest.metric", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1493, - serialized_end=1631, + name='UpdateLogMetricRequest', + full_name='google.logging.v2.UpdateLogMetricRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='metric_name', full_name='google.logging.v2.UpdateLogMetricRequest.metric_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metric', full_name='google.logging.v2.UpdateLogMetricRequest.metric', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1493, + serialized_end=1631, ) _DELETELOGMETRICREQUEST = _descriptor.Descriptor( - name="DeleteLogMetricRequest", - full_name="google.logging.v2.DeleteLogMetricRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="metric_name", - full_name="google.logging.v2.DeleteLogMetricRequest.metric_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1633, - serialized_end=1720, + name='DeleteLogMetricRequest', + full_name='google.logging.v2.DeleteLogMetricRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='metric_name', full_name='google.logging.v2.DeleteLogMetricRequest.metric_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1633, + serialized_end=1720, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC -_LOGMETRIC.fields_by_name[ - "metric_descriptor" -].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR -_LOGMETRIC.fields_by_name[ - "label_extractors" -].message_type = _LOGMETRIC_LABELEXTRACTORSENTRY -_LOGMETRIC.fields_by_name[ - "bucket_options" -].message_type = google_dot_api_dot_distribution__pb2._DISTRIBUTION_BUCKETOPTIONS -_LOGMETRIC.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGMETRIC.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGMETRIC.fields_by_name["version"].enum_type = _LOGMETRIC_APIVERSION +_LOGMETRIC.fields_by_name['metric_descriptor'].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR +_LOGMETRIC.fields_by_name['label_extractors'].message_type = _LOGMETRIC_LABELEXTRACTORSENTRY +_LOGMETRIC.fields_by_name['bucket_options'].message_type = google_dot_api_dot_distribution__pb2._DISTRIBUTION_BUCKETOPTIONS +_LOGMETRIC.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name['version'].enum_type = _LOGMETRIC_APIVERSION _LOGMETRIC_APIVERSION.containing_type = _LOGMETRIC -_LISTLOGMETRICSRESPONSE.fields_by_name["metrics"].message_type = _LOGMETRIC -_CREATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC -_UPDATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC -DESCRIPTOR.message_types_by_name["LogMetric"] = _LOGMETRIC -DESCRIPTOR.message_types_by_name["ListLogMetricsRequest"] = _LISTLOGMETRICSREQUEST -DESCRIPTOR.message_types_by_name["ListLogMetricsResponse"] = _LISTLOGMETRICSRESPONSE -DESCRIPTOR.message_types_by_name["GetLogMetricRequest"] = _GETLOGMETRICREQUEST -DESCRIPTOR.message_types_by_name["CreateLogMetricRequest"] = _CREATELOGMETRICREQUEST -DESCRIPTOR.message_types_by_name["UpdateLogMetricRequest"] = _UPDATELOGMETRICREQUEST -DESCRIPTOR.message_types_by_name["DeleteLogMetricRequest"] = _DELETELOGMETRICREQUEST +_LISTLOGMETRICSRESPONSE.fields_by_name['metrics'].message_type = _LOGMETRIC +_CREATELOGMETRICREQUEST.fields_by_name['metric'].message_type = _LOGMETRIC +_UPDATELOGMETRICREQUEST.fields_by_name['metric'].message_type = _LOGMETRIC +DESCRIPTOR.message_types_by_name['LogMetric'] = _LOGMETRIC +DESCRIPTOR.message_types_by_name['ListLogMetricsRequest'] = _LISTLOGMETRICSREQUEST +DESCRIPTOR.message_types_by_name['ListLogMetricsResponse'] = _LISTLOGMETRICSRESPONSE +DESCRIPTOR.message_types_by_name['GetLogMetricRequest'] = _GETLOGMETRICREQUEST +DESCRIPTOR.message_types_by_name['CreateLogMetricRequest'] = _CREATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name['UpdateLogMetricRequest'] = _UPDATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name['DeleteLogMetricRequest'] = _DELETELOGMETRICREQUEST _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogMetric = _reflection.GeneratedProtocolMessageType( - "LogMetric", - (_message.Message,), - { - "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( - "LabelExtractorsEntry", - (_message.Message,), - { - "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" - # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - }, - ), - "DESCRIPTOR": _LOGMETRIC, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Describes a logs-based metric. The value of the metric is the number +LogMetric = _reflection.GeneratedProtocolMessageType('LogMetric', (_message.Message,), { + + 'LabelExtractorsEntry' : _reflection.GeneratedProtocolMessageType('LabelExtractorsEntry', (_message.Message,), { + 'DESCRIPTOR' : _LOGMETRIC_LABELEXTRACTORSENTRY, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) + }) + , + 'DESCRIPTOR' : _LOGMETRIC, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval. Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the @@ -838,19 +552,16 @@ metric. The v2 format is used by default and cannot be changed. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) + }) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) -ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( - "ListLogMetricsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to ListLogMetrics. +ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType('ListLogMetricsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGMETRICSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """The parameters to ListLogMetrics. Attributes: parent: @@ -868,18 +579,15 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) + }) _sym_db.RegisterMessage(ListLogMetricsRequest) -ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( - "ListLogMetricsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Result returned from ListLogMetrics. +ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType('ListLogMetricsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGMETRICSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """Result returned from ListLogMetrics. Attributes: metrics: @@ -890,36 +598,30 @@ results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) + }) _sym_db.RegisterMessage(ListLogMetricsResponse) -GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( - "GetLogMetricRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETLOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to GetLogMetric. +GetLogMetricRequest = _reflection.GeneratedProtocolMessageType('GetLogMetricRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETLOGMETRICREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """The parameters to GetLogMetric. Attributes: metric_name: Required. The resource name of the desired metric: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) + }) _sym_db.RegisterMessage(GetLogMetricRequest) -CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( - "CreateLogMetricRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to CreateLogMetric. +CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType('CreateLogMetricRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATELOGMETRICREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """The parameters to CreateLogMetric. Attributes: parent: @@ -930,18 +632,15 @@ Required. The new logs-based metric, which must not have an identifier that already exists. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) + }) _sym_db.RegisterMessage(CreateLogMetricRequest) -UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( - "UpdateLogMetricRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to UpdateLogMetric. +UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType('UpdateLogMetricRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATELOGMETRICREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """The parameters to UpdateLogMetric. Attributes: metric_name: @@ -953,117 +652,112 @@ metric: Required. The updated metric. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) + }) _sym_db.RegisterMessage(UpdateLogMetricRequest) -DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( - "DeleteLogMetricRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to DeleteLogMetric. +DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType('DeleteLogMetricRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETELOGMETRICREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' + , + '__doc__': """The parameters to DeleteLogMetric. Attributes: metric_name: Required. The resource name of the metric to delete: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) + }) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None -_LOGMETRIC.fields_by_name["name"]._options = None -_LOGMETRIC.fields_by_name["description"]._options = None -_LOGMETRIC.fields_by_name["filter"]._options = None -_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None -_LOGMETRIC.fields_by_name["value_extractor"]._options = None -_LOGMETRIC.fields_by_name["label_extractors"]._options = None -_LOGMETRIC.fields_by_name["bucket_options"]._options = None -_LOGMETRIC.fields_by_name["create_time"]._options = None -_LOGMETRIC.fields_by_name["update_time"]._options = None -_LOGMETRIC.fields_by_name["version"]._options = None +_LOGMETRIC.fields_by_name['name']._options = None +_LOGMETRIC.fields_by_name['description']._options = None +_LOGMETRIC.fields_by_name['filter']._options = None +_LOGMETRIC.fields_by_name['metric_descriptor']._options = None +_LOGMETRIC.fields_by_name['value_extractor']._options = None +_LOGMETRIC.fields_by_name['label_extractors']._options = None +_LOGMETRIC.fields_by_name['bucket_options']._options = None +_LOGMETRIC.fields_by_name['create_time']._options = None +_LOGMETRIC.fields_by_name['update_time']._options = None +_LOGMETRIC.fields_by_name['version']._options = None _LOGMETRIC._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None -_GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None -_CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None -_CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None -_UPDATELOGMETRICREQUEST.fields_by_name["metric_name"]._options = None -_UPDATELOGMETRICREQUEST.fields_by_name["metric"]._options = None -_DELETELOGMETRICREQUEST.fields_by_name["metric_name"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name['parent']._options = None +_LISTLOGMETRICSREQUEST.fields_by_name['page_token']._options = None +_LISTLOGMETRICSREQUEST.fields_by_name['page_size']._options = None +_GETLOGMETRICREQUEST.fields_by_name['metric_name']._options = None +_CREATELOGMETRICREQUEST.fields_by_name['parent']._options = None +_CREATELOGMETRICREQUEST.fields_by_name['metric']._options = None +_UPDATELOGMETRICREQUEST.fields_by_name['metric_name']._options = None +_UPDATELOGMETRICREQUEST.fields_by_name['metric']._options = None +_DELETELOGMETRICREQUEST.fields_by_name['metric_name']._options = None _METRICSSERVICEV2 = _descriptor.ServiceDescriptor( - name="MetricsServiceV2", - full_name="google.logging.v2.MetricsServiceV2", - file=DESCRIPTOR, + name='MetricsServiceV2', + full_name='google.logging.v2.MetricsServiceV2', + file=DESCRIPTOR, + index=0, + serialized_options=b'\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write', + create_key=_descriptor._internal_create_key, + serialized_start=1723, + serialized_end=2793, + methods=[ + _descriptor.MethodDescriptor( + name='ListLogMetrics', + full_name='google.logging.v2.MetricsServiceV2.ListLogMetrics', index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + containing_service=None, + input_type=_LISTLOGMETRICSREQUEST, + output_type=_LISTLOGMETRICSRESPONSE, + serialized_options=b'\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent', create_key=_descriptor._internal_create_key, - serialized_start=1723, - serialized_end=2793, - methods=[ - _descriptor.MethodDescriptor( - name="ListLogMetrics", - full_name="google.logging.v2.MetricsServiceV2.ListLogMetrics", - index=0, - containing_service=None, - input_type=_LISTLOGMETRICSREQUEST, - output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetLogMetric", - full_name="google.logging.v2.MetricsServiceV2.GetLogMetric", - index=1, - containing_service=None, - input_type=_GETLOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="CreateLogMetric", - full_name="google.logging.v2.MetricsServiceV2.CreateLogMetric", - index=2, - containing_service=None, - input_type=_CREATELOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateLogMetric", - full_name="google.logging.v2.MetricsServiceV2.UpdateLogMetric", - index=3, - containing_service=None, - input_type=_UPDATELOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="DeleteLogMetric", - full_name="google.logging.v2.MetricsServiceV2.DeleteLogMetric", - index=4, - containing_service=None, - input_type=_DELETELOGMETRICREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, - ), - ], -) + ), + _descriptor.MethodDescriptor( + name='GetLogMetric', + full_name='google.logging.v2.MetricsServiceV2.GetLogMetric', + index=1, + containing_service=None, + input_type=_GETLOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b'\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='CreateLogMetric', + full_name='google.logging.v2.MetricsServiceV2.CreateLogMetric', + index=2, + containing_service=None, + input_type=_CREATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b'\202\323\344\223\002)\"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='UpdateLogMetric', + full_name='google.logging.v2.MetricsServiceV2.UpdateLogMetric', + index=3, + containing_service=None, + input_type=_UPDATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b'\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteLogMetric', + full_name='google.logging.v2.MetricsServiceV2.DeleteLogMetric', + index=4, + containing_service=None, + input_type=_DELETELOGMETRICREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b'\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name', + create_key=_descriptor._internal_create_key, + ), +]) _sym_db.RegisterServiceDescriptor(_METRICSSERVICEV2) -DESCRIPTOR.services_by_name["MetricsServiceV2"] = _METRICSSERVICEV2 +DESCRIPTOR.services_by_name['MetricsServiceV2'] = _METRICSSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index c97379c14..bfe55431d 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -2,14 +2,13 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import ( - logging_metrics_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2, -) +from google.cloud.logging_v2.proto import logging_metrics_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class MetricsServiceV2Stub(object): - """Service for configuring logs-based metrics.""" + """Service for configuring logs-based metrics. + """ def __init__(self, channel): """Constructor. @@ -18,235 +17,186 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( - "/google.logging.v2.MetricsServiceV2/ListLogMetrics", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - ) + '/google.logging.v2.MetricsServiceV2/ListLogMetrics', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, + ) self.GetLogMetric = channel.unary_unary( - "/google.logging.v2.MetricsServiceV2/GetLogMetric", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + '/google.logging.v2.MetricsServiceV2/GetLogMetric', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.CreateLogMetric = channel.unary_unary( - "/google.logging.v2.MetricsServiceV2/CreateLogMetric", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + '/google.logging.v2.MetricsServiceV2/CreateLogMetric', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.UpdateLogMetric = channel.unary_unary( - "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + '/google.logging.v2.MetricsServiceV2/UpdateLogMetric', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.DeleteLogMetric = channel.unary_unary( - "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + '/google.logging.v2.MetricsServiceV2/DeleteLogMetric', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) class MetricsServiceV2Servicer(object): - """Service for configuring logs-based metrics.""" + """Service for configuring logs-based metrics. + """ def ListLogMetrics(self, request, context): - """Lists logs-based metrics.""" + """Lists logs-based metrics. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def GetLogMetric(self, request, context): - """Gets a logs-based metric.""" + """Gets a logs-based metric. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def CreateLogMetric(self, request, context): - """Creates a logs-based metric.""" + """Creates a logs-based metric. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def UpdateLogMetric(self, request, context): - """Creates or updates a logs-based metric.""" + """Creates or updates a logs-based metric. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def DeleteLogMetric(self, request, context): - """Deletes a logs-based metric.""" + """Deletes a logs-based metric. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_MetricsServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - "ListLogMetrics": grpc.unary_unary_rpc_method_handler( - servicer.ListLogMetrics, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString, - ), - "GetLogMetric": grpc.unary_unary_rpc_method_handler( - servicer.GetLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - "CreateLogMetric": grpc.unary_unary_rpc_method_handler( - servicer.CreateLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - "UpdateLogMetric": grpc.unary_unary_rpc_method_handler( - servicer.UpdateLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - "DeleteLogMetric": grpc.unary_unary_rpc_method_handler( - servicer.DeleteLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), + 'ListLogMetrics': grpc.unary_unary_rpc_method_handler( + servicer.ListLogMetrics, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString, + ), + 'GetLogMetric': grpc.unary_unary_rpc_method_handler( + servicer.GetLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + 'CreateLogMetric': grpc.unary_unary_rpc_method_handler( + servicer.CreateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + 'UpdateLogMetric': grpc.unary_unary_rpc_method_handler( + servicer.UpdateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + 'DeleteLogMetric': grpc.unary_unary_rpc_method_handler( + servicer.DeleteLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "google.logging.v2.MetricsServiceV2", rpc_method_handlers - ) + 'google.logging.v2.MetricsServiceV2', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class MetricsServiceV2(object): - """Service for configuring logs-based metrics.""" + """Service for configuring logs-based metrics. + """ @staticmethod - def ListLogMetrics( - 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, + def ListLogMetrics(request, target, - "/google.logging.v2.MetricsServiceV2/ListLogMetrics", + 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.logging.v2.MetricsServiceV2/ListLogMetrics', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def GetLogMetric( - 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, + def GetLogMetric(request, target, - "/google.logging.v2.MetricsServiceV2/GetLogMetric", + 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.logging.v2.MetricsServiceV2/GetLogMetric', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def CreateLogMetric( - 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, + def CreateLogMetric(request, target, - "/google.logging.v2.MetricsServiceV2/CreateLogMetric", + 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.logging.v2.MetricsServiceV2/CreateLogMetric', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def UpdateLogMetric( - 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, + def UpdateLogMetric(request, target, - "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", + 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.logging.v2.MetricsServiceV2/UpdateLogMetric', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def DeleteLogMetric( - 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, + def DeleteLogMetric(request, target, - "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", + 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.logging.v2.MetricsServiceV2/DeleteLogMetric', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index a8a2100af..67739c54d 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -6,7 +6,6 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -14,16 +13,10 @@ 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 ( - monitored_resource_pb2 as google_dot_api_dot_monitored__resource__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.cloud.logging_v2.proto import ( - log_entry_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2, -) -from google.cloud.logging_v2.proto import ( - logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2, -) +from google.cloud.logging_v2.proto import log_entry_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2 +from google.cloud.logging_v2.proto import logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 @@ -33,881 +26,537 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/logging_v2/proto/logging.proto", - package="google.logging.v2", - syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', - dependencies=[ - google_dot_api_dot_client__pb2.DESCRIPTOR, - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, - google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, - google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2.DESCRIPTOR, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, - google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, - google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, - ], -) + name='google/cloud/logging_v2/proto/logging.proto', + package='google.logging.v2', + syntax='proto3', + serialized_options=b'\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto\"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x19\n\x17WriteLogEntriesResponse\"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01\"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty\"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse\"?\x82\xd3\xe4\x93\x02\x16\"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse\"<\x82\xd3\xe4\x93\x02\x15\"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse\"(\x82\xd3\xe4\x93\x02\"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12\".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse\"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' + , + dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2.DESCRIPTOR,google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) + + _DELETELOGREQUEST = _descriptor.Descriptor( - name="DeleteLogRequest", - full_name="google.logging.v2.DeleteLogRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="log_name", - full_name="google.logging.v2.DeleteLogRequest.log_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=470, - serialized_end=542, + name='DeleteLogRequest', + full_name='google.logging.v2.DeleteLogRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='log_name', full_name='google.logging.v2.DeleteLogRequest.log_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\034\n\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=470, + serialized_end=542, ) _WRITELOGENTRIESREQUEST_LABELSENTRY = _descriptor.Descriptor( - name="LabelsEntry", - full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.value", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=858, - serialized_end=903, + name='LabelsEntry', + full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=858, + serialized_end=903, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( - name="WriteLogEntriesRequest", - full_name="google.logging.v2.WriteLogEntriesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="log_name", - full_name="google.logging.v2.WriteLogEntriesRequest.log_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="resource", - full_name="google.logging.v2.WriteLogEntriesRequest.resource", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="labels", - full_name="google.logging.v2.WriteLogEntriesRequest.labels", - index=2, - number=3, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="entries", - full_name="google.logging.v2.WriteLogEntriesRequest.entries", - index=3, - number=4, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="partial_success", - full_name="google.logging.v2.WriteLogEntriesRequest.partial_success", - index=4, - number=5, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="dry_run", - full_name="google.logging.v2.WriteLogEntriesRequest.dry_run", - index=5, - number=6, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[ - _WRITELOGENTRIESREQUEST_LABELSENTRY, - ], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=545, - serialized_end=903, + name='WriteLogEntriesRequest', + full_name='google.logging.v2.WriteLogEntriesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='log_name', full_name='google.logging.v2.WriteLogEntriesRequest.log_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001\372A\034\n\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='resource', full_name='google.logging.v2.WriteLogEntriesRequest.resource', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='labels', full_name='google.logging.v2.WriteLogEntriesRequest.labels', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='entries', full_name='google.logging.v2.WriteLogEntriesRequest.entries', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='partial_success', full_name='google.logging.v2.WriteLogEntriesRequest.partial_success', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='dry_run', full_name='google.logging.v2.WriteLogEntriesRequest.dry_run', index=5, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_WRITELOGENTRIESREQUEST_LABELSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=545, + serialized_end=903, ) _WRITELOGENTRIESRESPONSE = _descriptor.Descriptor( - name="WriteLogEntriesResponse", - full_name="google.logging.v2.WriteLogEntriesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=905, - serialized_end=930, + name='WriteLogEntriesResponse', + full_name='google.logging.v2.WriteLogEntriesResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=905, + serialized_end=930, ) _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY = _descriptor.Descriptor( - name="LogEntryErrorsEntry", - full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.key", - index=0, - number=1, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.value", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"8\001", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1060, - serialized_end=1133, + name='LogEntryErrorsEntry', + full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.key', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=b'8\001', + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1060, + serialized_end=1133, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( - name="WriteLogEntriesPartialErrors", - full_name="google.logging.v2.WriteLogEntriesPartialErrors", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="log_entry_errors", - full_name="google.logging.v2.WriteLogEntriesPartialErrors.log_entry_errors", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[ - _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - ], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=933, - serialized_end=1133, + name='WriteLogEntriesPartialErrors', + full_name='google.logging.v2.WriteLogEntriesPartialErrors', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='log_entry_errors', full_name='google.logging.v2.WriteLogEntriesPartialErrors.log_entry_errors', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=933, + serialized_end=1133, ) _LISTLOGENTRIESREQUEST = _descriptor.Descriptor( - name="ListLogEntriesRequest", - full_name="google.logging.v2.ListLogEntriesRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="resource_names", - full_name="google.logging.v2.ListLogEntriesRequest.resource_names", - index=0, - number=8, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="filter", - full_name="google.logging.v2.ListLogEntriesRequest.filter", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="order_by", - full_name="google.logging.v2.ListLogEntriesRequest.order_by", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListLogEntriesRequest.page_size", - index=3, - number=4, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListLogEntriesRequest.page_token", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1136, - serialized_end=1312, + name='ListLogEntriesRequest', + full_name='google.logging.v2.ListLogEntriesRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='resource_names', full_name='google.logging.v2.ListLogEntriesRequest.resource_names', index=0, + number=8, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\034\022\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='filter', full_name='google.logging.v2.ListLogEntriesRequest.filter', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='order_by', full_name='google.logging.v2.ListLogEntriesRequest.order_by', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListLogEntriesRequest.page_size', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListLogEntriesRequest.page_token', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1136, + serialized_end=1312, ) _LISTLOGENTRIESRESPONSE = _descriptor.Descriptor( - name="ListLogEntriesResponse", - full_name="google.logging.v2.ListLogEntriesResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="entries", - full_name="google.logging.v2.ListLogEntriesResponse.entries", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListLogEntriesResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1314, - serialized_end=1409, + name='ListLogEntriesResponse', + full_name='google.logging.v2.ListLogEntriesResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='entries', full_name='google.logging.v2.ListLogEntriesResponse.entries', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListLogEntriesResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1314, + serialized_end=1409, ) _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST = _descriptor.Descriptor( - name="ListMonitoredResourceDescriptorsRequest", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_size", - index=0, - number=1, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1411, - serialized_end=1501, + name='ListMonitoredResourceDescriptorsRequest', + full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_size', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1411, + serialized_end=1501, ) _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE = _descriptor.Descriptor( - name="ListMonitoredResourceDescriptorsResponse", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="resource_descriptors", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.resource_descriptors", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1504, - serialized_end=1642, + name='ListMonitoredResourceDescriptorsResponse', + full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='resource_descriptors', full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse.resource_descriptors', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1504, + serialized_end=1642, ) _LISTLOGSREQUEST = _descriptor.Descriptor( - name="ListLogsRequest", - full_name="google.logging.v2.ListLogsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListLogsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListLogsRequest.page_size", - index=1, - number=2, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListLogsRequest.page_token", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1644, - serialized_end=1762, + name='ListLogsRequest', + full_name='google.logging.v2.ListLogsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='parent', full_name='google.logging.v2.ListLogsRequest.parent', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\002\372A\034\022\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_size', full_name='google.logging.v2.ListLogsRequest.page_size', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='page_token', full_name='google.logging.v2.ListLogsRequest.page_token', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1644, + serialized_end=1762, ) _LISTLOGSRESPONSE = _descriptor.Descriptor( - name="ListLogsResponse", - full_name="google.logging.v2.ListLogsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="log_names", - full_name="google.logging.v2.ListLogsResponse.log_names", - index=0, - number=3, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListLogsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1764, - serialized_end=1826, + name='ListLogsResponse', + full_name='google.logging.v2.ListLogsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='log_names', full_name='google.logging.v2.ListLogsResponse.log_names', index=0, + number=3, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='next_page_token', full_name='google.logging.v2.ListLogsResponse.next_page_token', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1764, + serialized_end=1826, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST -_WRITELOGENTRIESREQUEST.fields_by_name[ - "resource" -].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE -_WRITELOGENTRIESREQUEST.fields_by_name[ - "labels" -].message_type = _WRITELOGENTRIESREQUEST_LABELSENTRY -_WRITELOGENTRIESREQUEST.fields_by_name[ - "entries" -].message_type = ( - google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY -) -_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.fields_by_name[ - "value" -].message_type = google_dot_rpc_dot_status__pb2._STATUS -_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.containing_type = ( - _WRITELOGENTRIESPARTIALERRORS -) -_WRITELOGENTRIESPARTIALERRORS.fields_by_name[ - "log_entry_errors" -].message_type = _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY -_LISTLOGENTRIESRESPONSE.fields_by_name[ - "entries" -].message_type = ( - google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY -) -_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name[ - "resource_descriptors" -].message_type = ( - google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR -) -DESCRIPTOR.message_types_by_name["DeleteLogRequest"] = _DELETELOGREQUEST -DESCRIPTOR.message_types_by_name["WriteLogEntriesRequest"] = _WRITELOGENTRIESREQUEST -DESCRIPTOR.message_types_by_name["WriteLogEntriesResponse"] = _WRITELOGENTRIESRESPONSE -DESCRIPTOR.message_types_by_name[ - "WriteLogEntriesPartialErrors" -] = _WRITELOGENTRIESPARTIALERRORS -DESCRIPTOR.message_types_by_name["ListLogEntriesRequest"] = _LISTLOGENTRIESREQUEST -DESCRIPTOR.message_types_by_name["ListLogEntriesResponse"] = _LISTLOGENTRIESRESPONSE -DESCRIPTOR.message_types_by_name[ - "ListMonitoredResourceDescriptorsRequest" -] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST -DESCRIPTOR.message_types_by_name[ - "ListMonitoredResourceDescriptorsResponse" -] = _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE -DESCRIPTOR.message_types_by_name["ListLogsRequest"] = _LISTLOGSREQUEST -DESCRIPTOR.message_types_by_name["ListLogsResponse"] = _LISTLOGSRESPONSE +_WRITELOGENTRIESREQUEST.fields_by_name['resource'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_WRITELOGENTRIESREQUEST.fields_by_name['labels'].message_type = _WRITELOGENTRIESREQUEST_LABELSENTRY +_WRITELOGENTRIESREQUEST.fields_by_name['entries'].message_type = google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.fields_by_name['value'].message_type = google_dot_rpc_dot_status__pb2._STATUS +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.containing_type = _WRITELOGENTRIESPARTIALERRORS +_WRITELOGENTRIESPARTIALERRORS.fields_by_name['log_entry_errors'].message_type = _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY +_LISTLOGENTRIESRESPONSE.fields_by_name['entries'].message_type = google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name['resource_descriptors'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR +DESCRIPTOR.message_types_by_name['DeleteLogRequest'] = _DELETELOGREQUEST +DESCRIPTOR.message_types_by_name['WriteLogEntriesRequest'] = _WRITELOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name['WriteLogEntriesResponse'] = _WRITELOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name['WriteLogEntriesPartialErrors'] = _WRITELOGENTRIESPARTIALERRORS +DESCRIPTOR.message_types_by_name['ListLogEntriesRequest'] = _LISTLOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name['ListLogEntriesResponse'] = _LISTLOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name['ListMonitoredResourceDescriptorsRequest'] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST +DESCRIPTOR.message_types_by_name['ListMonitoredResourceDescriptorsResponse'] = _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE +DESCRIPTOR.message_types_by_name['ListLogsRequest'] = _LISTLOGSREQUEST +DESCRIPTOR.message_types_by_name['ListLogsResponse'] = _LISTLOGSRESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -DeleteLogRequest = _reflection.GeneratedProtocolMessageType( - "DeleteLogRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETELOGREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to DeleteLog. +DeleteLogRequest = _reflection.GeneratedProtocolMessageType('DeleteLogRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETELOGREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """The parameters to DeleteLog. Attributes: log_name: @@ -921,27 +570,22 @@ rcemanager.googleapis.com%2Factivity"``. For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) + }) _sym_db.RegisterMessage(DeleteLogRequest) -WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( - "WriteLogEntriesRequest", - (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( - "LabelsEntry", - (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - }, - ), - "DESCRIPTOR": _WRITELOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to WriteLogEntries. +WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType('WriteLogEntriesRequest', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _WRITELOGENTRIESREQUEST_LABELSENTRY, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) + }) + , + 'DESCRIPTOR' : _WRITELOGENTRIESREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """The parameters to WriteLogEntries. Attributes: log_name: @@ -1010,40 +654,32 @@ checking whether the logging API endpoints are working properly before sending valuable data. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) + }) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) -WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( - "WriteLogEntriesResponse", - (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from WriteLogEntries.""", - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - }, -) +WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType('WriteLogEntriesResponse', (_message.Message,), { + 'DESCRIPTOR' : _WRITELOGENTRIESRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """Result returned from WriteLogEntries.""", + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) + }) _sym_db.RegisterMessage(WriteLogEntriesResponse) -WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( - "WriteLogEntriesPartialErrors", - (_message.Message,), - { - "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( - "LogEntryErrorsEntry", - (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - }, - ), - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Error details for WriteLogEntries with partial success. +WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType('WriteLogEntriesPartialErrors', (_message.Message,), { + + 'LogEntryErrorsEntry' : _reflection.GeneratedProtocolMessageType('LogEntryErrorsEntry', (_message.Message,), { + 'DESCRIPTOR' : _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) + }) + , + 'DESCRIPTOR' : _WRITELOGENTRIESPARTIALERRORS, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """Error details for WriteLogEntries with partial success. Attributes: log_entry_errors: @@ -1053,19 +689,16 @@ ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) + }) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) -ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( - "ListLogEntriesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ``ListLogEntries``. +ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType('ListLogEntriesRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGENTRIESREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """The parameters to ``ListLogEntries``. Attributes: resource_names: @@ -1107,18 +740,15 @@ The values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) + }) _sym_db.RegisterMessage(ListLogEntriesRequest) -ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( - "ListLogEntriesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ``ListLogEntries``. +ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType('ListLogEntriesResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGENTRIESRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """Result returned from ``ListLogEntries``. Attributes: entries: @@ -1139,18 +769,15 @@ name or resource type, or to narrow the time range of the search. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) + }) _sym_db.RegisterMessage(ListLogEntriesResponse) -ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( - "ListMonitoredResourceDescriptorsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListMonitoredResourceDescriptors +ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType('ListMonitoredResourceDescriptorsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """The parameters to ListMonitoredResourceDescriptors Attributes: page_size: @@ -1165,18 +792,15 @@ values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) + }) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) -ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( - "ListMonitoredResourceDescriptorsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListMonitoredResourceDescriptors. +ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType('ListMonitoredResourceDescriptorsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """Result returned from ListMonitoredResourceDescriptors. Attributes: resource_descriptors: @@ -1187,18 +811,15 @@ set of results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) + }) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) -ListLogsRequest = _reflection.GeneratedProtocolMessageType( - "ListLogsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListLogs. +ListLogsRequest = _reflection.GeneratedProtocolMessageType('ListLogsRequest', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGSREQUEST, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """The parameters to ListLogs. Attributes: parent: @@ -1218,18 +839,15 @@ values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) + }) _sym_db.RegisterMessage(ListLogsRequest) -ListLogsResponse = _reflection.GeneratedProtocolMessageType( - "ListLogsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListLogs. +ListLogsResponse = _reflection.GeneratedProtocolMessageType('ListLogsResponse', (_message.Message,), { + 'DESCRIPTOR' : _LISTLOGSRESPONSE, + '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' + , + '__doc__': """Result returned from ListLogs. Attributes: log_names: @@ -1242,97 +860,95 @@ set of results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - }, -) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) + }) _sym_db.RegisterMessage(ListLogsResponse) DESCRIPTOR._options = None -_DELETELOGREQUEST.fields_by_name["log_name"]._options = None +_DELETELOGREQUEST.fields_by_name['log_name']._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['log_name']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['resource']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['labels']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['entries']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['partial_success']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name['dry_run']._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None -_LISTLOGSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name['resource_names']._options = None +_LISTLOGENTRIESREQUEST.fields_by_name['filter']._options = None +_LISTLOGENTRIESREQUEST.fields_by_name['order_by']._options = None +_LISTLOGENTRIESREQUEST.fields_by_name['page_size']._options = None +_LISTLOGENTRIESREQUEST.fields_by_name['page_token']._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name['page_size']._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name['page_token']._options = None +_LISTLOGSREQUEST.fields_by_name['parent']._options = None +_LISTLOGSREQUEST.fields_by_name['page_size']._options = None +_LISTLOGSREQUEST.fields_by_name['page_token']._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( - name="LoggingServiceV2", - full_name="google.logging.v2.LoggingServiceV2", - file=DESCRIPTOR, + name='LoggingServiceV2', + full_name='google.logging.v2.LoggingServiceV2', + file=DESCRIPTOR, + index=0, + serialized_options=b'\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write', + create_key=_descriptor._internal_create_key, + serialized_start=1829, + serialized_end=3202, + methods=[ + _descriptor.MethodDescriptor( + name='DeleteLog', + full_name='google.logging.v2.LoggingServiceV2.DeleteLog', index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + containing_service=None, + input_type=_DELETELOGREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b'\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name', create_key=_descriptor._internal_create_key, - serialized_start=1829, - serialized_end=3202, - methods=[ - _descriptor.MethodDescriptor( - name="DeleteLog", - full_name="google.logging.v2.LoggingServiceV2.DeleteLog", - index=0, - containing_service=None, - input_type=_DELETELOGREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="WriteLogEntries", - full_name="google.logging.v2.LoggingServiceV2.WriteLogEntries", - index=1, - containing_service=None, - input_type=_WRITELOGENTRIESREQUEST, - output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListLogEntries", - full_name="google.logging.v2.LoggingServiceV2.ListLogEntries", - index=2, - containing_service=None, - input_type=_LISTLOGENTRIESREQUEST, - output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListMonitoredResourceDescriptors", - full_name="google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", - index=3, - containing_service=None, - input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="ListLogs", - full_name="google.logging.v2.LoggingServiceV2.ListLogs", - index=4, - containing_service=None, - input_type=_LISTLOGSREQUEST, - output_type=_LISTLOGSRESPONSE, - serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - ], -) + ), + _descriptor.MethodDescriptor( + name='WriteLogEntries', + full_name='google.logging.v2.LoggingServiceV2.WriteLogEntries', + index=1, + containing_service=None, + input_type=_WRITELOGENTRIESREQUEST, + output_type=_WRITELOGENTRIESRESPONSE, + serialized_options=b'\202\323\344\223\002\026\"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListLogEntries', + full_name='google.logging.v2.LoggingServiceV2.ListLogEntries', + index=2, + containing_service=None, + input_type=_LISTLOGENTRIESREQUEST, + output_type=_LISTLOGENTRIESRESPONSE, + serialized_options=b'\202\323\344\223\002\025\"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListMonitoredResourceDescriptors', + full_name='google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors', + index=3, + containing_service=None, + input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + serialized_options=b'\202\323\344\223\002\"\022 /v2/monitoredResourceDescriptors', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListLogs', + full_name='google.logging.v2.LoggingServiceV2.ListLogs', + index=4, + containing_service=None, + input_type=_LISTLOGSREQUEST, + output_type=_LISTLOGSRESPONSE, + serialized_options=b'\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent', + create_key=_descriptor._internal_create_key, + ), +]) _sym_db.RegisterServiceDescriptor(_LOGGINGSERVICEV2) -DESCRIPTOR.services_by_name["LoggingServiceV2"] = _LOGGINGSERVICEV2 +DESCRIPTOR.services_by_name['LoggingServiceV2'] = _LOGGINGSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 15c16bee0..c18ddb2de 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -2,14 +2,13 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import ( - logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2, -) +from google.cloud.logging_v2.proto import logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class LoggingServiceV2Stub(object): - """Service for ingesting and querying logs.""" + """Service for ingesting and querying logs. + """ def __init__(self, channel): """Constructor. @@ -18,34 +17,35 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( - "/google.logging.v2.LoggingServiceV2/DeleteLog", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + '/google.logging.v2.LoggingServiceV2/DeleteLog', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.WriteLogEntries = channel.unary_unary( - "/google.logging.v2.LoggingServiceV2/WriteLogEntries", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - ) + '/google.logging.v2.LoggingServiceV2/WriteLogEntries', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, + ) self.ListLogEntries = channel.unary_unary( - "/google.logging.v2.LoggingServiceV2/ListLogEntries", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - ) + '/google.logging.v2.LoggingServiceV2/ListLogEntries', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, + ) self.ListMonitoredResourceDescriptors = channel.unary_unary( - "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - ) + '/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, + ) self.ListLogs = channel.unary_unary( - "/google.logging.v2.LoggingServiceV2/ListLogs", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - ) + '/google.logging.v2.LoggingServiceV2/ListLogs', + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, + ) class LoggingServiceV2Servicer(object): - """Service for ingesting and querying logs.""" + """Service for ingesting and querying logs. + """ def DeleteLog(self, request, context): """Deletes all the log entries in a log. The log reappears if it receives new @@ -54,8 +54,8 @@ def DeleteLog(self, request, context): before the operation will be deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def WriteLogEntries(self, request, context): """Writes log entries to Logging. This API method is the @@ -67,8 +67,8 @@ def WriteLogEntries(self, request, context): folders) """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated @@ -77,193 +77,139 @@ def ListLogEntries(self, request, context): Logs](https://cloud.google.com/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def ListMonitoredResourceDescriptors(self, request, context): - """Lists the descriptors for monitored resource types used by Logging.""" + """Lists the descriptors for monitored resource types used by Logging. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def ListLogs(self, request, context): """Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_LoggingServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - "DeleteLog": grpc.unary_unary_rpc_method_handler( - servicer.DeleteLog, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - "WriteLogEntries": grpc.unary_unary_rpc_method_handler( - servicer.WriteLogEntries, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString, - ), - "ListLogEntries": grpc.unary_unary_rpc_method_handler( - servicer.ListLogEntries, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString, - ), - "ListMonitoredResourceDescriptors": grpc.unary_unary_rpc_method_handler( - servicer.ListMonitoredResourceDescriptors, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString, - ), - "ListLogs": grpc.unary_unary_rpc_method_handler( - servicer.ListLogs, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString, - ), + 'DeleteLog': grpc.unary_unary_rpc_method_handler( + servicer.DeleteLog, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'WriteLogEntries': grpc.unary_unary_rpc_method_handler( + servicer.WriteLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString, + ), + 'ListLogEntries': grpc.unary_unary_rpc_method_handler( + servicer.ListLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString, + ), + 'ListMonitoredResourceDescriptors': grpc.unary_unary_rpc_method_handler( + servicer.ListMonitoredResourceDescriptors, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString, + ), + 'ListLogs': grpc.unary_unary_rpc_method_handler( + servicer.ListLogs, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - "google.logging.v2.LoggingServiceV2", rpc_method_handlers - ) + 'google.logging.v2.LoggingServiceV2', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) -# This class is part of an EXPERIMENTAL API. + # This class is part of an EXPERIMENTAL API. class LoggingServiceV2(object): - """Service for ingesting and querying logs.""" + """Service for ingesting and querying logs. + """ @staticmethod - def DeleteLog( - 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, + def DeleteLog(request, target, - "/google.logging.v2.LoggingServiceV2/DeleteLog", + 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.logging.v2.LoggingServiceV2/DeleteLog', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def WriteLogEntries( - 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, + def WriteLogEntries(request, target, - "/google.logging.v2.LoggingServiceV2/WriteLogEntries", + 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.logging.v2.LoggingServiceV2/WriteLogEntries', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ListLogEntries( - 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, + def ListLogEntries(request, target, - "/google.logging.v2.LoggingServiceV2/ListLogEntries", + 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.logging.v2.LoggingServiceV2/ListLogEntries', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ListMonitoredResourceDescriptors( - 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, + def ListMonitoredResourceDescriptors(request, target, - "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", + 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def ListLogs( - 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, + def ListLogs(request, target, - "/google.logging.v2.LoggingServiceV2/ListLogs", + 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.logging.v2.LoggingServiceV2/ListLogs', google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) + options, channel_credentials, + call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py deleted file mode 100644 index d309d6e97..000000000 --- a/scripts/readme-gen/readme_gen.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 deleted file mode 100644 index 4fd239765..000000000 --- a/scripts/readme-gen/templates/README.tmpl.rst +++ /dev/null @@ -1,87 +0,0 @@ -{# 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 deleted file mode 100644 index 1446b94a5..000000000 --- a/scripts/readme-gen/templates/auth.tmpl.rst +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 11957ce27..000000000 --- a/scripts/readme-gen/templates/auth_api_key.tmpl.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index a0406dba8..000000000 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 5ea33d18c..000000000 --- a/scripts/readme-gen/templates/install_portaudio.tmpl.rst +++ /dev/null @@ -1,35 +0,0 @@ -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 ca1680a58..a5616d3e5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,25 +1,32 @@ { "sources": [ + { + "generator": { + "name": "artman", + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, { "git": { "name": ".", - "remote": "https://github.com/googleapis/python-logging.git", - "sha": "0a1dd94811232634fdb849cb2c85bd44e870642f" + "remote": "git@github.com:googleapis/python-logging", + "sha": "a22a3bfdd4c8a4d6e9cc0c7d7504322ff31ad7ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "db69b46790b55a82ab7cfa473d031da787bc7591", - "internalRef": "320411362" + "sha": "aaff764c185e18a6c73227357c3df5fa60fec85a", + "internalRef": "309426927" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "cdddf139b36000b3a7c65fd2a7781e253262359a" } } ], @@ -30,96 +37,9 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "bazel" + "generator": "gapic", + "config": "google/logging/artman_logging.yaml" } } - ], - "generatedFiles": [ - ".coveragerc", - ".flake8", - ".github/CONTRIBUTING.md", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".gitignore", - ".kokoro/build.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/continuous.cfg", - ".kokoro/docs/common.cfg", - ".kokoro/docs/docs.cfg", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/presubmit.cfg", - ".kokoro/publish-docs.sh", - ".kokoro/release.sh", - ".kokoro/release/common.cfg", - ".kokoro/release/release.cfg", - ".kokoro/samples/lint/common.cfg", - ".kokoro/samples/lint/continuous.cfg", - ".kokoro/samples/lint/periodic.cfg", - ".kokoro/samples/lint/presubmit.cfg", - ".kokoro/samples/python3.6/common.cfg", - ".kokoro/samples/python3.6/continuous.cfg", - ".kokoro/samples/python3.6/periodic.cfg", - ".kokoro/samples/python3.6/presubmit.cfg", - ".kokoro/samples/python3.7/common.cfg", - ".kokoro/samples/python3.7/continuous.cfg", - ".kokoro/samples/python3.7/periodic.cfg", - ".kokoro/samples/python3.7/presubmit.cfg", - ".kokoro/samples/python3.8/common.cfg", - ".kokoro/samples/python3.8/continuous.cfg", - ".kokoro/samples/python3.8/periodic.cfg", - ".kokoro/samples/python3.8/presubmit.cfg", - ".kokoro/test-samples.sh", - ".kokoro/trampoline.sh", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.rst", - "LICENSE", - "MANIFEST.in", - "docs/_static/custom.css", - "docs/_templates/layout.html", - "docs/conf.py", - "docs/gapic/v2/api.rst", - "docs/gapic/v2/types.rst", - "docs/multiprocessing.rst", - "google/cloud/logging_v2/gapic/__init__.py", - "google/cloud/logging_v2/gapic/config_service_v2_client.py", - "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/enums.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/transports/__init__.py", - "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", - "google/cloud/logging_v2/proto/__init__.py", - "google/cloud/logging_v2/proto/log_entry.proto", - "google/cloud/logging_v2/proto/log_entry_pb2.py", - "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging.proto", - "google/cloud/logging_v2/proto/logging_config.proto", - "google/cloud/logging_v2/proto/logging_config_pb2.py", - "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging_metrics.proto", - "google/cloud/logging_v2/proto/logging_metrics_pb2.py", - "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging_pb2.py", - "google/cloud/logging_v2/proto/logging_pb2_grpc.py", - "renovate.json", - "scripts/decrypt-secrets.sh", - "scripts/readme-gen/readme_gen.py", - "scripts/readme-gen/templates/README.tmpl.rst", - "scripts/readme-gen/templates/auth.tmpl.rst", - "scripts/readme-gen/templates/auth_api_key.tmpl.rst", - "scripts/readme-gen/templates/install_deps.tmpl.rst", - "scripts/readme-gen/templates/install_portaudio.tmpl.rst", - "setup.cfg", - "testing/.gitignore", - "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 1b267f75c..ba9af3140 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -25,9 +25,9 @@ from google.protobuf import field_mask_pb2 + class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" - def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -48,12 +48,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - - def __init__(self, responses=[]): + def __init__(self, responses = []): self.responses = responses self.requests = [] - def unary_unary(self, method, request_serializer=None, response_deserializer=None): + def unary_unary( + self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -62,15 +62,16 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): + def test_delete_sink(self): channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' client.delete_sink(sink_name) @@ -81,69 +82,59 @@ def test_delete_sink(self): def test_delete_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' with pytest.raises(CustomException): client.delete_sink(sink_name) def test_update_sink(self): # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" + name = 'name3373707' + destination = 'destination-1429847026' + filter_ = 'filter-1274492040' + description = 'description-1724546052' disabled = True - writer_identity = "writerIdentity775638794" + writer_identity = 'writerIdentity775638794' include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } + expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' sink = {} response = client.update_sink(sink_name, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, sink=sink - ) + expected_request = logging_config_pb2.UpdateSinkRequest(sink_name=sink_name, sink=sink) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' sink = {} with pytest.raises(CustomException): @@ -151,13 +142,13 @@ def test_update_sink_exception(self): def test_delete_exclusion(self): channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' client.delete_exclusion(name) @@ -168,35 +159,35 @@ def test_delete_exclusion(self): def test_delete_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' with pytest.raises(CustomException): client.delete_exclusion(name) def test_list_buckets(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' buckets_element = {} buckets = [buckets_element] - expected_response = {"next_page_token": next_page_token, "buckets": buckets} + expected_response = {'next_page_token': next_page_token, 'buckets': buckets} expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') paged_list_response = client.list_buckets(parent) resources = list(paged_list_response) @@ -210,14 +201,14 @@ def test_list_buckets(self): assert expected_request == actual_request def test_list_buckets_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') paged_list_response = client.list_buckets(parent) with pytest.raises(CustomException): @@ -225,25 +216,21 @@ def test_list_buckets_exception(self): def test_get_bucket(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" + name_2 = 'name2-1052831874' + description = 'description-1724546052' retention_days = 1544391896 - expected_response = { - "name": name_2, - "description": description, - "retention_days": retention_days, - } + expected_response = {'name': name_2, 'description': description, 'retention_days': retention_days} expected_response = logging_config_pb2.LogBucket(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' response = client.get_bucket(name) assert expected_response == response @@ -255,39 +242,35 @@ def test_get_bucket(self): def test_get_bucket_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' with pytest.raises(CustomException): client.get_bucket(name) def test_update_bucket(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" + name_2 = 'name2-1052831874' + description = 'description-1724546052' retention_days = 1544391896 - expected_response = { - "name": name_2, - "description": description, - "retention_days": retention_days, - } + expected_response = {'name': name_2, 'description': description, 'retention_days': retention_days} expected_response = logging_config_pb2.LogBucket(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' bucket = {} update_mask = {} @@ -295,22 +278,20 @@ def test_update_bucket(self): assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateBucketRequest( - name=name, bucket=bucket, update_mask=update_mask - ) + expected_request = logging_config_pb2.UpdateBucketRequest(name=name, bucket=bucket, update_mask=update_mask) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_bucket_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' bucket = {} update_mask = {} @@ -319,21 +300,21 @@ def test_update_bucket_exception(self): def test_list_sinks(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' sinks_element = {} sinks = [sinks_element] - expected_response = {"next_page_token": next_page_token, "sinks": sinks} + expected_response = {'next_page_token': next_page_token, 'sinks': sinks} expected_response = logging_config_pb2.ListSinksResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_sinks(parent) resources = list(paged_list_response) @@ -347,14 +328,14 @@ def test_list_sinks(self): assert expected_request == actual_request def test_list_sinks_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): @@ -362,33 +343,25 @@ def test_list_sinks_exception(self): def test_get_sink(self): # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" + name = 'name3373707' + destination = 'destination-1429847026' + filter_ = 'filter-1274492040' + description = 'description-1724546052' disabled = True - writer_identity = "writerIdentity775638794" + writer_identity = 'writerIdentity775638794' include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } + expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' response = client.get_sink(sink_name) assert expected_response == response @@ -400,69 +373,59 @@ def test_get_sink(self): def test_get_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + sink_name = 'sinkName-1391757129' with pytest.raises(CustomException): client.get_sink(sink_name) def test_create_sink(self): # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" + name = 'name3373707' + destination = 'destination-1429847026' + filter_ = 'filter-1274492040' + description = 'description-1724546052' disabled = True - writer_identity = "writerIdentity775638794" + writer_identity = 'writerIdentity775638794' include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } + expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') sink = {} response = client.create_sink(parent, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateSinkRequest( - parent=parent, sink=sink - ) + expected_request = logging_config_pb2.CreateSinkRequest(parent=parent, sink=sink) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') sink = {} with pytest.raises(CustomException): @@ -470,26 +433,21 @@ def test_create_sink_exception(self): def test_list_exclusions(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' exclusions_element = {} exclusions = [exclusions_element] - expected_response = { - "next_page_token": next_page_token, - "exclusions": exclusions, - } - expected_response = logging_config_pb2.ListExclusionsResponse( - **expected_response - ) + expected_response = {'next_page_token': next_page_token, 'exclusions': exclusions} + expected_response = logging_config_pb2.ListExclusionsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_exclusions(parent) resources = list(paged_list_response) @@ -503,14 +461,14 @@ def test_list_exclusions(self): assert expected_request == actual_request def test_list_exclusions_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_exclusions(parent) with pytest.raises(CustomException): @@ -518,27 +476,22 @@ def test_list_exclusions_exception(self): def test_get_exclusion(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" - filter_ = "filter-1274492040" + name_2 = 'name2-1052831874' + description = 'description-1724546052' + filter_ = 'filter-1274492040' disabled = True - expected_response = { - "name": name_2, - "description": description, - "filter": filter_, - "disabled": disabled, - } + expected_response = {'name': name_2, 'description': description, 'filter': filter_, 'disabled': disabled} expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' response = client.get_exclusion(name) assert expected_response == response @@ -550,63 +503,56 @@ def test_get_exclusion(self): def test_get_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' with pytest.raises(CustomException): client.get_exclusion(name) def test_create_exclusion(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" + name = 'name3373707' + description = 'description-1724546052' + filter_ = 'filter-1274492040' disabled = True - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "disabled": disabled, - } + expected_response = {'name': name, 'description': description, 'filter': filter_, 'disabled': disabled} expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') exclusion = {} response = client.create_exclusion(parent, exclusion) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateExclusionRequest( - parent=parent, exclusion=exclusion - ) + expected_request = logging_config_pb2.CreateExclusionRequest(parent=parent, exclusion=exclusion) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') exclusion = {} with pytest.raises(CustomException): @@ -614,27 +560,22 @@ def test_create_exclusion_exception(self): def test_update_exclusion(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" - filter_ = "filter-1274492040" + name_2 = 'name2-1052831874' + description = 'description-1724546052' + filter_ = 'filter-1274492040' disabled = True - expected_response = { - "name": name_2, - "description": description, - "filter": filter_, - "disabled": disabled, - } + expected_response = {'name': name_2, 'description': description, 'filter': filter_, 'disabled': disabled} expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' exclusion = {} update_mask = {} @@ -642,22 +583,20 @@ def test_update_exclusion(self): assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateExclusionRequest( - name=name, exclusion=exclusion, update_mask=update_mask - ) + expected_request = logging_config_pb2.UpdateExclusionRequest(name=name, exclusion=exclusion, update_mask=update_mask) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' exclusion = {} update_mask = {} @@ -666,25 +605,21 @@ def test_update_exclusion_exception(self): def test_get_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" - kms_key_name = "kmsKeyName2094986649" - service_account_id = "serviceAccountId-111486921" - expected_response = { - "name": name_2, - "kms_key_name": kms_key_name, - "service_account_id": service_account_id, - } + name_2 = 'name2-1052831874' + kms_key_name = 'kmsKeyName2094986649' + service_account_id = 'serviceAccountId-111486921' + expected_response = {'name': name_2, 'kms_key_name': kms_key_name, 'service_account_id': service_account_id} expected_response = logging_config_pb2.CmekSettings(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' response = client.get_cmek_settings(name) assert expected_response == response @@ -696,61 +631,55 @@ def test_get_cmek_settings(self): def test_get_cmek_settings_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' with pytest.raises(CustomException): client.get_cmek_settings(name) def test_update_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" - kms_key_name = "kmsKeyName2094986649" - service_account_id = "serviceAccountId-111486921" - expected_response = { - "name": name_2, - "kms_key_name": kms_key_name, - "service_account_id": service_account_id, - } + name_2 = 'name2-1052831874' + kms_key_name = 'kmsKeyName2094986649' + service_account_id = 'serviceAccountId-111486921' + expected_response = {'name': name_2, 'kms_key_name': kms_key_name, 'service_account_id': service_account_id} expected_response = logging_config_pb2.CmekSettings(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = 'name3373707' cmek_settings = {} response = client.update_cmek_settings(name, cmek_settings) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest( - name=name, cmek_settings=cmek_settings - ) + expected_request = logging_config_pb2.UpdateCmekSettingsRequest(name=name, cmek_settings=cmek_settings) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_cmek_settings_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = 'name3373707' cmek_settings = {} with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index 9ece054d7..ac45396b0 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -26,9 +26,9 @@ from google.protobuf import empty_pb2 + class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" - def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -49,12 +49,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - - def __init__(self, responses=[]): + def __init__(self, responses = []): self.responses = responses self.requests = [] - def unary_unary(self, method, request_serializer=None, response_deserializer=None): + def unary_unary( + self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -63,15 +63,16 @@ class CustomException(Exception): class TestLoggingServiceV2Client(object): + def test_delete_log(self): channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = "logName2013526694" + log_name = 'logName2013526694' client.delete_log(log_name) @@ -82,29 +83,29 @@ def test_delete_log(self): def test_delete_log_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = "logName2013526694" + log_name = 'logName2013526694' with pytest.raises(CustomException): client.delete_log(log_name) def test_list_log_entries(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' entries_element = {} entries = [entries_element] - expected_response = {"next_page_token": next_page_token, "entries": entries} + expected_response = {'next_page_token': next_page_token, 'entries': entries} expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -119,15 +120,13 @@ def test_list_log_entries(self): assert expected_response.entries[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names - ) + expected_request = logging_pb2.ListLogEntriesRequest(resource_names=resource_names) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_list_log_entries_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -145,8 +144,8 @@ def test_write_log_entries(self): expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -164,8 +163,8 @@ def test_write_log_entries(self): def test_write_log_entries_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -178,20 +177,15 @@ def test_write_log_entries_exception(self): def test_list_monitored_resource_descriptors(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' resource_descriptors_element = {} resource_descriptors = [resource_descriptors_element] - expected_response = { - "next_page_token": next_page_token, - "resource_descriptors": resource_descriptors, - } - expected_response = logging_pb2.ListMonitoredResourceDescriptorsResponse( - **expected_response - ) + expected_response = {'next_page_token': next_page_token, 'resource_descriptors': resource_descriptors} + expected_response = logging_pb2.ListMonitoredResourceDescriptorsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -208,8 +202,8 @@ def test_list_monitored_resource_descriptors(self): assert expected_request == actual_request def test_list_monitored_resource_descriptors_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -220,21 +214,21 @@ def test_list_monitored_resource_descriptors_exception(self): def test_list_logs(self): # Setup Expected Response - next_page_token = "" - log_names_element = "logNamesElement-1079688374" + next_page_token = '' + log_names_element = 'logNamesElement-1079688374' log_names = [log_names_element] - expected_response = {"next_page_token": next_page_token, "log_names": log_names} + expected_response = {'next_page_token': next_page_token, 'log_names': log_names} expected_response = logging_pb2.ListLogsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_logs(parent) resources = list(paged_list_response) @@ -248,14 +242,14 @@ def test_list_logs(self): assert expected_request == actual_request def test_list_logs_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_logs(parent) with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 6baefad82..a3fa5b7b5 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -24,9 +24,9 @@ from google.protobuf import empty_pb2 + class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" - def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -47,12 +47,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - - def __init__(self, responses=[]): + def __init__(self, responses = []): self.responses = responses self.requests = [] - def unary_unary(self, method, request_serializer=None, response_deserializer=None): + def unary_unary( + self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -61,51 +61,45 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): + def test_update_log_metric(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } + name = 'name3373707' + description = 'description-1724546052' + filter_ = 'filter-1274492040' + value_extractor = 'valueExtractor2047672534' + expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') metric = {} response = client.update_log_metric(metric_name, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, metric=metric - ) + expected_request = logging_metrics_pb2.UpdateLogMetricRequest(metric_name=metric_name, metric=metric) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') metric = {} with pytest.raises(CustomException): @@ -113,56 +107,52 @@ def test_update_log_metric_exception(self): def test_delete_log_metric(self): channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest( - metric_name=metric_name - ) + expected_request = logging_metrics_pb2.DeleteLogMetricRequest(metric_name=metric_name) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_delete_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') with pytest.raises(CustomException): client.delete_log_metric(metric_name) def test_list_log_metrics(self): # Setup Expected Response - next_page_token = "" + next_page_token = '' metrics_element = {} metrics = [metrics_element] - expected_response = {"next_page_token": next_page_token, "metrics": metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse( - **expected_response - ) + expected_response = {'next_page_token': next_page_token, 'metrics': metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_log_metrics(parent) resources = list(paged_list_response) @@ -176,14 +166,14 @@ def test_list_log_metrics(self): assert expected_request == actual_request def test_list_log_metrics_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): @@ -191,97 +181,83 @@ def test_list_log_metrics_exception(self): def test_get_log_metric(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } + name = 'name3373707' + description = 'description-1724546052' + filter_ = 'filter-1274492040' + value_extractor = 'valueExtractor2047672534' + expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') response = client.get_log_metric(metric_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest( - metric_name=metric_name - ) + expected_request = logging_metrics_pb2.GetLogMetricRequest(metric_name=metric_name) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_get_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') with pytest.raises(CustomException): client.get_log_metric(metric_name) def test_create_log_metric(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } + name = 'name3373707' + description = 'description-1724546052' + filter_ = 'filter-1274492040' + value_extractor = 'valueExtractor2047672534' + expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [expected_response]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') metric = {} response = client.create_log_metric(parent, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, metric=metric - ) + expected_request = logging_metrics_pb2.CreateLogMetricRequest(parent=parent, metric=metric) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") + channel = ChannelStub(responses = [CustomException()]) + patch = mock.patch('google.api_core.grpc_helpers.create_channel') with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + parent = client.project_path('[PROJECT]') metric = {} with pytest.raises(CustomException): From 048ba62e4217cbd74ea889d766e35b90082205bb Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 06:59:58 -0700 Subject: [PATCH 21/39] Revert "feat(python-library): changes to docs job (#700)" This reverts commit f07cb4446192952f19be3056957f56d180586055. Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Jul 29 17:33:57 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: ee7506d15daa3873accfff9430eff7e3953f0248 Source-Link: https://github.com/googleapis/synthtool/commit/ee7506d15daa3873accfff9430eff7e3953f0248 --- .flake8 | 2 + .gitignore | 2 + .kokoro/build.sh | 8 +- .kokoro/docs/common.cfg | 21 +- .kokoro/publish-docs.sh | 39 +- .kokoro/test-samples.sh | 8 +- MANIFEST.in | 3 + docs/_templates/layout.html | 4 +- docs/conf.py | 7 +- docs/multiprocessing.rst | 7 + .../gapic/config_service_v2_client.py | 606 +-- .../gapic/config_service_v2_client_config.py | 234 +- google/cloud/logging_v2/gapic/enums.py | 11 +- .../gapic/logging_service_v2_client.py | 256 +- .../gapic/logging_service_v2_client_config.py | 152 +- .../gapic/metrics_service_v2_client.py | 234 +- .../gapic/metrics_service_v2_client_config.py | 134 +- .../config_service_v2_grpc_transport.py | 69 +- .../logging_service_v2_grpc_transport.py | 47 +- .../metrics_service_v2_grpc_transport.py | 49 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 1038 +++-- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 - .../logging_v2/proto/logging_config_pb2.py | 3751 ++++++++++------- .../proto/logging_config_pb2_grpc.py | 867 ++-- .../logging_v2/proto/logging_metrics_pb2.py | 1326 +++--- .../proto/logging_metrics_pb2_grpc.py | 308 +- google/cloud/logging_v2/proto/logging_pb2.py | 1662 +++++--- .../logging_v2/proto/logging_pb2_grpc.py | 296 +- scripts/readme-gen/readme_gen.py | 66 + scripts/readme-gen/templates/README.tmpl.rst | 87 + scripts/readme-gen/templates/auth.tmpl.rst | 9 + .../templates/auth_api_key.tmpl.rst | 14 + .../templates/install_deps.tmpl.rst | 29 + .../templates/install_portaudio.tmpl.rst | 35 + synth.metadata | 108 +- .../v2/test_config_service_v2_client_v2.py | 371 +- .../v2/test_logging_service_v2_client_v2.py | 80 +- .../v2/test_metrics_service_v2_client_v2.py | 136 +- 38 files changed, 7427 insertions(+), 4650 deletions(-) create mode 100644 docs/multiprocessing.rst create mode 100644 scripts/readme-gen/readme_gen.py create mode 100644 scripts/readme-gen/templates/README.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth_api_key.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_deps.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_portaudio.tmpl.rst diff --git a/.flake8 b/.flake8 index 20fe9bda2..ed9316381 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 3fb06e09c..b87e1ed58 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/build.sh b/.kokoro/build.sh index a194a9ead..8df566562 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -36,10 +36,4 @@ python3.6 -m pip uninstall --yes --quiet nox-automation python3.6 -m pip install --upgrade --quiet nox python3.6 -m nox --version -# If NOX_SESSION is set, it only runs the specified session, -# otherwise run all the sessions. -if [[ -n "${NOX_SESSION:-}" ]]; then - python3.6 -m nox -s "${NOX_SESSION:-}" -else - python3.6 -m nox -fi +python3.6 -m nox diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 4206e8ac4..01a16ec85 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -11,12 +11,12 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-logging/.kokoro/trampoline_v2.sh" +build_file: "python-logging/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" @@ -28,23 +28,6 @@ env_vars: { value: "docs-staging" } -env_vars: { - key: "V2_STAGING_BUCKET" - value: "docs-staging-v2-staging" -} - -# It will upload the docker image after successful builds. -env_vars: { - key: "TRAMPOLINE_IMAGE_UPLOAD" - value: "true" -} - -# It will always build the docker image. -env_vars: { - key: "TRAMPOLINE_DOCKERFILE" - value: ".kokoro/docker/docs/Dockerfile" -} - # Fetch the token needed for reporting release status to GitHub before_action { fetch_keystore { diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 8acb14e80..e49d523ad 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -18,37 +18,28 @@ set -eo pipefail # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 -export PATH="${HOME}/.local/bin:${PATH}" +cd github/python-logging + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation # Install nox -python3 -m pip install --user --upgrade --quiet nox -python3 -m nox --version +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version # build docs nox -s docs -python3 -m pip install --user gcp-docuploader - -# create metadata -python3 -m docuploader create-metadata \ - --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ - --version=$(python3 setup.py --version) \ - --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ - --distribution-name=$(python3 setup.py --name) \ - --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ - --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ - --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) - -cat docs.metadata - -# upload docs -python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}" +python3 -m pip install gcp-docuploader +# install a json parser +sudo apt-get update +sudo apt-get -y install software-properties-common +sudo add-apt-repository universe +sudo apt-get update +sudo apt-get -y install jq -# docfx yaml files -nox -s docfx - -# create metadata. +# create metadata python3 -m docuploader create-metadata \ --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ --version=$(python3 setup.py --version) \ @@ -61,4 +52,4 @@ python3 -m docuploader create-metadata \ cat docs.metadata # upload docs -python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}" +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index ba97b53d5..fee06244c 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,12 +28,6 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi -# Exit early if samples directory doesn't exist -if [ ! -d "./samples" ]; then - echo "No tests run. `./samples` not found" - exit 0 -fi - # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -107,4 +101,4 @@ cd "$ROOT" # Workaround for Kokoro permissions issue: delete secrets rm testing/{test-env.sh,client-secrets.json,service-account.json} -exit "$RTN" +exit "$RTN" \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 68855abc3..e9e29d120 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 228529efe..6316a537f 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 7a03936bb..850861fb7 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'] diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst new file mode 100644 index 000000000..1cb29d4ca --- /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/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index 801a479bb..e77426f1f 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -40,22 +40,20 @@ from google.protobuf import field_mask_pb2 - _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - 'google-cloud-logging', + "google-cloud-logging", ).version class ConfigServiceV2Client(object): """Service for configuring sinks used to route log entries.""" - SERVICE_ADDRESS = 'logging.googleapis.com:443' + SERVICE_ADDRESS = "logging.googleapis.com:443" """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = 'google.logging.v2.ConfigServiceV2' - + _INTERFACE_NAME = "google.logging.v2.ConfigServiceV2" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -71,19 +69,17 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: ConfigServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file( - filename) - kwargs['credentials'] = credentials + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file - @classmethod def billing_account_path(cls, billing_account): """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( - 'billingAccounts/{billing_account}', + "billingAccounts/{billing_account}", billing_account=billing_account, ) @@ -91,7 +87,7 @@ def billing_account_path(cls, billing_account): def billing_account_location_path(cls, billing_account, location): """Return a fully-qualified billing_account_location string.""" return google.api_core.path_template.expand( - 'billingAccounts/{billing_account}/locations/{location}', + "billingAccounts/{billing_account}/locations/{location}", billing_account=billing_account, location=location, ) @@ -100,7 +96,7 @@ def billing_account_location_path(cls, billing_account, location): def cmek_settings_path(cls, project): """Return a fully-qualified cmek_settings string.""" return google.api_core.path_template.expand( - 'projects/{project}/cmekSettings', + "projects/{project}/cmekSettings", project=project, ) @@ -108,7 +104,7 @@ def cmek_settings_path(cls, project): def folder_path(cls, folder): """Return a fully-qualified folder string.""" return google.api_core.path_template.expand( - 'folders/{folder}', + "folders/{folder}", folder=folder, ) @@ -116,7 +112,7 @@ def folder_path(cls, folder): def folder_location_path(cls, folder, location): """Return a fully-qualified folder_location string.""" return google.api_core.path_template.expand( - 'folders/{folder}/locations/{location}', + "folders/{folder}/locations/{location}", folder=folder, location=location, ) @@ -125,7 +121,7 @@ def folder_location_path(cls, folder, location): def location_path(cls, project, location): """Return a fully-qualified location string.""" return google.api_core.path_template.expand( - 'projects/{project}/locations/{location}', + "projects/{project}/locations/{location}", project=project, location=location, ) @@ -134,7 +130,7 @@ def location_path(cls, project, location): def log_bucket_path(cls, project, location, bucket): """Return a fully-qualified log_bucket string.""" return google.api_core.path_template.expand( - 'projects/{project}/locations/{location}/buckets/{bucket}', + "projects/{project}/locations/{location}/buckets/{bucket}", project=project, location=location, bucket=bucket, @@ -144,7 +140,7 @@ def log_bucket_path(cls, project, location, bucket): def log_exclusion_path(cls, project, exclusion): """Return a fully-qualified log_exclusion string.""" return google.api_core.path_template.expand( - 'projects/{project}/exclusions/{exclusion}', + "projects/{project}/exclusions/{exclusion}", project=project, exclusion=exclusion, ) @@ -153,7 +149,7 @@ def log_exclusion_path(cls, project, exclusion): def log_sink_path(cls, project, sink): """Return a fully-qualified log_sink string.""" return google.api_core.path_template.expand( - 'projects/{project}/sinks/{sink}', + "projects/{project}/sinks/{sink}", project=project, sink=sink, ) @@ -162,7 +158,7 @@ def log_sink_path(cls, project, sink): def organization_path(cls, organization): """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - 'organizations/{organization}', + "organizations/{organization}", organization=organization, ) @@ -170,7 +166,7 @@ def organization_path(cls, organization): def organization_location_path(cls, organization, location): """Return a fully-qualified organization_location string.""" return google.api_core.path_template.expand( - 'organizations/{organization}/locations/{location}', + "organizations/{organization}/locations/{location}", organization=organization, location=location, ) @@ -179,12 +175,19 @@ def organization_location_path(cls, organization, location): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - 'projects/{project}', + "projects/{project}", project=project, ) - def __init__(self, transport=None, channel=None, credentials=None, - client_config=None, client_info=None, client_options=None): + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): """Constructor. Args: @@ -220,20 +223,27 @@ def __init__(self, transport=None, channel=None, credentials=None, """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn('The `client_config` argument is deprecated.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) else: client_config = config_service_v2_client_config.config if channel: - warnings.warn('The `channel` argument is deprecated; use ' - '`transport` instead.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict(client_options) + client_options = google.api_core.client_options.from_dict( + client_options + ) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -250,15 +260,17 @@ def __init__(self, transport=None, channel=None, credentials=None, else: if credentials: raise ValueError( - 'Received both a transport instance and ' - 'credentials; these are mutually exclusive.' + "Received both a transport instance and " + "credentials; these are mutually exclusive." ) self.transport = transport else: - self.transport = config_service_v2_grpc_transport.ConfigServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, + self.transport = ( + config_service_v2_grpc_transport.ConfigServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, + ) ) if client_info is None: @@ -274,7 +286,7 @@ def __init__(self, transport=None, channel=None, credentials=None, # (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. @@ -285,11 +297,12 @@ def __init__(self, transport=None, channel=None, credentials=None, # Service calls def delete_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. @@ -333,11 +346,13 @@ def delete_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'delete_sink' not in self._inner_api_calls: - self._inner_api_calls['delete_sink'] = google.api_core.gapic_v1.method.wrap_method( + if "delete_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_sink" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_sink, - default_retry=self._method_configs['DeleteSink'].retry, - default_timeout=self._method_configs['DeleteSink'].timeout, + default_retry=self._method_configs["DeleteSink"].retry, + default_timeout=self._method_configs["DeleteSink"].timeout, client_info=self._client_info, ) @@ -348,24 +363,29 @@ def delete_sink( metadata = [] metadata = list(metadata) try: - routing_header = [('sink_name', sink_name)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - self._inner_api_calls['delete_sink'](request, retry=retry, timeout=timeout, metadata=metadata) + self._inner_api_calls["delete_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def update_sink( - self, - sink_name, - sink, - unique_writer_identity=None, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + sink_name, + sink, + unique_writer_identity=None, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: ``destination``, and @@ -451,11 +471,13 @@ def update_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'update_sink' not in self._inner_api_calls: - self._inner_api_calls['update_sink'] = google.api_core.gapic_v1.method.wrap_method( + if "update_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "update_sink" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_sink, - default_retry=self._method_configs['UpdateSink'].retry, - default_timeout=self._method_configs['UpdateSink'].timeout, + default_retry=self._method_configs["UpdateSink"].retry, + default_timeout=self._method_configs["UpdateSink"].timeout, client_info=self._client_info, ) @@ -469,21 +491,26 @@ def update_sink( metadata = [] metadata = list(metadata) try: - routing_header = [('sink_name', sink_name)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['update_sink'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["update_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Deletes an exclusion. @@ -525,11 +552,13 @@ def delete_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'delete_exclusion' not in self._inner_api_calls: - self._inner_api_calls['delete_exclusion'] = google.api_core.gapic_v1.method.wrap_method( + if "delete_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_exclusion, - default_retry=self._method_configs['DeleteExclusion'].retry, - default_timeout=self._method_configs['DeleteExclusion'].timeout, + default_retry=self._method_configs["DeleteExclusion"].retry, + default_timeout=self._method_configs["DeleteExclusion"].timeout, client_info=self._client_info, ) @@ -540,22 +569,27 @@ def delete_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - self._inner_api_calls['delete_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) + self._inner_api_calls["delete_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_buckets( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists buckets (Beta). @@ -621,11 +655,13 @@ def list_buckets( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_buckets' not in self._inner_api_calls: - self._inner_api_calls['list_buckets'] = google.api_core.gapic_v1.method.wrap_method( + if "list_buckets" not in self._inner_api_calls: + self._inner_api_calls[ + "list_buckets" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_buckets, - default_retry=self._method_configs['ListBuckets'].retry, - default_timeout=self._method_configs['ListBuckets'].timeout, + default_retry=self._method_configs["ListBuckets"].retry, + default_timeout=self._method_configs["ListBuckets"].timeout, client_info=self._client_info, ) @@ -637,29 +673,37 @@ def list_buckets( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_buckets'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_buckets"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='buckets', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="buckets", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def get_bucket( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Gets a bucket (Beta). @@ -705,11 +749,13 @@ def get_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'get_bucket' not in self._inner_api_calls: - self._inner_api_calls['get_bucket'] = google.api_core.gapic_v1.method.wrap_method( + if "get_bucket" not in self._inner_api_calls: + self._inner_api_calls[ + "get_bucket" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_bucket, - default_retry=self._method_configs['GetBucket'].retry, - default_timeout=self._method_configs['GetBucket'].timeout, + default_retry=self._method_configs["GetBucket"].retry, + default_timeout=self._method_configs["GetBucket"].timeout, client_info=self._client_info, ) @@ -720,23 +766,28 @@ def get_bucket( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['get_bucket'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["get_bucket"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def update_bucket( - self, - name, - bucket, - update_mask, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + bucket, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Updates a bucket. This method replaces the following fields in the existing bucket with values from the new bucket: ``retention_period`` @@ -816,11 +867,13 @@ def update_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'update_bucket' not in self._inner_api_calls: - self._inner_api_calls['update_bucket'] = google.api_core.gapic_v1.method.wrap_method( + if "update_bucket" not in self._inner_api_calls: + self._inner_api_calls[ + "update_bucket" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_bucket, - default_retry=self._method_configs['UpdateBucket'].retry, - default_timeout=self._method_configs['UpdateBucket'].timeout, + default_retry=self._method_configs["UpdateBucket"].retry, + default_timeout=self._method_configs["UpdateBucket"].timeout, client_info=self._client_info, ) @@ -833,22 +886,27 @@ def update_bucket( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['update_bucket'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["update_bucket"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_sinks( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists sinks. @@ -910,11 +968,13 @@ def list_sinks( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_sinks' not in self._inner_api_calls: - self._inner_api_calls['list_sinks'] = google.api_core.gapic_v1.method.wrap_method( + if "list_sinks" not in self._inner_api_calls: + self._inner_api_calls[ + "list_sinks" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_sinks, - default_retry=self._method_configs['ListSinks'].retry, - default_timeout=self._method_configs['ListSinks'].timeout, + default_retry=self._method_configs["ListSinks"].retry, + default_timeout=self._method_configs["ListSinks"].timeout, client_info=self._client_info, ) @@ -926,29 +986,37 @@ def list_sinks( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_sinks'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_sinks"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='sinks', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="sinks", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def get_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Gets a sink. @@ -993,11 +1061,13 @@ def get_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'get_sink' not in self._inner_api_calls: - self._inner_api_calls['get_sink'] = google.api_core.gapic_v1.method.wrap_method( + if "get_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "get_sink" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_sink, - default_retry=self._method_configs['GetSink'].retry, - default_timeout=self._method_configs['GetSink'].timeout, + default_retry=self._method_configs["GetSink"].retry, + default_timeout=self._method_configs["GetSink"].timeout, client_info=self._client_info, ) @@ -1008,23 +1078,28 @@ def get_sink( metadata = [] metadata = list(metadata) try: - routing_header = [('sink_name', sink_name)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['get_sink'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["get_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def create_sink( - self, - parent, - sink, - unique_writer_identity=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + sink, + unique_writer_identity=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the @@ -1091,11 +1166,13 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'create_sink' not in self._inner_api_calls: - self._inner_api_calls['create_sink'] = google.api_core.gapic_v1.method.wrap_method( + if "create_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "create_sink" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_sink, - default_retry=self._method_configs['CreateSink'].retry, - default_timeout=self._method_configs['CreateSink'].timeout, + default_retry=self._method_configs["CreateSink"].retry, + default_timeout=self._method_configs["CreateSink"].timeout, client_info=self._client_info, ) @@ -1108,22 +1185,27 @@ def create_sink( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['create_sink'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["create_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_exclusions( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists all the exclusions in a parent resource. @@ -1185,11 +1267,13 @@ def list_exclusions( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_exclusions' not in self._inner_api_calls: - self._inner_api_calls['list_exclusions'] = google.api_core.gapic_v1.method.wrap_method( + if "list_exclusions" not in self._inner_api_calls: + self._inner_api_calls[ + "list_exclusions" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_exclusions, - default_retry=self._method_configs['ListExclusions'].retry, - default_timeout=self._method_configs['ListExclusions'].timeout, + default_retry=self._method_configs["ListExclusions"].retry, + default_timeout=self._method_configs["ListExclusions"].timeout, client_info=self._client_info, ) @@ -1201,29 +1285,37 @@ def list_exclusions( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_exclusions'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_exclusions"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='exclusions', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="exclusions", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def get_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Gets the description of an exclusion. @@ -1268,11 +1360,13 @@ def get_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'get_exclusion' not in self._inner_api_calls: - self._inner_api_calls['get_exclusion'] = google.api_core.gapic_v1.method.wrap_method( + if "get_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "get_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_exclusion, - default_retry=self._method_configs['GetExclusion'].retry, - default_timeout=self._method_configs['GetExclusion'].timeout, + default_retry=self._method_configs["GetExclusion"].retry, + default_timeout=self._method_configs["GetExclusion"].timeout, client_info=self._client_info, ) @@ -1283,22 +1377,27 @@ def get_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['get_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["get_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def create_exclusion( - self, - parent, - exclusion, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + exclusion, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. @@ -1353,11 +1452,13 @@ def create_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'create_exclusion' not in self._inner_api_calls: - self._inner_api_calls['create_exclusion'] = google.api_core.gapic_v1.method.wrap_method( + if "create_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "create_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_exclusion, - default_retry=self._method_configs['CreateExclusion'].retry, - default_timeout=self._method_configs['CreateExclusion'].timeout, + default_retry=self._method_configs["CreateExclusion"].retry, + default_timeout=self._method_configs["CreateExclusion"].timeout, client_info=self._client_info, ) @@ -1369,23 +1470,28 @@ def create_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['create_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["create_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def update_exclusion( - self, - name, - exclusion, - update_mask, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + exclusion, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Changes one or more properties of an existing exclusion. @@ -1452,11 +1558,13 @@ def update_exclusion( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'update_exclusion' not in self._inner_api_calls: - self._inner_api_calls['update_exclusion'] = google.api_core.gapic_v1.method.wrap_method( + if "update_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "update_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_exclusion, - default_retry=self._method_configs['UpdateExclusion'].retry, - default_timeout=self._method_configs['UpdateExclusion'].timeout, + default_retry=self._method_configs["UpdateExclusion"].retry, + default_timeout=self._method_configs["UpdateExclusion"].timeout, client_info=self._client_info, ) @@ -1469,21 +1577,26 @@ def update_exclusion( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['update_exclusion'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["update_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def get_cmek_settings( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Gets the Logs Router CMEK settings for the given resource. @@ -1540,11 +1653,13 @@ def get_cmek_settings( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'get_cmek_settings' not in self._inner_api_calls: - self._inner_api_calls['get_cmek_settings'] = google.api_core.gapic_v1.method.wrap_method( + if "get_cmek_settings" not in self._inner_api_calls: + self._inner_api_calls[ + "get_cmek_settings" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_cmek_settings, - default_retry=self._method_configs['GetCmekSettings'].retry, - default_timeout=self._method_configs['GetCmekSettings'].timeout, + default_retry=self._method_configs["GetCmekSettings"].retry, + default_timeout=self._method_configs["GetCmekSettings"].timeout, client_info=self._client_info, ) @@ -1555,23 +1670,28 @@ def get_cmek_settings( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['get_cmek_settings'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["get_cmek_settings"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def update_cmek_settings( - self, - name, - cmek_settings, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + name, + cmek_settings, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Updates the Logs Router CMEK settings for the given resource. @@ -1654,11 +1774,13 @@ def update_cmek_settings( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'update_cmek_settings' not in self._inner_api_calls: - self._inner_api_calls['update_cmek_settings'] = google.api_core.gapic_v1.method.wrap_method( + if "update_cmek_settings" not in self._inner_api_calls: + self._inner_api_calls[ + "update_cmek_settings" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_cmek_settings, - default_retry=self._method_configs['UpdateCmekSettings'].retry, - default_timeout=self._method_configs['UpdateCmekSettings'].timeout, + default_retry=self._method_configs["UpdateCmekSettings"].retry, + default_timeout=self._method_configs["UpdateCmekSettings"].timeout, client_info=self._client_info, ) @@ -1671,11 +1793,15 @@ def update_cmek_settings( metadata = [] metadata = list(metadata) try: - routing_header = [('name', name)] + routing_header = [("name", name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['update_cmek_settings'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["update_cmek_settings"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 87891764f..2edc1e079 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -1,121 +1,121 @@ config = { - "interfaces": { - "google.logging.v2.ConfigServiceV2": { - "retry_codes": { - "no_retry_2_codes": [], - "no_retry_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "retry_params": { - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 + "interfaces": { + "google.logging.v2.ConfigServiceV2": { + "retry_codes": { + "no_retry_2_codes": [], + "no_retry_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + }, + "retry_params": { + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000, + }, + }, + "methods": { + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "UpdateSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "ListSinks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "GetSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "CreateSink": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", + }, + "ListExclusions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "GetExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "CreateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", + }, + "UpdateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", + }, + "GetCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "UpdateCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + }, } - }, - "methods": { - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSinks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateSink": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ListExclusions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } } - } } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index 8d684043b..159669d6e 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -55,6 +55,7 @@ class LaunchStage(enum.IntEnum): Platform Subject to the Deprecation Policy `__ documentation. """ + LAUNCH_STAGE_UNSPECIFIED = 0 UNIMPLEMENTED = 6 PRELAUNCH = 7 @@ -75,6 +76,7 @@ class LifecycleState(enum.IntEnum): ACTIVE (int): The normal and active state. DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. """ + LIFECYCLE_STATE_UNSPECIFIED = 0 ACTIVE = 1 DELETE_REQUESTED = 2 @@ -113,6 +115,7 @@ class LogSeverity(enum.IntEnum): ALERT (int): (700) A person must take an action immediately. EMERGENCY (int): (800) One or more systems are unusable. """ + DEFAULT = 0 DEBUG = 100 INFO = 200 @@ -134,6 +137,7 @@ class NullValue(enum.IntEnum): Attributes: NULL_VALUE (int): Null value. """ + NULL_VALUE = 0 @@ -147,6 +151,7 @@ class ValueType(enum.IntEnum): BOOL (int): Boolean; true or false. INT64 (int): A 64-bit signed integer. """ + STRING = 0 BOOL = 1 INT64 = 2 @@ -161,6 +166,7 @@ class ApiVersion(enum.IntEnum): V2 (int): Logging API v2. V1 (int): Logging API v1. """ + V2 = 0 V1 = 1 @@ -175,6 +181,7 @@ class VersionFormat(enum.IntEnum): V2 (int): ``LogEntry`` version 2 format. V1 (int): ``LogEntry`` version 1 format. """ + VERSION_FORMAT_UNSPECIFIED = 0 V2 = 1 V1 = 2 @@ -195,12 +202,12 @@ class MetricKind(enum.IntEnum): value to zero and sets a new start time for the following points. """ + METRIC_KIND_UNSPECIFIED = 0 GAUGE = 1 DELTA = 2 CUMULATIVE = 3 - class ValueType(enum.IntEnum): """ The value type of a metric. @@ -216,6 +223,7 @@ class ValueType(enum.IntEnum): DISTRIBUTION (int): The value is a ``Distribution``. MONEY (int): The value is money. """ + VALUE_TYPE_UNSPECIFIED = 0 BOOL = 1 INT64 = 2 @@ -223,4 +231,3 @@ class ValueType(enum.IntEnum): STRING = 4 DISTRIBUTION = 5 MONEY = 6 - \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 25af1aaa5..1882b2b8b 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -44,22 +44,20 @@ from google.protobuf import field_mask_pb2 - _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - 'google-cloud-logging', + "google-cloud-logging", ).version class LoggingServiceV2Client(object): """Service for ingesting and querying logs.""" - SERVICE_ADDRESS = 'logging.googleapis.com:443' + SERVICE_ADDRESS = "logging.googleapis.com:443" """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = 'google.logging.v2.LoggingServiceV2' - + _INTERFACE_NAME = "google.logging.v2.LoggingServiceV2" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -75,19 +73,17 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: LoggingServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file( - filename) - kwargs['credentials'] = credentials + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file - @classmethod def billing_account_path(cls, billing_account): """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( - 'billingAccounts/{billing_account}', + "billingAccounts/{billing_account}", billing_account=billing_account, ) @@ -95,7 +91,7 @@ def billing_account_path(cls, billing_account): def folder_path(cls, folder): """Return a fully-qualified folder string.""" return google.api_core.path_template.expand( - 'folders/{folder}', + "folders/{folder}", folder=folder, ) @@ -103,7 +99,7 @@ def folder_path(cls, folder): def log_path(cls, project, log): """Return a fully-qualified log string.""" return google.api_core.path_template.expand( - 'projects/{project}/logs/{log}', + "projects/{project}/logs/{log}", project=project, log=log, ) @@ -112,7 +108,7 @@ def log_path(cls, project, log): def organization_path(cls, organization): """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - 'organizations/{organization}', + "organizations/{organization}", organization=organization, ) @@ -120,12 +116,19 @@ def organization_path(cls, organization): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - 'projects/{project}', + "projects/{project}", project=project, ) - def __init__(self, transport=None, channel=None, credentials=None, - client_config=None, client_info=None, client_options=None): + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): """Constructor. Args: @@ -161,20 +164,27 @@ def __init__(self, transport=None, channel=None, credentials=None, """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn('The `client_config` argument is deprecated.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) else: client_config = logging_service_v2_client_config.config if channel: - warnings.warn('The `channel` argument is deprecated; use ' - '`transport` instead.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict(client_options) + client_options = google.api_core.client_options.from_dict( + client_options + ) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -191,15 +201,17 @@ def __init__(self, transport=None, channel=None, credentials=None, else: if credentials: raise ValueError( - 'Received both a transport instance and ' - 'credentials; these are mutually exclusive.' + "Received both a transport instance and " + "credentials; these are mutually exclusive." ) self.transport = transport else: - self.transport = logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, + self.transport = ( + logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, + ) ) if client_info is None: @@ -215,7 +227,7 @@ def __init__(self, transport=None, channel=None, credentials=None, # (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. @@ -226,11 +238,12 @@ def __init__(self, transport=None, channel=None, credentials=None, # Service calls def delete_log( - self, - log_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + log_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not @@ -278,11 +291,13 @@ def delete_log( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'delete_log' not in self._inner_api_calls: - self._inner_api_calls['delete_log'] = google.api_core.gapic_v1.method.wrap_method( + if "delete_log" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_log" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_log, - default_retry=self._method_configs['DeleteLog'].retry, - default_timeout=self._method_configs['DeleteLog'].timeout, + default_retry=self._method_configs["DeleteLog"].retry, + default_timeout=self._method_configs["DeleteLog"].timeout, client_info=self._client_info, ) @@ -293,24 +308,29 @@ def delete_log( metadata = [] metadata = list(metadata) try: - routing_header = [('log_name', log_name)] + routing_header = [("log_name", log_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - self._inner_api_calls['delete_log'](request, retry=retry, timeout=timeout, metadata=metadata) + self._inner_api_calls["delete_log"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_log_entries( - self, - resource_names, - filter_=None, - order_by=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + resource_names, + filter_=None, + order_by=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways @@ -394,11 +414,13 @@ def list_log_entries( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_log_entries' not in self._inner_api_calls: - self._inner_api_calls['list_log_entries'] = google.api_core.gapic_v1.method.wrap_method( + if "list_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "list_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_log_entries, - default_retry=self._method_configs['ListLogEntries'].retry, - default_timeout=self._method_configs['ListLogEntries'].timeout, + default_retry=self._method_configs["ListLogEntries"].retry, + default_timeout=self._method_configs["ListLogEntries"].timeout, client_info=self._client_info, ) @@ -410,25 +432,31 @@ def list_log_entries( ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_log_entries'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_log_entries"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='entries', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="entries", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def write_log_entries( - self, - entries, - log_name=None, - resource=None, - labels=None, - partial_success=None, - dry_run=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + entries, + log_name=None, + resource=None, + labels=None, + partial_success=None, + dry_run=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method @@ -542,11 +570,13 @@ def write_log_entries( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'write_log_entries' not in self._inner_api_calls: - self._inner_api_calls['write_log_entries'] = google.api_core.gapic_v1.method.wrap_method( + if "write_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "write_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.write_log_entries, - default_retry=self._method_configs['WriteLogEntries'].retry, - default_timeout=self._method_configs['WriteLogEntries'].timeout, + default_retry=self._method_configs["WriteLogEntries"].retry, + default_timeout=self._method_configs["WriteLogEntries"].timeout, client_info=self._client_info, ) @@ -558,14 +588,17 @@ def write_log_entries( partial_success=partial_success, dry_run=dry_run, ) - return self._inner_api_calls['write_log_entries'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["write_log_entries"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_monitored_resource_descriptors( - self, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists the descriptors for monitored resource types used by Logging. @@ -617,11 +650,17 @@ def list_monitored_resource_descriptors( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_monitored_resource_descriptors' not in self._inner_api_calls: - self._inner_api_calls['list_monitored_resource_descriptors'] = google.api_core.gapic_v1.method.wrap_method( + if "list_monitored_resource_descriptors" not in self._inner_api_calls: + self._inner_api_calls[ + "list_monitored_resource_descriptors" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_monitored_resource_descriptors, - default_retry=self._method_configs['ListMonitoredResourceDescriptors'].retry, - default_timeout=self._method_configs['ListMonitoredResourceDescriptors'].timeout, + default_retry=self._method_configs[ + "ListMonitoredResourceDescriptors" + ].retry, + default_timeout=self._method_configs[ + "ListMonitoredResourceDescriptors" + ].timeout, client_info=self._client_info, ) @@ -630,21 +669,27 @@ def list_monitored_resource_descriptors( ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_monitored_resource_descriptors'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_monitored_resource_descriptors"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='resource_descriptors', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="resource_descriptors", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def list_logs( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. @@ -707,11 +752,13 @@ def list_logs( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_logs' not in self._inner_api_calls: - self._inner_api_calls['list_logs'] = google.api_core.gapic_v1.method.wrap_method( + if "list_logs" not in self._inner_api_calls: + self._inner_api_calls[ + "list_logs" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_logs, - default_retry=self._method_configs['ListLogs'].retry, - default_timeout=self._method_configs['ListLogs'].timeout, + default_retry=self._method_configs["ListLogs"].retry, + default_timeout=self._method_configs["ListLogs"].timeout, client_info=self._client_info, ) @@ -723,19 +770,26 @@ def list_logs( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_logs'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_logs"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='log_names', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="log_names", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 7172e8669..6c4e8c8e4 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -1,80 +1,80 @@ config = { - "interfaces": { - "google.logging.v2.LoggingServiceV2": { - "retry_codes": { - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "retry_params": { - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 + "interfaces": { + "google.logging.v2.LoggingServiceV2": { + "retry_codes": { + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + }, + "retry_params": { + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + }, + "methods": { + "DeleteLog": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "WriteLogEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + "bundling": { + "element_count_threshold": 1000, + "request_byte_threshold": 1048576, + "delay_threshold_millis": 50, + }, + }, + "ListMonitoredResourceDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "ListLogs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + }, } - }, - "methods": { - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "WriteLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - "bundling": { - "element_count_threshold": 1000, - "request_byte_threshold": 1048576, - "delay_threshold_millis": 50 - } - }, - "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } } - } } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index 67df39e59..c3d1f2f4c 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -46,22 +46,20 @@ from google.protobuf import field_mask_pb2 - _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - 'google-cloud-logging', + "google-cloud-logging", ).version class MetricsServiceV2Client(object): """Service for configuring logs-based metrics.""" - SERVICE_ADDRESS = 'logging.googleapis.com:443' + SERVICE_ADDRESS = "logging.googleapis.com:443" """The default address of the service.""" # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = 'google.logging.v2.MetricsServiceV2' - + _INTERFACE_NAME = "google.logging.v2.MetricsServiceV2" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -77,19 +75,17 @@ def from_service_account_file(cls, filename, *args, **kwargs): Returns: MetricsServiceV2Client: The constructed client. """ - credentials = service_account.Credentials.from_service_account_file( - filename) - kwargs['credentials'] = credentials + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file - @classmethod def log_metric_path(cls, project, metric): """Return a fully-qualified log_metric string.""" return google.api_core.path_template.expand( - 'projects/{project}/metrics/{metric}', + "projects/{project}/metrics/{metric}", project=project, metric=metric, ) @@ -98,12 +94,19 @@ def log_metric_path(cls, project, metric): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - 'projects/{project}', + "projects/{project}", project=project, ) - def __init__(self, transport=None, channel=None, credentials=None, - client_config=None, client_info=None, client_options=None): + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): """Constructor. Args: @@ -139,20 +142,27 @@ def __init__(self, transport=None, channel=None, credentials=None, """ # Raise deprecation warnings for things we want to go away. if client_config is not None: - warnings.warn('The `client_config` argument is deprecated.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) else: client_config = metrics_service_v2_client_config.config if channel: - warnings.warn('The `channel` argument is deprecated; use ' - '`transport` instead.', - PendingDeprecationWarning, stacklevel=2) + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) api_endpoint = self.SERVICE_ADDRESS if client_options: if type(client_options) == dict: - client_options = google.api_core.client_options.from_dict(client_options) + client_options = google.api_core.client_options.from_dict( + client_options + ) if client_options.api_endpoint: api_endpoint = client_options.api_endpoint @@ -169,15 +179,17 @@ def __init__(self, transport=None, channel=None, credentials=None, else: if credentials: raise ValueError( - 'Received both a transport instance and ' - 'credentials; these are mutually exclusive.' + "Received both a transport instance and " + "credentials; these are mutually exclusive." ) self.transport = transport else: - self.transport = metrics_service_v2_grpc_transport.MetricsServiceV2GrpcTransport( - address=api_endpoint, - channel=channel, - credentials=credentials, + self.transport = ( + metrics_service_v2_grpc_transport.MetricsServiceV2GrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, + ) ) if client_info is None: @@ -193,7 +205,7 @@ def __init__(self, transport=None, channel=None, credentials=None, # (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. @@ -204,12 +216,13 @@ def __init__(self, transport=None, channel=None, credentials=None, # Service calls def update_log_metric( - self, - metric_name, - metric, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + metric_name, + metric, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Creates or updates a logs-based metric. @@ -259,11 +272,13 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'update_log_metric' not in self._inner_api_calls: - self._inner_api_calls['update_log_metric'] = google.api_core.gapic_v1.method.wrap_method( + if "update_log_metric" not in self._inner_api_calls: + self._inner_api_calls[ + "update_log_metric" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.update_log_metric, - default_retry=self._method_configs['UpdateLogMetric'].retry, - default_timeout=self._method_configs['UpdateLogMetric'].timeout, + default_retry=self._method_configs["UpdateLogMetric"].retry, + default_timeout=self._method_configs["UpdateLogMetric"].timeout, client_info=self._client_info, ) @@ -275,21 +290,26 @@ def update_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [('metric_name', metric_name)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['update_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["update_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def delete_log_metric( - self, - metric_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + metric_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Deletes a logs-based metric. @@ -325,11 +345,13 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'delete_log_metric' not in self._inner_api_calls: - self._inner_api_calls['delete_log_metric'] = google.api_core.gapic_v1.method.wrap_method( + if "delete_log_metric" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_log_metric" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.delete_log_metric, - default_retry=self._method_configs['DeleteLogMetric'].retry, - default_timeout=self._method_configs['DeleteLogMetric'].timeout, + default_retry=self._method_configs["DeleteLogMetric"].retry, + default_timeout=self._method_configs["DeleteLogMetric"].timeout, client_info=self._client_info, ) @@ -340,22 +362,27 @@ def delete_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [('metric_name', metric_name)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - self._inner_api_calls['delete_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) + self._inner_api_calls["delete_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def list_log_metrics( - self, - parent, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Lists logs-based metrics. @@ -414,11 +441,13 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'list_log_metrics' not in self._inner_api_calls: - self._inner_api_calls['list_log_metrics'] = google.api_core.gapic_v1.method.wrap_method( + if "list_log_metrics" not in self._inner_api_calls: + self._inner_api_calls[ + "list_log_metrics" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.list_log_metrics, - default_retry=self._method_configs['ListLogMetrics'].retry, - default_timeout=self._method_configs['ListLogMetrics'].timeout, + default_retry=self._method_configs["ListLogMetrics"].retry, + default_timeout=self._method_configs["ListLogMetrics"].timeout, client_info=self._client_info, ) @@ -430,29 +459,37 @@ def list_log_metrics( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) iterator = google.api_core.page_iterator.GRPCIterator( client=None, - method=functools.partial(self._inner_api_calls['list_log_metrics'], retry=retry, timeout=timeout, metadata=metadata), + method=functools.partial( + self._inner_api_calls["list_log_metrics"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), request=request, - items_field='metrics', - request_token_field='page_token', - response_token_field='next_page_token', + items_field="metrics", + request_token_field="page_token", + response_token_field="next_page_token", ) return iterator def get_log_metric( - self, - metric_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + metric_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Gets a logs-based metric. @@ -491,11 +528,13 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'get_log_metric' not in self._inner_api_calls: - self._inner_api_calls['get_log_metric'] = google.api_core.gapic_v1.method.wrap_method( + if "get_log_metric" not in self._inner_api_calls: + self._inner_api_calls[ + "get_log_metric" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.get_log_metric, - default_retry=self._method_configs['GetLogMetric'].retry, - default_timeout=self._method_configs['GetLogMetric'].timeout, + default_retry=self._method_configs["GetLogMetric"].retry, + default_timeout=self._method_configs["GetLogMetric"].timeout, client_info=self._client_info, ) @@ -506,22 +545,27 @@ def get_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [('metric_name', metric_name)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['get_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["get_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) def create_log_metric( - self, - parent, - metric, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None): + self, + parent, + metric, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): """ Creates a logs-based metric. @@ -571,11 +615,13 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if 'create_log_metric' not in self._inner_api_calls: - self._inner_api_calls['create_log_metric'] = google.api_core.gapic_v1.method.wrap_method( + if "create_log_metric" not in self._inner_api_calls: + self._inner_api_calls[ + "create_log_metric" + ] = google.api_core.gapic_v1.method.wrap_method( self.transport.create_log_metric, - default_retry=self._method_configs['CreateLogMetric'].retry, - default_timeout=self._method_configs['CreateLogMetric'].timeout, + default_retry=self._method_configs["CreateLogMetric"].retry, + default_timeout=self._method_configs["CreateLogMetric"].timeout, client_info=self._client_info, ) @@ -587,11 +633,15 @@ def create_log_metric( metadata = [] metadata = list(metadata) try: - routing_header = [('parent', parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(routing_header) + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) metadata.append(routing_metadata) - return self._inner_api_calls['create_log_metric'](request, retry=retry, timeout=timeout, metadata=metadata) + return self._inner_api_calls["create_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index e64984d56..d4bc0e960 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -1,71 +1,71 @@ config = { - "interfaces": { - "google.logging.v2.MetricsServiceV2": { - "retry_codes": { - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 + "interfaces": { + "google.logging.v2.MetricsServiceV2": { + "retry_codes": { + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "no_retry_1_codes": [], + }, + "retry_params": { + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + }, + "methods": { + "UpdateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", + }, + "DeleteLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", + }, + "ListLogMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", + }, + "GetLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", + }, + "CreateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", + }, + }, } - }, - "methods": { - "UpdateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "DeleteLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListLogMetrics": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "CreateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } } - } } diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 29f9a5ce3..3cb7e0870 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -28,18 +28,20 @@ class ConfigServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ + # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read", + "https://www.googleapis.com/auth/logging.write", ) - def __init__(self, channel=None, credentials=None, - address='logging.googleapis.com:443'): + def __init__( + self, channel=None, credentials=None, address="logging.googleapis.com:443" + ): """Instantiate the transport class. Args: @@ -57,8 +59,7 @@ def __init__(self, channel=None, credentials=None, # 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. @@ -67,8 +68,8 @@ def __init__(self, channel=None, credentials=None, address=address, credentials=credentials, options={ - 'grpc.max_send_message_length': -1, - 'grpc.max_receive_message_length': -1, + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, }.items(), ) @@ -77,16 +78,15 @@ def __init__(self, channel=None, credentials=None, # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - 'config_service_v2_stub': logging_config_pb2_grpc.ConfigServiceV2Stub(channel), + "config_service_v2_stub": logging_config_pb2_grpc.ConfigServiceV2Stub( + channel + ), } - @classmethod def create_channel( - cls, - address='logging.googleapis.com:443', - credentials=None, - **kwargs): + cls, address="logging.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -103,10 +103,7 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, - credentials=credentials, - scopes=cls._OAUTH_SCOPES, - **kwargs + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -130,7 +127,7 @@ def delete_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].DeleteSink + return self._stubs["config_service_v2_stub"].DeleteSink @property def update_sink(self): @@ -148,7 +145,7 @@ def update_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].UpdateSink + return self._stubs["config_service_v2_stub"].UpdateSink @property def delete_exclusion(self): @@ -161,7 +158,7 @@ def delete_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].DeleteExclusion + return self._stubs["config_service_v2_stub"].DeleteExclusion @property def list_buckets(self): @@ -174,7 +171,7 @@ def list_buckets(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].ListBuckets + return self._stubs["config_service_v2_stub"].ListBuckets @property def get_bucket(self): @@ -187,7 +184,7 @@ def get_bucket(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].GetBucket + return self._stubs["config_service_v2_stub"].GetBucket @property def update_bucket(self): @@ -210,7 +207,7 @@ def update_bucket(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].UpdateBucket + return self._stubs["config_service_v2_stub"].UpdateBucket @property def list_sinks(self): @@ -223,7 +220,7 @@ def list_sinks(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].ListSinks + return self._stubs["config_service_v2_stub"].ListSinks @property def get_sink(self): @@ -236,7 +233,7 @@ def get_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].GetSink + return self._stubs["config_service_v2_stub"].GetSink @property def create_sink(self): @@ -252,7 +249,7 @@ def create_sink(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].CreateSink + return self._stubs["config_service_v2_stub"].CreateSink @property def list_exclusions(self): @@ -265,7 +262,7 @@ def list_exclusions(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].ListExclusions + return self._stubs["config_service_v2_stub"].ListExclusions @property def get_exclusion(self): @@ -278,7 +275,7 @@ def get_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].GetExclusion + return self._stubs["config_service_v2_stub"].GetExclusion @property def create_exclusion(self): @@ -293,7 +290,7 @@ def create_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].CreateExclusion + return self._stubs["config_service_v2_stub"].CreateExclusion @property def update_exclusion(self): @@ -306,7 +303,7 @@ def update_exclusion(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].UpdateExclusion + return self._stubs["config_service_v2_stub"].UpdateExclusion @property def get_cmek_settings(self): @@ -327,7 +324,7 @@ def get_cmek_settings(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].GetCmekSettings + return self._stubs["config_service_v2_stub"].GetCmekSettings @property def update_cmek_settings(self): @@ -353,4 +350,4 @@ def update_cmek_settings(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['config_service_v2_stub'].UpdateCmekSettings \ No newline at end of file + return self._stubs["config_service_v2_stub"].UpdateCmekSettings diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 8f0d57acb..07ca0603f 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -28,18 +28,20 @@ class LoggingServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ + # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read", + "https://www.googleapis.com/auth/logging.write", ) - def __init__(self, channel=None, credentials=None, - address='logging.googleapis.com:443'): + def __init__( + self, channel=None, credentials=None, address="logging.googleapis.com:443" + ): """Instantiate the transport class. Args: @@ -57,8 +59,7 @@ def __init__(self, channel=None, credentials=None, # 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. @@ -67,8 +68,8 @@ def __init__(self, channel=None, credentials=None, address=address, credentials=credentials, options={ - 'grpc.max_send_message_length': -1, - 'grpc.max_receive_message_length': -1, + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, }.items(), ) @@ -77,16 +78,13 @@ def __init__(self, channel=None, credentials=None, # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - 'logging_service_v2_stub': logging_pb2_grpc.LoggingServiceV2Stub(channel), + "logging_service_v2_stub": logging_pb2_grpc.LoggingServiceV2Stub(channel), } - @classmethod def create_channel( - cls, - address='logging.googleapis.com:443', - credentials=None, - **kwargs): + cls, address="logging.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -103,10 +101,7 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, - credentials=credentials, - scopes=cls._OAUTH_SCOPES, - **kwargs + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -132,7 +127,7 @@ def delete_log(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['logging_service_v2_stub'].DeleteLog + return self._stubs["logging_service_v2_stub"].DeleteLog @property def list_log_entries(self): @@ -148,7 +143,7 @@ def list_log_entries(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['logging_service_v2_stub'].ListLogEntries + return self._stubs["logging_service_v2_stub"].ListLogEntries @property def write_log_entries(self): @@ -167,7 +162,7 @@ def write_log_entries(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['logging_service_v2_stub'].WriteLogEntries + return self._stubs["logging_service_v2_stub"].WriteLogEntries @property def list_monitored_resource_descriptors(self): @@ -180,7 +175,7 @@ def list_monitored_resource_descriptors(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['logging_service_v2_stub'].ListMonitoredResourceDescriptors + return self._stubs["logging_service_v2_stub"].ListMonitoredResourceDescriptors @property def list_logs(self): @@ -194,4 +189,4 @@ def list_logs(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['logging_service_v2_stub'].ListLogs \ No newline at end of file + return self._stubs["logging_service_v2_stub"].ListLogs diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index ebe94f008..f1d75af56 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -28,18 +28,20 @@ class MetricsServiceV2GrpcTransport(object): which can be used to take advantage of advanced features of gRPC. """ + # The scopes needed to make gRPC calls to all of the methods defined # in this service. _OAUTH_SCOPES = ( - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read", + "https://www.googleapis.com/auth/logging.write", ) - def __init__(self, channel=None, credentials=None, - address='logging.googleapis.com:443'): + def __init__( + self, channel=None, credentials=None, address="logging.googleapis.com:443" + ): """Instantiate the transport class. Args: @@ -57,8 +59,7 @@ def __init__(self, channel=None, credentials=None, # 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. @@ -67,8 +68,8 @@ def __init__(self, channel=None, credentials=None, address=address, credentials=credentials, options={ - 'grpc.max_send_message_length': -1, - 'grpc.max_receive_message_length': -1, + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, }.items(), ) @@ -77,16 +78,15 @@ def __init__(self, channel=None, credentials=None, # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - 'metrics_service_v2_stub': logging_metrics_pb2_grpc.MetricsServiceV2Stub(channel), + "metrics_service_v2_stub": logging_metrics_pb2_grpc.MetricsServiceV2Stub( + channel + ), } - @classmethod def create_channel( - cls, - address='logging.googleapis.com:443', - credentials=None, - **kwargs): + cls, address="logging.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -103,10 +103,7 @@ def create_channel( grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, - credentials=credentials, - scopes=cls._OAUTH_SCOPES, - **kwargs + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -129,7 +126,7 @@ def update_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['metrics_service_v2_stub'].UpdateLogMetric + return self._stubs["metrics_service_v2_stub"].UpdateLogMetric @property def delete_log_metric(self): @@ -142,7 +139,7 @@ def delete_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['metrics_service_v2_stub'].DeleteLogMetric + return self._stubs["metrics_service_v2_stub"].DeleteLogMetric @property def list_log_metrics(self): @@ -155,7 +152,7 @@ def list_log_metrics(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['metrics_service_v2_stub'].ListLogMetrics + return self._stubs["metrics_service_v2_stub"].ListLogMetrics @property def get_log_metric(self): @@ -168,7 +165,7 @@ def get_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['metrics_service_v2_stub'].GetLogMetric + return self._stubs["metrics_service_v2_stub"].GetLogMetric @property def create_log_metric(self): @@ -181,4 +178,4 @@ def create_log_metric(self): deserialized request object and returns a deserialized response object. """ - return self._stubs['metrics_service_v2_stub'].CreateLogMetric \ No newline at end of file + return self._stubs["metrics_service_v2_stub"].CreateLogMetric diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index d5c1cc208..d0cbb10fb 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -6,16 +6,23 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 -from google.api import monitored_resource_pb2 as google_dot_api_dot_monitored__resource__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.logging.type import http_request_pb2 as google_dot_logging_dot_type_dot_http__request__pb2 -from google.logging.type import log_severity_pb2 as google_dot_logging_dot_type_dot_log__severity__pb2 +from google.logging.type import ( + http_request_pb2 as google_dot_logging_dot_type_dot_http__request__pb2, +) +from google.logging.type import ( + log_severity_pb2 as google_dot_logging_dot_type_dot_log__severity__pb2, +) from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 @@ -24,333 +31,663 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='google/cloud/logging_v2/proto/log_entry.proto', - package='google.logging.v2', - syntax='proto3', - serialized_options=b'\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto\"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload\"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' - , - dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR,google_dot_logging_dot_type_dot_log__severity__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) - - + name="google/cloud/logging_v2/proto/log_entry.proto", + package="google.logging.v2", + syntax="proto3", + serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + dependencies=[ + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, + google_dot_logging_dot_type_dot_log__severity__pb2.DESCRIPTOR, + google_dot_protobuf_dot_any__pb2.DESCRIPTOR, + google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) _LOGENTRY_LABELSENTRY = _descriptor.Descriptor( - name='LabelsEntry', - full_name='google.logging.v2.LogEntry.LabelsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='google.logging.v2.LogEntry.LabelsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='google.logging.v2.LogEntry.LabelsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1121, - serialized_end=1166, + name="LabelsEntry", + full_name="google.logging.v2.LogEntry.LabelsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.LogEntry.LabelsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.LogEntry.LabelsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1121, + serialized_end=1166, ) _LOGENTRY = _descriptor.Descriptor( - name='LogEntry', - full_name='google.logging.v2.LogEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='log_name', full_name='google.logging.v2.LogEntry.log_name', index=0, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='resource', full_name='google.logging.v2.LogEntry.resource', index=1, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='proto_payload', full_name='google.logging.v2.LogEntry.proto_payload', index=2, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='text_payload', full_name='google.logging.v2.LogEntry.text_payload', index=3, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='json_payload', full_name='google.logging.v2.LogEntry.json_payload', index=4, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='timestamp', full_name='google.logging.v2.LogEntry.timestamp', index=5, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='receive_timestamp', full_name='google.logging.v2.LogEntry.receive_timestamp', index=6, - number=24, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='severity', full_name='google.logging.v2.LogEntry.severity', index=7, - number=10, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='insert_id', full_name='google.logging.v2.LogEntry.insert_id', index=8, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='http_request', full_name='google.logging.v2.LogEntry.http_request', index=9, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='labels', full_name='google.logging.v2.LogEntry.labels', index=10, - number=11, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='operation', full_name='google.logging.v2.LogEntry.operation', index=11, - number=15, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='trace', full_name='google.logging.v2.LogEntry.trace', index=12, - number=22, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='span_id', full_name='google.logging.v2.LogEntry.span_id', index=13, - number=27, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='trace_sampled', full_name='google.logging.v2.LogEntry.trace_sampled', index=14, - number=30, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='source_location', full_name='google.logging.v2.LogEntry.source_location', index=15, - number=23, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_LOGENTRY_LABELSENTRY, ], - enum_types=[ - ], - serialized_options=b'\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022\'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='payload', full_name='google.logging.v2.LogEntry.payload', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=391, - serialized_end=1369, + name="LogEntry", + full_name="google.logging.v2.LogEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.LogEntry.log_name", + index=0, + number=12, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="google.logging.v2.LogEntry.resource", + index=1, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="proto_payload", + full_name="google.logging.v2.LogEntry.proto_payload", + index=2, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="text_payload", + full_name="google.logging.v2.LogEntry.text_payload", + index=3, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="json_payload", + full_name="google.logging.v2.LogEntry.json_payload", + index=4, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="timestamp", + full_name="google.logging.v2.LogEntry.timestamp", + index=5, + number=9, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="receive_timestamp", + full_name="google.logging.v2.LogEntry.receive_timestamp", + index=6, + number=24, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="severity", + full_name="google.logging.v2.LogEntry.severity", + index=7, + number=10, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="insert_id", + full_name="google.logging.v2.LogEntry.insert_id", + index=8, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="http_request", + full_name="google.logging.v2.LogEntry.http_request", + index=9, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="labels", + full_name="google.logging.v2.LogEntry.labels", + index=10, + number=11, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="operation", + full_name="google.logging.v2.LogEntry.operation", + index=11, + number=15, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="trace", + full_name="google.logging.v2.LogEntry.trace", + index=12, + number=22, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="span_id", + full_name="google.logging.v2.LogEntry.span_id", + index=13, + number=27, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="trace_sampled", + full_name="google.logging.v2.LogEntry.trace_sampled", + index=14, + number=30, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="source_location", + full_name="google.logging.v2.LogEntry.source_location", + index=15, + number=23, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _LOGENTRY_LABELSENTRY, + ], + enum_types=[], + serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="payload", + full_name="google.logging.v2.LogEntry.payload", + index=0, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[], + ), + ], + serialized_start=391, + serialized_end=1369, ) _LOGENTRYOPERATION = _descriptor.Descriptor( - name='LogEntryOperation', - full_name='google.logging.v2.LogEntryOperation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='google.logging.v2.LogEntryOperation.id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='producer', full_name='google.logging.v2.LogEntryOperation.producer', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='first', full_name='google.logging.v2.LogEntryOperation.first', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='last', full_name='google.logging.v2.LogEntryOperation.last', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1371, - serialized_end=1469, + name="LogEntryOperation", + full_name="google.logging.v2.LogEntryOperation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="id", + full_name="google.logging.v2.LogEntryOperation.id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="producer", + full_name="google.logging.v2.LogEntryOperation.producer", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="first", + full_name="google.logging.v2.LogEntryOperation.first", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="last", + full_name="google.logging.v2.LogEntryOperation.last", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1371, + serialized_end=1469, ) _LOGENTRYSOURCELOCATION = _descriptor.Descriptor( - name='LogEntrySourceLocation', - full_name='google.logging.v2.LogEntrySourceLocation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='file', full_name='google.logging.v2.LogEntrySourceLocation.file', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='line', full_name='google.logging.v2.LogEntrySourceLocation.line', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='function', full_name='google.logging.v2.LogEntrySourceLocation.function', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1471, - serialized_end=1556, + name="LogEntrySourceLocation", + full_name="google.logging.v2.LogEntrySourceLocation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="file", + full_name="google.logging.v2.LogEntrySourceLocation.file", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="line", + full_name="google.logging.v2.LogEntrySourceLocation.line", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="function", + full_name="google.logging.v2.LogEntrySourceLocation.function", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1471, + serialized_end=1556, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY -_LOGENTRY.fields_by_name['resource'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE -_LOGENTRY.fields_by_name['proto_payload'].message_type = google_dot_protobuf_dot_any__pb2._ANY -_LOGENTRY.fields_by_name['json_payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_LOGENTRY.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGENTRY.fields_by_name['receive_timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGENTRY.fields_by_name['severity'].enum_type = google_dot_logging_dot_type_dot_log__severity__pb2._LOGSEVERITY -_LOGENTRY.fields_by_name['http_request'].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST -_LOGENTRY.fields_by_name['labels'].message_type = _LOGENTRY_LABELSENTRY -_LOGENTRY.fields_by_name['operation'].message_type = _LOGENTRYOPERATION -_LOGENTRY.fields_by_name['source_location'].message_type = _LOGENTRYSOURCELOCATION -_LOGENTRY.oneofs_by_name['payload'].fields.append( - _LOGENTRY.fields_by_name['proto_payload']) -_LOGENTRY.fields_by_name['proto_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] -_LOGENTRY.oneofs_by_name['payload'].fields.append( - _LOGENTRY.fields_by_name['text_payload']) -_LOGENTRY.fields_by_name['text_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] -_LOGENTRY.oneofs_by_name['payload'].fields.append( - _LOGENTRY.fields_by_name['json_payload']) -_LOGENTRY.fields_by_name['json_payload'].containing_oneof = _LOGENTRY.oneofs_by_name['payload'] -DESCRIPTOR.message_types_by_name['LogEntry'] = _LOGENTRY -DESCRIPTOR.message_types_by_name['LogEntryOperation'] = _LOGENTRYOPERATION -DESCRIPTOR.message_types_by_name['LogEntrySourceLocation'] = _LOGENTRYSOURCELOCATION +_LOGENTRY.fields_by_name[ + "resource" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_LOGENTRY.fields_by_name[ + "proto_payload" +].message_type = google_dot_protobuf_dot_any__pb2._ANY +_LOGENTRY.fields_by_name[ + "json_payload" +].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_LOGENTRY.fields_by_name[ + "timestamp" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name[ + "receive_timestamp" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name[ + "severity" +].enum_type = google_dot_logging_dot_type_dot_log__severity__pb2._LOGSEVERITY +_LOGENTRY.fields_by_name[ + "http_request" +].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST +_LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY +_LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION +_LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION +_LOGENTRY.oneofs_by_name["payload"].fields.append( + _LOGENTRY.fields_by_name["proto_payload"] +) +_LOGENTRY.fields_by_name["proto_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +_LOGENTRY.oneofs_by_name["payload"].fields.append( + _LOGENTRY.fields_by_name["text_payload"] +) +_LOGENTRY.fields_by_name["text_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +_LOGENTRY.oneofs_by_name["payload"].fields.append( + _LOGENTRY.fields_by_name["json_payload"] +) +_LOGENTRY.fields_by_name["json_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +DESCRIPTOR.message_types_by_name["LogEntry"] = _LOGENTRY +DESCRIPTOR.message_types_by_name["LogEntryOperation"] = _LOGENTRYOPERATION +DESCRIPTOR.message_types_by_name["LogEntrySourceLocation"] = _LOGENTRYSOURCELOCATION _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogEntry = _reflection.GeneratedProtocolMessageType('LogEntry', (_message.Message,), { - - 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { - 'DESCRIPTOR' : _LOGENTRY_LABELSENTRY, - '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - }) - , - 'DESCRIPTOR' : _LOGENTRY, - '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' - , - '__doc__': """An individual entry in a log. +LogEntry = _reflection.GeneratedProtocolMessageType( + "LogEntry", + (_message.Message,), + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _LOGENTRY_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) + }, + ), + "DESCRIPTOR": _LOGENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """An individual entry in a log. Attributes: log_name: @@ -455,16 +792,19 @@ Optional. Source code location information associated with the log entry, if any. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) + }, +) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) -LogEntryOperation = _reflection.GeneratedProtocolMessageType('LogEntryOperation', (_message.Message,), { - 'DESCRIPTOR' : _LOGENTRYOPERATION, - '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' - , - '__doc__': """Additional information about a potentially long-running operation with +LogEntryOperation = _reflection.GeneratedProtocolMessageType( + "LogEntryOperation", + (_message.Message,), + { + "DESCRIPTOR": _LOGENTRYOPERATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about a potentially long-running operation with which a log entry is associated. Attributes: @@ -484,15 +824,18 @@ Optional. Set this to True if this is the last log entry in the operation. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) + }, +) _sym_db.RegisterMessage(LogEntryOperation) -LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType('LogEntrySourceLocation', (_message.Message,), { - 'DESCRIPTOR' : _LOGENTRYSOURCELOCATION, - '__module__' : 'google.cloud.logging_v2.proto.log_entry_pb2' - , - '__doc__': """Additional information about the source code location that produced +LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( + "LogEntrySourceLocation", + (_message.Message,), + { + "DESCRIPTOR": _LOGENTRYSOURCELOCATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about the source code location that produced the log entry. Attributes: @@ -512,32 +855,33 @@ ``qual.if.ied.Class.method`` (Java), ``dir/package.func`` (Go), ``function`` (Python). """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) + }, +) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name['log_name']._options = None -_LOGENTRY.fields_by_name['resource']._options = None -_LOGENTRY.fields_by_name['timestamp']._options = None -_LOGENTRY.fields_by_name['receive_timestamp']._options = None -_LOGENTRY.fields_by_name['severity']._options = None -_LOGENTRY.fields_by_name['insert_id']._options = None -_LOGENTRY.fields_by_name['http_request']._options = None -_LOGENTRY.fields_by_name['labels']._options = None -_LOGENTRY.fields_by_name['operation']._options = None -_LOGENTRY.fields_by_name['trace']._options = None -_LOGENTRY.fields_by_name['span_id']._options = None -_LOGENTRY.fields_by_name['trace_sampled']._options = None -_LOGENTRY.fields_by_name['source_location']._options = None +_LOGENTRY.fields_by_name["log_name"]._options = None +_LOGENTRY.fields_by_name["resource"]._options = None +_LOGENTRY.fields_by_name["timestamp"]._options = None +_LOGENTRY.fields_by_name["receive_timestamp"]._options = None +_LOGENTRY.fields_by_name["severity"]._options = None +_LOGENTRY.fields_by_name["insert_id"]._options = None +_LOGENTRY.fields_by_name["http_request"]._options = None +_LOGENTRY.fields_by_name["labels"]._options = None +_LOGENTRY.fields_by_name["operation"]._options = None +_LOGENTRY.fields_by_name["trace"]._options = None +_LOGENTRY.fields_by_name["span_id"]._options = None +_LOGENTRY.fields_by_name["trace_sampled"]._options = None +_LOGENTRY.fields_by_name["source_location"]._options = None _LOGENTRY._options = None -_LOGENTRYOPERATION.fields_by_name['id']._options = None -_LOGENTRYOPERATION.fields_by_name['producer']._options = None -_LOGENTRYOPERATION.fields_by_name['first']._options = None -_LOGENTRYOPERATION.fields_by_name['last']._options = None -_LOGENTRYSOURCELOCATION.fields_by_name['file']._options = None -_LOGENTRYSOURCELOCATION.fields_by_name['line']._options = None -_LOGENTRYSOURCELOCATION.fields_by_name['function']._options = None +_LOGENTRYOPERATION.fields_by_name["id"]._options = None +_LOGENTRYOPERATION.fields_by_name["producer"]._options = None +_LOGENTRYOPERATION.fields_by_name["first"]._options = None +_LOGENTRYOPERATION.fields_by_name["last"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 2daafffeb..8a9393943 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py @@ -1,4 +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/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 6f19125c2..672b83523 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -7,6 +7,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -23,42 +24,60 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='google/cloud/logging_v2/proto/logging_config.proto', - package='google.logging.v2', - syntax='proto3', - serialized_options=b'\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}\"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32\".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options\"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n\"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogBucket\"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}\"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings\"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse\"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket\"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket\"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse\"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12\"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12\"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01\"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%\"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\x04sinkZ$\"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,\"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink\"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty\"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse\"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12\"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12\"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01\"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\texclusionZ4\"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ.\"!/v2/{parent=folders/*}/exclusions:\texclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion\"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty\"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings\"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings\"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3' - , - dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) + name="google/cloud/logging_v2/proto/logging_config.proto", + package="google.logging.v2", + syntax="proto3", + serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', + dependencies=[ + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) _LIFECYCLESTATE = _descriptor.EnumDescriptor( - name='LifecycleState', - full_name='google.logging.v2.LifecycleState', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='LIFECYCLE_STATE_UNSPECIFIED', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='ACTIVE', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DELETE_REQUESTED', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=4659, - serialized_end=4742, + name="LifecycleState", + full_name="google.logging.v2.LifecycleState", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="LIFECYCLE_STATE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="ACTIVE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="DELETE_REQUESTED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=4659, + serialized_end=4742, ) _sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) @@ -69,1142 +88,1918 @@ _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( - name='VersionFormat', - full_name='google.logging.v2.LogSink.VersionFormat', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='VERSION_FORMAT_UNSPECIFIED', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='V2', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='V1', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1306, - serialized_end=1369, + name="VersionFormat", + full_name="google.logging.v2.LogSink.VersionFormat", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="VERSION_FORMAT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="V2", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="V1", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1306, + serialized_end=1369, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) _LOGBUCKET = _descriptor.Descriptor( - name='LogBucket', - full_name='google.logging.v2.LogBucket', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.LogBucket.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='description', full_name='google.logging.v2.LogBucket.description', index=1, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='create_time', full_name='google.logging.v2.LogBucket.create_time', index=2, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_time', full_name='google.logging.v2.LogBucket.update_time', index=3, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='retention_days', full_name='google.logging.v2.LogBucket.retention_days', index=4, - number=11, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='lifecycle_state', full_name='google.logging.v2.LogBucket.lifecycle_state', index=5, - number=12, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=317, - serialized_end=856, + name="LogBucket", + full_name="google.logging.v2.LogBucket", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogBucket.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogBucket.description", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogBucket.create_time", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogBucket.update_time", + index=3, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="retention_days", + full_name="google.logging.v2.LogBucket.retention_days", + index=4, + number=11, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="lifecycle_state", + full_name="google.logging.v2.LogBucket.lifecycle_state", + index=5, + number=12, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=317, + serialized_end=856, ) _LOGSINK = _descriptor.Descriptor( - name='LogSink', - full_name='google.logging.v2.LogSink', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.LogSink.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='destination', full_name='google.logging.v2.LogSink.destination', index=1, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\003\n\001*', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='filter', full_name='google.logging.v2.LogSink.filter', index=2, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='description', full_name='google.logging.v2.LogSink.description', index=3, - number=18, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='disabled', full_name='google.logging.v2.LogSink.disabled', index=4, - number=19, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='output_version_format', full_name='google.logging.v2.LogSink.output_version_format', index=5, - number=6, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='writer_identity', full_name='google.logging.v2.LogSink.writer_identity', index=6, - number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='include_children', full_name='google.logging.v2.LogSink.include_children', index=7, - number=9, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bigquery_options', full_name='google.logging.v2.LogSink.bigquery_options', index=8, - number=12, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='create_time', full_name='google.logging.v2.LogSink.create_time', index=9, - number=13, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_time', full_name='google.logging.v2.LogSink.update_time', index=10, - number=14, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _LOGSINK_VERSIONFORMAT, - ], - serialized_options=b'\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='options', full_name='google.logging.v2.LogSink.options', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=859, - serialized_end=1574, + name="LogSink", + full_name="google.logging.v2.LogSink", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogSink.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="destination", + full_name="google.logging.v2.LogSink.destination", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A\003\n\001*", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogSink.filter", + index=2, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogSink.description", + index=3, + number=18, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="disabled", + full_name="google.logging.v2.LogSink.disabled", + index=4, + number=19, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="output_version_format", + full_name="google.logging.v2.LogSink.output_version_format", + index=5, + number=6, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\030\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="writer_identity", + full_name="google.logging.v2.LogSink.writer_identity", + index=6, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="include_children", + full_name="google.logging.v2.LogSink.include_children", + index=7, + number=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="bigquery_options", + full_name="google.logging.v2.LogSink.bigquery_options", + index=8, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogSink.create_time", + index=9, + number=13, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogSink.update_time", + index=10, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[ + _LOGSINK_VERSIONFORMAT, + ], + serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="options", + full_name="google.logging.v2.LogSink.options", + index=0, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[], + ), + ], + serialized_start=859, + serialized_end=1574, ) _BIGQUERYOPTIONS = _descriptor.Descriptor( - name='BigQueryOptions', - full_name='google.logging.v2.BigQueryOptions', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='use_partitioned_tables', full_name='google.logging.v2.BigQueryOptions.use_partitioned_tables', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='uses_timestamp_column_partitioning', full_name='google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning', index=1, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1576, - serialized_end=1679, + name="BigQueryOptions", + full_name="google.logging.v2.BigQueryOptions", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="use_partitioned_tables", + full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="uses_timestamp_column_partitioning", + full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", + index=1, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1576, + serialized_end=1679, ) _LISTBUCKETSREQUEST = _descriptor.Descriptor( - name='ListBucketsRequest', - full_name='google.logging.v2.ListBucketsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.ListBucketsRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\022 logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListBucketsRequest.page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListBucketsRequest.page_size', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1681, - serialized_end=1808, + name="ListBucketsRequest", + full_name="google.logging.v2.ListBucketsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListBucketsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListBucketsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListBucketsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1681, + serialized_end=1808, ) _LISTBUCKETSRESPONSE = _descriptor.Descriptor( - name='ListBucketsResponse', - full_name='google.logging.v2.ListBucketsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='buckets', full_name='google.logging.v2.ListBucketsResponse.buckets', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListBucketsResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1810, - serialized_end=1903, + name="ListBucketsResponse", + full_name="google.logging.v2.ListBucketsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="buckets", + full_name="google.logging.v2.ListBucketsResponse.buckets", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListBucketsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1810, + serialized_end=1903, ) _UPDATEBUCKETREQUEST = _descriptor.Descriptor( - name='UpdateBucketRequest', - full_name='google.logging.v2.UpdateBucketRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.UpdateBucketRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bucket', full_name='google.logging.v2.UpdateBucketRequest.bucket', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_mask', full_name='google.logging.v2.UpdateBucketRequest.update_mask', index=2, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1906, - serialized_end=2088, + name="UpdateBucketRequest", + full_name="google.logging.v2.UpdateBucketRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.UpdateBucketRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="bucket", + full_name="google.logging.v2.UpdateBucketRequest.bucket", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateBucketRequest.update_mask", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1906, + serialized_end=2088, ) _GETBUCKETREQUEST = _descriptor.Descriptor( - name='GetBucketRequest', - full_name='google.logging.v2.GetBucketRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.GetBucketRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2090, - serialized_end=2164, + name="GetBucketRequest", + full_name="google.logging.v2.GetBucketRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.GetBucketRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2090, + serialized_end=2164, ) _LISTSINKSREQUEST = _descriptor.Descriptor( - name='ListSinksRequest', - full_name='google.logging.v2.ListSinksRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.ListSinksRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A \022\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListSinksRequest.page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListSinksRequest.page_size', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2166, - serialized_end=2289, + name="ListSinksRequest", + full_name="google.logging.v2.ListSinksRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListSinksRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListSinksRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListSinksRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2166, + serialized_end=2289, ) _LISTSINKSRESPONSE = _descriptor.Descriptor( - name='ListSinksResponse', - full_name='google.logging.v2.ListSinksResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='sinks', full_name='google.logging.v2.ListSinksResponse.sinks', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListSinksResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2291, - serialized_end=2378, + name="ListSinksResponse", + full_name="google.logging.v2.ListSinksResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="sinks", + full_name="google.logging.v2.ListSinksResponse.sinks", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListSinksResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2291, + serialized_end=2378, ) _GETSINKREQUEST = _descriptor.Descriptor( - name='GetSinkRequest', - full_name='google.logging.v2.GetSinkRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='sink_name', full_name='google.logging.v2.GetSinkRequest.sink_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2380, - serialized_end=2455, + name="GetSinkRequest", + full_name="google.logging.v2.GetSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.GetSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2380, + serialized_end=2455, ) _CREATESINKREQUEST = _descriptor.Descriptor( - name='CreateSinkRequest', - full_name='google.logging.v2.CreateSinkRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.CreateSinkRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A \022\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sink', full_name='google.logging.v2.CreateSinkRequest.sink', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='unique_writer_identity', full_name='google.logging.v2.CreateSinkRequest.unique_writer_identity', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2458, - serialized_end=2617, + name="CreateSinkRequest", + full_name="google.logging.v2.CreateSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateSinkRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sink", + full_name="google.logging.v2.CreateSinkRequest.sink", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="unique_writer_identity", + full_name="google.logging.v2.CreateSinkRequest.unique_writer_identity", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2458, + serialized_end=2617, ) _UPDATESINKREQUEST = _descriptor.Descriptor( - name='UpdateSinkRequest', - full_name='google.logging.v2.UpdateSinkRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='sink_name', full_name='google.logging.v2.UpdateSinkRequest.sink_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sink', full_name='google.logging.v2.UpdateSinkRequest.sink', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='unique_writer_identity', full_name='google.logging.v2.UpdateSinkRequest.unique_writer_identity', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_mask', full_name='google.logging.v2.UpdateSinkRequest.update_mask', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2620, - serialized_end=2836, + name="UpdateSinkRequest", + full_name="google.logging.v2.UpdateSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.UpdateSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sink", + full_name="google.logging.v2.UpdateSinkRequest.sink", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="unique_writer_identity", + full_name="google.logging.v2.UpdateSinkRequest.unique_writer_identity", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateSinkRequest.update_mask", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2620, + serialized_end=2836, ) _DELETESINKREQUEST = _descriptor.Descriptor( - name='DeleteSinkRequest', - full_name='google.logging.v2.DeleteSinkRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='sink_name', full_name='google.logging.v2.DeleteSinkRequest.sink_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A \n\036logging.googleapis.com/LogSink', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2838, - serialized_end=2916, + name="DeleteSinkRequest", + full_name="google.logging.v2.DeleteSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.DeleteSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2838, + serialized_end=2916, ) _LOGEXCLUSION = _descriptor.Descriptor( - name='LogExclusion', - full_name='google.logging.v2.LogExclusion', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.LogExclusion.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='description', full_name='google.logging.v2.LogExclusion.description', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='filter', full_name='google.logging.v2.LogExclusion.filter', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='disabled', full_name='google.logging.v2.LogExclusion.disabled', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='create_time', full_name='google.logging.v2.LogExclusion.create_time', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_time', full_name='google.logging.v2.LogExclusion.update_time', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022\'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2919, - serialized_end=3369, + name="LogExclusion", + full_name="google.logging.v2.LogExclusion", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogExclusion.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogExclusion.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogExclusion.filter", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="disabled", + full_name="google.logging.v2.LogExclusion.disabled", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogExclusion.create_time", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogExclusion.update_time", + index=5, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2919, + serialized_end=3369, ) _LISTEXCLUSIONSREQUEST = _descriptor.Descriptor( - name='ListExclusionsRequest', - full_name='google.logging.v2.ListExclusionsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.ListExclusionsRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\022#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListExclusionsRequest.page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListExclusionsRequest.page_size', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3372, - serialized_end=3505, + name="ListExclusionsRequest", + full_name="google.logging.v2.ListExclusionsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListExclusionsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListExclusionsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListExclusionsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3372, + serialized_end=3505, ) _LISTEXCLUSIONSRESPONSE = _descriptor.Descriptor( - name='ListExclusionsResponse', - full_name='google.logging.v2.ListExclusionsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='exclusions', full_name='google.logging.v2.ListExclusionsResponse.exclusions', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListExclusionsResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3507, - serialized_end=3609, + name="ListExclusionsResponse", + full_name="google.logging.v2.ListExclusionsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="exclusions", + full_name="google.logging.v2.ListExclusionsResponse.exclusions", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListExclusionsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3507, + serialized_end=3609, ) _GETEXCLUSIONREQUEST = _descriptor.Descriptor( - name='GetExclusionRequest', - full_name='google.logging.v2.GetExclusionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.GetExclusionRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3611, - serialized_end=3691, + name="GetExclusionRequest", + full_name="google.logging.v2.GetExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.GetExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3611, + serialized_end=3691, ) _CREATEEXCLUSIONREQUEST = _descriptor.Descriptor( - name='CreateExclusionRequest', - full_name='google.logging.v2.CreateExclusionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.CreateExclusionRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\022#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='exclusion', full_name='google.logging.v2.CreateExclusionRequest.exclusion', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3694, - serialized_end=3836, + name="CreateExclusionRequest", + full_name="google.logging.v2.CreateExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateExclusionRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="exclusion", + full_name="google.logging.v2.CreateExclusionRequest.exclusion", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3694, + serialized_end=3836, ) _UPDATEEXCLUSIONREQUEST = _descriptor.Descriptor( - name='UpdateExclusionRequest', - full_name='google.logging.v2.UpdateExclusionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.UpdateExclusionRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='exclusion', full_name='google.logging.v2.UpdateExclusionRequest.exclusion', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_mask', full_name='google.logging.v2.UpdateExclusionRequest.update_mask', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3839, - serialized_end=4033, + name="UpdateExclusionRequest", + full_name="google.logging.v2.UpdateExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.UpdateExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="exclusion", + full_name="google.logging.v2.UpdateExclusionRequest.exclusion", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateExclusionRequest.update_mask", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3839, + serialized_end=4033, ) _DELETEEXCLUSIONREQUEST = _descriptor.Descriptor( - name='DeleteExclusionRequest', - full_name='google.logging.v2.DeleteExclusionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.DeleteExclusionRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/LogExclusion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4035, - serialized_end=4118, + name="DeleteExclusionRequest", + full_name="google.logging.v2.DeleteExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.DeleteExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4035, + serialized_end=4118, ) _GETCMEKSETTINGSREQUEST = _descriptor.Descriptor( - name='GetCmekSettingsRequest', - full_name='google.logging.v2.GetCmekSettingsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.GetCmekSettingsRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A%\n#logging.googleapis.com/CmekSettings', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4120, - serialized_end=4203, + name="GetCmekSettingsRequest", + full_name="google.logging.v2.GetCmekSettingsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.GetCmekSettingsRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/CmekSettings", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4120, + serialized_end=4203, ) _UPDATECMEKSETTINGSREQUEST = _descriptor.Descriptor( - name='UpdateCmekSettingsRequest', - full_name='google.logging.v2.UpdateCmekSettingsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.UpdateCmekSettingsRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='cmek_settings', full_name='google.logging.v2.UpdateCmekSettingsRequest.cmek_settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_mask', full_name='google.logging.v2.UpdateCmekSettingsRequest.update_mask', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4206, - serialized_end=4367, + name="UpdateCmekSettingsRequest", + full_name="google.logging.v2.UpdateCmekSettingsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.UpdateCmekSettingsRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="cmek_settings", + full_name="google.logging.v2.UpdateCmekSettingsRequest.cmek_settings", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateCmekSettingsRequest.update_mask", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4206, + serialized_end=4367, ) _CMEKSETTINGS = _descriptor.Descriptor( - name='CmekSettings', - full_name='google.logging.v2.CmekSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.CmekSettings.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='kms_key_name', full_name='google.logging.v2.CmekSettings.kms_key_name', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='service_account_id', full_name='google.logging.v2.CmekSettings.service_account_id', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4370, - serialized_end=4657, + name="CmekSettings", + full_name="google.logging.v2.CmekSettings", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.CmekSettings.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="kms_key_name", + full_name="google.logging.v2.CmekSettings.kms_key_name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="service_account_id", + full_name="google.logging.v2.CmekSettings.service_account_id", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4370, + serialized_end=4657, ) -_LOGBUCKET.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name['lifecycle_state'].enum_type = _LIFECYCLESTATE -_LOGSINK.fields_by_name['output_version_format'].enum_type = _LOGSINK_VERSIONFORMAT -_LOGSINK.fields_by_name['bigquery_options'].message_type = _BIGQUERYOPTIONS -_LOGSINK.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGSINK.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE +_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT +_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS +_LOGSINK.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK -_LOGSINK.oneofs_by_name['options'].fields.append( - _LOGSINK.fields_by_name['bigquery_options']) -_LOGSINK.fields_by_name['bigquery_options'].containing_oneof = _LOGSINK.oneofs_by_name['options'] -_LISTBUCKETSRESPONSE.fields_by_name['buckets'].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name['bucket'].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LISTSINKSRESPONSE.fields_by_name['sinks'].message_type = _LOGSINK -_CREATESINKREQUEST.fields_by_name['sink'].message_type = _LOGSINK -_UPDATESINKREQUEST.fields_by_name['sink'].message_type = _LOGSINK -_UPDATESINKREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_LOGEXCLUSION.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGEXCLUSION.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LISTEXCLUSIONSRESPONSE.fields_by_name['exclusions'].message_type = _LOGEXCLUSION -_CREATEEXCLUSIONREQUEST.fields_by_name['exclusion'].message_type = _LOGEXCLUSION -_UPDATEEXCLUSIONREQUEST.fields_by_name['exclusion'].message_type = _LOGEXCLUSION -_UPDATEEXCLUSIONREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -_UPDATECMEKSETTINGSREQUEST.fields_by_name['cmek_settings'].message_type = _CMEKSETTINGS -_UPDATECMEKSETTINGSREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -DESCRIPTOR.message_types_by_name['LogBucket'] = _LOGBUCKET -DESCRIPTOR.message_types_by_name['LogSink'] = _LOGSINK -DESCRIPTOR.message_types_by_name['BigQueryOptions'] = _BIGQUERYOPTIONS -DESCRIPTOR.message_types_by_name['ListBucketsRequest'] = _LISTBUCKETSREQUEST -DESCRIPTOR.message_types_by_name['ListBucketsResponse'] = _LISTBUCKETSRESPONSE -DESCRIPTOR.message_types_by_name['UpdateBucketRequest'] = _UPDATEBUCKETREQUEST -DESCRIPTOR.message_types_by_name['GetBucketRequest'] = _GETBUCKETREQUEST -DESCRIPTOR.message_types_by_name['ListSinksRequest'] = _LISTSINKSREQUEST -DESCRIPTOR.message_types_by_name['ListSinksResponse'] = _LISTSINKSRESPONSE -DESCRIPTOR.message_types_by_name['GetSinkRequest'] = _GETSINKREQUEST -DESCRIPTOR.message_types_by_name['CreateSinkRequest'] = _CREATESINKREQUEST -DESCRIPTOR.message_types_by_name['UpdateSinkRequest'] = _UPDATESINKREQUEST -DESCRIPTOR.message_types_by_name['DeleteSinkRequest'] = _DELETESINKREQUEST -DESCRIPTOR.message_types_by_name['LogExclusion'] = _LOGEXCLUSION -DESCRIPTOR.message_types_by_name['ListExclusionsRequest'] = _LISTEXCLUSIONSREQUEST -DESCRIPTOR.message_types_by_name['ListExclusionsResponse'] = _LISTEXCLUSIONSRESPONSE -DESCRIPTOR.message_types_by_name['GetExclusionRequest'] = _GETEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name['CreateExclusionRequest'] = _CREATEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name['UpdateExclusionRequest'] = _UPDATEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name['DeleteExclusionRequest'] = _DELETEEXCLUSIONREQUEST -DESCRIPTOR.message_types_by_name['GetCmekSettingsRequest'] = _GETCMEKSETTINGSREQUEST -DESCRIPTOR.message_types_by_name['UpdateCmekSettingsRequest'] = _UPDATECMEKSETTINGSREQUEST -DESCRIPTOR.message_types_by_name['CmekSettings'] = _CMEKSETTINGS -DESCRIPTOR.enum_types_by_name['LifecycleState'] = _LIFECYCLESTATE +_LOGSINK.oneofs_by_name["options"].fields.append( + _LOGSINK.fields_by_name["bigquery_options"] +) +_LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ + "options" +] +_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK +_CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_LOGEXCLUSION.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGEXCLUSION.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LISTEXCLUSIONSRESPONSE.fields_by_name["exclusions"].message_type = _LOGEXCLUSION +_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"].message_type = _CMEKSETTINGS +_UPDATECMEKSETTINGSREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET +DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK +DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS +DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST +DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE +DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST +DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST +DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST +DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE +DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST +DESCRIPTOR.message_types_by_name["CreateSinkRequest"] = _CREATESINKREQUEST +DESCRIPTOR.message_types_by_name["UpdateSinkRequest"] = _UPDATESINKREQUEST +DESCRIPTOR.message_types_by_name["DeleteSinkRequest"] = _DELETESINKREQUEST +DESCRIPTOR.message_types_by_name["LogExclusion"] = _LOGEXCLUSION +DESCRIPTOR.message_types_by_name["ListExclusionsRequest"] = _LISTEXCLUSIONSREQUEST +DESCRIPTOR.message_types_by_name["ListExclusionsResponse"] = _LISTEXCLUSIONSRESPONSE +DESCRIPTOR.message_types_by_name["GetExclusionRequest"] = _GETEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["CreateExclusionRequest"] = _CREATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["UpdateExclusionRequest"] = _UPDATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["DeleteExclusionRequest"] = _DELETEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["GetCmekSettingsRequest"] = _GETCMEKSETTINGSREQUEST +DESCRIPTOR.message_types_by_name[ + "UpdateCmekSettingsRequest" +] = _UPDATECMEKSETTINGSREQUEST +DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS +DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogBucket = _reflection.GeneratedProtocolMessageType('LogBucket', (_message.Message,), { - 'DESCRIPTOR' : _LOGBUCKET, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Describes a repository of logs (Beta). +LogBucket = _reflection.GeneratedProtocolMessageType( + "LogBucket", + (_message.Message,), + { + "DESCRIPTOR": _LOGBUCKET, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a repository of logs (Beta). Attributes: name: @@ -1230,15 +2025,18 @@ lifecycle_state: Output only. The bucket lifecycle state. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) + }, +) _sym_db.RegisterMessage(LogBucket) -LogSink = _reflection.GeneratedProtocolMessageType('LogSink', (_message.Message,), { - 'DESCRIPTOR' : _LOGSINK, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Describes a sink used to export log entries to one of the following +LogSink = _reflection.GeneratedProtocolMessageType( + "LogSink", + (_message.Message,), + { + "DESCRIPTOR": _LOGSINK, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a sink used to export log entries to one of the following destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which log entries are exported. The sink must be created within a project, @@ -1320,15 +2118,18 @@ Output only. The last update timestamp of the sink. This field may not be present for older sinks. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) + }, +) _sym_db.RegisterMessage(LogSink) -BigQueryOptions = _reflection.GeneratedProtocolMessageType('BigQueryOptions', (_message.Message,), { - 'DESCRIPTOR' : _BIGQUERYOPTIONS, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Options that change functionality of a sink exporting data to +BigQueryOptions = _reflection.GeneratedProtocolMessageType( + "BigQueryOptions", + (_message.Message,), + { + "DESCRIPTOR": _BIGQUERYOPTIONS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Options that change functionality of a sink exporting data to BigQuery. Attributes: @@ -1351,15 +2152,18 @@ sinks using partitioned tables will have this field set to false. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) + }, +) _sym_db.RegisterMessage(BigQueryOptions) -ListBucketsRequest = _reflection.GeneratedProtocolMessageType('ListBucketsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTBUCKETSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``ListBuckets`` (Beta). +ListBucketsRequest = _reflection.GeneratedProtocolMessageType( + "ListBucketsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListBuckets`` (Beta). Attributes: parent: @@ -1383,15 +2187,18 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) + }, +) _sym_db.RegisterMessage(ListBucketsRequest) -ListBucketsResponse = _reflection.GeneratedProtocolMessageType('ListBucketsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTBUCKETSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The response from ListBuckets (Beta). +ListBucketsResponse = _reflection.GeneratedProtocolMessageType( + "ListBucketsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The response from ListBuckets (Beta). Attributes: buckets: @@ -1402,15 +2209,18 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) + }, +) _sym_db.RegisterMessage(ListBucketsResponse) -UpdateBucketRequest = _reflection.GeneratedProtocolMessageType('UpdateBucketRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATEBUCKETREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``UpdateBucket`` (Beta). +UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( + "UpdateBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATEBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateBucket`` (Beta). Attributes: name: @@ -1435,15 +2245,18 @@ /docs/reference/google.protobuf#google.protobuf.FieldMask Example: ``updateMask=retention_days``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) + }, +) _sym_db.RegisterMessage(UpdateBucketRequest) -GetBucketRequest = _reflection.GeneratedProtocolMessageType('GetBucketRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETBUCKETREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``GetBucket`` (Beta). +GetBucketRequest = _reflection.GeneratedProtocolMessageType( + "GetBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetBucket`` (Beta). Attributes: name: @@ -1456,15 +2269,18 @@ ``"projects/my-project-id/locations/my-location/buckets/my- bucket-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) + }, +) _sym_db.RegisterMessage(GetBucketRequest) -ListSinksRequest = _reflection.GeneratedProtocolMessageType('ListSinksRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTSINKSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``ListSinks``. +ListSinksRequest = _reflection.GeneratedProtocolMessageType( + "ListSinksRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTSINKSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListSinks``. Attributes: parent: @@ -1485,15 +2301,18 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) + }, +) _sym_db.RegisterMessage(ListSinksRequest) -ListSinksResponse = _reflection.GeneratedProtocolMessageType('ListSinksResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTSINKSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Result returned from ``ListSinks``. +ListSinksResponse = _reflection.GeneratedProtocolMessageType( + "ListSinksResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTSINKSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Result returned from ``ListSinks``. Attributes: sinks: @@ -1504,15 +2323,18 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) + }, +) _sym_db.RegisterMessage(ListSinksResponse) -GetSinkRequest = _reflection.GeneratedProtocolMessageType('GetSinkRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETSINKREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``GetSink``. +GetSinkRequest = _reflection.GeneratedProtocolMessageType( + "GetSinkRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETSINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetSink``. Attributes: sink_name: @@ -1523,15 +2345,18 @@ "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) + }, +) _sym_db.RegisterMessage(GetSinkRequest) -CreateSinkRequest = _reflection.GeneratedProtocolMessageType('CreateSinkRequest', (_message.Message,), { - 'DESCRIPTOR' : _CREATESINKREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``CreateSink``. +CreateSinkRequest = _reflection.GeneratedProtocolMessageType( + "CreateSinkRequest", + (_message.Message,), + { + "DESCRIPTOR": _CREATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``CreateSink``. Attributes: parent: @@ -1557,15 +2382,18 @@ sink. For more information, see ``writer_identity`` in [LogSink][google.logging.v2.LogSink]. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) + }, +) _sym_db.RegisterMessage(CreateSinkRequest) -UpdateSinkRequest = _reflection.GeneratedProtocolMessageType('UpdateSinkRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATESINKREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``UpdateSink``. +UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( + "UpdateSinkRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateSink``. Attributes: sink_name: @@ -1606,15 +2434,18 @@ google.protobuf#google.protobuf.FieldMask Example: ``updateMask=filter``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) + }, +) _sym_db.RegisterMessage(UpdateSinkRequest) -DeleteSinkRequest = _reflection.GeneratedProtocolMessageType('DeleteSinkRequest', (_message.Message,), { - 'DESCRIPTOR' : _DELETESINKREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``DeleteSink``. +DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( + "DeleteSinkRequest", + (_message.Message,), + { + "DESCRIPTOR": _DELETESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``DeleteSink``. Attributes: sink_name: @@ -1626,15 +2457,18 @@ "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) + }, +) _sym_db.RegisterMessage(DeleteSinkRequest) -LogExclusion = _reflection.GeneratedProtocolMessageType('LogExclusion', (_message.Message,), { - 'DESCRIPTOR' : _LOGEXCLUSION, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Specifies a set of log entries that are not to be stored in Logging. +LogExclusion = _reflection.GeneratedProtocolMessageType( + "LogExclusion", + (_message.Message,), + { + "DESCRIPTOR": _LOGEXCLUSION, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Specifies a set of log entries that are not to be stored in Logging. If your GCP resource receives a large volume of logs, you can use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are @@ -1673,15 +2507,18 @@ Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogExclusion) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogExclusion) + }, +) _sym_db.RegisterMessage(LogExclusion) -ListExclusionsRequest = _reflection.GeneratedProtocolMessageType('ListExclusionsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTEXCLUSIONSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``ListExclusions``. +ListExclusionsRequest = _reflection.GeneratedProtocolMessageType( + "ListExclusionsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTEXCLUSIONSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListExclusions``. Attributes: parent: @@ -1702,15 +2539,18 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsRequest) + }, +) _sym_db.RegisterMessage(ListExclusionsRequest) -ListExclusionsResponse = _reflection.GeneratedProtocolMessageType('ListExclusionsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTEXCLUSIONSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Result returned from ``ListExclusions``. +ListExclusionsResponse = _reflection.GeneratedProtocolMessageType( + "ListExclusionsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTEXCLUSIONSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Result returned from ``ListExclusions``. Attributes: exclusions: @@ -1721,15 +2561,18 @@ results, call the same method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListExclusionsResponse) + }, +) _sym_db.RegisterMessage(ListExclusionsResponse) -GetExclusionRequest = _reflection.GeneratedProtocolMessageType('GetExclusionRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETEXCLUSIONREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``GetExclusion``. +GetExclusionRequest = _reflection.GeneratedProtocolMessageType( + "GetExclusionRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETEXCLUSIONREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetExclusion``. Attributes: name: @@ -1741,15 +2584,18 @@ Example: ``"projects/my-project-id/exclusions/my-exclusion- id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetExclusionRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetExclusionRequest) + }, +) _sym_db.RegisterMessage(GetExclusionRequest) -CreateExclusionRequest = _reflection.GeneratedProtocolMessageType('CreateExclusionRequest', (_message.Message,), { - 'DESCRIPTOR' : _CREATEEXCLUSIONREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``CreateExclusion``. +CreateExclusionRequest = _reflection.GeneratedProtocolMessageType( + "CreateExclusionRequest", + (_message.Message,), + { + "DESCRIPTOR": _CREATEEXCLUSIONREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``CreateExclusion``. Attributes: parent: @@ -1764,15 +2610,18 @@ exclusion name that is not already used in the parent resource. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateExclusionRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateExclusionRequest) + }, +) _sym_db.RegisterMessage(CreateExclusionRequest) -UpdateExclusionRequest = _reflection.GeneratedProtocolMessageType('UpdateExclusionRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATEEXCLUSIONREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``UpdateExclusion``. +UpdateExclusionRequest = _reflection.GeneratedProtocolMessageType( + "UpdateExclusionRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATEEXCLUSIONREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateExclusion``. Attributes: name: @@ -1796,15 +2645,18 @@ change the filter and description of an exclusion, specify an ``update_mask`` of ``"filter,description"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateExclusionRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateExclusionRequest) + }, +) _sym_db.RegisterMessage(UpdateExclusionRequest) -DeleteExclusionRequest = _reflection.GeneratedProtocolMessageType('DeleteExclusionRequest', (_message.Message,), { - 'DESCRIPTOR' : _DELETEEXCLUSIONREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to ``DeleteExclusion``. +DeleteExclusionRequest = _reflection.GeneratedProtocolMessageType( + "DeleteExclusionRequest", + (_message.Message,), + { + "DESCRIPTOR": _DELETEEXCLUSIONREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``DeleteExclusion``. Attributes: name: @@ -1817,15 +2669,18 @@ Example: ``"projects/my-project-id/exclusions/my-exclusion- id"``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteExclusionRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteExclusionRequest) + }, +) _sym_db.RegisterMessage(DeleteExclusionRequest) -GetCmekSettingsRequest = _reflection.GeneratedProtocolMessageType('GetCmekSettingsRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETCMEKSETTINGSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to +GetCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( + "GetCmekSettingsRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETCMEKSETTINGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. See `Enabling CMEK for Logs Router `__ @@ -1843,15 +2698,18 @@ organizations. Once configured, it applies to all projects and folders in the GCP organization. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) + }, +) _sym_db.RegisterMessage(GetCmekSettingsRequest) -UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType('UpdateCmekSettingsRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATECMEKSETTINGSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService +UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( + "UpdateCmekSettingsRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router `__ for more information. @@ -1880,15 +2738,18 @@ [FieldMask][google.protobuf.FieldMask] for more information. Example: ``"updateMask=kmsKeyName"`` """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) + }, +) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) -CmekSettings = _reflection.GeneratedProtocolMessageType('CmekSettings', (_message.Message,), { - 'DESCRIPTOR' : _CMEKSETTINGS, - '__module__' : 'google.cloud.logging_v2.proto.logging_config_pb2' - , - '__doc__': """Describes the customer-managed encryption key (CMEK) settings +CmekSettings = _reflection.GeneratedProtocolMessageType( + "CmekSettings", + (_message.Message,), + { + "DESCRIPTOR": _CMEKSETTINGS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes the customer-managed encryption key (CMEK) settings associated with a project, folder, organization, billing account, or flexible resource. Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to @@ -1931,237 +2792,239 @@ `__ for more information. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) + }, +) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None -_LOGBUCKET.fields_by_name['create_time']._options = None -_LOGBUCKET.fields_by_name['update_time']._options = None -_LOGBUCKET.fields_by_name['lifecycle_state']._options = None +_LOGBUCKET.fields_by_name["create_time"]._options = None +_LOGBUCKET.fields_by_name["update_time"]._options = None +_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None _LOGBUCKET._options = None -_LOGSINK.fields_by_name['name']._options = None -_LOGSINK.fields_by_name['destination']._options = None -_LOGSINK.fields_by_name['filter']._options = None -_LOGSINK.fields_by_name['description']._options = None -_LOGSINK.fields_by_name['disabled']._options = None -_LOGSINK.fields_by_name['output_version_format']._options = None -_LOGSINK.fields_by_name['writer_identity']._options = None -_LOGSINK.fields_by_name['include_children']._options = None -_LOGSINK.fields_by_name['bigquery_options']._options = None -_LOGSINK.fields_by_name['create_time']._options = None -_LOGSINK.fields_by_name['update_time']._options = None +_LOGSINK.fields_by_name["name"]._options = None +_LOGSINK.fields_by_name["destination"]._options = None +_LOGSINK.fields_by_name["filter"]._options = None +_LOGSINK.fields_by_name["description"]._options = None +_LOGSINK.fields_by_name["disabled"]._options = None +_LOGSINK.fields_by_name["output_version_format"]._options = None +_LOGSINK.fields_by_name["writer_identity"]._options = None +_LOGSINK.fields_by_name["include_children"]._options = None +_LOGSINK.fields_by_name["bigquery_options"]._options = None +_LOGSINK.fields_by_name["create_time"]._options = None +_LOGSINK.fields_by_name["update_time"]._options = None _LOGSINK._options = None -_BIGQUERYOPTIONS.fields_by_name['use_partitioned_tables']._options = None -_BIGQUERYOPTIONS.fields_by_name['uses_timestamp_column_partitioning']._options = None -_LISTBUCKETSREQUEST.fields_by_name['parent']._options = None -_LISTBUCKETSREQUEST.fields_by_name['page_token']._options = None -_LISTBUCKETSREQUEST.fields_by_name['page_size']._options = None -_UPDATEBUCKETREQUEST.fields_by_name['name']._options = None -_UPDATEBUCKETREQUEST.fields_by_name['bucket']._options = None -_UPDATEBUCKETREQUEST.fields_by_name['update_mask']._options = None -_GETBUCKETREQUEST.fields_by_name['name']._options = None -_LISTSINKSREQUEST.fields_by_name['parent']._options = None -_LISTSINKSREQUEST.fields_by_name['page_token']._options = None -_LISTSINKSREQUEST.fields_by_name['page_size']._options = None -_GETSINKREQUEST.fields_by_name['sink_name']._options = None -_CREATESINKREQUEST.fields_by_name['parent']._options = None -_CREATESINKREQUEST.fields_by_name['sink']._options = None -_CREATESINKREQUEST.fields_by_name['unique_writer_identity']._options = None -_UPDATESINKREQUEST.fields_by_name['sink_name']._options = None -_UPDATESINKREQUEST.fields_by_name['sink']._options = None -_UPDATESINKREQUEST.fields_by_name['unique_writer_identity']._options = None -_UPDATESINKREQUEST.fields_by_name['update_mask']._options = None -_DELETESINKREQUEST.fields_by_name['sink_name']._options = None -_LOGEXCLUSION.fields_by_name['name']._options = None -_LOGEXCLUSION.fields_by_name['description']._options = None -_LOGEXCLUSION.fields_by_name['filter']._options = None -_LOGEXCLUSION.fields_by_name['disabled']._options = None -_LOGEXCLUSION.fields_by_name['create_time']._options = None -_LOGEXCLUSION.fields_by_name['update_time']._options = None +_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None +_BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None +_GETBUCKETREQUEST.fields_by_name["name"]._options = None +_LISTSINKSREQUEST.fields_by_name["parent"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None +_GETSINKREQUEST.fields_by_name["sink_name"]._options = None +_CREATESINKREQUEST.fields_by_name["parent"]._options = None +_CREATESINKREQUEST.fields_by_name["sink"]._options = None +_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None +_UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None +_UPDATESINKREQUEST.fields_by_name["sink"]._options = None +_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None +_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None +_DELETESINKREQUEST.fields_by_name["sink_name"]._options = None +_LOGEXCLUSION.fields_by_name["name"]._options = None +_LOGEXCLUSION.fields_by_name["description"]._options = None +_LOGEXCLUSION.fields_by_name["filter"]._options = None +_LOGEXCLUSION.fields_by_name["disabled"]._options = None +_LOGEXCLUSION.fields_by_name["create_time"]._options = None +_LOGEXCLUSION.fields_by_name["update_time"]._options = None _LOGEXCLUSION._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name['parent']._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name['page_token']._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name['page_size']._options = None -_GETEXCLUSIONREQUEST.fields_by_name['name']._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name['parent']._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name['exclusion']._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name['name']._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name['exclusion']._options = None -_UPDATEEXCLUSIONREQUEST.fields_by_name['update_mask']._options = None -_DELETEEXCLUSIONREQUEST.fields_by_name['name']._options = None -_GETCMEKSETTINGSREQUEST.fields_by_name['name']._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name['name']._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name['cmek_settings']._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name['update_mask']._options = None -_CMEKSETTINGS.fields_by_name['name']._options = None -_CMEKSETTINGS.fields_by_name['service_account_id']._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None +_GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None +_UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None +_DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None +_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None +_CMEKSETTINGS.fields_by_name["name"]._options = None +_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None _CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( - name='ConfigServiceV2', - full_name='google.logging.v2.ConfigServiceV2', - file=DESCRIPTOR, - index=0, - serialized_options=b'\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read', - create_key=_descriptor._internal_create_key, - serialized_start=4745, - serialized_end=9784, - methods=[ - _descriptor.MethodDescriptor( - name='ListBuckets', - full_name='google.logging.v2.ConfigServiceV2.ListBuckets', + name="ConfigServiceV2", + full_name="google.logging.v2.ConfigServiceV2", + file=DESCRIPTOR, index=0, - containing_service=None, - input_type=_LISTBUCKETSREQUEST, - output_type=_LISTBUCKETSRESPONSE, - serialized_options=b'\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetBucket', - full_name='google.logging.v2.ConfigServiceV2.GetBucket', - index=1, - containing_service=None, - input_type=_GETBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b'\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='UpdateBucket', - full_name='google.logging.v2.ConfigServiceV2.UpdateBucket', - index=2, - containing_service=None, - input_type=_UPDATEBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b'\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListSinks', - full_name='google.logging.v2.ConfigServiceV2.ListSinks', - index=3, - containing_service=None, - input_type=_LISTSINKSREQUEST, - output_type=_LISTSINKSRESPONSE, - serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022\"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetSink', - full_name='google.logging.v2.ConfigServiceV2.GetSink', - index=4, - containing_service=None, - input_type=_GETSINKREQUEST, - output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022\'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='CreateSink', - full_name='google.logging.v2.ConfigServiceV2.CreateSink', - index=5, - containing_service=None, - input_type=_CREATESINKREQUEST, - output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\305\001\"\026/v2/{parent=*/*}/sinks:\004sinkZ%\"\035/v2/{parent=projects/*}/sinks:\004sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\004sinkZ$\"\034/v2/{parent=folders/*}/sinks:\004sinkZ,\"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='UpdateSink', - full_name='google.logging.v2.ConfigServiceV2.UpdateSink', - index=6, - containing_service=None, - input_type=_UPDATESINKREQUEST, - output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032\'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='DeleteSink', - full_name='google.logging.v2.ConfigServiceV2.DeleteSink', - index=7, - containing_service=None, - input_type=_DELETESINKREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b'\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name', + serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListExclusions', - full_name='google.logging.v2.ConfigServiceV2.ListExclusions', - index=8, - containing_service=None, - input_type=_LISTEXCLUSIONSREQUEST, - output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022\'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetExclusion', - full_name='google.logging.v2.ConfigServiceV2.GetExclusion', - index=9, - containing_service=None, - input_type=_GETEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022\'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='CreateExclusion', - full_name='google.logging.v2.ConfigServiceV2.CreateExclusion', - index=10, - containing_service=None, - input_type=_CREATEEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\367\001\"\033/v2/{parent=*/*}/exclusions:\texclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\texclusionZ4\"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ.\"!/v2/{parent=folders/*}/exclusions:\texclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='UpdateExclusion', - full_name='google.logging.v2.ConfigServiceV2.UpdateExclusion', - index=11, - containing_service=None, - input_type=_UPDATEEXCLUSIONREQUEST, - output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='DeleteExclusion', - full_name='google.logging.v2.ConfigServiceV2.DeleteExclusion', - index=12, - containing_service=None, - input_type=_DELETEEXCLUSIONREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b'\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetCmekSettings', - full_name='google.logging.v2.ConfigServiceV2.GetCmekSettings', - index=13, - containing_service=None, - input_type=_GETCMEKSETTINGSREQUEST, - output_type=_CMEKSETTINGS, - serialized_options=b'\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022\'/v2/{name=organizations/*}/cmekSettings', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='UpdateCmekSettings', - full_name='google.logging.v2.ConfigServiceV2.UpdateCmekSettings', - index=14, - containing_service=None, - input_type=_UPDATECMEKSETTINGSREQUEST, - output_type=_CMEKSETTINGS, - serialized_options=b'\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings', - create_key=_descriptor._internal_create_key, - ), -]) + serialized_start=4745, + serialized_end=9784, + methods=[ + _descriptor.MethodDescriptor( + name="ListBuckets", + full_name="google.logging.v2.ConfigServiceV2.ListBuckets", + index=0, + containing_service=None, + input_type=_LISTBUCKETSREQUEST, + output_type=_LISTBUCKETSRESPONSE, + serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetBucket", + full_name="google.logging.v2.ConfigServiceV2.GetBucket", + index=1, + containing_service=None, + input_type=_GETBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateBucket", + full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", + index=2, + containing_service=None, + input_type=_UPDATEBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="ListSinks", + full_name="google.logging.v2.ConfigServiceV2.ListSinks", + index=3, + containing_service=None, + input_type=_LISTSINKSREQUEST, + output_type=_LISTSINKSRESPONSE, + serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetSink", + full_name="google.logging.v2.ConfigServiceV2.GetSink", + index=4, + containing_service=None, + input_type=_GETSINKREQUEST, + output_type=_LOGSINK, + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="CreateSink", + full_name="google.logging.v2.ConfigServiceV2.CreateSink", + index=5, + containing_service=None, + input_type=_CREATESINKREQUEST, + output_type=_LOGSINK, + serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateSink", + full_name="google.logging.v2.ConfigServiceV2.UpdateSink", + index=6, + containing_service=None, + input_type=_UPDATESINKREQUEST, + output_type=_LOGSINK, + serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="DeleteSink", + full_name="google.logging.v2.ConfigServiceV2.DeleteSink", + index=7, + containing_service=None, + input_type=_DELETESINKREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="ListExclusions", + full_name="google.logging.v2.ConfigServiceV2.ListExclusions", + index=8, + containing_service=None, + input_type=_LISTEXCLUSIONSREQUEST, + output_type=_LISTEXCLUSIONSRESPONSE, + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetExclusion", + full_name="google.logging.v2.ConfigServiceV2.GetExclusion", + index=9, + containing_service=None, + input_type=_GETEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="CreateExclusion", + full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", + index=10, + containing_service=None, + input_type=_CREATEEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateExclusion", + full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", + index=11, + containing_service=None, + input_type=_UPDATEEXCLUSIONREQUEST, + output_type=_LOGEXCLUSION, + serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="DeleteExclusion", + full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", + index=12, + containing_service=None, + input_type=_DELETEEXCLUSIONREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetCmekSettings", + full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", + index=13, + containing_service=None, + input_type=_GETCMEKSETTINGSREQUEST, + output_type=_CMEKSETTINGS, + serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateCmekSettings", + full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", + index=14, + containing_service=None, + input_type=_UPDATECMEKSETTINGSREQUEST, + output_type=_CMEKSETTINGS, + serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", + create_key=_descriptor._internal_create_key, + ), + ], +) _sym_db.RegisterServiceDescriptor(_CONFIGSERVICEV2) -DESCRIPTOR.services_by_name['ConfigServiceV2'] = _CONFIGSERVICEV2 +DESCRIPTOR.services_by_name["ConfigServiceV2"] = _CONFIGSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index dba266d85..d3bd11324 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -2,13 +2,14 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2 +from google.cloud.logging_v2.proto import ( + logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2, +) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class ConfigServiceV2Stub(object): - """Service for configuring sinks used to route log entries. - """ + """Service for configuring sinks used to route log entries.""" def __init__(self, channel): """Constructor. @@ -17,99 +18,96 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ListBuckets = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/ListBuckets', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - ) + "/google.logging.v2.ConfigServiceV2/ListBuckets", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + ) self.GetBucket = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/GetBucket', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) + "/google.logging.v2.ConfigServiceV2/GetBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.UpdateBucket = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/UpdateBucket', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) + "/google.logging.v2.ConfigServiceV2/UpdateBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.ListSinks = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/ListSinks', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - ) + "/google.logging.v2.ConfigServiceV2/ListSinks", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, + ) self.GetSink = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/GetSink', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + "/google.logging.v2.ConfigServiceV2/GetSink", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.CreateSink = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/CreateSink', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + "/google.logging.v2.ConfigServiceV2/CreateSink", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.UpdateSink = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/UpdateSink', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - ) + "/google.logging.v2.ConfigServiceV2/UpdateSink", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + ) self.DeleteSink = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/DeleteSink', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + "/google.logging.v2.ConfigServiceV2/DeleteSink", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.ListExclusions = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/ListExclusions', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - ) + "/google.logging.v2.ConfigServiceV2/ListExclusions", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, + ) self.GetExclusion = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/GetExclusion', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + "/google.logging.v2.ConfigServiceV2/GetExclusion", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.CreateExclusion = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/CreateExclusion', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + "/google.logging.v2.ConfigServiceV2/CreateExclusion", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.UpdateExclusion = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/UpdateExclusion', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - ) + "/google.logging.v2.ConfigServiceV2/UpdateExclusion", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + ) self.DeleteExclusion = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/DeleteExclusion', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + "/google.logging.v2.ConfigServiceV2/DeleteExclusion", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.GetCmekSettings = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/GetCmekSettings', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - ) + "/google.logging.v2.ConfigServiceV2/GetCmekSettings", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + ) self.UpdateCmekSettings = channel.unary_unary( - '/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - ) + "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + ) class ConfigServiceV2Servicer(object): - """Service for configuring sinks used to route log entries. - """ + """Service for configuring sinks used to route log entries.""" def ListBuckets(self, request, context): - """Lists buckets (Beta). - """ + """Lists buckets (Beta).""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetBucket(self, request, context): - """Gets a bucket (Beta). - """ + """Gets a bucket (Beta).""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateBucket(self, request, context): """Updates a bucket. This method replaces the following fields in the @@ -125,22 +123,20 @@ def UpdateBucket(self, request, context): This method is in Beta. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ListSinks(self, request, context): - """Lists sinks. - """ + """Lists sinks.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetSink(self, request, context): - """Gets a sink. - """ + """Gets a sink.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def CreateSink(self, request, context): """Creates a sink that exports specified log entries to a destination. The @@ -149,8 +145,8 @@ def CreateSink(self, request, context): export log entries only from the resource owning the sink. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateSink(self, request, context): """Updates a sink. This method replaces the following fields in the existing @@ -160,30 +156,28 @@ def UpdateSink(self, request, context): `unique_writer_identity` field. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def DeleteSink(self, request, context): """Deletes a sink. If the sink has a unique `writer_identity`, then that service account is also deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ListExclusions(self, request, context): - """Lists all the exclusions in a parent resource. - """ + """Lists all the exclusions in a parent resource.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetExclusion(self, request, context): - """Gets the description of an exclusion. - """ + """Gets the description of an exclusion.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def CreateExclusion(self, request, context): """Creates a new exclusion in a specified parent resource. @@ -191,22 +185,20 @@ def CreateExclusion(self, request, context): You can have up to 10 exclusions in a resource. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateExclusion(self, request, context): - """Changes one or more properties of an existing exclusion. - """ + """Changes one or more properties of an existing exclusion.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def DeleteExclusion(self, request, context): - """Deletes an exclusion. - """ + """Deletes an exclusion.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetCmekSettings(self, request, context): """Gets the Logs Router CMEK settings for the given resource. @@ -220,8 +212,8 @@ def GetCmekSettings(self, request, context): for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateCmekSettings(self, request, context): """Updates the Logs Router CMEK settings for the given resource. @@ -241,334 +233,499 @@ def UpdateCmekSettings(self, request, context): for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - 'ListBuckets': grpc.unary_unary_rpc_method_handler( - servicer.ListBuckets, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, - ), - 'GetBucket': grpc.unary_unary_rpc_method_handler( - servicer.GetBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - 'UpdateBucket': grpc.unary_unary_rpc_method_handler( - servicer.UpdateBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - 'ListSinks': grpc.unary_unary_rpc_method_handler( - servicer.ListSinks, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.SerializeToString, - ), - 'GetSink': grpc.unary_unary_rpc_method_handler( - servicer.GetSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - 'CreateSink': grpc.unary_unary_rpc_method_handler( - servicer.CreateSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - 'UpdateSink': grpc.unary_unary_rpc_method_handler( - servicer.UpdateSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, - ), - 'DeleteSink': grpc.unary_unary_rpc_method_handler( - servicer.DeleteSink, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'ListExclusions': grpc.unary_unary_rpc_method_handler( - servicer.ListExclusions, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.SerializeToString, - ), - 'GetExclusion': grpc.unary_unary_rpc_method_handler( - servicer.GetExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - 'CreateExclusion': grpc.unary_unary_rpc_method_handler( - servicer.CreateExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - 'UpdateExclusion': grpc.unary_unary_rpc_method_handler( - servicer.UpdateExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, - ), - 'DeleteExclusion': grpc.unary_unary_rpc_method_handler( - servicer.DeleteExclusion, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'GetCmekSettings': grpc.unary_unary_rpc_method_handler( - servicer.GetCmekSettings, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, - ), - 'UpdateCmekSettings': grpc.unary_unary_rpc_method_handler( - servicer.UpdateCmekSettings, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, - ), + "ListBuckets": grpc.unary_unary_rpc_method_handler( + servicer.ListBuckets, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, + ), + "GetBucket": grpc.unary_unary_rpc_method_handler( + servicer.GetBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + "UpdateBucket": grpc.unary_unary_rpc_method_handler( + servicer.UpdateBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + "ListSinks": grpc.unary_unary_rpc_method_handler( + servicer.ListSinks, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.SerializeToString, + ), + "GetSink": grpc.unary_unary_rpc_method_handler( + servicer.GetSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + "CreateSink": grpc.unary_unary_rpc_method_handler( + servicer.CreateSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + "UpdateSink": grpc.unary_unary_rpc_method_handler( + servicer.UpdateSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.SerializeToString, + ), + "DeleteSink": grpc.unary_unary_rpc_method_handler( + servicer.DeleteSink, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "ListExclusions": grpc.unary_unary_rpc_method_handler( + servicer.ListExclusions, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.SerializeToString, + ), + "GetExclusion": grpc.unary_unary_rpc_method_handler( + servicer.GetExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + "CreateExclusion": grpc.unary_unary_rpc_method_handler( + servicer.CreateExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + "UpdateExclusion": grpc.unary_unary_rpc_method_handler( + servicer.UpdateExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.SerializeToString, + ), + "DeleteExclusion": grpc.unary_unary_rpc_method_handler( + servicer.DeleteExclusion, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "GetCmekSettings": grpc.unary_unary_rpc_method_handler( + servicer.GetCmekSettings, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, + ), + "UpdateCmekSettings": grpc.unary_unary_rpc_method_handler( + servicer.UpdateCmekSettings, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'google.logging.v2.ConfigServiceV2', rpc_method_handlers) + "google.logging.v2.ConfigServiceV2", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class ConfigServiceV2(object): - """Service for configuring sinks used to route log entries. - """ + """Service for configuring sinks used to route log entries.""" @staticmethod - def ListBuckets(request, + def ListBuckets( + 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, - 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.logging.v2.ConfigServiceV2/ListBuckets', + "/google.logging.v2.ConfigServiceV2/ListBuckets", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetBucket(request, + def GetBucket( + 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, - 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.logging.v2.ConfigServiceV2/GetBucket', + "/google.logging.v2.ConfigServiceV2/GetBucket", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateBucket(request, + def UpdateBucket( + 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, - 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.logging.v2.ConfigServiceV2/UpdateBucket', + "/google.logging.v2.ConfigServiceV2/UpdateBucket", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ListSinks(request, + def ListSinks( + 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, - 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.logging.v2.ConfigServiceV2/ListSinks', + "/google.logging.v2.ConfigServiceV2/ListSinks", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetSink(request, + def GetSink( + 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, - 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.logging.v2.ConfigServiceV2/GetSink', + "/google.logging.v2.ConfigServiceV2/GetSink", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def CreateSink(request, + def CreateSink( + 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, - 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.logging.v2.ConfigServiceV2/CreateSink', + "/google.logging.v2.ConfigServiceV2/CreateSink", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateSink(request, + def UpdateSink( + 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, - 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.logging.v2.ConfigServiceV2/UpdateSink', + "/google.logging.v2.ConfigServiceV2/UpdateSink", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def DeleteSink(request, + def DeleteSink( + 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, - 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.logging.v2.ConfigServiceV2/DeleteSink', + "/google.logging.v2.ConfigServiceV2/DeleteSink", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ListExclusions(request, + def ListExclusions( + 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, - 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.logging.v2.ConfigServiceV2/ListExclusions', + "/google.logging.v2.ConfigServiceV2/ListExclusions", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetExclusion(request, + def GetExclusion( + 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, - 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.logging.v2.ConfigServiceV2/GetExclusion', + "/google.logging.v2.ConfigServiceV2/GetExclusion", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def CreateExclusion(request, + def CreateExclusion( + 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, - 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.logging.v2.ConfigServiceV2/CreateExclusion', + "/google.logging.v2.ConfigServiceV2/CreateExclusion", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateExclusion(request, + def UpdateExclusion( + 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, - 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.logging.v2.ConfigServiceV2/UpdateExclusion', + "/google.logging.v2.ConfigServiceV2/UpdateExclusion", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def DeleteExclusion(request, + def DeleteExclusion( + 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, - 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.logging.v2.ConfigServiceV2/DeleteExclusion', + "/google.logging.v2.ConfigServiceV2/DeleteExclusion", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetCmekSettings(request, + def GetCmekSettings( + 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, - 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.logging.v2.ConfigServiceV2/GetCmekSettings', + "/google.logging.v2.ConfigServiceV2/GetCmekSettings", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateCmekSettings(request, + def UpdateCmekSettings( + 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, - 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.logging.v2.ConfigServiceV2/UpdateCmekSettings', + "/google.logging.v2.ConfigServiceV2/UpdateCmekSettings", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index a8f0d0d74..c840bf186 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -6,6 +6,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -24,435 +25,720 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='google/cloud/logging_v2/proto/logging_metrics.proto', - package='google.logging.v2', - syntax='proto3', - serialized_options=b'\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}\"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse\"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"?\x82\xd3\xe4\x93\x02)\"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' - , - dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_distribution__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_metric__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) - + name="google/cloud/logging_v2/proto/logging_metrics.proto", + package="google.logging.v2", + syntax="proto3", + serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + dependencies=[ + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_distribution__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_metric__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) _LOGMETRIC_APIVERSION = _descriptor.EnumDescriptor( - name='ApiVersion', - full_name='google.logging.v2.LogMetric.ApiVersion', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='V2', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='V1', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=922, - serialized_end=950, + name="ApiVersion", + full_name="google.logging.v2.LogMetric.ApiVersion", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="V2", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="V1", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=922, + serialized_end=950, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) _LOGMETRIC_LABELEXTRACTORSENTRY = _descriptor.Descriptor( - name='LabelExtractorsEntry', - full_name='google.logging.v2.LogMetric.LabelExtractorsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='google.logging.v2.LogMetric.LabelExtractorsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='google.logging.v2.LogMetric.LabelExtractorsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=866, - serialized_end=920, + name="LabelExtractorsEntry", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=866, + serialized_end=920, ) _LOGMETRIC = _descriptor.Descriptor( - name='LogMetric', - full_name='google.logging.v2.LogMetric', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='google.logging.v2.LogMetric.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='description', full_name='google.logging.v2.LogMetric.description', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='filter', full_name='google.logging.v2.LogMetric.filter', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='metric_descriptor', full_name='google.logging.v2.LogMetric.metric_descriptor', index=3, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value_extractor', full_name='google.logging.v2.LogMetric.value_extractor', index=4, - number=6, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='label_extractors', full_name='google.logging.v2.LogMetric.label_extractors', index=5, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bucket_options', full_name='google.logging.v2.LogMetric.bucket_options', index=6, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='create_time', full_name='google.logging.v2.LogMetric.create_time', index=7, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='update_time', full_name='google.logging.v2.LogMetric.update_time', index=8, - number=10, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='version', full_name='google.logging.v2.LogMetric.version', index=9, - number=4, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_LOGMETRIC_LABELEXTRACTORSENTRY, ], - enum_types=[ - _LOGMETRIC_APIVERSION, - ], - serialized_options=b'\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=374, - serialized_end=1026, + name="LogMetric", + full_name="google.logging.v2.LogMetric", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogMetric.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogMetric.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogMetric.filter", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="metric_descriptor", + full_name="google.logging.v2.LogMetric.metric_descriptor", + index=3, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value_extractor", + full_name="google.logging.v2.LogMetric.value_extractor", + index=4, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="label_extractors", + full_name="google.logging.v2.LogMetric.label_extractors", + index=5, + number=7, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="bucket_options", + full_name="google.logging.v2.LogMetric.bucket_options", + index=6, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogMetric.create_time", + index=7, + number=9, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogMetric.update_time", + index=8, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="version", + full_name="google.logging.v2.LogMetric.version", + index=9, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\030\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _LOGMETRIC_LABELEXTRACTORSENTRY, + ], + enum_types=[ + _LOGMETRIC_APIVERSION, + ], + serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=374, + serialized_end=1026, ) _LISTLOGMETRICSREQUEST = _descriptor.Descriptor( - name='ListLogMetricsRequest', - full_name='google.logging.v2.ListLogMetricsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.ListLogMetricsRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListLogMetricsRequest.page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListLogMetricsRequest.page_size', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1029, - serialized_end=1170, + name="ListLogMetricsRequest", + full_name="google.logging.v2.ListLogMetricsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListLogMetricsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogMetricsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogMetricsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1029, + serialized_end=1170, ) _LISTLOGMETRICSRESPONSE = _descriptor.Descriptor( - name='ListLogMetricsResponse', - full_name='google.logging.v2.ListLogMetricsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='metrics', full_name='google.logging.v2.ListLogMetricsResponse.metrics', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListLogMetricsResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1172, - serialized_end=1268, + name="ListLogMetricsResponse", + full_name="google.logging.v2.ListLogMetricsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="metrics", + full_name="google.logging.v2.ListLogMetricsResponse.metrics", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogMetricsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1172, + serialized_end=1268, ) _GETLOGMETRICREQUEST = _descriptor.Descriptor( - name='GetLogMetricRequest', - full_name='google.logging.v2.GetLogMetricRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='metric_name', full_name='google.logging.v2.GetLogMetricRequest.metric_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1270, - serialized_end=1354, + name="GetLogMetricRequest", + full_name="google.logging.v2.GetLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.GetLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1270, + serialized_end=1354, ) _CREATELOGMETRICREQUEST = _descriptor.Descriptor( - name='CreateLogMetricRequest', - full_name='google.logging.v2.CreateLogMetricRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.CreateLogMetricRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\022 logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='metric', full_name='google.logging.v2.CreateLogMetricRequest.metric', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1357, - serialized_end=1490, + name="CreateLogMetricRequest", + full_name="google.logging.v2.CreateLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateLogMetricRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="metric", + full_name="google.logging.v2.CreateLogMetricRequest.metric", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1357, + serialized_end=1490, ) _UPDATELOGMETRICREQUEST = _descriptor.Descriptor( - name='UpdateLogMetricRequest', - full_name='google.logging.v2.UpdateLogMetricRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='metric_name', full_name='google.logging.v2.UpdateLogMetricRequest.metric_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='metric', full_name='google.logging.v2.UpdateLogMetricRequest.metric', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1493, - serialized_end=1631, + name="UpdateLogMetricRequest", + full_name="google.logging.v2.UpdateLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.UpdateLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="metric", + full_name="google.logging.v2.UpdateLogMetricRequest.metric", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1493, + serialized_end=1631, ) _DELETELOGMETRICREQUEST = _descriptor.Descriptor( - name='DeleteLogMetricRequest', - full_name='google.logging.v2.DeleteLogMetricRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='metric_name', full_name='google.logging.v2.DeleteLogMetricRequest.metric_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1633, - serialized_end=1720, + name="DeleteLogMetricRequest", + full_name="google.logging.v2.DeleteLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.DeleteLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1633, + serialized_end=1720, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC -_LOGMETRIC.fields_by_name['metric_descriptor'].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR -_LOGMETRIC.fields_by_name['label_extractors'].message_type = _LOGMETRIC_LABELEXTRACTORSENTRY -_LOGMETRIC.fields_by_name['bucket_options'].message_type = google_dot_api_dot_distribution__pb2._DISTRIBUTION_BUCKETOPTIONS -_LOGMETRIC.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGMETRIC.fields_by_name['update_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGMETRIC.fields_by_name['version'].enum_type = _LOGMETRIC_APIVERSION +_LOGMETRIC.fields_by_name[ + "metric_descriptor" +].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR +_LOGMETRIC.fields_by_name[ + "label_extractors" +].message_type = _LOGMETRIC_LABELEXTRACTORSENTRY +_LOGMETRIC.fields_by_name[ + "bucket_options" +].message_type = google_dot_api_dot_distribution__pb2._DISTRIBUTION_BUCKETOPTIONS +_LOGMETRIC.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name["version"].enum_type = _LOGMETRIC_APIVERSION _LOGMETRIC_APIVERSION.containing_type = _LOGMETRIC -_LISTLOGMETRICSRESPONSE.fields_by_name['metrics'].message_type = _LOGMETRIC -_CREATELOGMETRICREQUEST.fields_by_name['metric'].message_type = _LOGMETRIC -_UPDATELOGMETRICREQUEST.fields_by_name['metric'].message_type = _LOGMETRIC -DESCRIPTOR.message_types_by_name['LogMetric'] = _LOGMETRIC -DESCRIPTOR.message_types_by_name['ListLogMetricsRequest'] = _LISTLOGMETRICSREQUEST -DESCRIPTOR.message_types_by_name['ListLogMetricsResponse'] = _LISTLOGMETRICSRESPONSE -DESCRIPTOR.message_types_by_name['GetLogMetricRequest'] = _GETLOGMETRICREQUEST -DESCRIPTOR.message_types_by_name['CreateLogMetricRequest'] = _CREATELOGMETRICREQUEST -DESCRIPTOR.message_types_by_name['UpdateLogMetricRequest'] = _UPDATELOGMETRICREQUEST -DESCRIPTOR.message_types_by_name['DeleteLogMetricRequest'] = _DELETELOGMETRICREQUEST +_LISTLOGMETRICSRESPONSE.fields_by_name["metrics"].message_type = _LOGMETRIC +_CREATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC +_UPDATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC +DESCRIPTOR.message_types_by_name["LogMetric"] = _LOGMETRIC +DESCRIPTOR.message_types_by_name["ListLogMetricsRequest"] = _LISTLOGMETRICSREQUEST +DESCRIPTOR.message_types_by_name["ListLogMetricsResponse"] = _LISTLOGMETRICSRESPONSE +DESCRIPTOR.message_types_by_name["GetLogMetricRequest"] = _GETLOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["CreateLogMetricRequest"] = _CREATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["UpdateLogMetricRequest"] = _UPDATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["DeleteLogMetricRequest"] = _DELETELOGMETRICREQUEST _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogMetric = _reflection.GeneratedProtocolMessageType('LogMetric', (_message.Message,), { - - 'LabelExtractorsEntry' : _reflection.GeneratedProtocolMessageType('LabelExtractorsEntry', (_message.Message,), { - 'DESCRIPTOR' : _LOGMETRIC_LABELEXTRACTORSENTRY, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - }) - , - 'DESCRIPTOR' : _LOGMETRIC, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """Describes a logs-based metric. The value of the metric is the number +LogMetric = _reflection.GeneratedProtocolMessageType( + "LogMetric", + (_message.Message,), + { + "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( + "LabelExtractorsEntry", + (_message.Message,), + { + "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) + }, + ), + "DESCRIPTOR": _LOGMETRIC, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval. Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the @@ -552,16 +838,19 @@ metric. The v2 format is used by default and cannot be changed. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) + }, +) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) -ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType('ListLogMetricsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGMETRICSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """The parameters to ListLogMetrics. +ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( + "ListLogMetricsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGMETRICSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to ListLogMetrics. Attributes: parent: @@ -579,15 +868,18 @@ ``nextPageToken`` in the response indicates that more results might be available. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) + }, +) _sym_db.RegisterMessage(ListLogMetricsRequest) -ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType('ListLogMetricsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGMETRICSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """Result returned from ListLogMetrics. +ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( + "ListLogMetricsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Result returned from ListLogMetrics. Attributes: metrics: @@ -598,30 +890,36 @@ results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) + }, +) _sym_db.RegisterMessage(ListLogMetricsResponse) -GetLogMetricRequest = _reflection.GeneratedProtocolMessageType('GetLogMetricRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETLOGMETRICREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """The parameters to GetLogMetric. +GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( + "GetLogMetricRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETLOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to GetLogMetric. Attributes: metric_name: Required. The resource name of the desired metric: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) + }, +) _sym_db.RegisterMessage(GetLogMetricRequest) -CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType('CreateLogMetricRequest', (_message.Message,), { - 'DESCRIPTOR' : _CREATELOGMETRICREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """The parameters to CreateLogMetric. +CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( + "CreateLogMetricRequest", + (_message.Message,), + { + "DESCRIPTOR": _CREATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to CreateLogMetric. Attributes: parent: @@ -632,15 +930,18 @@ Required. The new logs-based metric, which must not have an identifier that already exists. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) + }, +) _sym_db.RegisterMessage(CreateLogMetricRequest) -UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType('UpdateLogMetricRequest', (_message.Message,), { - 'DESCRIPTOR' : _UPDATELOGMETRICREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """The parameters to UpdateLogMetric. +UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( + "UpdateLogMetricRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to UpdateLogMetric. Attributes: metric_name: @@ -652,112 +953,117 @@ metric: Required. The updated metric. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) + }, +) _sym_db.RegisterMessage(UpdateLogMetricRequest) -DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType('DeleteLogMetricRequest', (_message.Message,), { - 'DESCRIPTOR' : _DELETELOGMETRICREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_metrics_pb2' - , - '__doc__': """The parameters to DeleteLogMetric. +DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( + "DeleteLogMetricRequest", + (_message.Message,), + { + "DESCRIPTOR": _DELETELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to DeleteLogMetric. Attributes: metric_name: Required. The resource name of the metric to delete: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) + }, +) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None -_LOGMETRIC.fields_by_name['name']._options = None -_LOGMETRIC.fields_by_name['description']._options = None -_LOGMETRIC.fields_by_name['filter']._options = None -_LOGMETRIC.fields_by_name['metric_descriptor']._options = None -_LOGMETRIC.fields_by_name['value_extractor']._options = None -_LOGMETRIC.fields_by_name['label_extractors']._options = None -_LOGMETRIC.fields_by_name['bucket_options']._options = None -_LOGMETRIC.fields_by_name['create_time']._options = None -_LOGMETRIC.fields_by_name['update_time']._options = None -_LOGMETRIC.fields_by_name['version']._options = None +_LOGMETRIC.fields_by_name["name"]._options = None +_LOGMETRIC.fields_by_name["description"]._options = None +_LOGMETRIC.fields_by_name["filter"]._options = None +_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None +_LOGMETRIC.fields_by_name["value_extractor"]._options = None +_LOGMETRIC.fields_by_name["label_extractors"]._options = None +_LOGMETRIC.fields_by_name["bucket_options"]._options = None +_LOGMETRIC.fields_by_name["create_time"]._options = None +_LOGMETRIC.fields_by_name["update_time"]._options = None +_LOGMETRIC.fields_by_name["version"]._options = None _LOGMETRIC._options = None -_LISTLOGMETRICSREQUEST.fields_by_name['parent']._options = None -_LISTLOGMETRICSREQUEST.fields_by_name['page_token']._options = None -_LISTLOGMETRICSREQUEST.fields_by_name['page_size']._options = None -_GETLOGMETRICREQUEST.fields_by_name['metric_name']._options = None -_CREATELOGMETRICREQUEST.fields_by_name['parent']._options = None -_CREATELOGMETRICREQUEST.fields_by_name['metric']._options = None -_UPDATELOGMETRICREQUEST.fields_by_name['metric_name']._options = None -_UPDATELOGMETRICREQUEST.fields_by_name['metric']._options = None -_DELETELOGMETRICREQUEST.fields_by_name['metric_name']._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None +_GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None +_CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None +_CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None +_UPDATELOGMETRICREQUEST.fields_by_name["metric_name"]._options = None +_UPDATELOGMETRICREQUEST.fields_by_name["metric"]._options = None +_DELETELOGMETRICREQUEST.fields_by_name["metric_name"]._options = None _METRICSSERVICEV2 = _descriptor.ServiceDescriptor( - name='MetricsServiceV2', - full_name='google.logging.v2.MetricsServiceV2', - file=DESCRIPTOR, - index=0, - serialized_options=b'\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write', - create_key=_descriptor._internal_create_key, - serialized_start=1723, - serialized_end=2793, - methods=[ - _descriptor.MethodDescriptor( - name='ListLogMetrics', - full_name='google.logging.v2.MetricsServiceV2.ListLogMetrics', + name="MetricsServiceV2", + full_name="google.logging.v2.MetricsServiceV2", + file=DESCRIPTOR, index=0, - containing_service=None, - input_type=_LISTLOGMETRICSREQUEST, - output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=b'\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetLogMetric', - full_name='google.logging.v2.MetricsServiceV2.GetLogMetric', - index=1, - containing_service=None, - input_type=_GETLOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='CreateLogMetric', - full_name='google.logging.v2.MetricsServiceV2.CreateLogMetric', - index=2, - containing_service=None, - input_type=_CREATELOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\002)\"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='UpdateLogMetric', - full_name='google.logging.v2.MetricsServiceV2.UpdateLogMetric', - index=3, - containing_service=None, - input_type=_UPDATELOGMETRICREQUEST, - output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='DeleteLogMetric', - full_name='google.logging.v2.MetricsServiceV2.DeleteLogMetric', - index=4, - containing_service=None, - input_type=_DELETELOGMETRICREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b'\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name', - create_key=_descriptor._internal_create_key, - ), -]) + serialized_start=1723, + serialized_end=2793, + methods=[ + _descriptor.MethodDescriptor( + name="ListLogMetrics", + full_name="google.logging.v2.MetricsServiceV2.ListLogMetrics", + index=0, + containing_service=None, + input_type=_LISTLOGMETRICSREQUEST, + output_type=_LISTLOGMETRICSRESPONSE, + serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetLogMetric", + full_name="google.logging.v2.MetricsServiceV2.GetLogMetric", + index=1, + containing_service=None, + input_type=_GETLOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="CreateLogMetric", + full_name="google.logging.v2.MetricsServiceV2.CreateLogMetric", + index=2, + containing_service=None, + input_type=_CREATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateLogMetric", + full_name="google.logging.v2.MetricsServiceV2.UpdateLogMetric", + index=3, + containing_service=None, + input_type=_UPDATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="DeleteLogMetric", + full_name="google.logging.v2.MetricsServiceV2.DeleteLogMetric", + index=4, + containing_service=None, + input_type=_DELETELOGMETRICREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, + ), + ], +) _sym_db.RegisterServiceDescriptor(_METRICSSERVICEV2) -DESCRIPTOR.services_by_name['MetricsServiceV2'] = _METRICSSERVICEV2 +DESCRIPTOR.services_by_name["MetricsServiceV2"] = _METRICSSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index bfe55431d..c97379c14 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -2,13 +2,14 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import logging_metrics_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2 +from google.cloud.logging_v2.proto import ( + logging_metrics_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2, +) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class MetricsServiceV2Stub(object): - """Service for configuring logs-based metrics. - """ + """Service for configuring logs-based metrics.""" def __init__(self, channel): """Constructor. @@ -17,186 +18,235 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( - '/google.logging.v2.MetricsServiceV2/ListLogMetrics', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - ) + "/google.logging.v2.MetricsServiceV2/ListLogMetrics", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, + ) self.GetLogMetric = channel.unary_unary( - '/google.logging.v2.MetricsServiceV2/GetLogMetric', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + "/google.logging.v2.MetricsServiceV2/GetLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.CreateLogMetric = channel.unary_unary( - '/google.logging.v2.MetricsServiceV2/CreateLogMetric', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + "/google.logging.v2.MetricsServiceV2/CreateLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.UpdateLogMetric = channel.unary_unary( - '/google.logging.v2.MetricsServiceV2/UpdateLogMetric', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - ) + "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) self.DeleteLogMetric = channel.unary_unary( - '/google.logging.v2.MetricsServiceV2/DeleteLogMetric', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) class MetricsServiceV2Servicer(object): - """Service for configuring logs-based metrics. - """ + """Service for configuring logs-based metrics.""" def ListLogMetrics(self, request, context): - """Lists logs-based metrics. - """ + """Lists logs-based metrics.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetLogMetric(self, request, context): - """Gets a logs-based metric. - """ + """Gets a logs-based metric.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def CreateLogMetric(self, request, context): - """Creates a logs-based metric. - """ + """Creates a logs-based metric.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateLogMetric(self, request, context): - """Creates or updates a logs-based metric. - """ + """Creates or updates a logs-based metric.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def DeleteLogMetric(self, request, context): - """Deletes a logs-based metric. - """ + """Deletes a logs-based metric.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_MetricsServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - 'ListLogMetrics': grpc.unary_unary_rpc_method_handler( - servicer.ListLogMetrics, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString, - ), - 'GetLogMetric': grpc.unary_unary_rpc_method_handler( - servicer.GetLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - 'CreateLogMetric': grpc.unary_unary_rpc_method_handler( - servicer.CreateLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - 'UpdateLogMetric': grpc.unary_unary_rpc_method_handler( - servicer.UpdateLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, - ), - 'DeleteLogMetric': grpc.unary_unary_rpc_method_handler( - servicer.DeleteLogMetric, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), + "ListLogMetrics": grpc.unary_unary_rpc_method_handler( + servicer.ListLogMetrics, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString, + ), + "GetLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.GetLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "CreateLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.CreateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "UpdateLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.UpdateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "DeleteLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.DeleteLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'google.logging.v2.MetricsServiceV2', rpc_method_handlers) + "google.logging.v2.MetricsServiceV2", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class MetricsServiceV2(object): - """Service for configuring logs-based metrics. - """ + """Service for configuring logs-based metrics.""" @staticmethod - def ListLogMetrics(request, + def ListLogMetrics( + 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, - 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.logging.v2.MetricsServiceV2/ListLogMetrics', + "/google.logging.v2.MetricsServiceV2/ListLogMetrics", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def GetLogMetric(request, + def GetLogMetric( + 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, - 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.logging.v2.MetricsServiceV2/GetLogMetric', + "/google.logging.v2.MetricsServiceV2/GetLogMetric", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def CreateLogMetric(request, + def CreateLogMetric( + 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, - 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.logging.v2.MetricsServiceV2/CreateLogMetric', + "/google.logging.v2.MetricsServiceV2/CreateLogMetric", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def UpdateLogMetric(request, + def UpdateLogMetric( + 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, - 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.logging.v2.MetricsServiceV2/UpdateLogMetric', + "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def DeleteLogMetric(request, + def DeleteLogMetric( + 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, - 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.logging.v2.MetricsServiceV2/DeleteLogMetric', + "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 67739c54d..a8a2100af 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -6,6 +6,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,10 +14,16 @@ 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 monitored_resource_pb2 as google_dot_api_dot_monitored__resource__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.cloud.logging_v2.proto import log_entry_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2 -from google.cloud.logging_v2.proto import logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2 +from google.cloud.logging_v2.proto import ( + log_entry_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2, +) +from google.cloud.logging_v2.proto import ( + logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2, +) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 @@ -26,537 +33,881 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='google/cloud/logging_v2/proto/logging.proto', - package='google.logging.v2', - syntax='proto3', - serialized_options=b'\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto\"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB\"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x19\n\x17WriteLogEntriesResponse\"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01\"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty\"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse\"?\x82\xd3\xe4\x93\x02\x16\"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse\"<\x82\xd3\xe4\x93\x02\x15\"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse\"(\x82\xd3\xe4\x93\x02\"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12\".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse\"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3' - , - dependencies=[google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2.DESCRIPTOR,google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) - - + name="google/cloud/logging_v2/proto/logging.proto", + package="google.logging.v2", + syntax="proto3", + serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + dependencies=[ + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2.DESCRIPTOR, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) _DELETELOGREQUEST = _descriptor.Descriptor( - name='DeleteLogRequest', - full_name='google.logging.v2.DeleteLogRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='log_name', full_name='google.logging.v2.DeleteLogRequest.log_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\034\n\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=470, - serialized_end=542, + name="DeleteLogRequest", + full_name="google.logging.v2.DeleteLogRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.DeleteLogRequest.log_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=470, + serialized_end=542, ) _WRITELOGENTRIESREQUEST_LABELSENTRY = _descriptor.Descriptor( - name='LabelsEntry', - full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='google.logging.v2.WriteLogEntriesRequest.LabelsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=858, - serialized_end=903, + name="LabelsEntry", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=858, + serialized_end=903, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( - name='WriteLogEntriesRequest', - full_name='google.logging.v2.WriteLogEntriesRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='log_name', full_name='google.logging.v2.WriteLogEntriesRequest.log_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001\372A\034\n\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='resource', full_name='google.logging.v2.WriteLogEntriesRequest.resource', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='labels', full_name='google.logging.v2.WriteLogEntriesRequest.labels', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='entries', full_name='google.logging.v2.WriteLogEntriesRequest.entries', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='partial_success', full_name='google.logging.v2.WriteLogEntriesRequest.partial_success', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='dry_run', full_name='google.logging.v2.WriteLogEntriesRequest.dry_run', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_WRITELOGENTRIESREQUEST_LABELSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=545, - serialized_end=903, + name="WriteLogEntriesRequest", + full_name="google.logging.v2.WriteLogEntriesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.WriteLogEntriesRequest.log_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="google.logging.v2.WriteLogEntriesRequest.resource", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="labels", + full_name="google.logging.v2.WriteLogEntriesRequest.labels", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="entries", + full_name="google.logging.v2.WriteLogEntriesRequest.entries", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="partial_success", + full_name="google.logging.v2.WriteLogEntriesRequest.partial_success", + index=4, + number=5, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="dry_run", + full_name="google.logging.v2.WriteLogEntriesRequest.dry_run", + index=5, + number=6, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _WRITELOGENTRIESREQUEST_LABELSENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=545, + serialized_end=903, ) _WRITELOGENTRIESRESPONSE = _descriptor.Descriptor( - name='WriteLogEntriesResponse', - full_name='google.logging.v2.WriteLogEntriesResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=905, - serialized_end=930, + name="WriteLogEntriesResponse", + full_name="google.logging.v2.WriteLogEntriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=905, + serialized_end=930, ) _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY = _descriptor.Descriptor( - name='LogEntryErrorsEntry', - full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.key', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=b'8\001', - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1060, - serialized_end=1133, + name="LogEntryErrorsEntry", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.key", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1060, + serialized_end=1133, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( - name='WriteLogEntriesPartialErrors', - full_name='google.logging.v2.WriteLogEntriesPartialErrors', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='log_entry_errors', full_name='google.logging.v2.WriteLogEntriesPartialErrors.log_entry_errors', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=933, - serialized_end=1133, + name="WriteLogEntriesPartialErrors", + full_name="google.logging.v2.WriteLogEntriesPartialErrors", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="log_entry_errors", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.log_entry_errors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=933, + serialized_end=1133, ) _LISTLOGENTRIESREQUEST = _descriptor.Descriptor( - name='ListLogEntriesRequest', - full_name='google.logging.v2.ListLogEntriesRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='resource_names', full_name='google.logging.v2.ListLogEntriesRequest.resource_names', index=0, - number=8, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\034\022\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='filter', full_name='google.logging.v2.ListLogEntriesRequest.filter', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='order_by', full_name='google.logging.v2.ListLogEntriesRequest.order_by', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListLogEntriesRequest.page_size', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListLogEntriesRequest.page_token', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1136, - serialized_end=1312, + name="ListLogEntriesRequest", + full_name="google.logging.v2.ListLogEntriesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="resource_names", + full_name="google.logging.v2.ListLogEntriesRequest.resource_names", + index=0, + number=8, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.ListLogEntriesRequest.filter", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="order_by", + full_name="google.logging.v2.ListLogEntriesRequest.order_by", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogEntriesRequest.page_size", + index=3, + number=4, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogEntriesRequest.page_token", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1136, + serialized_end=1312, ) _LISTLOGENTRIESRESPONSE = _descriptor.Descriptor( - name='ListLogEntriesResponse', - full_name='google.logging.v2.ListLogEntriesResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='entries', full_name='google.logging.v2.ListLogEntriesResponse.entries', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListLogEntriesResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1314, - serialized_end=1409, + name="ListLogEntriesResponse", + full_name="google.logging.v2.ListLogEntriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="entries", + full_name="google.logging.v2.ListLogEntriesResponse.entries", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogEntriesResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1314, + serialized_end=1409, ) _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST = _descriptor.Descriptor( - name='ListMonitoredResourceDescriptorsRequest', - full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_size', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1411, - serialized_end=1501, + name="ListMonitoredResourceDescriptorsRequest", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_size", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1411, + serialized_end=1501, ) _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE = _descriptor.Descriptor( - name='ListMonitoredResourceDescriptorsResponse', - full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='resource_descriptors', full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse.resource_descriptors', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListMonitoredResourceDescriptorsResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1504, - serialized_end=1642, + name="ListMonitoredResourceDescriptorsResponse", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="resource_descriptors", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.resource_descriptors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1504, + serialized_end=1642, ) _LISTLOGSREQUEST = _descriptor.Descriptor( - name='ListLogsRequest', - full_name='google.logging.v2.ListLogsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='parent', full_name='google.logging.v2.ListLogsRequest.parent', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A\034\022\032logging.googleapis.com/Log', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_size', full_name='google.logging.v2.ListLogsRequest.page_size', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='page_token', full_name='google.logging.v2.ListLogsRequest.page_token', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=b'\340A\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1644, - serialized_end=1762, + name="ListLogsRequest", + full_name="google.logging.v2.ListLogsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListLogsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogsRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogsRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1644, + serialized_end=1762, ) _LISTLOGSRESPONSE = _descriptor.Descriptor( - name='ListLogsResponse', - full_name='google.logging.v2.ListLogsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='log_names', full_name='google.logging.v2.ListLogsResponse.log_names', index=0, - number=3, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='next_page_token', full_name='google.logging.v2.ListLogsResponse.next_page_token', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1764, - serialized_end=1826, + name="ListLogsResponse", + full_name="google.logging.v2.ListLogsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="log_names", + full_name="google.logging.v2.ListLogsResponse.log_names", + index=0, + number=3, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1764, + serialized_end=1826, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST -_WRITELOGENTRIESREQUEST.fields_by_name['resource'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE -_WRITELOGENTRIESREQUEST.fields_by_name['labels'].message_type = _WRITELOGENTRIESREQUEST_LABELSENTRY -_WRITELOGENTRIESREQUEST.fields_by_name['entries'].message_type = google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY -_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.fields_by_name['value'].message_type = google_dot_rpc_dot_status__pb2._STATUS -_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.containing_type = _WRITELOGENTRIESPARTIALERRORS -_WRITELOGENTRIESPARTIALERRORS.fields_by_name['log_entry_errors'].message_type = _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY -_LISTLOGENTRIESRESPONSE.fields_by_name['entries'].message_type = google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY -_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name['resource_descriptors'].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR -DESCRIPTOR.message_types_by_name['DeleteLogRequest'] = _DELETELOGREQUEST -DESCRIPTOR.message_types_by_name['WriteLogEntriesRequest'] = _WRITELOGENTRIESREQUEST -DESCRIPTOR.message_types_by_name['WriteLogEntriesResponse'] = _WRITELOGENTRIESRESPONSE -DESCRIPTOR.message_types_by_name['WriteLogEntriesPartialErrors'] = _WRITELOGENTRIESPARTIALERRORS -DESCRIPTOR.message_types_by_name['ListLogEntriesRequest'] = _LISTLOGENTRIESREQUEST -DESCRIPTOR.message_types_by_name['ListLogEntriesResponse'] = _LISTLOGENTRIESRESPONSE -DESCRIPTOR.message_types_by_name['ListMonitoredResourceDescriptorsRequest'] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST -DESCRIPTOR.message_types_by_name['ListMonitoredResourceDescriptorsResponse'] = _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE -DESCRIPTOR.message_types_by_name['ListLogsRequest'] = _LISTLOGSREQUEST -DESCRIPTOR.message_types_by_name['ListLogsResponse'] = _LISTLOGSRESPONSE +_WRITELOGENTRIESREQUEST.fields_by_name[ + "resource" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_WRITELOGENTRIESREQUEST.fields_by_name[ + "labels" +].message_type = _WRITELOGENTRIESREQUEST_LABELSENTRY +_WRITELOGENTRIESREQUEST.fields_by_name[ + "entries" +].message_type = ( + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +) +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.fields_by_name[ + "value" +].message_type = google_dot_rpc_dot_status__pb2._STATUS +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.containing_type = ( + _WRITELOGENTRIESPARTIALERRORS +) +_WRITELOGENTRIESPARTIALERRORS.fields_by_name[ + "log_entry_errors" +].message_type = _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY +_LISTLOGENTRIESRESPONSE.fields_by_name[ + "entries" +].message_type = ( + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +) +_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name[ + "resource_descriptors" +].message_type = ( + google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR +) +DESCRIPTOR.message_types_by_name["DeleteLogRequest"] = _DELETELOGREQUEST +DESCRIPTOR.message_types_by_name["WriteLogEntriesRequest"] = _WRITELOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name["WriteLogEntriesResponse"] = _WRITELOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name[ + "WriteLogEntriesPartialErrors" +] = _WRITELOGENTRIESPARTIALERRORS +DESCRIPTOR.message_types_by_name["ListLogEntriesRequest"] = _LISTLOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name["ListLogEntriesResponse"] = _LISTLOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name[ + "ListMonitoredResourceDescriptorsRequest" +] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST +DESCRIPTOR.message_types_by_name[ + "ListMonitoredResourceDescriptorsResponse" +] = _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE +DESCRIPTOR.message_types_by_name["ListLogsRequest"] = _LISTLOGSREQUEST +DESCRIPTOR.message_types_by_name["ListLogsResponse"] = _LISTLOGSRESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -DeleteLogRequest = _reflection.GeneratedProtocolMessageType('DeleteLogRequest', (_message.Message,), { - 'DESCRIPTOR' : _DELETELOGREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """The parameters to DeleteLog. +DeleteLogRequest = _reflection.GeneratedProtocolMessageType( + "DeleteLogRequest", + (_message.Message,), + { + "DESCRIPTOR": _DELETELOGREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to DeleteLog. Attributes: log_name: @@ -570,22 +921,27 @@ rcemanager.googleapis.com%2Factivity"``. For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) + }, +) _sym_db.RegisterMessage(DeleteLogRequest) -WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType('WriteLogEntriesRequest', (_message.Message,), { - - 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { - 'DESCRIPTOR' : _WRITELOGENTRIESREQUEST_LABELSENTRY, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - }) - , - 'DESCRIPTOR' : _WRITELOGENTRIESREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """The parameters to WriteLogEntries. +WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesRequest", + (_message.Message,), + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) + }, + ), + "DESCRIPTOR": _WRITELOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to WriteLogEntries. Attributes: log_name: @@ -654,32 +1010,40 @@ checking whether the logging API endpoints are working properly before sending valuable data. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) + }, +) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) -WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType('WriteLogEntriesResponse', (_message.Message,), { - 'DESCRIPTOR' : _WRITELOGENTRIESRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """Result returned from WriteLogEntries.""", - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - }) +WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesResponse", + (_message.Message,), + { + "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from WriteLogEntries.""", + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) + }, +) _sym_db.RegisterMessage(WriteLogEntriesResponse) -WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType('WriteLogEntriesPartialErrors', (_message.Message,), { - - 'LogEntryErrorsEntry' : _reflection.GeneratedProtocolMessageType('LogEntryErrorsEntry', (_message.Message,), { - 'DESCRIPTOR' : _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - }) - , - 'DESCRIPTOR' : _WRITELOGENTRIESPARTIALERRORS, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """Error details for WriteLogEntries with partial success. +WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesPartialErrors", + (_message.Message,), + { + "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( + "LogEntryErrorsEntry", + (_message.Message,), + { + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) + }, + ), + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Error details for WriteLogEntries with partial success. Attributes: log_entry_errors: @@ -689,16 +1053,19 @@ ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) + }, +) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) -ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType('ListLogEntriesRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGENTRIESREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """The parameters to ``ListLogEntries``. +ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( + "ListLogEntriesRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ``ListLogEntries``. Attributes: resource_names: @@ -740,15 +1107,18 @@ The values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) + }, +) _sym_db.RegisterMessage(ListLogEntriesRequest) -ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType('ListLogEntriesResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGENTRIESRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """Result returned from ``ListLogEntries``. +ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( + "ListLogEntriesResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ``ListLogEntries``. Attributes: entries: @@ -769,15 +1139,18 @@ name or resource type, or to narrow the time range of the search. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) + }, +) _sym_db.RegisterMessage(ListLogEntriesResponse) -ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType('ListMonitoredResourceDescriptorsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """The parameters to ListMonitoredResourceDescriptors +ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( + "ListMonitoredResourceDescriptorsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListMonitoredResourceDescriptors Attributes: page_size: @@ -792,15 +1165,18 @@ values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) + }, +) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) -ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType('ListMonitoredResourceDescriptorsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """Result returned from ListMonitoredResourceDescriptors. +ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( + "ListMonitoredResourceDescriptorsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListMonitoredResourceDescriptors. Attributes: resource_descriptors: @@ -811,15 +1187,18 @@ set of results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) + }, +) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) -ListLogsRequest = _reflection.GeneratedProtocolMessageType('ListLogsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGSREQUEST, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """The parameters to ListLogs. +ListLogsRequest = _reflection.GeneratedProtocolMessageType( + "ListLogsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListLogs. Attributes: parent: @@ -839,15 +1218,18 @@ values of other method parameters should be identical to those in the previous call. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) + }, +) _sym_db.RegisterMessage(ListLogsRequest) -ListLogsResponse = _reflection.GeneratedProtocolMessageType('ListLogsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LISTLOGSRESPONSE, - '__module__' : 'google.cloud.logging_v2.proto.logging_pb2' - , - '__doc__': """Result returned from ListLogs. +ListLogsResponse = _reflection.GeneratedProtocolMessageType( + "ListLogsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTLOGSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListLogs. Attributes: log_names: @@ -860,95 +1242,97 @@ set of results, call this method again using the value of ``nextPageToken`` as ``pageToken``. """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - }) + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) + }, +) _sym_db.RegisterMessage(ListLogsResponse) DESCRIPTOR._options = None -_DELETELOGREQUEST.fields_by_name['log_name']._options = None +_DELETELOGREQUEST.fields_by_name["log_name"]._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['log_name']._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['resource']._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['labels']._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['entries']._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['partial_success']._options = None -_WRITELOGENTRIESREQUEST.fields_by_name['dry_run']._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None -_LISTLOGENTRIESREQUEST.fields_by_name['resource_names']._options = None -_LISTLOGENTRIESREQUEST.fields_by_name['filter']._options = None -_LISTLOGENTRIESREQUEST.fields_by_name['order_by']._options = None -_LISTLOGENTRIESREQUEST.fields_by_name['page_size']._options = None -_LISTLOGENTRIESREQUEST.fields_by_name['page_token']._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name['page_size']._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name['page_token']._options = None -_LISTLOGSREQUEST.fields_by_name['parent']._options = None -_LISTLOGSREQUEST.fields_by_name['page_size']._options = None -_LISTLOGSREQUEST.fields_by_name['page_token']._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None +_LISTLOGSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( - name='LoggingServiceV2', - full_name='google.logging.v2.LoggingServiceV2', - file=DESCRIPTOR, - index=0, - serialized_options=b'\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write', - create_key=_descriptor._internal_create_key, - serialized_start=1829, - serialized_end=3202, - methods=[ - _descriptor.MethodDescriptor( - name='DeleteLog', - full_name='google.logging.v2.LoggingServiceV2.DeleteLog', + name="LoggingServiceV2", + full_name="google.logging.v2.LoggingServiceV2", + file=DESCRIPTOR, index=0, - containing_service=None, - input_type=_DELETELOGREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b'\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='WriteLogEntries', - full_name='google.logging.v2.LoggingServiceV2.WriteLogEntries', - index=1, - containing_service=None, - input_type=_WRITELOGENTRIESREQUEST, - output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\026\"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListLogEntries', - full_name='google.logging.v2.LoggingServiceV2.ListLogEntries', - index=2, - containing_service=None, - input_type=_LISTLOGENTRIESREQUEST, - output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\025\"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListMonitoredResourceDescriptors', - full_name='google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors', - index=3, - containing_service=None, - input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=b'\202\323\344\223\002\"\022 /v2/monitoredResourceDescriptors', - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListLogs', - full_name='google.logging.v2.LoggingServiceV2.ListLogs', - index=4, - containing_service=None, - input_type=_LISTLOGSREQUEST, - output_type=_LISTLOGSRESPONSE, - serialized_options=b'\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent', - create_key=_descriptor._internal_create_key, - ), -]) + serialized_start=1829, + serialized_end=3202, + methods=[ + _descriptor.MethodDescriptor( + name="DeleteLog", + full_name="google.logging.v2.LoggingServiceV2.DeleteLog", + index=0, + containing_service=None, + input_type=_DELETELOGREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="WriteLogEntries", + full_name="google.logging.v2.LoggingServiceV2.WriteLogEntries", + index=1, + containing_service=None, + input_type=_WRITELOGENTRIESREQUEST, + output_type=_WRITELOGENTRIESRESPONSE, + serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="ListLogEntries", + full_name="google.logging.v2.LoggingServiceV2.ListLogEntries", + index=2, + containing_service=None, + input_type=_LISTLOGENTRIESREQUEST, + output_type=_LISTLOGENTRIESRESPONSE, + serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="ListMonitoredResourceDescriptors", + full_name="google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + index=3, + containing_service=None, + input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="ListLogs", + full_name="google.logging.v2.LoggingServiceV2.ListLogs", + index=4, + containing_service=None, + input_type=_LISTLOGSREQUEST, + output_type=_LISTLOGSRESPONSE, + serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", + create_key=_descriptor._internal_create_key, + ), + ], +) _sym_db.RegisterServiceDescriptor(_LOGGINGSERVICEV2) -DESCRIPTOR.services_by_name['LoggingServiceV2'] = _LOGGINGSERVICEV2 +DESCRIPTOR.services_by_name["LoggingServiceV2"] = _LOGGINGSERVICEV2 # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index c18ddb2de..15c16bee0 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -2,13 +2,14 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from google.cloud.logging_v2.proto import logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2 +from google.cloud.logging_v2.proto import ( + logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2, +) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class LoggingServiceV2Stub(object): - """Service for ingesting and querying logs. - """ + """Service for ingesting and querying logs.""" def __init__(self, channel): """Constructor. @@ -17,35 +18,34 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( - '/google.logging.v2.LoggingServiceV2/DeleteLog', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) + "/google.logging.v2.LoggingServiceV2/DeleteLog", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.WriteLogEntries = channel.unary_unary( - '/google.logging.v2.LoggingServiceV2/WriteLogEntries', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - ) + "/google.logging.v2.LoggingServiceV2/WriteLogEntries", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, + ) self.ListLogEntries = channel.unary_unary( - '/google.logging.v2.LoggingServiceV2/ListLogEntries', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - ) + "/google.logging.v2.LoggingServiceV2/ListLogEntries", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, + ) self.ListMonitoredResourceDescriptors = channel.unary_unary( - '/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - ) + "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, + ) self.ListLogs = channel.unary_unary( - '/google.logging.v2.LoggingServiceV2/ListLogs', - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - ) + "/google.logging.v2.LoggingServiceV2/ListLogs", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, + ) class LoggingServiceV2Servicer(object): - """Service for ingesting and querying logs. - """ + """Service for ingesting and querying logs.""" def DeleteLog(self, request, context): """Deletes all the log entries in a log. The log reappears if it receives new @@ -54,8 +54,8 @@ def DeleteLog(self, request, context): before the operation will be deleted. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def WriteLogEntries(self, request, context): """Writes log entries to Logging. This API method is the @@ -67,8 +67,8 @@ def WriteLogEntries(self, request, context): folders) """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated @@ -77,139 +77,193 @@ def ListLogEntries(self, request, context): Logs](https://cloud.google.com/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ListMonitoredResourceDescriptors(self, request, context): - """Lists the descriptors for monitored resource types used by Logging. - """ + """Lists the descriptors for monitored resource types used by Logging.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def ListLogs(self, request, context): """Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_LoggingServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - 'DeleteLog': grpc.unary_unary_rpc_method_handler( - servicer.DeleteLog, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'WriteLogEntries': grpc.unary_unary_rpc_method_handler( - servicer.WriteLogEntries, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString, - ), - 'ListLogEntries': grpc.unary_unary_rpc_method_handler( - servicer.ListLogEntries, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString, - ), - 'ListMonitoredResourceDescriptors': grpc.unary_unary_rpc_method_handler( - servicer.ListMonitoredResourceDescriptors, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString, - ), - 'ListLogs': grpc.unary_unary_rpc_method_handler( - servicer.ListLogs, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString, - ), + "DeleteLog": grpc.unary_unary_rpc_method_handler( + servicer.DeleteLog, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "WriteLogEntries": grpc.unary_unary_rpc_method_handler( + servicer.WriteLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString, + ), + "ListLogEntries": grpc.unary_unary_rpc_method_handler( + servicer.ListLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString, + ), + "ListMonitoredResourceDescriptors": grpc.unary_unary_rpc_method_handler( + servicer.ListMonitoredResourceDescriptors, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString, + ), + "ListLogs": grpc.unary_unary_rpc_method_handler( + servicer.ListLogs, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'google.logging.v2.LoggingServiceV2', rpc_method_handlers) + "google.logging.v2.LoggingServiceV2", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class LoggingServiceV2(object): - """Service for ingesting and querying logs. - """ + """Service for ingesting and querying logs.""" @staticmethod - def DeleteLog(request, + def DeleteLog( + 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, - 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.logging.v2.LoggingServiceV2/DeleteLog', + "/google.logging.v2.LoggingServiceV2/DeleteLog", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def WriteLogEntries(request, + def WriteLogEntries( + 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, - 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.logging.v2.LoggingServiceV2/WriteLogEntries', + "/google.logging.v2.LoggingServiceV2/WriteLogEntries", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ListLogEntries(request, + def ListLogEntries( + 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, - 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.logging.v2.LoggingServiceV2/ListLogEntries', + "/google.logging.v2.LoggingServiceV2/ListLogEntries", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ListMonitoredResourceDescriptors(request, + def ListMonitoredResourceDescriptors( + 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, - 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', + "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) @staticmethod - def ListLogs(request, + def ListLogs( + 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, - 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.logging.v2.LoggingServiceV2/ListLogs', + "/google.logging.v2.LoggingServiceV2/ListLogs", google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - options, channel_credentials, - call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py new file mode 100644 index 000000000..d309d6e97 --- /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 000000000..4fd239765 --- /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 000000000..1446b94a5 --- /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 000000000..11957ce27 --- /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 000000000..a0406dba8 --- /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 000000000..5ea33d18c --- /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 a5616d3e5..2b94a8b54 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-logging", - "sha": "a22a3bfdd4c8a4d6e9cc0c7d7504322ff31ad7ea" + "remote": "https://github.com/googleapis/python-logging.git", + "sha": "0a1dd94811232634fdb849cb2c85bd44e870642f" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aaff764c185e18a6c73227357c3df5fa60fec85a", - "internalRef": "309426927" + "sha": "d399c754bdea83297877ab49e5f66b257a957a78", + "internalRef": "323860336" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cdddf139b36000b3a7c65fd2a7781e253262359a" + "sha": "ee7506d15daa3873accfff9430eff7e3953f0248" } } ], @@ -37,9 +30,96 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "generator": "bazel" } } + ], + "generatedFiles": [ + ".coveragerc", + ".flake8", + ".github/CONTRIBUTING.md", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".gitignore", + ".kokoro/build.sh", + ".kokoro/continuous/common.cfg", + ".kokoro/continuous/continuous.cfg", + ".kokoro/docs/common.cfg", + ".kokoro/docs/docs.cfg", + ".kokoro/presubmit/common.cfg", + ".kokoro/presubmit/presubmit.cfg", + ".kokoro/publish-docs.sh", + ".kokoro/release.sh", + ".kokoro/release/common.cfg", + ".kokoro/release/release.cfg", + ".kokoro/samples/lint/common.cfg", + ".kokoro/samples/lint/continuous.cfg", + ".kokoro/samples/lint/periodic.cfg", + ".kokoro/samples/lint/presubmit.cfg", + ".kokoro/samples/python3.6/common.cfg", + ".kokoro/samples/python3.6/continuous.cfg", + ".kokoro/samples/python3.6/periodic.cfg", + ".kokoro/samples/python3.6/presubmit.cfg", + ".kokoro/samples/python3.7/common.cfg", + ".kokoro/samples/python3.7/continuous.cfg", + ".kokoro/samples/python3.7/periodic.cfg", + ".kokoro/samples/python3.7/presubmit.cfg", + ".kokoro/samples/python3.8/common.cfg", + ".kokoro/samples/python3.8/continuous.cfg", + ".kokoro/samples/python3.8/periodic.cfg", + ".kokoro/samples/python3.8/presubmit.cfg", + ".kokoro/test-samples.sh", + ".kokoro/trampoline.sh", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.rst", + "LICENSE", + "MANIFEST.in", + "docs/_static/custom.css", + "docs/_templates/layout.html", + "docs/conf.py", + "docs/gapic/v2/api.rst", + "docs/gapic/v2/types.rst", + "docs/multiprocessing.rst", + "google/cloud/logging_v2/gapic/__init__.py", + "google/cloud/logging_v2/gapic/config_service_v2_client.py", + "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/enums.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/transports/__init__.py", + "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", + "google/cloud/logging_v2/proto/__init__.py", + "google/cloud/logging_v2/proto/log_entry.proto", + "google/cloud/logging_v2/proto/log_entry_pb2.py", + "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging.proto", + "google/cloud/logging_v2/proto/logging_config.proto", + "google/cloud/logging_v2/proto/logging_config_pb2.py", + "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_metrics.proto", + "google/cloud/logging_v2/proto/logging_metrics_pb2.py", + "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_pb2.py", + "google/cloud/logging_v2/proto/logging_pb2_grpc.py", + "renovate.json", + "scripts/decrypt-secrets.sh", + "scripts/readme-gen/readme_gen.py", + "scripts/readme-gen/templates/README.tmpl.rst", + "scripts/readme-gen/templates/auth.tmpl.rst", + "scripts/readme-gen/templates/auth_api_key.tmpl.rst", + "scripts/readme-gen/templates/install_deps.tmpl.rst", + "scripts/readme-gen/templates/install_portaudio.tmpl.rst", + "setup.cfg", + "testing/.gitignore", + "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index ba9af3140..1b267f75c 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -25,9 +25,9 @@ from google.protobuf import field_mask_pb2 - class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -48,12 +48,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - def __init__(self, responses = []): + + def __init__(self, responses=[]): self.responses = responses self.requests = [] - def unary_unary( - self, method, request_serializer=None, response_deserializer=None): + def unary_unary(self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -62,16 +62,15 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): - def test_delete_sink(self): channel = ChannelStub() - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" client.delete_sink(sink_name) @@ -82,59 +81,69 @@ def test_delete_sink(self): def test_delete_sink_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" with pytest.raises(CustomException): client.delete_sink(sink_name) def test_update_sink(self): # Setup Expected Response - name = 'name3373707' - destination = 'destination-1429847026' - filter_ = 'filter-1274492040' - description = 'description-1724546052' + name = "name3373707" + destination = "destination-1429847026" + filter_ = "filter-1274492040" + description = "description-1724546052" disabled = True - writer_identity = 'writerIdentity775638794' + writer_identity = "writerIdentity775638794" include_children = True - expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} + expected_response = { + "name": name, + "destination": destination, + "filter": filter_, + "description": description, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, + } expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" sink = {} response = client.update_sink(sink_name, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest(sink_name=sink_name, sink=sink) + expected_request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_sink_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" sink = {} with pytest.raises(CustomException): @@ -142,13 +151,13 @@ def test_update_sink_exception(self): def test_delete_exclusion(self): channel = ChannelStub() - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" client.delete_exclusion(name) @@ -159,35 +168,35 @@ def test_delete_exclusion(self): def test_delete_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" with pytest.raises(CustomException): client.delete_exclusion(name) def test_list_buckets(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" buckets_element = {} buckets = [buckets_element] - expected_response = {'next_page_token': next_page_token, 'buckets': buckets} + expected_response = {"next_page_token": next_page_token, "buckets": buckets} expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") paged_list_response = client.list_buckets(parent) resources = list(paged_list_response) @@ -201,14 +210,14 @@ def test_list_buckets(self): assert expected_request == actual_request def test_list_buckets_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") paged_list_response = client.list_buckets(parent) with pytest.raises(CustomException): @@ -216,21 +225,25 @@ def test_list_buckets_exception(self): def test_get_bucket(self): # Setup Expected Response - name_2 = 'name2-1052831874' - description = 'description-1724546052' + name_2 = "name2-1052831874" + description = "description-1724546052" retention_days = 1544391896 - expected_response = {'name': name_2, 'description': description, 'retention_days': retention_days} + expected_response = { + "name": name_2, + "description": description, + "retention_days": retention_days, + } expected_response = logging_config_pb2.LogBucket(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" response = client.get_bucket(name) assert expected_response == response @@ -242,35 +255,39 @@ def test_get_bucket(self): def test_get_bucket_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" with pytest.raises(CustomException): client.get_bucket(name) def test_update_bucket(self): # Setup Expected Response - name_2 = 'name2-1052831874' - description = 'description-1724546052' + name_2 = "name2-1052831874" + description = "description-1724546052" retention_days = 1544391896 - expected_response = {'name': name_2, 'description': description, 'retention_days': retention_days} + expected_response = { + "name": name_2, + "description": description, + "retention_days": retention_days, + } expected_response = logging_config_pb2.LogBucket(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" bucket = {} update_mask = {} @@ -278,20 +295,22 @@ def test_update_bucket(self): assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateBucketRequest(name=name, bucket=bucket, update_mask=update_mask) + expected_request = logging_config_pb2.UpdateBucketRequest( + name=name, bucket=bucket, update_mask=update_mask + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_bucket_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" bucket = {} update_mask = {} @@ -300,21 +319,21 @@ def test_update_bucket_exception(self): def test_list_sinks(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" sinks_element = {} sinks = [sinks_element] - expected_response = {'next_page_token': next_page_token, 'sinks': sinks} + expected_response = {"next_page_token": next_page_token, "sinks": sinks} expected_response = logging_config_pb2.ListSinksResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_sinks(parent) resources = list(paged_list_response) @@ -328,14 +347,14 @@ def test_list_sinks(self): assert expected_request == actual_request def test_list_sinks_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): @@ -343,25 +362,33 @@ def test_list_sinks_exception(self): def test_get_sink(self): # Setup Expected Response - name = 'name3373707' - destination = 'destination-1429847026' - filter_ = 'filter-1274492040' - description = 'description-1724546052' + name = "name3373707" + destination = "destination-1429847026" + filter_ = "filter-1274492040" + description = "description-1724546052" disabled = True - writer_identity = 'writerIdentity775638794' + writer_identity = "writerIdentity775638794" include_children = True - expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} + expected_response = { + "name": name, + "destination": destination, + "filter": filter_, + "description": description, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, + } expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" response = client.get_sink(sink_name) assert expected_response == response @@ -373,59 +400,69 @@ def test_get_sink(self): def test_get_sink_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = 'sinkName-1391757129' + sink_name = "sinkName-1391757129" with pytest.raises(CustomException): client.get_sink(sink_name) def test_create_sink(self): # Setup Expected Response - name = 'name3373707' - destination = 'destination-1429847026' - filter_ = 'filter-1274492040' - description = 'description-1724546052' + name = "name3373707" + destination = "destination-1429847026" + filter_ = "filter-1274492040" + description = "description-1724546052" disabled = True - writer_identity = 'writerIdentity775638794' + writer_identity = "writerIdentity775638794" include_children = True - expected_response = {'name': name, 'destination': destination, 'filter': filter_, 'description': description, 'disabled': disabled, 'writer_identity': writer_identity, 'include_children': include_children} + expected_response = { + "name": name, + "destination": destination, + "filter": filter_, + "description": description, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, + } expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") sink = {} response = client.create_sink(parent, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateSinkRequest(parent=parent, sink=sink) + expected_request = logging_config_pb2.CreateSinkRequest( + parent=parent, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_sink_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") sink = {} with pytest.raises(CustomException): @@ -433,21 +470,26 @@ def test_create_sink_exception(self): def test_list_exclusions(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" exclusions_element = {} exclusions = [exclusions_element] - expected_response = {'next_page_token': next_page_token, 'exclusions': exclusions} - expected_response = logging_config_pb2.ListExclusionsResponse(**expected_response) + expected_response = { + "next_page_token": next_page_token, + "exclusions": exclusions, + } + expected_response = logging_config_pb2.ListExclusionsResponse( + **expected_response + ) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_exclusions(parent) resources = list(paged_list_response) @@ -461,14 +503,14 @@ def test_list_exclusions(self): assert expected_request == actual_request def test_list_exclusions_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_exclusions(parent) with pytest.raises(CustomException): @@ -476,22 +518,27 @@ def test_list_exclusions_exception(self): def test_get_exclusion(self): # Setup Expected Response - name_2 = 'name2-1052831874' - description = 'description-1724546052' - filter_ = 'filter-1274492040' + name_2 = "name2-1052831874" + description = "description-1724546052" + filter_ = "filter-1274492040" disabled = True - expected_response = {'name': name_2, 'description': description, 'filter': filter_, 'disabled': disabled} + expected_response = { + "name": name_2, + "description": description, + "filter": filter_, + "disabled": disabled, + } expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" response = client.get_exclusion(name) assert expected_response == response @@ -503,56 +550,63 @@ def test_get_exclusion(self): def test_get_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" with pytest.raises(CustomException): client.get_exclusion(name) def test_create_exclusion(self): # Setup Expected Response - name = 'name3373707' - description = 'description-1724546052' - filter_ = 'filter-1274492040' + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" disabled = True - expected_response = {'name': name, 'description': description, 'filter': filter_, 'disabled': disabled} + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "disabled": disabled, + } expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") exclusion = {} response = client.create_exclusion(parent, exclusion) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateExclusionRequest(parent=parent, exclusion=exclusion) + expected_request = logging_config_pb2.CreateExclusionRequest( + parent=parent, exclusion=exclusion + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") exclusion = {} with pytest.raises(CustomException): @@ -560,22 +614,27 @@ def test_create_exclusion_exception(self): def test_update_exclusion(self): # Setup Expected Response - name_2 = 'name2-1052831874' - description = 'description-1724546052' - filter_ = 'filter-1274492040' + name_2 = "name2-1052831874" + description = "description-1724546052" + filter_ = "filter-1274492040" disabled = True - expected_response = {'name': name_2, 'description': description, 'filter': filter_, 'disabled': disabled} + expected_response = { + "name": name_2, + "description": description, + "filter": filter_, + "disabled": disabled, + } expected_response = logging_config_pb2.LogExclusion(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" exclusion = {} update_mask = {} @@ -583,20 +642,22 @@ def test_update_exclusion(self): assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateExclusionRequest(name=name, exclusion=exclusion, update_mask=update_mask) + expected_request = logging_config_pb2.UpdateExclusionRequest( + name=name, exclusion=exclusion, update_mask=update_mask + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_exclusion_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" exclusion = {} update_mask = {} @@ -605,21 +666,25 @@ def test_update_exclusion_exception(self): def test_get_cmek_settings(self): # Setup Expected Response - name_2 = 'name2-1052831874' - kms_key_name = 'kmsKeyName2094986649' - service_account_id = 'serviceAccountId-111486921' - expected_response = {'name': name_2, 'kms_key_name': kms_key_name, 'service_account_id': service_account_id} + name_2 = "name2-1052831874" + kms_key_name = "kmsKeyName2094986649" + service_account_id = "serviceAccountId-111486921" + expected_response = { + "name": name_2, + "kms_key_name": kms_key_name, + "service_account_id": service_account_id, + } expected_response = logging_config_pb2.CmekSettings(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" response = client.get_cmek_settings(name) assert expected_response == response @@ -631,55 +696,61 @@ def test_get_cmek_settings(self): def test_get_cmek_settings_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" with pytest.raises(CustomException): client.get_cmek_settings(name) def test_update_cmek_settings(self): # Setup Expected Response - name_2 = 'name2-1052831874' - kms_key_name = 'kmsKeyName2094986649' - service_account_id = 'serviceAccountId-111486921' - expected_response = {'name': name_2, 'kms_key_name': kms_key_name, 'service_account_id': service_account_id} + name_2 = "name2-1052831874" + kms_key_name = "kmsKeyName2094986649" + service_account_id = "serviceAccountId-111486921" + expected_response = { + "name": name_2, + "kms_key_name": kms_key_name, + "service_account_id": service_account_id, + } expected_response = logging_config_pb2.CmekSettings(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - name = 'name3373707' + name = "name3373707" cmek_settings = {} response = client.update_cmek_settings(name, cmek_settings) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest(name=name, cmek_settings=cmek_settings) + expected_request = logging_config_pb2.UpdateCmekSettingsRequest( + name=name, cmek_settings=cmek_settings + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_cmek_settings_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup request - name = 'name3373707' + name = "name3373707" cmek_settings = {} with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index ac45396b0..9ece054d7 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -26,9 +26,9 @@ from google.protobuf import empty_pb2 - class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -49,12 +49,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - def __init__(self, responses = []): + + def __init__(self, responses=[]): self.responses = responses self.requests = [] - def unary_unary( - self, method, request_serializer=None, response_deserializer=None): + def unary_unary(self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -63,16 +63,15 @@ class CustomException(Exception): class TestLoggingServiceV2Client(object): - def test_delete_log(self): channel = ChannelStub() - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = 'logName2013526694' + log_name = "logName2013526694" client.delete_log(log_name) @@ -83,29 +82,29 @@ def test_delete_log(self): def test_delete_log_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = 'logName2013526694' + log_name = "logName2013526694" with pytest.raises(CustomException): client.delete_log(log_name) def test_list_log_entries(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" entries_element = {} entries = [entries_element] - expected_response = {'next_page_token': next_page_token, 'entries': entries} + expected_response = {"next_page_token": next_page_token, "entries": entries} expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -120,13 +119,15 @@ def test_list_log_entries(self): assert expected_response.entries[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_pb2.ListLogEntriesRequest(resource_names=resource_names) + expected_request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_list_log_entries_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -144,8 +145,8 @@ def test_write_log_entries(self): expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -163,8 +164,8 @@ def test_write_log_entries(self): def test_write_log_entries_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -177,15 +178,20 @@ def test_write_log_entries_exception(self): def test_list_monitored_resource_descriptors(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" resource_descriptors_element = {} resource_descriptors = [resource_descriptors_element] - expected_response = {'next_page_token': next_page_token, 'resource_descriptors': resource_descriptors} - expected_response = logging_pb2.ListMonitoredResourceDescriptorsResponse(**expected_response) + expected_response = { + "next_page_token": next_page_token, + "resource_descriptors": resource_descriptors, + } + expected_response = logging_pb2.ListMonitoredResourceDescriptorsResponse( + **expected_response + ) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -202,8 +208,8 @@ def test_list_monitored_resource_descriptors(self): assert expected_request == actual_request def test_list_monitored_resource_descriptors_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() @@ -214,21 +220,21 @@ def test_list_monitored_resource_descriptors_exception(self): def test_list_logs(self): # Setup Expected Response - next_page_token = '' - log_names_element = 'logNamesElement-1079688374' + next_page_token = "" + log_names_element = "logNamesElement-1079688374" log_names = [log_names_element] - expected_response = {'next_page_token': next_page_token, 'log_names': log_names} + expected_response = {"next_page_token": next_page_token, "log_names": log_names} expected_response = logging_pb2.ListLogsResponse(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_logs(parent) resources = list(paged_list_response) @@ -242,14 +248,14 @@ def test_list_logs(self): assert expected_request == actual_request def test_list_logs_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.LoggingServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_logs(parent) with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index a3fa5b7b5..6baefad82 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -24,9 +24,9 @@ from google.protobuf import empty_pb2 - class MultiCallableStub(object): """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub @@ -47,12 +47,12 @@ def __call__(self, request, timeout=None, metadata=None, credentials=None): class ChannelStub(object): """Stub for the grpc.Channel interface.""" - def __init__(self, responses = []): + + def __init__(self, responses=[]): self.responses = responses self.requests = [] - def unary_unary( - self, method, request_serializer=None, response_deserializer=None): + def unary_unary(self, method, request_serializer=None, response_deserializer=None): return MultiCallableStub(method, self) @@ -61,45 +61,51 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): - def test_update_log_metric(self): # Setup Expected Response - name = 'name3373707' - description = 'description-1724546052' - filter_ = 'filter-1274492040' - value_extractor = 'valueExtractor2047672534' - expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") metric = {} response = client.update_log_metric(metric_name, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest(metric_name=metric_name, metric=metric) + expected_request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") metric = {} with pytest.raises(CustomException): @@ -107,52 +113,56 @@ def test_update_log_metric_exception(self): def test_delete_log_metric(self): channel = ChannelStub() - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest(metric_name=metric_name) + expected_request = logging_metrics_pb2.DeleteLogMetricRequest( + metric_name=metric_name + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_delete_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): client.delete_log_metric(metric_name) def test_list_log_metrics(self): # Setup Expected Response - next_page_token = '' + next_page_token = "" metrics_element = {} metrics = [metrics_element] - expected_response = {'next_page_token': next_page_token, 'metrics': metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse(**expected_response) + expected_response = {"next_page_token": next_page_token, "metrics": metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse( + **expected_response + ) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_log_metrics(parent) resources = list(paged_list_response) @@ -166,14 +176,14 @@ def test_list_log_metrics(self): assert expected_request == actual_request def test_list_log_metrics_exception(self): - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): @@ -181,83 +191,97 @@ def test_list_log_metrics_exception(self): def test_get_log_metric(self): # Setup Expected Response - name = 'name3373707' - description = 'description-1724546052' - filter_ = 'filter-1274492040' - value_extractor = 'valueExtractor2047672534' - expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") response = client.get_log_metric(metric_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest(metric_name=metric_name) + expected_request = logging_metrics_pb2.GetLogMetricRequest( + metric_name=metric_name + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_get_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): client.get_log_metric(metric_name) def test_create_log_metric(self): # Setup Expected Response - name = 'name3373707' - description = 'description-1724546052' - filter_ = 'filter-1274492040' - value_extractor = 'valueExtractor2047672534' - expected_response = {'name': name, 'description': description, 'filter': filter_, 'value_extractor': value_extractor} + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response - channel = ChannelStub(responses = [expected_response]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") metric = {} response = client.create_log_metric(parent, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest(parent=parent, metric=metric) + expected_request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_create_log_metric_exception(self): # Mock the API response - channel = ChannelStub(responses = [CustomException()]) - patch = mock.patch('google.api_core.grpc_helpers.create_channel') + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path('[PROJECT]') + parent = client.project_path("[PROJECT]") metric = {} with pytest.raises(CustomException): From dc96dcca714dcc738b3af5b183f656678b60cfd9 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:00:25 -0700 Subject: [PATCH 22/39] feat(python-library): changes to docs job * feat(python-library): changes to docs job * migrate to Trampoline V2 * add docs-presubmit job * create docfx yaml files and upload them to another bucket * remove redundant envvars * add a failing test first * fix TemplateSyntaxError: Missing end of comment tag * serving_path is not needed any more * use `raw` to make jinja happy Source-Author: Takashi Matsuo Source-Date: Thu Jul 30 12:44:02 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5dfda5621df45b71b6e88544ebbb53b1a8c90214 Source-Link: https://github.com/googleapis/synthtool/commit/5dfda5621df45b71b6e88544ebbb53b1a8c90214 --- .gitignore | 3 ++- .kokoro/docs/common.cfg | 17 +++++++++++++++++ .kokoro/publish-docs.sh | 21 ++++++++++++++++++++- docs/conf.py | 3 +++ synth.metadata | 11 ++++++++--- 5 files changed, 50 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b87e1ed58..b9daa52f1 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ pip-log.txt # Built documentation docs/_build bigquery/docs/generated +docs.metadata # Virtual environment env/ @@ -57,4 +58,4 @@ system_tests/local_test_setup # Make sure a generated file isn't accidentally committed. pylintrc -pylintrc.test \ No newline at end of file +pylintrc.test diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 01a16ec85..d143c6e36 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -28,6 +28,23 @@ env_vars: { value: "docs-staging" } +env_vars: { + key: "V2_STAGING_BUCKET" + value: "docs-staging-v2-staging" +} + +# It will upload the docker image after successful builds. +env_vars: { + key: "TRAMPOLINE_IMAGE_UPLOAD" + value: "true" +} + +# It will always build the docker image. +env_vars: { + key: "TRAMPOLINE_DOCKERFILE" + value: ".kokoro/docker/docs/Dockerfile" +} + # Fetch the token needed for reporting release status to GitHub before_action { fetch_keystore { diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index e49d523ad..1e81b8f41 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -52,4 +52,23 @@ python3 -m docuploader create-metadata \ cat docs.metadata # upload docs -python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}" + + +# docfx yaml files +nox -s docfx + +# create metadata. +python3 -m docuploader create-metadata \ + --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ + --version=$(python3 setup.py --version) \ + --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ + --distribution-name=$(python3 setup.py --name) \ + --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ + --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ + --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) + +cat docs.metadata + +# upload docs +python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}" diff --git a/docs/conf.py b/docs/conf.py index 850861fb7..f3a999c21 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,9 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) +# For plugins that can not read conf.py. +sys.path.insert(0, os.path.abspath(".")) + __version__ = "" # -- General configuration ------------------------------------------------ diff --git a/synth.metadata b/synth.metadata index 2b94a8b54..8bdfb4464 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d399c754bdea83297877ab49e5f66b257a957a78", - "internalRef": "323860336" + "sha": "26e80fe6cffa4963139373b9a8300bddad606daa", + "internalRef": "324046932" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ee7506d15daa3873accfff9430eff7e3953f0248" + "sha": "5dfda5621df45b71b6e88544ebbb53b1a8c90214" } } ], @@ -47,7 +47,10 @@ ".kokoro/build.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/continuous.cfg", + ".kokoro/docker/docs/Dockerfile", + ".kokoro/docker/docs/fetch_gpg_keys.sh", ".kokoro/docs/common.cfg", + ".kokoro/docs/docs-presubmit.cfg", ".kokoro/docs/docs.cfg", ".kokoro/presubmit/common.cfg", ".kokoro/presubmit/presubmit.cfg", @@ -73,6 +76,8 @@ ".kokoro/samples/python3.8/presubmit.cfg", ".kokoro/test-samples.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.rst", "LICENSE", From 6504e5b6ab93b214eb7b95094b004d1586b73b40 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:01:02 -0700 Subject: [PATCH 23/39] fix(python-library): add missing changes Source-Author: Takashi Matsuo Source-Date: Thu Jul 30 18:26:35 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 39b527a39f5cd56d4882b3874fc08eed4756cebe Source-Link: https://github.com/googleapis/synthtool/commit/39b527a39f5cd56d4882b3874fc08eed4756cebe --- .kokoro/docs/common.cfg | 4 ++-- .kokoro/publish-docs.sh | 18 ++++-------------- synth.metadata | 6 +++--- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index d143c6e36..4206e8ac4 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -11,12 +11,12 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-logging/.kokoro/trampoline.sh" +build_file: "python-logging/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" + value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 1e81b8f41..8acb14e80 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -18,26 +18,16 @@ set -eo pipefail # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 -cd github/python-logging - -# Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation +export PATH="${HOME}/.local/bin:${PATH}" # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +python3 -m pip install --user --upgrade --quiet nox +python3 -m nox --version # build docs nox -s docs -python3 -m pip install gcp-docuploader - -# install a json parser -sudo apt-get update -sudo apt-get -y install software-properties-common -sudo add-apt-repository universe -sudo apt-get update -sudo apt-get -y install jq +python3 -m pip install --user gcp-docuploader # create metadata python3 -m docuploader create-metadata \ diff --git a/synth.metadata b/synth.metadata index 8bdfb4464..9c7ddd78d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "26e80fe6cffa4963139373b9a8300bddad606daa", - "internalRef": "324046932" + "sha": "4d52dfb72078000b13de923c1dadec19f3a64ad1", + "internalRef": "324098852" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5dfda5621df45b71b6e88544ebbb53b1a8c90214" + "sha": "39b527a39f5cd56d4882b3874fc08eed4756cebe" } } ], From ea14f8a2d5a4bc436e52f33ebd68dbb4db612874 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:01:52 -0700 Subject: [PATCH 24/39] chore(py_library): add split_system_tests Source-Author: Takashi Matsuo Source-Date: Fri Jul 31 16:17:13 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669 Source-Link: https://github.com/googleapis/synthtool/commit/bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669 --- .kokoro/build.sh | 8 +++++++- synth.metadata | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 8df566562..a194a9ead 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -36,4 +36,10 @@ python3.6 -m pip uninstall --yes --quiet nox-automation python3.6 -m pip install --upgrade --quiet nox python3.6 -m nox --version -python3.6 -m nox +# If NOX_SESSION is set, it only runs the specified session, +# otherwise run all the sessions. +if [[ -n "${NOX_SESSION:-}" ]]; then + python3.6 -m nox -s "${NOX_SESSION:-}" +else + python3.6 -m nox +fi diff --git a/synth.metadata b/synth.metadata index 9c7ddd78d..b5725a20d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4d52dfb72078000b13de923c1dadec19f3a64ad1", - "internalRef": "324098852" + "sha": "868615a5c1c1059c636bb3d82a555edb1d5a251e", + "internalRef": "324294521" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "39b527a39f5cd56d4882b3874fc08eed4756cebe" + "sha": "bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669" } } ], From 2c7b42eafe61e75da2ec77a5e0c60d4034d69830 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:02:04 -0700 Subject: [PATCH 25/39] chore(py_library): add some excludes in docs/conf.py This should fix build failures in python-bigquery. Example: https://github.com/googleapis/python-bigquery/pull/205 * also add a comment Source-Author: Takashi Matsuo Source-Date: Mon Aug 3 15:08:00 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 4f8f5dc24af79694887385015294e4dbb214c352 Source-Link: https://github.com/googleapis/synthtool/commit/4f8f5dc24af79694887385015294e4dbb214c352 --- docs/conf.py | 8 +++++++- synth.metadata | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f3a999c21..93e0dcfeb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,6 +21,7 @@ sys.path.insert(0, os.path.abspath("..")) # For plugins that can not read conf.py. +# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85 sys.path.insert(0, os.path.abspath(".")) __version__ = "" @@ -93,7 +94,12 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build"] +exclude_patterns = [ + "_build", + "samples/AUTHORING_GUIDE.md", + "samples/CONTRIBUTING.md", + "samples/snippets/README.rst", +] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/synth.metadata b/synth.metadata index b5725a20d..233be05a6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669" + "sha": "4f8f5dc24af79694887385015294e4dbb214c352" } } ], From 0a9625a72103e5d4f490e61c2e1662d8d9ad45ab Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:15:15 -0700 Subject: [PATCH 26/39] Update protobuf workspace dependency to v3.13.0. PiperOrigin-RevId: 327026955 Source-Author: Google APIs Source-Date: Mon Aug 17 08:40:22 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 0dc0a6c0f1a9f979bc0690f0caa5fbafa3000c2c Source-Link: https://github.com/googleapis/googleapis/commit/0dc0a6c0f1a9f979bc0690f0caa5fbafa3000c2c --- google/cloud/logging_v2/proto/log_entry_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_config_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_metrics_pb2.py | 2 +- google/cloud/logging_v2/proto/logging_pb2.py | 2 +- synth.metadata | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index d0cbb10fb..bd5c29b01 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.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 diff --git a/google/cloud/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 672b83523..20191acac 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_config.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 diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index c840bf186..f033fb679 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.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 diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index a8a2100af..7c4fa3929 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.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 diff --git a/synth.metadata b/synth.metadata index 233be05a6..bd9b31cb7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "868615a5c1c1059c636bb3d82a555edb1d5a251e", - "internalRef": "324294521" + "sha": "0dc0a6c0f1a9f979bc0690f0caa5fbafa3000c2c", + "internalRef": "327026955" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "4f8f5dc24af79694887385015294e4dbb214c352" + "sha": "d3049e66447b44dc10579e461d5e08e0e3838edd" } } ], From 581cf7ff46a285e165e11fdee4d476f17ab6c71a Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:18:08 -0700 Subject: [PATCH 27/39] chore(py-library): enable snippet-bot Co-authored-by: Benjamin E. Coe Source-Author: Takashi Matsuo Source-Date: Tue Sep 1 17:14:08 2020 +0000 Source-Repo: googleapis/synthtool Source-Sha: d91dd8aac77f7a9c5506c238038a26fa4f9e361e Source-Link: https://github.com/googleapis/synthtool/commit/d91dd8aac77f7a9c5506c238038a26fa4f9e361e --- .github/snippet-bot.yml | 0 synth.metadata | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .github/snippet-bot.yml diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 000000000..e69de29bb diff --git a/synth.metadata b/synth.metadata index bd9b31cb7..9ba594a90 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0dc0a6c0f1a9f979bc0690f0caa5fbafa3000c2c", - "internalRef": "327026955" + "sha": "2db5725bf898b544a0cf951e1694d3b0fce5eda3", + "internalRef": "329384854" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d3049e66447b44dc10579e461d5e08e0e3838edd" + "sha": "d91dd8aac77f7a9c5506c238038a26fa4f9e361e" } } ], @@ -43,6 +43,7 @@ ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", ".github/release-please.yml", + ".github/snippet-bot.yml", ".gitignore", ".kokoro/build.sh", ".kokoro/continuous/common.cfg", From 1226d4f4eb023344b785389e1e955ac35c91e162 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:19:27 -0700 Subject: [PATCH 28/39] chore(py-library): update decrypt secrets file * chore(py-library): update decrypt secrets file From https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/scripts/decrypt-secrets.sh * docs: explain conditional Co-authored-by: Jeffrey Rennie Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Tue Sep 8 11:35:59 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: d302f93d7f47e2852e585ac35ab2d15585717ec0 Source-Link: https://github.com/googleapis/synthtool/commit/d302f93d7f47e2852e585ac35ab2d15585717ec0 --- scripts/decrypt-secrets.sh | 15 ++++++++++++++- synth.metadata | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index ff599eb2a..21f6d2a26 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -20,14 +20,27 @@ ROOT=$( dirname "$DIR" ) # Work from the project root. cd $ROOT +# Prevent it from overriding files. +# We recommend that sample authors use their own service account files and cloud project. +# In that case, they are supposed to prepare these files by themselves. +if [[ -f "testing/test-env.sh" ]] || \ + [[ -f "testing/service-account.json" ]] || \ + [[ -f "testing/client-secrets.json" ]]; then + echo "One or more target files exist, aborting." + exit 1 +fi + # 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" \ + --project="${PROJECT_ID}" \ > testing/test-env.sh gcloud secrets versions access latest \ --secret="python-docs-samples-service-account" \ + --project="${PROJECT_ID}" \ > 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 + --project="${PROJECT_ID}" \ + > testing/client-secrets.json diff --git a/synth.metadata b/synth.metadata index 9ba594a90..7e14f86a2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2db5725bf898b544a0cf951e1694d3b0fce5eda3", - "internalRef": "329384854" + "sha": "48ce8878cd4c54cf247de826ac53c1414b0345bd", + "internalRef": "330504082" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d91dd8aac77f7a9c5506c238038a26fa4f9e361e" + "sha": "d302f93d7f47e2852e585ac35ab2d15585717ec0" } } ], From 2f306d4129b4b8d27595db3e9b600c66a245c031 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:20:04 -0700 Subject: [PATCH 29/39] chore(python-library): use sphinx 1.5.5 for the docfx job Originally tested at: https://github.com/googleapis/python-texttospeech/pull/89 This change will fix the missing docstring in the yaml files. Source-Author: Takashi Matsuo Source-Date: Thu Sep 10 04:12:14 2020 +0000 Source-Repo: googleapis/synthtool Source-Sha: ffcee7952b74f647cbb3ef021d95422f10816fca Source-Link: https://github.com/googleapis/synthtool/commit/ffcee7952b74f647cbb3ef021d95422f10816fca --- docs/conf.py | 2 +- synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 93e0dcfeb..e2b4ba6bf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,7 @@ # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" +needs_sphinx = "1.5.5" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom diff --git a/synth.metadata b/synth.metadata index 7e14f86a2..8d2c4134a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "48ce8878cd4c54cf247de826ac53c1414b0345bd", - "internalRef": "330504082" + "sha": "3293ef20c714bb005f6a9c987e2ae8a1ad745272", + "internalRef": "330824843" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d302f93d7f47e2852e585ac35ab2d15585717ec0" + "sha": "ffcee7952b74f647cbb3ef021d95422f10816fca" } } ], From 20e57c17c56d57c1a3f62eede2046710170cedaf Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:21:45 -0700 Subject: [PATCH 30/39] =?UTF-8?q?build(python):=20use=20release-publish=20?= =?UTF-8?q?app=20for=20notifying=20GitHub=20of=20releas=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(python): use release-publish app for notifying GitHub of release status * fix: re-add pypi password Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Sep 16 08:46:42 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: 257fda18168bedb76985024bd198ed1725485488 Source-Link: https://github.com/googleapis/synthtool/commit/257fda18168bedb76985024bd198ed1725485488 --- .kokoro/release/common.cfg | 50 ++++++++++---------------------------- synth.metadata | 6 ++--- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 52c4b699b..9fedb82bb 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,42 +23,18 @@ env_vars: { value: "github/python-logging/.kokoro/release.sh" } -# Fetch the token needed for reporting release status to GitHub -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - -# Fetch PyPI password -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" - } - } -} - -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_pypi_password" + } + } } -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } -} +# Tokens needed to report release status back to GitHub +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 8d2c4134a..e5cee76ec 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3293ef20c714bb005f6a9c987e2ae8a1ad745272", - "internalRef": "330824843" + "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", + "internalRef": "331912851" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ffcee7952b74f647cbb3ef021d95422f10816fca" + "sha": "257fda18168bedb76985024bd198ed1725485488" } } ], From 78d3b8b319a37824b746fea4d772e95851dbf42d Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:21:45 -0700 Subject: [PATCH 31/39] build(python): add secret manager in kokoro Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Sep 16 10:24:40 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: dba48bb9bc6959c232bec9150ac6313b608fe7bd Source-Link: https://github.com/googleapis/synthtool/commit/dba48bb9bc6959c232bec9150ac6313b608fe7bd --- .kokoro/populate-secrets.sh | 43 +++++++++++++++++++++++++++++++++++++ .kokoro/trampoline.sh | 15 ++++++++----- synth.metadata | 3 ++- 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100755 .kokoro/populate-secrets.sh diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 000000000..f52514257 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/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 +# +# 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. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index e8c4251f3..f39236e94 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -15,9 +15,14 @@ set -eo pipefail -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$? +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT -chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh -${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true - -exit ${ret_code} +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index e5cee76ec..b3e580270 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "257fda18168bedb76985024bd198ed1725485488" + "sha": "dba48bb9bc6959c232bec9150ac6313b608fe7bd" } } ], @@ -53,6 +53,7 @@ ".kokoro/docs/common.cfg", ".kokoro/docs/docs-presubmit.cfg", ".kokoro/docs/docs.cfg", + ".kokoro/populate-secrets.sh", ".kokoro/presubmit/common.cfg", ".kokoro/presubmit/presubmit.cfg", ".kokoro/publish-docs.sh", From 8cafbfde2bb4a2993d806468aa0530d877984ad3 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:22:48 -0700 Subject: [PATCH 32/39] chore(python): add sphinx doctest extension Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Mon Sep 21 13:09:57 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: 27f4406999b1eee29e04b09b2423a8e4646c7e24 Source-Link: https://github.com/googleapis/synthtool/commit/27f4406999b1eee29e04b09b2423a8e4646c7e24 --- docs/conf.py | 1 + synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e2b4ba6bf..b507b408e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,6 +39,7 @@ "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx.ext.coverage", + "sphinx.ext.doctest", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", diff --git a/synth.metadata b/synth.metadata index b3e580270..a59e43327 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "8d73f9486fc193a150f6c907dfb9f49431aff3ff", + "internalRef": "332497859" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dba48bb9bc6959c232bec9150ac6313b608fe7bd" + "sha": "27f4406999b1eee29e04b09b2423a8e4646c7e24" } } ], From 5e25f498ffd36588e15c48750daaf571b2bce1be Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:23:28 -0700 Subject: [PATCH 33/39] feat: Add Java microgen rules to imports Source-Author: Mira Leung Source-Date: Mon Sep 21 18:04:02 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: aaac658367398e478d650768344b88acebad50d9 Source-Link: https://github.com/googleapis/googleapis/commit/aaac658367398e478d650768344b88acebad50d9 --- .flake8 | 2 - .github/snippet-bot.yml | 0 .gitignore | 5 +- .kokoro/populate-secrets.sh | 43 - .kokoro/release/common.cfg | 50 +- .kokoro/test-samples.sh | 8 +- .kokoro/trampoline.sh | 15 +- MANIFEST.in | 3 - docs/_templates/layout.html | 4 +- docs/conf.py | 21 +- docs/gapic/v2/api.rst | 4 +- docs/gapic/v2/types.rst | 4 +- docs/multiprocessing.rst | 7 - .../gapic/config_service_v2_client.py | 992 ++++------ .../gapic/config_service_v2_client_config.py | 126 +- google/cloud/logging_v2/gapic/enums.py | 42 +- .../gapic/logging_service_v2_client.py | 352 ++-- .../gapic/logging_service_v2_client_config.py | 64 +- .../gapic/metrics_service_v2_client.py | 296 +-- .../gapic/metrics_service_v2_client_config.py | 67 +- .../config_service_v2_grpc_transport.py | 135 +- .../logging_service_v2_grpc_transport.py | 32 +- .../metrics_service_v2_grpc_transport.py | 40 +- google/cloud/logging_v2/proto/log_entry.proto | 107 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 274 ++- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 - google/cloud/logging_v2/proto/logging.proto | 102 +- .../logging_v2/proto/logging_config.proto | 470 ++--- .../logging_v2/proto/logging_config_pb2.py | 1638 +++++------------ .../proto/logging_config_pb2_grpc.py | 478 +---- .../logging_v2/proto/logging_metrics.proto | 42 +- .../logging_v2/proto/logging_metrics_pb2.py | 326 ++-- .../proto/logging_metrics_pb2_grpc.py | 143 +- google/cloud/logging_v2/proto/logging_pb2.py | 442 +++-- .../logging_v2/proto/logging_pb2_grpc.py | 146 +- scripts/decrypt-secrets.sh | 15 +- scripts/readme-gen/readme_gen.py | 66 - scripts/readme-gen/templates/README.tmpl.rst | 87 - scripts/readme-gen/templates/auth.tmpl.rst | 9 - .../templates/auth_api_key.tmpl.rst | 14 - .../templates/install_deps.tmpl.rst | 29 - .../templates/install_portaudio.tmpl.rst | 35 - synth.metadata | 115 +- .../v2/test_config_service_v2_client_v2.py | 379 ++-- .../v2/test_logging_service_v2_client_v2.py | 64 +- .../v2/test_metrics_service_v2_client_v2.py | 166 +- 46 files changed, 2415 insertions(+), 5045 deletions(-) delete mode 100644 .github/snippet-bot.yml delete mode 100755 .kokoro/populate-secrets.sh delete mode 100644 docs/multiprocessing.rst delete mode 100644 scripts/readme-gen/readme_gen.py delete mode 100644 scripts/readme-gen/templates/README.tmpl.rst delete mode 100644 scripts/readme-gen/templates/auth.tmpl.rst delete mode 100644 scripts/readme-gen/templates/auth_api_key.tmpl.rst delete mode 100644 scripts/readme-gen/templates/install_deps.tmpl.rst delete mode 100644 scripts/readme-gen/templates/install_portaudio.tmpl.rst diff --git a/.flake8 b/.flake8 index ed9316381..20fe9bda2 100644 --- a/.flake8 +++ b/.flake8 @@ -21,8 +21,6 @@ exclude = # Exclude generated code. **/proto/** **/gapic/** - **/services/** - **/types/** *_pb2.py # Standard linting exemptions. diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/.gitignore b/.gitignore index b9daa52f1..3fb06e09c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ dist build eggs -.eggs parts bin var @@ -46,16 +45,14 @@ pip-log.txt # Built documentation docs/_build bigquery/docs/generated -docs.metadata # Virtual environment env/ coverage.xml -sponge_log.xml # System test environment variables. system_tests/local_test_setup # Make sure a generated file isn't accidentally committed. pylintrc -pylintrc.test +pylintrc.test \ No newline at end of file diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh deleted file mode 100755 index f52514257..000000000 --- a/.kokoro/populate-secrets.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 -# -# 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. - -set -eo pipefail - -function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} -function msg { println "$*" >&2 ;} -function println { printf '%s\n' "$(now) $*" ;} - - -# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: -# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com -SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" -msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" -mkdir -p ${SECRET_LOCATION} -for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") -do - msg "Retrieving secret ${key}" - docker run --entrypoint=gcloud \ - --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ - gcr.io/google.com/cloudsdktool/cloud-sdk \ - secrets versions access latest \ - --project cloud-devrel-kokoro-resources \ - --secret ${key} > \ - "${SECRET_LOCATION}/${key}" - if [[ $? == 0 ]]; then - msg "Secret written to ${SECRET_LOCATION}/${key}" - else - msg "Error retrieving secret ${key}" - fi -done diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 9fedb82bb..52c4b699b 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,18 +23,42 @@ env_vars: { value: "github/python-logging/.kokoro/release.sh" } -# Fetch PyPI password -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" - } - } +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } } -# Tokens needed to report release status back to GitHub -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" -} \ No newline at end of file +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_pypi_password" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index fee06244c..ba97b53d5 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi +# Exit early if samples directory doesn't exist +if [ ! -d "./samples" ]; then + echo "No tests run. `./samples` not found" + exit 0 +fi + # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -101,4 +107,4 @@ 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 +exit "$RTN" diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index f39236e94..e8c4251f3 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -15,14 +15,9 @@ set -eo pipefail -# Always run the cleanup script, regardless of the success of bouncing into -# the container. -function cleanup() { - chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - echo "cleanup"; -} -trap cleanup EXIT +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$? -$(dirname $0)/populate-secrets.sh # Secret Manager secrets. -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" \ No newline at end of file +chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh +${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true + +exit ${ret_code} diff --git a/MANIFEST.in b/MANIFEST.in index e9e29d120..68855abc3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -20,6 +20,3 @@ 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 6316a537f..228529efe 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -21,8 +21,8 @@
- 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 + 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 visit Python 2 support on Google Cloud.
{% block body %} {% endblock %} diff --git a/docs/conf.py b/docs/conf.py index b507b408e..7a03936bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,16 +20,12 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) -# For plugins that can not read conf.py. -# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85 -sys.path.insert(0, os.path.abspath(".")) - __version__ = "" # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.5.5" +needs_sphinx = "1.6.3" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -39,22 +35,24 @@ "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx.ext.coverage", - "sphinx.ext.doctest", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", - "recommonmark", ] # autodoc/autosummary flags autoclass_content = "both" -autodoc_default_options = {"members": True} +autodoc_default_flags = ["members"] 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'] @@ -95,12 +93,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = [ - "_build", - "samples/AUTHORING_GUIDE.md", - "samples/CONTRIBUTING.md", - "samples/snippets/README.rst", -] +exclude_patterns = ["_build"] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/gapic/v2/api.rst b/docs/gapic/v2/api.rst index f54ac1620..2dc6bf6fc 100644 --- a/docs/gapic/v2/api.rst +++ b/docs/gapic/v2/api.rst @@ -1,5 +1,5 @@ -Client for Cloud Logging API -============================ +Client for Stackdriver Logging API +================================== .. automodule:: google.cloud.logging_v2 :members: diff --git a/docs/gapic/v2/types.rst b/docs/gapic/v2/types.rst index 1060f7bc8..5521d4f9b 100644 --- a/docs/gapic/v2/types.rst +++ b/docs/gapic/v2/types.rst @@ -1,5 +1,5 @@ -Types for Cloud Logging API Client -================================== +Types for Stackdriver Logging API Client +======================================== .. automodule:: google.cloud.logging_v2.types :members: \ No newline at end of file diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst deleted file mode 100644 index 1cb29d4ca..000000000 --- a/docs/multiprocessing.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. 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/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index e77426f1f..d3d08370e 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -76,28 +76,38 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_account_path(cls, billing_account): - """Return a fully-qualified billing_account string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) @classmethod - def billing_account_location_path(cls, billing_account, location): - """Return a fully-qualified billing_account_location string.""" + def billing_exclusion_path(cls, billing_account, exclusion): + """Return a fully-qualified billing_exclusion string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/locations/{location}", + "billingAccounts/{billing_account}/exclusions/{exclusion}", billing_account=billing_account, - location=location, + exclusion=exclusion, + ) + + @classmethod + def billing_sink_path(cls, billing_account, sink): + """Return a fully-qualified billing_sink string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}/sinks/{sink}", + billing_account=billing_account, + sink=sink, ) @classmethod - def cmek_settings_path(cls, project): - """Return a fully-qualified cmek_settings string.""" + def exclusion_path(cls, project, exclusion): + """Return a fully-qualified exclusion string.""" return google.api_core.path_template.expand( - "projects/{project}/cmekSettings", + "projects/{project}/exclusions/{exclusion}", project=project, + exclusion=exclusion, ) @classmethod @@ -109,48 +119,20 @@ def folder_path(cls, folder): ) @classmethod - def folder_location_path(cls, folder, location): - """Return a fully-qualified folder_location string.""" + def folder_exclusion_path(cls, folder, exclusion): + """Return a fully-qualified folder_exclusion string.""" return google.api_core.path_template.expand( - "folders/{folder}/locations/{location}", + "folders/{folder}/exclusions/{exclusion}", folder=folder, - location=location, - ) - - @classmethod - def location_path(cls, project, location): - """Return a fully-qualified location string.""" - return google.api_core.path_template.expand( - "projects/{project}/locations/{location}", - project=project, - location=location, - ) - - @classmethod - def log_bucket_path(cls, project, location, bucket): - """Return a fully-qualified log_bucket string.""" - return google.api_core.path_template.expand( - "projects/{project}/locations/{location}/buckets/{bucket}", - project=project, - location=location, - bucket=bucket, - ) - - @classmethod - def log_exclusion_path(cls, project, exclusion): - """Return a fully-qualified log_exclusion string.""" - return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", - project=project, exclusion=exclusion, ) @classmethod - def log_sink_path(cls, project, sink): - """Return a fully-qualified log_sink string.""" + def folder_sink_path(cls, folder, sink): + """Return a fully-qualified folder_sink string.""" return google.api_core.path_template.expand( - "projects/{project}/sinks/{sink}", - project=project, + "folders/{folder}/sinks/{sink}", + folder=folder, sink=sink, ) @@ -163,12 +145,21 @@ def organization_path(cls, organization): ) @classmethod - def organization_location_path(cls, organization, location): - """Return a fully-qualified organization_location string.""" + def organization_exclusion_path(cls, organization, exclusion): + """Return a fully-qualified organization_exclusion string.""" return google.api_core.path_template.expand( - "organizations/{organization}/locations/{location}", + "organizations/{organization}/exclusions/{exclusion}", organization=organization, - location=location, + exclusion=exclusion, + ) + + @classmethod + def organization_sink_path(cls, organization, sink): + """Return a fully-qualified organization_sink string.""" + return google.api_core.path_template.expand( + "organizations/{organization}/sinks/{sink}", + organization=organization, + sink=sink, ) @classmethod @@ -179,6 +170,15 @@ def project_path(cls, project): project=project, ) + @classmethod + def sink_path(cls, project, sink): + """Return a fully-qualified sink string.""" + return google.api_core.path_template.expand( + "projects/{project}/sinks/{sink}", + project=project, + sink=sink, + ) + def __init__( self, transport=None, @@ -296,293 +296,7 @@ def __init__( self._inner_api_calls = {} # Service calls - def delete_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' - >>> - >>> client.delete_sink(sink_name) - - Args: - sink_name (str): Required. The full resource name of the sink to delete, including - the parent resource and the sink identifier: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" - - Example: ``"projects/my-project-id/sinks/my-sink-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_sink" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_sink, - default_retry=self._method_configs["DeleteSink"].retry, - default_timeout=self._method_configs["DeleteSink"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteSinkRequest( - sink_name=sink_name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("sink_name", sink_name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_sink( - self, - sink_name, - sink, - unique_writer_identity=None, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} - >>> - >>> response = client.update_sink(sink_name, sink) - - Args: - sink_name (str): Required. The full resource name of the sink to update, including - the parent resource and the sink identifier: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" - - Example: ``"projects/my-project-id/sinks/my-sink-id"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that - appears as part of ``sink_name``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When - updating a sink, the effect of this field on the value of - ``writer_identity`` in the updated sink depends on both the old and new - values of this field: - - - If the old and new values of this field are both false or both true, - then there is no change to the sink's ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service account. - - It is an error if the old value is true and the new value is set to - false or defaulted to false. - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need - an update. A sink field will be overwritten if, and only if, it is in - the update mask. ``name`` and output only fields cannot be updated. - - An empty updateMask is temporarily treated as using the following mask - for backwards compatibility purposes: destination,filter,includeChildren - At some point in the future, behavior will be removed and specifying an - empty updateMask will be an error. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - - Example: ``updateMask=filter``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` 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 "update_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "update_sink" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_sink, - default_retry=self._method_configs["UpdateSink"].retry, - default_timeout=self._method_configs["UpdateSink"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, - sink=sink, - unique_writer_identity=unique_writer_identity, - update_mask=update_mask, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("sink_name", sink_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["update_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes an exclusion. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> client.delete_exclusion(name) - - Args: - name (str): Required. The resource name of an existing exclusion to delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - - Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_exclusion, - default_retry=self._method_configs["DeleteExclusion"].retry, - default_timeout=self._method_configs["DeleteExclusion"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteExclusionRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def list_buckets( + def list_sinks( self, parent, page_size=None, @@ -591,17 +305,17 @@ def list_buckets( metadata=None, ): """ - Lists buckets (Beta). + Lists sinks. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # Iterate over all results - >>> for element in client.list_buckets(parent): + >>> for element in client.list_sinks(parent): ... # process element ... pass >>> @@ -609,24 +323,20 @@ def list_buckets( >>> # Alternatively: >>> >>> # Iterate over results one page at a time - >>> for page in client.list_buckets(parent).pages: + >>> for page in client.list_sinks(parent).pages: ... for element in page: ... # process element ... pass Args: - parent (str): Required. The parent resource whose buckets are to be listed: + parent (str): Required. The parent resource whose sinks are to be listed: :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be specified, but - supplying the character ``-`` in place of [LOCATION_ID] will return all - buckets. + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -643,7 +353,7 @@ def list_buckets( Returns: A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogBucket` instances. + An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. You can also iterate over the pages of the response using its `pages` property. @@ -655,17 +365,17 @@ def list_buckets( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_buckets" not in self._inner_api_calls: + if "list_sinks" not in self._inner_api_calls: self._inner_api_calls[ - "list_buckets" + "list_sinks" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_buckets, - default_retry=self._method_configs["ListBuckets"].retry, - default_timeout=self._method_configs["ListBuckets"].timeout, + self.transport.list_sinks, + default_retry=self._method_configs["ListSinks"].retry, + default_timeout=self._method_configs["ListSinks"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.ListBucketsRequest( + request = logging_config_pb2.ListSinksRequest( parent=parent, page_size=page_size, ) @@ -685,168 +395,48 @@ def list_buckets( iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._inner_api_calls["list_buckets"], + self._inner_api_calls["list_sinks"], retry=retry, timeout=timeout, metadata=metadata, ), request=request, - items_field="buckets", + items_field="sinks", request_token_field="page_token", response_token_field="next_page_token", ) return iterator - def get_bucket( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets a bucket (Beta). - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> response = client.get_bucket(name) - - Args: - name (str): Required. The resource name of the bucket: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - - Example: - ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. - 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.logging_v2.types.LogBucket` 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 "get_bucket" not in self._inner_api_calls: - self._inner_api_calls[ - "get_bucket" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_bucket, - default_retry=self._method_configs["GetBucket"].retry, - default_timeout=self._method_configs["GetBucket"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.GetBucketRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_bucket"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_bucket( + def get_sink( self, - name, - bucket, - update_mask, + sink_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: ``retention_period`` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, - FAILED_PRECONDITION will be returned. - - A buckets region may not be modified after it is created. This method is - in Beta. + Gets a sink. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> # TODO: Initialize `bucket`: - >>> bucket = {} - >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_bucket(name, bucket, update_mask) + >>> response = client.get_sink(sink_name) Args: - name (str): Required. The full resource name of the bucket to update. + sink_name (str): Required. The resource name of the sink: :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - - Example: - ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. - Also requires permission "resourcemanager.projects.updateLiens" to set - the locked property - bucket (Union[dict, ~google.cloud.logging_v2.types.LogBucket]): Required. The updated bucket. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogBucket` - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. Field mask that specifies the fields in ``bucket`` that - need an update. A bucket field will be overwritten if, and only if, it - is in the update mask. ``name`` and output only fields cannot be - updated. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" - Example: ``updateMask=retention_days``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` + Example: ``"projects/my-project-id/sinks/my-sink-id"``. 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. @@ -857,7 +447,7 @@ def update_bucket( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogBucket` instance. + A :class:`~google.cloud.logging_v2.types.LogSink` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -867,26 +457,24 @@ def update_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_bucket" not in self._inner_api_calls: + if "get_sink" not in self._inner_api_calls: self._inner_api_calls[ - "update_bucket" + "get_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_bucket, - default_retry=self._method_configs["UpdateBucket"].retry, - default_timeout=self._method_configs["UpdateBucket"].timeout, + self.transport.get_sink, + default_retry=self._method_configs["GetSink"].retry, + default_timeout=self._method_configs["GetSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.UpdateBucketRequest( - name=name, - bucket=bucket, - update_mask=update_mask, + request = logging_config_pb2.GetSinkRequest( + sink_name=sink_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: @@ -895,20 +483,24 @@ def update_bucket( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_bucket"]( + return self._inner_api_calls["get_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_sinks( + def create_sink( self, parent, - page_size=None, + sink, + unique_writer_identity=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists sinks. + Creates a sink that exports specified log entries to a destination. The + export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Example: >>> from google.cloud import logging_v2 @@ -917,34 +509,39 @@ def list_sinks( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # Iterate over all results - >>> for element in client.list_sinks(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> # TODO: Initialize `sink`: + >>> sink = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_sinks(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.create_sink(parent, sink) Args: - parent (str): Required. The parent resource whose sinks are to be listed: + parent (str): Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + + Examples: ``"projects/my-logging-project"``, + ``"organizations/123456789"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink identifier + that is not already in use. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as + ``writer_identity`` in the new sink. If this value is omitted or set to + false, and if the sink's parent is a project, then the value returned as + ``writer_identity`` is the same group or service account used by Logging + before the addition of writer identities to this API. The sink's + destination must be in the same project as the sink itself. + + If this field is set to true, or if the sink is owned by a non-project + resource such as an organization, then the value of ``writer_identity`` + will be a unique service account used only for exports from the new + sink. For more information, see ``writer_identity`` in ``LogSink``. 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. @@ -955,10 +552,7 @@ def list_sinks( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogSink` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -968,19 +562,20 @@ def list_sinks( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_sinks" not in self._inner_api_calls: + if "create_sink" not in self._inner_api_calls: self._inner_api_calls[ - "list_sinks" + "create_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_sinks, - default_retry=self._method_configs["ListSinks"].retry, - default_timeout=self._method_configs["ListSinks"].timeout, + self.transport.create_sink, + default_retry=self._method_configs["CreateSink"].retry, + default_timeout=self._method_configs["CreateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.ListSinksRequest( + request = logging_config_pb2.CreateSinkRequest( parent=parent, - page_size=page_size, + sink=sink, + unique_writer_identity=unique_writer_identity, ) if metadata is None: metadata = [] @@ -995,52 +590,84 @@ def list_sinks( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_sinks"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="sinks", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["create_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_sink( + def update_sink( self, sink_name, + sink, + unique_writer_identity=None, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Gets a sink. + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> response = client.get_sink(sink_name) + >>> # TODO: Initialize `sink`: + >>> sink = {} + >>> + >>> response = client.update_sink(sink_name, sink) Args: - sink_name (str): Required. The resource name of the sink: + sink_name (str): Required. The full resource name of the sink to update, including the + parent resource and the sink identifier: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that + appears as part of ``sink_name``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When + updating a sink, the effect of this field on the value of + ``writer_identity`` in the updated sink depends on both the old and new + values of this field: + + - If the old and new values of this field are both false or both true, + then there is no change to the sink's ``writer_identity``. + - If the old value is false and the new value is true, then + ``writer_identity`` is changed to a unique service account. + - It is an error if the old value is true and the new value is set to + false or defaulted to false. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need an + update. A sink field will be overwritten if, and only if, it is in the + update mask. ``name`` and output only fields cannot be updated. + + An empty updateMask is temporarily treated as using the following mask + for backwards compatibility purposes: destination,filter,includeChildren + At some point in the future, behavior will be removed and specifying an + empty updateMask will be an error. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=filter``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1061,18 +688,21 @@ def get_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_sink" not in self._inner_api_calls: + if "update_sink" not in self._inner_api_calls: self._inner_api_calls[ - "get_sink" + "update_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_sink, - default_retry=self._method_configs["GetSink"].retry, - default_timeout=self._method_configs["GetSink"].timeout, + self.transport.update_sink, + default_retry=self._method_configs["UpdateSink"].retry, + default_timeout=self._method_configs["UpdateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.GetSinkRequest( + request = logging_config_pb2.UpdateSinkRequest( sink_name=sink_name, + sink=sink, + unique_writer_identity=unique_writer_identity, + update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1087,65 +717,42 @@ def get_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_sink"]( + return self._inner_api_calls["update_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_sink( + def delete_sink( self, - parent, - sink, - unique_writer_identity=None, + sink_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a sink that exports specified log entries to a destination. - The export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Deletes a sink. If the sink has a unique ``writer_identity``, then that + service account is also deleted. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> response = client.create_sink(parent, sink) + >>> client.delete_sink(sink_name) Args: - parent (str): Required. The resource in which to create the sink: + sink_name (str): Required. The full resource name of the sink to delete, including the + parent resource and the sink identifier: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Examples: ``"projects/my-logging-project"``, - ``"organizations/123456789"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink - identifier that is not already in use. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is omitted or set to - false, and if the sink's parent is a project, then the value returned as - ``writer_identity`` is the same group or service account used by Logging - before the addition of writer identities to this API. The sink's - destination must be in the same project as the sink itself. + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" - If this field is set to true, or if the sink is owned by a non-project - resource such as an organization, then the value of ``writer_identity`` - will be a unique service account used only for exports from the new - sink. For more information, see ``writer_identity`` in ``LogSink``. + Example: ``"projects/my-project-id/sinks/my-sink-id"``. 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. @@ -1155,9 +762,6 @@ def create_sink( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -1166,26 +770,24 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_sink" not in self._inner_api_calls: + if "delete_sink" not in self._inner_api_calls: self._inner_api_calls[ - "create_sink" + "delete_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_sink, - default_retry=self._method_configs["CreateSink"].retry, - default_timeout=self._method_configs["CreateSink"].timeout, + self.transport.delete_sink, + default_retry=self._method_configs["DeleteSink"].retry, + default_timeout=self._method_configs["DeleteSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.CreateSinkRequest( - parent=parent, - sink=sink, - unique_writer_identity=unique_writer_identity, + request = logging_config_pb2.DeleteSinkRequest( + sink_name=sink_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: @@ -1194,7 +796,7 @@ def create_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_sink"]( + self._inner_api_calls["delete_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -1235,10 +837,10 @@ def list_exclusions( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -1324,8 +926,7 @@ def get_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') >>> >>> response = client.get_exclusion(name) @@ -1334,10 +935,10 @@ def get_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1420,15 +1021,15 @@ def create_exclusion( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging-project"``, ``"organizations/123456789"``. - exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an - exclusion name that is not already used in the parent resource. + exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an exclusion + name that is not already used in the parent resource. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogExclusion` @@ -1500,8 +1101,7 @@ def update_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') >>> >>> # TODO: Initialize `exclusion`: >>> exclusion = {} @@ -1516,10 +1116,10 @@ def update_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. New values for the existing exclusion. Only the fields @@ -1590,12 +1190,89 @@ def update_exclusion( request, retry=retry, timeout=timeout, metadata=metadata ) - def get_cmek_settings( + def delete_exclusion( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, + ): + """ + Deletes an exclusion. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> + >>> client.delete_exclusion(name) + + Args: + name (str): Required. The resource name of an existing exclusion to delete: + + :: + + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + + Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_exclusion, + default_retry=self._method_configs["DeleteExclusion"].retry, + default_timeout=self._method_configs["DeleteExclusion"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteExclusionRequest( + name=name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_cmek_settings( + self, + name=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, ): """ Gets the Logs Router CMEK settings for the given resource. @@ -1613,20 +1290,17 @@ def get_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> response = client.get_cmek_settings(name) + >>> response = client.get_cmek_settings() Args: name (str): Required. The resource for which to retrieve CMEK settings. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. @@ -1685,8 +1359,8 @@ def get_cmek_settings( def update_cmek_settings( self, - name, - cmek_settings, + name=None, + cmek_settings=None, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, @@ -1702,7 +1376,9 @@ def update_cmek_settings( ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or 3) access to the key is disabled. + key, or + + 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ @@ -1713,23 +1389,17 @@ def update_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> # TODO: Initialize `cmek_settings`: - >>> cmek_settings = {} - >>> - >>> response = client.update_cmek_settings(name, cmek_settings) + >>> response = client.update_cmek_settings() Args: name (str): Required. The resource name for the CMEK settings to update. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 2edc1e079..00c7146e2 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,118 +2,90 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "no_retry_2_codes": [], - "no_retry_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { - "retry_policy_3_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, + "write_sink": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, }, "methods": { - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "UpdateSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "UpdateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetSink": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "CreateSink": { "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "UpdateSink": { + "timeout_millis": 120000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "CreateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, "UpdateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", + "retry_codes_name": "idempotent2", + "retry_params_name": "default", }, "UpdateCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index 159669d6e..ee1a098a5 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -26,8 +26,6 @@ class LaunchStage(enum.IntEnum): Attributes: LAUNCH_STAGE_UNSPECIFIED (int): Do not use this default value. - UNIMPLEMENTED (int): The feature is not yet implemented. Users can not use it. - PRELAUNCH (int): Prelaunch features are hidden from users and are only visible internally. EARLY_ACCESS (int): Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may @@ -49,16 +47,14 @@ class LaunchStage(enum.IntEnum): limited production use cases. GA (int): GA features are open to all developers and are considered stable and fully qualified for production use. - DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For - more information, see the “Deprecation Policy” section of our `Terms of + DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more + information, see the “Deprecation Policy” section of our `Terms of Service `__ and the `Google Cloud Platform Subject to the Deprecation Policy `__ documentation. """ LAUNCH_STAGE_UNSPECIFIED = 0 - UNIMPLEMENTED = 6 - PRELAUNCH = 7 EARLY_ACCESS = 1 ALPHA = 2 BETA = 3 @@ -66,26 +62,10 @@ class LaunchStage(enum.IntEnum): DEPRECATED = 5 -class LifecycleState(enum.IntEnum): - """ - LogBucket lifecycle states (Beta). - - Attributes: - LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing - unset values. - ACTIVE (int): The normal and active state. - DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. - """ - - LIFECYCLE_STATE_UNSPECIFIED = 0 - ACTIVE = 1 - DELETE_REQUESTED = 2 - - class LogSeverity(enum.IntEnum): """ - The severity of the event described in a log entry, expressed as one - of the standard severity levels listed below. For your reference, the + The severity of the event described in a log entry, expressed as one of + the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined. @@ -95,7 +75,7 @@ class LogSeverity(enum.IntEnum): :: - severity > DEBUG AND severity <= WARNING + severity > DEBUG AND severity <= WARNING If you are writing log entries, you should map other severity encodings to one of these standard levels. For example, you might map all of @@ -129,8 +109,8 @@ class LogSeverity(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value - for the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value for + the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -174,7 +154,9 @@ class ApiVersion(enum.IntEnum): class LogSink(object): class VersionFormat(enum.IntEnum): """ - Deprecated. This is unused. + Available log entry formats. Log entries can be written to + Logging in either format and can be exported in either format. + Version 2 is the preferred format. Attributes: VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2. @@ -214,8 +196,8 @@ class ValueType(enum.IntEnum): Attributes: VALUE_TYPE_UNSPECIFIED (int): Do not use this default value. - BOOL (int): The value is a boolean. This value type can be used only if the - metric kind is ``GAUGE``. + BOOL (int): The value is a boolean. This value type can be used only if the metric + kind is ``GAUGE``. INT64 (int): The value is a signed 64-bit integer. DOUBLE (int): The value is a double precision floating point number. STRING (int): The value is a text string. This value type can be used only if the diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 1882b2b8b..c823deacb 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -80,13 +80,22 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_account_path(cls, billing_account): - """Return a fully-qualified billing_account string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) + @classmethod + def billing_log_path(cls, billing_account, log): + """Return a fully-qualified billing_log string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}/logs/{log}", + billing_account=billing_account, + log=log, + ) + @classmethod def folder_path(cls, folder): """Return a fully-qualified folder string.""" @@ -95,6 +104,15 @@ def folder_path(cls, folder): folder=folder, ) + @classmethod + def folder_log_path(cls, folder, log): + """Return a fully-qualified folder_log string.""" + return google.api_core.path_template.expand( + "folders/{folder}/logs/{log}", + folder=folder, + log=log, + ) + @classmethod def log_path(cls, project, log): """Return a fully-qualified log string.""" @@ -112,6 +130,15 @@ def organization_path(cls, organization): organization=organization, ) + @classmethod + def organization_log_path(cls, organization, log): + """Return a fully-qualified organization_log string.""" + return google.api_core.path_template.expand( + "organizations/{organization}/logs/{log}", + organization=organization, + log=log, + ) + @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -255,8 +282,7 @@ def delete_log( >>> >>> client = logging_v2.LoggingServiceV2Client() >>> - >>> # TODO: Initialize `log_name`: - >>> log_name = '' + >>> log_name = client.log_path('[PROJECT]', '[LOG]') >>> >>> client.delete_log(log_name) @@ -265,10 +291,10 @@ def delete_log( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example, ``"projects/my-project-id/logs/syslog"``, @@ -321,130 +347,6 @@ def delete_log( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_log_entries( - self, - resource_names, - filter_=None, - order_by=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.LoggingServiceV2Client() - >>> - >>> # TODO: Initialize `resource_names`: - >>> resource_names = [] - >>> - >>> # Iterate over all results - >>> for element in client.list_log_entries(resource_names): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_entries(resource_names).pages: - ... for element in page: - ... # process element - ... pass - - Args: - resource_names (list[str]): Required. Names of one or more parent resources from which to - retrieve log entries: - - :: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Projects listed in the ``project_ids`` field are added to this list. - filter_ (str): Optional. A filter that chooses which log entries to return. See - `Advanced Logs - Queries `__. - Only log entries that match the filter are returned. An empty filter - matches all log entries in the resources listed in ``resource_names``. - Referencing a parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum length of the - filter is 20000 characters. - order_by (str): Optional. How the results should be sorted. Presently, the only - permitted values are ``"timestamp asc"`` (default) and - ``"timestamp desc"``. The first option returns entries in order of - increasing values of ``LogEntry.timestamp`` (oldest first), and the - second option returns entries in order of decreasing timestamps (newest - first). Entries with equal timestamps are returned in order of their - ``insert_id`` values. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - 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.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - 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 "list_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "list_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_entries, - default_retry=self._method_configs["ListLogEntries"].retry, - default_timeout=self._method_configs["ListLogEntries"].timeout, - client_info=self._client_info, - ) - - request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names, - filter=filter_, - order_by=order_by, - page_size=page_size, - ) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_entries"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="entries", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - def write_log_entries( self, entries, @@ -477,8 +379,8 @@ def write_log_entries( >>> response = client.write_log_entries(entries) Args: - entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log - entries in this list does not matter. Values supplied in this method's + entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log entries + in this list does not matter. Values supplied in this method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the ``LogEntry`` type. @@ -508,45 +410,46 @@ def write_log_entries( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example: :: - "projects/my-project-id/logs/syslog" - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + "projects/my-project-id/logs/syslog" + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed on each project, + The permission logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new log - entries, whether the resource is specified in ``logName`` or in an + entries, whether the resource is specified in logName or in an individual log entry. - resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to - all log entries in ``entries`` that do not specify a value for - ``resource``. Example: + resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to all + log entries in ``entries`` that do not specify a value for ``resource``. + Example: :: - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + { "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See ``LogEntry``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.MonitoredResource` - labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of - all log entries in ``entries``. If a log entry already has a label with - the same key as a label in this parameter, then the log entry's label is - not changed. See ``LogEntry``. + labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of all + log entries in ``entries``. If a log entry already has a label with the + same key as a label in this parameter, then the log entry's label is not + changed. See ``LogEntry``. partial_success (bool): Optional. Whether valid entries should be written even if some other - entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any - entry is not written, then the response status is the error associated - with one of the failed entries and the response includes error details - keyed by the entries' zero-based index in the ``entries.write`` method. + entries fail due to INVALID\_ARGUMENT or PERMISSION\_DENIED errors. If + any entry is not written, then the response status is the error + associated with one of the failed entries and the response includes + error details keyed by the entries' zero-based index in the + ``entries.write`` method. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. @@ -592,6 +495,135 @@ def write_log_entries( request, retry=retry, timeout=timeout, metadata=metadata ) + def list_log_entries( + self, + resource_names, + project_ids=None, + filter_=None, + order_by=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.LoggingServiceV2Client() + >>> + >>> # TODO: Initialize `resource_names`: + >>> resource_names = [] + >>> + >>> # Iterate over all results + >>> for element in client.list_log_entries(resource_names): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_entries(resource_names).pages: + ... for element in page: + ... # process element + ... pass + + Args: + resource_names (list[str]): Required. Names of one or more parent resources from which to retrieve + log entries: + + :: + + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + + Projects listed in the ``project_ids`` field are added to this list. + project_ids (list[str]): Deprecated. Use ``resource_names`` instead. One or more project + identifiers or project numbers from which to retrieve log entries. + Example: ``"my-project-1A"``. + filter_ (str): Optional. A filter that chooses which log entries to return. See + `Advanced Logs + Queries `__. + Only log entries that match the filter are returned. An empty filter + matches all log entries in the resources listed in ``resource_names``. + Referencing a parent resource that is not listed in ``resource_names`` + will cause the filter to return no results. The maximum length of the + filter is 20000 characters. + order_by (str): Optional. How the results should be sorted. Presently, the only + permitted values are ``"timestamp asc"`` (default) and + ``"timestamp desc"``. The first option returns entries in order of + increasing values of ``LogEntry.timestamp`` (oldest first), and the + second option returns entries in order of decreasing timestamps (newest + first). Entries with equal timestamps are returned in order of their + ``insert_id`` values. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + 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.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + 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 "list_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "list_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_log_entries, + default_retry=self._method_configs["ListLogEntries"].retry, + default_timeout=self._method_configs["ListLogEntries"].timeout, + client_info=self._client_info, + ) + + request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names, + project_ids=project_ids, + filter=filter_, + order_by=order_by, + page_size=page_size, + ) + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_entries"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="entries", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + def list_monitored_resource_descriptors( self, page_size=None, @@ -720,10 +752,10 @@ def list_logs( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 6c4e8c8e4..b3da612f6 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,77 +2,59 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], }, "retry_params": { - "retry_policy_1_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, - "retry_policy_2_params": { + "list": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, "request_byte_threshold": 1048576, "delay_threshold_millis": 50, }, }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index c3d1f2f4c..87cf5b89d 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -82,14 +82,38 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def log_metric_path(cls, project, metric): - """Return a fully-qualified log_metric string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}", + billing_account=billing_account, + ) + + @classmethod + def folder_path(cls, folder): + """Return a fully-qualified folder string.""" + return google.api_core.path_template.expand( + "folders/{folder}", + folder=folder, + ) + + @classmethod + def metric_path(cls, project, metric): + """Return a fully-qualified metric string.""" return google.api_core.path_template.expand( "projects/{project}/metrics/{metric}", project=project, metric=metric, ) + @classmethod + def organization_path(cls, organization): + """Return a fully-qualified organization string.""" + return google.api_core.path_template.expand( + "organizations/{organization}", + organization=organization, + ) + @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -215,43 +239,49 @@ def __init__( self._inner_api_calls = {} # Service calls - def update_log_metric( + def list_log_metrics( self, - metric_name, - metric, + parent, + page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates or updates a logs-based metric. + Lists logs-based metrics. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> parent = client.project_path('[PROJECT]') >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> # Iterate over all results + >>> for element in client.list_log_metrics(parent): + ... # process element + ... pass >>> - >>> response = client.update_log_metric(metric_name, metric) + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_metrics(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - metric_name (str): Required. The resource name of the metric to update: + parent (str): Required. The name of the project containing the metrics: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - - The updated metric must be provided in the request and it's ``name`` - field must be the same as ``[METRIC_ID]`` If the metric does not exist - in ``[PROJECT_ID]``, then a new metric is created. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. 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. @@ -262,7 +292,10 @@ def update_log_metric( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -272,25 +305,25 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_log_metric" not in self._inner_api_calls: + if "list_log_metrics" not in self._inner_api_calls: self._inner_api_calls[ - "update_log_metric" + "list_log_metrics" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_log_metric, - default_retry=self._method_configs["UpdateLogMetric"].retry, - default_timeout=self._method_configs["UpdateLogMetric"].timeout, + self.transport.list_log_metrics, + default_retry=self._method_configs["ListLogMetrics"].retry, + default_timeout=self._method_configs["ListLogMetrics"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, - metric=metric, + request = logging_metrics_pb2.ListLogMetricsRequest( + parent=parent, + page_size=page_size, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -299,11 +332,22 @@ def update_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_metrics"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="metrics", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def delete_log_metric( + def get_log_metric( self, metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -311,23 +355,23 @@ def delete_log_metric( metadata=None, ): """ - Deletes a logs-based metric. + Gets a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> client.delete_log_metric(metric_name) + >>> response = client.get_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the metric to delete: + metric_name (str): Required. The resource name of the desired metric: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -337,6 +381,9 @@ def delete_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -345,17 +392,17 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log_metric" not in self._inner_api_calls: + if "get_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "delete_log_metric" + "get_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_log_metric, - default_retry=self._method_configs["DeleteLogMetric"].retry, - default_timeout=self._method_configs["DeleteLogMetric"].timeout, + self.transport.get_log_metric, + default_retry=self._method_configs["GetLogMetric"].retry, + default_timeout=self._method_configs["GetLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.DeleteLogMetricRequest( + request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name, ) if metadata is None: @@ -371,20 +418,20 @@ def delete_log_metric( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_log_metric"]( + return self._inner_api_calls["get_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_log_metrics( + def create_log_metric( self, parent, - page_size=None, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists logs-based metrics. + Creates a logs-based metric. Example: >>> from google.cloud import logging_v2 @@ -393,31 +440,25 @@ def list_log_metrics( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # Iterate over all results - >>> for element in client.list_log_metrics(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> # TODO: Initialize `metric`: + >>> metric = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_metrics(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.create_log_metric(parent, metric) Args: - parent (str): Required. The name of the project containing the metrics: + parent (str): Required. The resource name of the project in which to create the + metric: :: - "projects/[PROJECT_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]" + + The new metric must be provided in the request. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that + already exists. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -428,10 +469,7 @@ def list_log_metrics( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -441,19 +479,19 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_metrics" not in self._inner_api_calls: + if "create_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "list_log_metrics" + "create_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_metrics, - default_retry=self._method_configs["ListLogMetrics"].retry, - default_timeout=self._method_configs["ListLogMetrics"].timeout, + self.transport.create_log_metric, + default_retry=self._method_configs["CreateLogMetric"].retry, + default_timeout=self._method_configs["CreateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.ListLogMetricsRequest( + request = logging_metrics_pb2.CreateLogMetricRequest( parent=parent, - page_size=page_size, + metric=metric, ) if metadata is None: metadata = [] @@ -468,46 +506,47 @@ def list_log_metrics( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_metrics"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="metrics", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["create_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_log_metric( + def update_log_metric( self, metric_name, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Gets a logs-based metric. + Creates or updates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.get_log_metric(metric_name) + >>> # TODO: Initialize `metric`: + >>> metric = {} + >>> + >>> response = client.update_log_metric(metric_name, metric) Args: - metric_name (str): Required. The resource name of the desired metric: + metric_name (str): Required. The resource name of the metric to update: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + + The updated metric must be provided in the request and it's ``name`` + field must be the same as ``[METRIC_ID]`` If the metric does not exist + in ``[PROJECT_ID]``, then a new metric is created. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -528,18 +567,19 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_log_metric" not in self._inner_api_calls: + if "update_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "get_log_metric" + "update_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_log_metric, - default_retry=self._method_configs["GetLogMetric"].retry, - default_timeout=self._method_configs["GetLogMetric"].timeout, + self.transport.update_log_metric, + default_retry=self._method_configs["UpdateLogMetric"].retry, + default_timeout=self._method_configs["UpdateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.GetLogMetricRequest( + request = logging_metrics_pb2.UpdateLogMetricRequest( metric_name=metric_name, + metric=metric, ) if metadata is None: metadata = [] @@ -554,47 +594,35 @@ def get_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_log_metric"]( + return self._inner_api_calls["update_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_log_metric( + def delete_log_metric( self, - parent, - metric, + metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a logs-based metric. + Deletes a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.create_log_metric(parent, metric) + >>> client.delete_log_metric(metric_name) Args: - parent (str): Required. The resource name of the project in which to create the - metric: + metric_name (str): Required. The resource name of the metric to delete: :: - "projects/[PROJECT_ID]" - - The new metric must be provided in the request. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that - already exists. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -604,9 +632,6 @@ def create_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -615,25 +640,24 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_log_metric" not in self._inner_api_calls: + if "delete_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "create_log_metric" + "delete_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_log_metric, - default_retry=self._method_configs["CreateLogMetric"].retry, - default_timeout=self._method_configs["CreateLogMetric"].timeout, + self.transport.delete_log_metric, + default_retry=self._method_configs["DeleteLogMetric"].retry, + default_timeout=self._method_configs["DeleteLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, - metric=metric, + request = logging_metrics_pb2.DeleteLogMetricRequest( + metric_name=metric_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: @@ -642,6 +666,6 @@ def create_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_log_metric"]( + self._inner_api_calls["delete_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index d4bc0e960..133abec23 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,68 +2,45 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "no_retry_1_codes": [], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], }, "retry_params": { - "retry_policy_4_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, + } }, "methods": { - "UpdateLogMetric": { + "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "DeleteLogMetric": { + "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "ListLogMetrics": { + "CreateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, - "GetLogMetric": { + "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "CreateLogMetric": { + "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 3cb7e0870..f3132ede0 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -116,140 +116,78 @@ def channel(self): return self._channel @property - def delete_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteSink - - @property - def update_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].UpdateSink - - @property - def delete_exclusion(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. - - Deletes an exclusion. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteExclusion - - @property - def list_buckets(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_buckets`. + def list_sinks(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. - Lists buckets (Beta). + Lists sinks. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListBuckets + return self._stubs["config_service_v2_stub"].ListSinks @property - def get_bucket(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_bucket`. + def get_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. - Gets a bucket (Beta). + Gets a sink. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetBucket + return self._stubs["config_service_v2_stub"].GetSink @property - def update_bucket(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_bucket`. - - Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: ``retention_period`` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, - FAILED_PRECONDITION will be returned. + def create_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. - A buckets region may not be modified after it is created. This method is - in Beta. + Creates a sink that exports specified log entries to a destination. The + export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateBucket + return self._stubs["config_service_v2_stub"].CreateSink @property - def list_sinks(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. - - Lists sinks. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].ListSinks + def update_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - @property - def get_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. - Gets a sink. + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetSink + return self._stubs["config_service_v2_stub"].UpdateSink @property - def create_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. + def delete_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - Creates a sink that exports specified log entries to a destination. - The export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Deletes a sink. If the sink has a unique ``writer_identity``, then that + service account is also deleted. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].CreateSink + return self._stubs["config_service_v2_stub"].DeleteSink @property def list_exclusions(self): @@ -305,6 +243,19 @@ def update_exclusion(self): """ return self._stubs["config_service_v2_stub"].UpdateExclusion + @property + def delete_exclusion(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. + + Deletes an exclusion. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].DeleteExclusion + @property def get_cmek_settings(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_cmek_settings`. @@ -339,7 +290,9 @@ def update_cmek_settings(self): ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or 3) access to the key is disabled. + key, or + + 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 07ca0603f..4cf843caf 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -129,22 +129,6 @@ def delete_log(self): """ return self._stubs["logging_service_v2_stub"].DeleteLog - @property - def list_log_entries(self): - """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. - - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["logging_service_v2_stub"].ListLogEntries - @property def write_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. @@ -164,6 +148,22 @@ def write_log_entries(self): """ return self._stubs["logging_service_v2_stub"].WriteLogEntries + @property + def list_log_entries(self): + """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. + + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["logging_service_v2_stub"].ListLogEntries + @property def list_monitored_resource_descriptors(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_monitored_resource_descriptors`. diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index f1d75af56..605bc118e 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -116,66 +116,66 @@ def channel(self): return self._channel @property - def update_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. + def list_log_metrics(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. - Creates or updates a logs-based metric. + Lists logs-based metrics. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].UpdateLogMetric + return self._stubs["metrics_service_v2_stub"].ListLogMetrics @property - def delete_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. + def get_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. - Deletes a logs-based metric. + Gets a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].DeleteLogMetric + return self._stubs["metrics_service_v2_stub"].GetLogMetric @property - def list_log_metrics(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. + def create_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. - Lists logs-based metrics. + Creates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].ListLogMetrics + return self._stubs["metrics_service_v2_stub"].CreateLogMetric @property - def get_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. + def update_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. - Gets a logs-based metric. + Creates or updates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].GetLogMetric + return self._stubs["metrics_service_v2_stub"].UpdateLogMetric @property - def create_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. + def delete_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. - Creates a logs-based metric. + Deletes a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].CreateLogMetric + return self._stubs["metrics_service_v2_stub"].DeleteLogMetric diff --git a/google/cloud/logging_v2/proto/log_entry.proto b/google/cloud/logging_v2/proto/log_entry.proto index 3ad2cfbb5..3f9c3d51d 100644 --- a/google/cloud/logging_v2/proto/log_entry.proto +++ b/google/cloud/logging_v2/proto/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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,12 +11,12 @@ // 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.logging.v2; -import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; @@ -34,7 +34,6 @@ option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -option ruby_package = "Google::Cloud::Logging::V2"; // An individual entry in a log. // @@ -56,9 +55,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may be used in place of PROJECT_ID. The project number is - // translated to its corresponding PROJECT_ID internally and the `log_name` - // field will contain PROJECT_ID in queries and exports. + // A project number may optionally be used in place of PROJECT_ID. The project + // number is translated to its corresponding PROJECT_ID internally and the + // `log_name` field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -71,16 +70,16 @@ message LogEntry { // forward-slash is removed. Listing the log entry will not show the leading // slash and filtering for a log name with a leading slash will never return // any results. - string log_name = 12 [(google.api.field_behavior) = REQUIRED]; + string log_name = 12; // Required. The monitored resource that produced this log entry. // // Example: a log entry that reports a database error would be associated with // the monitored resource designating the particular database that reported // the error. - google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; + google.api.MonitoredResource resource = 8; - // The log entry payload, which can be one of multiple types. + // Optional. The log entry payload, which can be one of multiple types. oneof payload { // The log entry payload, represented as a protocol buffer. Some Google // Cloud Platform services use this field for their log entry payloads. @@ -100,27 +99,29 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This time is used - // to compute the log entry's age and to enforce the logs retention period. - // If this field is omitted in a new log entry, then Logging assigns it the - // current time. Timestamps have nanosecond accuracy, but trailing zeros in - // the fractional seconds might be omitted when the timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This + // time is used to compute the log entry's age and to enforce the logs + // retention period. If this field is omitted in a new log entry, then Logging + // assigns it the current time. Timestamps have nanosecond accuracy, but + // trailing zeros in the fractional seconds might be omitted when the + // timestamp is displayed. // - // Incoming log entries must have timestamps that don't exceed the - // [logs retention - // period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - // the past, and that don't exceed 24 hours in the future. Log entries outside - // those time boundaries aren't ingested by Logging. - google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; + // Incoming log entries should have timestamps that are no more than the [logs + // retention period](/logging/quotas) in the past, and no more than 24 hours + // in the future. Log entries outside those time boundaries will not be + // available when calling `entries.list`, but those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + google.protobuf.Timestamp timestamp = 9; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp receive_timestamp = 24; - // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The severity of the log entry. The default value is + // `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10; - // Optional. A unique identifier for the log entry. If you provide a value, then - // Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, + // then Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -130,32 +131,43 @@ message LogEntry { // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. - string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; + string insert_id = 4; - // Optional. Information about the HTTP request associated with this log entry, if - // applicable. - google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Information about the HTTP request associated with this log + // entry, if applicable. + google.logging.type.HttpRequest http_request = 7; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11 [(google.api.field_behavior) = OPTIONAL]; + map labels = 11; + + // Deprecated. Output only. Additional metadata about the monitored resource. + // + // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have + // this field populated for GKE versions older than 1.12.6. For GKE versions + // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes + // pod labels that used to be in `metadata.userLabels` will now be present in + // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system + // labels that were present in the `metadata.systemLabels` field will no + // longer be available in the LogEntry. + google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; + LogEntryOperation operation = 15; - // Optional. Resource name of the trace associated with the log entry, if any. If it - // contains a relative resource name, the name is assumed to be relative to - // `//tracing.googleapis.com`. Example: + // Optional. Resource name of the trace associated with the log entry, if any. + // If it contains a relative resource name, the name is assumed to be relative + // to `//tracing.googleapis.com`. Example: // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - string trace = 22 [(google.api.field_behavior) = OPTIONAL]; + string trace = 22; // Optional. The span ID within the trace associated with the log entry. // // For Trace spans, this is the same format that the Trace API v2 uses: a // 16-character hexadecimal encoding of an 8-byte array, such as - // `000000000000004a`. - string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; + // "000000000000004a". + string span_id = 27; // Optional. The sampling decision of the trace associated with the log entry. // @@ -164,10 +176,11 @@ message LogEntry { // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; + bool trace_sampled = 30; - // Optional. Source code location information associated with the log entry, if any. - LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Source code location information associated with the log entry, + // if any. + LogEntrySourceLocation source_location = 23; } // Additional information about a potentially long-running operation with which @@ -175,18 +188,18 @@ message LogEntry { message LogEntryOperation { // Optional. An arbitrary operation identifier. Log entries with the same // identifier are assumed to be part of the same operation. - string id = 1 [(google.api.field_behavior) = OPTIONAL]; + string id = 1; // Optional. An arbitrary producer identifier. The combination of `id` and // `producer` must be globally unique. Examples for `producer`: // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - string producer = 2 [(google.api.field_behavior) = OPTIONAL]; + string producer = 2; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3 [(google.api.field_behavior) = OPTIONAL]; + bool first = 3; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4 [(google.api.field_behavior) = OPTIONAL]; + bool last = 4; } // Additional information about the source code location that produced the log @@ -194,11 +207,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1 [(google.api.field_behavior) = OPTIONAL]; + string file = 1; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; + int64 line = 2; // Optional. Human-readable name of the function or method being invoked, with // optional context such as the class or package name. This information may be @@ -206,5 +219,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3 [(google.api.field_behavior) = OPTIONAL]; + string function = 3; } diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index bd5c29b01..9b0ef2205 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -12,7 +15,6 @@ _sym_db = _symbol_database.Default() -from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) @@ -34,11 +36,13 @@ name="google/cloud/logging_v2/proto/log_entry.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xce\x07\n\x08LogEntry\x12\x10\n\x08log_name\x18\x0c \x01(\t\x12/\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12-\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverity\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x36\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequest\x12\x37\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntry\x12;\n\x08metadata\x18\x19 \x01(\x0b\x32%.google.api.MonitoredResourceMetadataB\x02\x18\x01\x12\x37\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperation\x12\r\n\x05trace\x18\x16 \x01(\t\x12\x0f\n\x07span_id\x18\x1b \x01(\t\x12\x15\n\rtrace_sampled\x18\x1e \x01(\x08\x12\x42\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, @@ -58,7 +62,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -69,7 +72,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, @@ -77,7 +80,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -88,7 +90,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, @@ -96,19 +98,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1121, - serialized_end=1166, + serialized_start=1084, + serialized_end=1129, ) _LOGENTRY = _descriptor.Descriptor( @@ -117,7 +118,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -128,15 +128,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -153,9 +152,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="proto_payload", @@ -174,7 +172,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_payload", @@ -185,7 +182,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, @@ -193,7 +190,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="json_payload", @@ -212,7 +208,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="timestamp", @@ -229,9 +224,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="receive_timestamp", @@ -248,9 +242,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="severity", @@ -267,9 +260,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="insert_id", @@ -280,15 +272,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="http_request", @@ -305,9 +296,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -324,14 +314,31 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metadata", + full_name="google.logging.v2.LogEntry.metadata", + index=11, + number=25, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="operation", full_name="google.logging.v2.LogEntry.operation", - index=11, + index=12, number=15, type=11, cpp_type=10, @@ -343,52 +350,49 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace", full_name="google.logging.v2.LogEntry.trace", - index=12, + index=13, number=22, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="span_id", full_name="google.logging.v2.LogEntry.span_id", - index=13, + index=14, number=27, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace_sampled", full_name="google.logging.v2.LogEntry.trace_sampled", - index=14, + index=15, number=30, type=8, cpp_type=7, @@ -400,14 +404,13 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_location", full_name="google.logging.v2.LogEntry.source_location", - index=15, + index=16, number=23, type=11, cpp_type=10, @@ -419,9 +422,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -429,7 +431,9 @@ _LOGENTRY_LABELSENTRY, ], enum_types=[], - serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", + serialized_options=_b( + "\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -439,12 +443,11 @@ full_name="google.logging.v2.LogEntry.payload", index=0, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[], ), ], - serialized_start=391, - serialized_end=1369, + serialized_start=358, + serialized_end=1332, ) @@ -454,7 +457,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="id", @@ -465,15 +467,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="producer", @@ -484,15 +485,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="first", @@ -509,9 +509,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="last", @@ -528,9 +527,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -541,8 +539,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1371, - serialized_end=1469, + serialized_start=1334, + serialized_end=1412, ) @@ -552,7 +550,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="file", @@ -563,15 +560,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="line", @@ -588,9 +584,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="function", @@ -601,15 +596,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -620,8 +614,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1471, - serialized_end=1556, + serialized_start=1414, + serialized_end=1484, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY @@ -647,6 +641,9 @@ "http_request" ].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST _LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY +_LOGENTRY.fields_by_name[ + "metadata" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEMETADATA _LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION _LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION _LOGENTRY.oneofs_by_name["payload"].fields.append( @@ -675,30 +672,31 @@ LogEntry = _reflection.GeneratedProtocolMessageType( "LogEntry", (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRY_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" + dict( + DESCRIPTOR=_LOGENTRY_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - }, + ), ), - "DESCRIPTOR": _LOGENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """An individual entry in a log. + DESCRIPTOR=_LOGENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""An individual entry in a log. + Attributes: log_name: Required. The resource name of the log to which this log entry - belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be - used in place of PROJECT_ID. The project number is translated - to its corresponding PROJECT_ID internally and the - ``log_name`` field will contain PROJECT_ID in queries and + "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may + optionally be used in place of PROJECT\_ID. The project number + is translated to its corresponding PROJECT\_ID internally and + the ``log_name`` field will contain PROJECT\_ID in queries and exports. ``[LOG_ID]`` must be URL-encoded within ``log_name``. Example: ``"organizations/1234567890/logs/cloudr esourcemanager.googleapis.com%2Factivity"``. ``[LOG_ID]`` must @@ -717,14 +715,15 @@ associated with the monitored resource designating the particular database that reported the error. payload: - The log entry payload, which can be one of multiple types. + Optional. The log entry payload, which can be one of multiple + types. proto_payload: The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. The following protocol buffer types are supported; user-defined types are not supported: - “type.googleapis.com/google.cloud.audit.AuditLog” - “type.googleapis.com/google.appengine.logging.v1.RequestLog” + "type.googleapis.com/google.cloud.audit.AuditLog" + "type.googleapis.com/google.appengine.logging.v1.RequestLog" text_payload: The log entry payload, represented as a Unicode string (UTF-8). @@ -733,16 +732,18 @@ expressed as a JSON object. timestamp: Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry’s age and + occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is - displayed. Incoming log entries must have timestamps that - don’t exceed the `logs retention period `__ in the past, and - that don’t exceed 24 hours in the future. Log entries outside - those time boundaries aren’t ingested by Logging. + displayed. Incoming log entries should have timestamps that + are no more than the `logs retention period + `__ in the past, and no more than 24 hours in + the future. Log entries outside those time boundaries will not + be available when calling ``entries.list``, but those log + entries can still be `exported with LogSinks + `__. receive_timestamp: Output only. The time the log entry was received by Logging. severity: @@ -765,6 +766,18 @@ labels: Optional. A set of user-defined (key, value) data that provides additional information about the log entry. + metadata: + Deprecated. Output only. Additional metadata about the + monitored resource. Only ``k8s_container``, ``k8s_pod``, and + ``k8s_node`` MonitoredResources have this field populated for + GKE versions older than 1.12.6. For GKE versions 1.12.6 and + above, the ``metadata`` field has been deprecated. The + Kubernetes pod labels that used to be in + ``metadata.userLabels`` will now be present in the ``labels`` + field with a key prefix of ``k8s-pod/``. The Stackdriver + system labels that were present in the + ``metadata.systemLabels`` field will no longer be available in + the LogEntry. operation: Optional. Information about an operation associated with the log entry, if applicable. @@ -778,7 +791,7 @@ Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an - 8-byte array, such as ``000000000000004a``. + 8-byte array, such as "000000000000004a". trace_sampled: Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the @@ -793,7 +806,7 @@ log entry, if any. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - }, + ), ) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) @@ -801,11 +814,12 @@ LogEntryOperation = _reflection.GeneratedProtocolMessageType( "LogEntryOperation", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYOPERATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about a potentially long-running operation with - which a log entry is associated. + dict( + DESCRIPTOR=_LOGENTRYOPERATION, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""Additional information about a potentially long-running + operation with which a log entry is associated. + Attributes: id: @@ -825,18 +839,19 @@ the operation. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - }, + ), ) _sym_db.RegisterMessage(LogEntryOperation) LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( "LogEntrySourceLocation", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYSOURCELOCATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about the source code location that produced - the log entry. + dict( + DESCRIPTOR=_LOGENTRYSOURCELOCATION, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""Additional information about the source code location that + produced the log entry. + Attributes: file: @@ -856,32 +871,13 @@ (Go), ``function`` (Python). """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - }, + ), ) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name["log_name"]._options = None -_LOGENTRY.fields_by_name["resource"]._options = None -_LOGENTRY.fields_by_name["timestamp"]._options = None -_LOGENTRY.fields_by_name["receive_timestamp"]._options = None -_LOGENTRY.fields_by_name["severity"]._options = None -_LOGENTRY.fields_by_name["insert_id"]._options = None -_LOGENTRY.fields_by_name["http_request"]._options = None -_LOGENTRY.fields_by_name["labels"]._options = None -_LOGENTRY.fields_by_name["operation"]._options = None -_LOGENTRY.fields_by_name["trace"]._options = None -_LOGENTRY.fields_by_name["span_id"]._options = None -_LOGENTRY.fields_by_name["trace_sampled"]._options = None -_LOGENTRY.fields_by_name["source_location"]._options = None +_LOGENTRY.fields_by_name["metadata"]._options = None _LOGENTRY._options = None -_LOGENTRYOPERATION.fields_by_name["id"]._options = None -_LOGENTRYOPERATION.fields_by_name["producer"]._options = None -_LOGENTRYOPERATION.fields_by_name["first"]._options = None -_LOGENTRYOPERATION.fields_by_name["last"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 8a9393943..07cb78fe0 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py @@ -1,3 +1,2 @@ # 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/logging_v2/proto/logging.proto b/google/cloud/logging_v2/proto/logging.proto index 58647b92f..c3a524633 100644 --- a/google/cloud/logging_v2/proto/logging.proto +++ b/google/cloud/logging_v2/proto/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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,11 +11,13 @@ // 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.logging.v2; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -24,10 +26,8 @@ import "google/logging/v2/log_entry.proto"; import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -36,7 +36,6 @@ option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -option ruby_package = "Google::Cloud::Logging::V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { @@ -88,8 +87,7 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting - // Logs](https://cloud.google.com/logging/docs/export). + // entries, see [Exporting Logs](/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -144,7 +142,7 @@ message DeleteLogRequest { string log_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Log" + child_type: "logging.googleapis.com/Log" } ]; } @@ -164,16 +162,13 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission `logging.logEntries.create` is needed on each project, - // organization, billing account, or folder that is receiving new log - // entries, whether the resource is specified in `logName` or in an - // individual log entry. - string log_name = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - } - ]; + // The permission logging.logEntries.create is needed on each + // project, organization, billing account, or folder that is receiving + // new log entries, whether the resource is specified in + // logName or in an individual log entry. + string log_name = 1 [(google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + }]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -183,13 +178,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; + google.api.MonitoredResource resource = 2; // Optional. Default labels that are added to the `labels` field of all log // entries in `entries`. If a log entry already has a label with the same key // as a label in this parameter, then the log entry's label is not changed. // See [LogEntry][google.logging.v2.LogEntry]. - map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + map labels = 3; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -205,16 +200,15 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](https://cloud.google.com/logging/quota-policy) in - // the past or more than 24 hours in the future will not be available when - // calling `entries.list`. However, those log entries can still be [exported - // with - // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + // [logs retention period](/logging/quota-policy) in the past or more than + // 24 hours in the future will not be available when calling `entries.list`. + // However, those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to - // `entries.write`, you should try to include several log entries in this - // list, rather than calling this method for each individual log entry. + // [quota limit](/logging/quota-policy) for calls to `entries.write`, + // you should try to include several log entries in this list, + // rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other @@ -222,16 +216,19 @@ message WriteLogEntriesRequest { // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; + bool partial_success = 5; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; + bool dry_run = 6; } // Result returned from WriteLogEntries. -message WriteLogEntriesResponse {} +// empty +message WriteLogEntriesResponse { + +} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -246,6 +243,11 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { + // Deprecated. Use `resource_names` instead. One or more project identifiers + // or project numbers from which to retrieve log entries. Example: + // `"my-project-1A"`. + repeated string project_ids = 1 [deprecated = true]; + // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -264,13 +266,13 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - // Only log entries that match the filter are returned. An empty filter - // matches all log entries in the resources listed in `resource_names`. - // Referencing a parent resource that is not listed in `resource_names` will - // cause the filter to return no results. The maximum length of the filter is - // 20000 characters. - string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + // Logs Queries](/logging/docs/view/advanced-queries). Only log entries that + // match the filter are returned. An empty filter matches all log entries in + // the resources listed in `resource_names`. Referencing a parent resource + // that is not listed in `resource_names` will cause the filter to return no + // results. + // The maximum length of the filter is 20000 characters. + string filter = 2; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -278,19 +280,18 @@ message ListLogEntriesRequest { // `LogEntry.timestamp` (oldest first), and the second option returns entries // in order of decreasing timestamps (newest first). Entries with equal // timestamps are returned in order of their `insert_id` values. - string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; + string order_by = 3; // Optional. The maximum number of results to return from this request. - // Default is 50. If the value is negative or exceeds 1000, - // the request is rejected. The presence of `next_page_token` in the + // Non-positive values are ignored. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + int32 page_size = 4; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + string page_token = 5; } // Result returned from `ListLogEntries`. @@ -318,13 +319,13 @@ message ListMonitoredResourceDescriptorsRequest { // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + int32 page_size = 1; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + string page_token = 2; } // Result returned from ListMonitoredResourceDescriptors. @@ -346,23 +347,20 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" - } - ]; + string parent = 1 [(google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + }]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + int32 page_size = 2; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + string page_token = 3; } // Result returned from ListLogs. diff --git a/google/cloud/logging_v2/proto/logging_config.proto b/google/cloud/logging_v2/proto/logging_config.proto index 9486f4a9a..7fb830ded 100644 --- a/google/cloud/logging_v2/proto/logging_config.proto +++ b/google/cloud/logging_v2/proto/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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,6 +11,7 @@ // 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"; @@ -32,19 +33,6 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -option ruby_package = "Google::Cloud::Logging::V2"; -option (google.api.resource_definition) = { - type: "logging.googleapis.com/OrganizationLocation" - pattern: "organizations/{organization}/locations/{location}" -}; -option (google.api.resource_definition) = { - type: "logging.googleapis.com/FolderLocation" - pattern: "folders/{folder}/locations/{location}" -}; -option (google.api.resource_definition) = { - type: "logging.googleapis.com/BillingAccountLocation" - pattern: "billingAccounts/{billing_account}/locations/{location}" -}; // Service for configuring sinks used to route log entries. service ConfigServiceV2 { @@ -55,79 +43,6 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; - // Lists buckets (Beta). - rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { - option (google.api.http) = { - get: "/v2/{parent=*/*/locations/*}/buckets" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/buckets" - } - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/buckets" - } - additional_bindings { - get: "/v2/{parent=folders/*/locations/*}/buckets" - } - additional_bindings { - get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a bucket (Beta). - rpc GetBucket(GetBucketRequest) returns (LogBucket) { - option (google.api.http) = { - get: "/v2/{name=*/*/locations/*/buckets/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/buckets/*}" - } - additional_bindings { - get: "/v2/{name=organizations/*/locations/*/buckets/*}" - } - additional_bindings { - get: "/v2/{name=folders/*/locations/*/buckets/*}" - } - additional_bindings { - get: "/v2/{name=billingAccounts/*/buckets/*}" - } - }; - } - - // Updates a bucket. This method replaces the following fields in the - // existing bucket with values from the new bucket: `retention_period` - // - // If the retention period is decreased and the bucket is locked, - // FAILED_PRECONDITION will be returned. - // - // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - // will be returned. - // - // A buckets region may not be modified after it is created. - // This method is in Beta. - rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { - option (google.api.http) = { - patch: "/v2/{name=*/*/locations/*/buckets/*}" - body: "bucket" - additional_bindings { - patch: "/v2/{name=projects/*/locations/*/buckets/*}" - body: "bucket" - } - additional_bindings { - patch: "/v2/{name=organizations/*/locations/*/buckets/*}" - body: "bucket" - } - additional_bindings { - patch: "/v2/{name=folders/*/locations/*/buckets/*}" - body: "bucket" - } - additional_bindings { - patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" - body: "bucket" - } - }; - } - // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -382,8 +297,7 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. + // Router](/logging/docs/routing/managed-encryption) for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -406,8 +320,7 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - // for more information. + // Router](/logging/docs/routing/managed-encryption) for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -420,48 +333,6 @@ service ConfigServiceV2 { } } -// Describes a repository of logs (Beta). -message LogBucket { - option (google.api.resource) = { - type: "logging.googleapis.com/LogBucket" - pattern: "projects/{project}/locations/{location}/buckets/{bucket}" - pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" - pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" - pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" - }; - - // The resource name of the bucket. - // For example: - // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The - // supported locations are: - // "global" - // "us-central1" - // - // For the location of `global` it is unspecified where logs are actually - // stored. - // Once a bucket has been created, the location can not be changed. - string name = 1; - - // Describes this bucket. - string description = 3; - - // Output only. The creation timestamp of the bucket. This is not set for any of the - // default buckets. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of the bucket. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Logs will be retained by default for this amount of time, after which they - // will automatically be deleted. The minimum retention period is 1 day. - // If this value is set to zero at bucket creation time, the default time of - // 30 days will be used. - int32 retention_days = 11; - - // Output only. The bucket lifecycle state. - LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -469,14 +340,16 @@ message LogBucket { // folder. message LogSink { option (google.api.resource) = { - type: "logging.googleapis.com/LogSink" + type: "logging.googleapis.com/Sink" pattern: "projects/{project}/sinks/{sink}" pattern: "organizations/{organization}/sinks/{sink}" pattern: "folders/{folder}/sinks/{sink}" pattern: "billingAccounts/{billing_account}/sinks/{sink}" }; - // Deprecated. This is unused. + // Available log entry formats. Log entries can be written to + // Logging in either format and can be exported in either format. + // Version 2 is the preferred format. enum VersionFormat { // An unspecified format version that will default to V2. VERSION_FORMAT_UNSPECIFIED = 0; @@ -488,12 +361,12 @@ message LogSink { V1 = 2; } - // Required. The client-assigned sink identifier, unique within the project. Example: - // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100 - // characters and can include only the following characters: upper and - // lower-case alphanumeric characters, underscores, hyphens, and periods. - // First character has to be alphanumeric. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The client-assigned sink identifier, unique within the + // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are + // limited to 100 characters and can include only the following characters: + // upper and lower-case alphanumeric characters, underscores, hyphens, and + // periods. First character has to be alphanumeric. + string name = 1; // Required. The export destination: // @@ -504,44 +377,42 @@ message LogSink { // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log // entries are not exported. For more information, see - // [Exporting Logs with - // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - string destination = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "*" - } - ]; + // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). + string destination = 3 [(google.api.resource_reference) = { + type: "*" + }]; - // Optional. An [advanced logs - // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - // only exported log entries are those that are in the resource owning the - // sink and that match the filter. For example: + // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only + // exported log entries are those that are in the resource owning the sink and + // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + string filter = 5; // Optional. A description of this sink. // The maximum length of the description is 8000 characters. - string description = 18 [(google.api.field_behavior) = OPTIONAL]; + string description = 18; // Optional. If set to True, then this sink is disabled and it does not // export any log entries. - bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; + bool disabled = 19; - // Deprecated. This field is unused. + // Deprecated. The log entry format to use for this sink's exported log + // entries. The v2 format is used by default and cannot be changed. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity–a service account or group—under which Logging - // writes the exported log entries to the sink's destination. This field is - // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - // value of `unique_writer_identity` in those methods. + // Output only. An IAM identity—a service account or group—under + // which Logging writes the exported log entries to the sink's destination. + // This field is set by + // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + // and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] + // based on the value of `unique_writer_identity` in those methods. // // Until you grant this identity write-access to the destination, log entry // exports from this sink will fail. For more information, // see [Granting Access for a - // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + // Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -559,12 +430,12 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; + bool include_children = 9; - // Destination dependent options. + // Optional. Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; + BigQueryOptions bigquery_options = 12; } // Output only. The creation timestamp of the sink. @@ -576,19 +447,24 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Do not use. This field is ignored. + google.protobuf.Timestamp start_time = 10 [deprecated = true]; + + // Do not use. This field is ignored. + google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - // default, Logging creates dated tables based on the log entries' timestamps, - // e.g. syslog_20170523. With partitioned tables the date suffix is no longer + // tables](/bigquery/docs/partitioned-tables). By default, Logging + // creates dated tables based on the log entries' timestamps, e.g. + // syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - // has to be used instead. In both cases, tables are sharded based on UTC - // timezone. - bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; + // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // In both cases, tables are sharded based on UTC timezone. + bool use_partitioned_tables = 1; // Output only. True if new timestamp column based partitioning is in use, // false if legacy ingestion-time partitioning is in use. @@ -599,114 +475,6 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// LogBucket lifecycle states (Beta). -enum LifecycleState { - // Unspecified state. This is only used/useful for distinguishing - // unset values. - LIFECYCLE_STATE_UNSPECIFIED = 0; - - // The normal and active state. - ACTIVE = 1; - - // The bucket has been marked for deletion by the user. - DELETE_REQUESTED = 2; -} - -// The parameters to `ListBuckets` (Beta). -message ListBucketsRequest { - // Required. The parent resource whose buckets are to be listed: - // - // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - // - // Note: The locations portion of the resource must be specified, but - // supplying the character `-` in place of [LOCATION_ID] will return all - // buckets. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "logging.googleapis.com/LogBucket" - } - ]; - - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method - // parameters should be identical to those in the previous call. - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the - // response indicates that more results might be available. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response from ListBuckets (Beta). -message ListBucketsResponse { - // A list of buckets. - repeated LogBucket buckets = 1; - - // If there might be more results than appear in this response, then - // `nextPageToken` is included. To get the next set of results, call the same - // method again using the value of `nextPageToken` as `pageToken`. - string next_page_token = 2; -} - -// The parameters to `UpdateBucket` (Beta). -message UpdateBucketRequest { - // Required. The full resource name of the bucket to update. - // - // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also - // requires permission "resourcemanager.projects.updateLiens" to set the - // locked property - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogBucket" - } - ]; - - // Required. The updated bucket. - LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Field mask that specifies the fields in `bucket` that need an update. A - // bucket field will be overwritten if, and only if, it is in the update - // mask. `name` and output only fields cannot be updated. - // - // For a detailed `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - // - // Example: `updateMask=retention_days`. - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// The parameters to `GetBucket` (Beta). -message GetBucketRequest { - // Required. The resource name of the bucket: - // - // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - // - // Example: - // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "logging.googleapis.com/LogBucket" - } - ]; -} - // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: @@ -718,7 +486,7 @@ message ListSinksRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/LogSink" + child_type: "logging.googleapis.com/Sink" } ]; @@ -726,12 +494,12 @@ message ListSinksRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + string page_token = 2; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + int32 page_size = 3; } // Result returned from `ListSinks`. @@ -758,7 +526,7 @@ message GetSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" + type: "logging.googleapis.com/Sink" } ]; } @@ -776,7 +544,7 @@ message CreateSinkRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/LogSink" + child_type: "logging.googleapis.com/Sink" } ]; @@ -795,13 +563,13 @@ message CreateSinkRequest { // resource such as an organization, then the value of `writer_identity` will // be a unique service account used only for exports from the new sink. For // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. - bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; + bool unique_writer_identity = 3; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the parent - // resource and the sink identifier: + // Required. The full resource name of the sink to update, including the + // parent resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -812,12 +580,12 @@ message UpdateSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" + type: "logging.googleapis.com/Sink" } ]; - // Required. The updated sink, whose name is the same identifier that appears as part - // of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears + // as part of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -831,7 +599,7 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; + bool unique_writer_identity = 3; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is @@ -847,13 +615,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 4; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the parent - // resource and the sink identifier: + // Required. The full resource name of the sink to delete, including the + // parent resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -864,7 +632,7 @@ message DeleteSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogSink" + type: "logging.googleapis.com/Sink" } ]; } @@ -877,48 +645,47 @@ message DeleteSinkRequest { // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { option (google.api.resource) = { - type: "logging.googleapis.com/LogExclusion" + type: "logging.googleapis.com/Exclusion" pattern: "projects/{project}/exclusions/{exclusion}" pattern: "organizations/{organization}/exclusions/{exclusion}" pattern: "folders/{folder}/exclusions/{exclusion}" pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. - // Identifiers are limited to 100 characters and can include only letters, - // digits, underscores, hyphens, and periods. First character has to be - // alphanumeric. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. A client-assigned identifier, such as + // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + // can include only letters, digits, underscores, hyphens, and periods. + // First character has to be alphanumeric. + string name = 1; // Optional. A description of this exclusion. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; + string description = 2; - // Required. An [advanced logs - // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - // matches the log entries to be excluded. By using the [sample - // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) + // that matches the log entries to be excluded. By using the + // [sample function](/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: // // `"resource.type=gcs_bucket severity\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsH\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\nstart_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x30\n\x08\x65nd_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbc\x01\xea\x41\xb8\x01\n\x1blogging.googleapis.com/Sink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"b\n\x0f\x42igQueryOptions\x12\x1e\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"n\n\x10ListSinksRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x0eGetSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\x97\x01\n\x11\x43reateSinkRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08"\xcb\x01\n\x11UpdateSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x11\x44\x65leteSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\xa1\x03\n\x0cLogExclusion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe9\x01\xea\x41\xe5\x01\n logging.googleapis.com/Exclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"x\n\x15ListExclusionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"M\n\x13GetExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"\x86\x01\n\x16\x43reateExclusionRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion"\xbf\x01\n\x16UpdateExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"P\n\x16\x44\x65leteExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"&\n\x16GetCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x92\x01\n\x19UpdateCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"N\n\x0c\x43mekSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1a\n\x12service_account_id\x18\x03 \x01(\t2\x9e\x1f\n\x0f\x43onfigServiceV2\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\x9e\x01\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -42,57 +47,12 @@ ], ) -_LIFECYCLESTATE = _descriptor.EnumDescriptor( - name="LifecycleState", - full_name="google.logging.v2.LifecycleState", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="LIFECYCLE_STATE_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="ACTIVE", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="DELETE_REQUESTED", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=4659, - serialized_end=4742, -) -_sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) - -LifecycleState = enum_type_wrapper.EnumTypeWrapper(_LIFECYCLESTATE) -LIFECYCLE_STATE_UNSPECIFIED = 0 -ACTIVE = 1 -DELETE_REQUESTED = 2 - _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( name="VersionFormat", full_name="google.logging.v2.LogSink.VersionFormat", filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="VERSION_FORMAT_UNSPECIFIED", @@ -100,176 +60,28 @@ number=0, serialized_options=None, type=None, - create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V2", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V2", index=1, number=1, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="V1", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V1", index=2, number=2, serialized_options=None, type=None ), ], containing_type=None, serialized_options=None, - serialized_start=1306, - serialized_end=1369, + serialized_start=833, + serialized_end=896, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) -_LOGBUCKET = _descriptor.Descriptor( - name="LogBucket", - full_name="google.logging.v2.LogBucket", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogBucket.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogBucket.description", - index=1, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogBucket.create_time", - index=2, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogBucket.update_time", - index=3, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="retention_days", - full_name="google.logging.v2.LogBucket.retention_days", - index=4, - number=11, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="lifecycle_state", - full_name="google.logging.v2.LogBucket.lifecycle_state", - index=5, - number=12, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=317, - serialized_end=856, -) - - _LOGSINK = _descriptor.Descriptor( name="LogSink", full_name="google.logging.v2.LogSink", filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -280,15 +92,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="destination", @@ -299,15 +110,14 @@ 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=b"\340A\002\372A\003\n\001*", + serialized_options=_b("\372A\003\n\001*"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -318,15 +128,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -337,15 +146,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -362,9 +170,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_version_format", @@ -381,9 +188,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\030\001", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="writer_identity", @@ -394,15 +200,14 @@ 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=b"\340A\003", + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="include_children", @@ -413,255 +218,25 @@ cpp_type=7, label=1, has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="bigquery_options", - full_name="google.logging.v2.LogSink.bigquery_options", - index=8, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogSink.create_time", - index=9, - number=13, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogSink.update_time", - index=10, - number=14, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _LOGSINK_VERSIONFORMAT, - ], - serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="options", - full_name="google.logging.v2.LogSink.options", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=859, - serialized_end=1574, -) - - -_BIGQUERYOPTIONS = _descriptor.Descriptor( - name="BigQueryOptions", - full_name="google.logging.v2.BigQueryOptions", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="use_partitioned_tables", - full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", - index=0, - number=1, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="uses_timestamp_column_partitioning", - full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", - index=1, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1576, - serialized_end=1679, -) - - -_LISTBUCKETSREQUEST = _descriptor.Descriptor( - name="ListBucketsRequest", - full_name="google.logging.v2.ListBucketsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListBucketsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListBucketsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListBucketsRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1681, - serialized_end=1808, -) - - -_LISTBUCKETSRESPONSE = _descriptor.Descriptor( - name="ListBucketsResponse", - full_name="google.logging.v2.ListBucketsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( - name="buckets", - full_name="google.logging.v2.ListBucketsResponse.buckets", - index=0, - number=1, + name="bigquery_options", + full_name="google.logging.v2.LogSink.bigquery_options", + index=8, + number=12, type=11, cpp_type=10, - label=3, + label=1, has_default_value=False, - default_value=[], + default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -669,73 +244,48 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListBucketsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, + name="create_time", + full_name="google.logging.v2.LogSink.create_time", + index=9, + number=13, + type=11, + cpp_type=10, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1810, - serialized_end=1903, -) - - -_UPDATEBUCKETREQUEST = _descriptor.Descriptor( - name="UpdateBucketRequest", - full_name="google.logging.v2.UpdateBucketRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.UpdateBucketRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, + name="update_time", + full_name="google.logging.v2.LogSink.update_time", + index=10, + number=14, + type=11, + cpp_type=10, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="bucket", - full_name="google.logging.v2.UpdateBucketRequest.bucket", - index=1, - number=2, + name="start_time", + full_name="google.logging.v2.LogSink.start_time", + index=11, + number=10, type=11, cpp_type=10, label=1, @@ -746,15 +296,14 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateBucketRequest.update_mask", - index=2, - number=4, + name="end_time", + full_name="google.logging.v2.LogSink.end_time", + index=12, + number=11, type=11, cpp_type=10, label=1, @@ -765,50 +314,77 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[], - serialized_options=None, + enum_types=[ + _LOGSINK_VERSIONFORMAT, + ], + serialized_options=_b( + "\352A\270\001\n\033logging.googleapis.com/Sink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], - oneofs=[], - serialized_start=1906, - serialized_end=2088, + oneofs=[ + _descriptor.OneofDescriptor( + name="options", + full_name="google.logging.v2.LogSink.options", + index=0, + containing_type=None, + fields=[], + ), + ], + serialized_start=317, + serialized_end=1098, ) -_GETBUCKETREQUEST = _descriptor.Descriptor( - name="GetBucketRequest", - full_name="google.logging.v2.GetBucketRequest", +_BIGQUERYOPTIONS = _descriptor.Descriptor( + name="BigQueryOptions", + full_name="google.logging.v2.BigQueryOptions", filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.GetBucketRequest.name", + name="use_partitioned_tables", + full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", index=0, number=1, - type=9, - cpp_type=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="uses_timestamp_column_partitioning", + full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", + index=1, + number=3, + type=8, + cpp_type=7, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -819,8 +395,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2090, - serialized_end=2164, + serialized_start=1100, + serialized_end=1198, ) @@ -830,7 +406,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -841,15 +416,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=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\022\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -860,15 +436,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -885,9 +460,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -898,8 +472,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2166, - serialized_end=2289, + serialized_start=1200, + serialized_end=1310, ) @@ -909,7 +483,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sinks", @@ -928,7 +501,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -939,7 +511,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, @@ -947,7 +519,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -958,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2291, - serialized_end=2378, + serialized_start=1312, + serialized_end=1399, ) @@ -969,7 +540,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -980,15 +550,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -999,8 +570,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2380, - serialized_end=2455, + serialized_start=1401, + serialized_end=1473, ) @@ -1010,7 +581,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1021,15 +591,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=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\022\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -1046,9 +617,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -1065,9 +635,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1078,8 +647,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2458, - serialized_end=2617, + serialized_start=1476, + serialized_end=1627, ) @@ -1089,7 +658,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1100,15 +668,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -1125,9 +694,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -1144,9 +712,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1163,9 +730,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1176,8 +742,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2620, - serialized_end=2836, + serialized_start=1630, + serialized_end=1833, ) @@ -1187,7 +753,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1198,15 +763,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1217,8 +783,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2838, - serialized_end=2916, + serialized_start=1835, + serialized_end=1910, ) @@ -1228,7 +794,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1239,15 +804,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1258,15 +822,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -1277,15 +840,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -1302,9 +864,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -1321,9 +882,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -1340,21 +900,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", + serialized_options=_b( + "\352A\345\001\n logging.googleapis.com/Exclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2919, - serialized_end=3369, + serialized_start=1913, + serialized_end=2330, ) @@ -1364,7 +925,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1375,15 +935,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=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + serialized_options=_b( + '\340A\002\372A"\022 logging.googleapis.com/Exclusion' + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1394,15 +955,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1419,9 +979,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1432,8 +991,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3372, - serialized_end=3505, + serialized_start=2332, + serialized_end=2452, ) @@ -1443,7 +1002,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="exclusions", @@ -1462,7 +1020,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1473,7 +1030,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, @@ -1481,7 +1038,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1492,8 +1048,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3507, - serialized_end=3609, + serialized_start=2454, + serialized_end=2556, ) @@ -1503,7 +1059,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1514,15 +1069,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1533,8 +1087,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3611, - serialized_end=3691, + serialized_start=2558, + serialized_end=2635, ) @@ -1544,7 +1098,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1555,15 +1108,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=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + serialized_options=_b( + '\340A\002\372A"\022 logging.googleapis.com/Exclusion' + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1580,9 +1134,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1593,8 +1146,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3694, - serialized_end=3836, + serialized_start=2638, + serialized_end=2772, ) @@ -1604,7 +1157,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1615,15 +1167,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1640,9 +1191,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1659,9 +1209,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1672,8 +1221,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3839, - serialized_end=4033, + serialized_start=2775, + serialized_end=2966, ) @@ -1683,7 +1232,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1694,15 +1242,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1713,8 +1260,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4035, - serialized_end=4118, + serialized_start=2968, + serialized_end=3048, ) @@ -1724,7 +1271,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1735,15 +1281,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/CmekSettings", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1754,8 +1299,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4120, - serialized_end=4203, + serialized_start=3050, + serialized_end=3088, ) @@ -1765,7 +1310,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1776,15 +1320,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="cmek_settings", @@ -1801,9 +1344,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1820,9 +1362,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1833,8 +1374,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4206, - serialized_end=4367, + serialized_start=3091, + serialized_end=3237, ) @@ -1844,7 +1385,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1855,15 +1395,14 @@ 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=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kms_key_name", @@ -1874,7 +1413,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, @@ -1882,7 +1421,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="service_account_id", @@ -1893,36 +1431,28 @@ 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=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", + serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4370, - serialized_end=4657, + serialized_start=3239, + serialized_end=3317, ) -_LOGBUCKET.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE _LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT _LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS _LOGSINK.fields_by_name[ @@ -1931,6 +1461,12 @@ _LOGSINK.fields_by_name[ "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "start_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "end_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK _LOGSINK.oneofs_by_name["options"].fields.append( _LOGSINK.fields_by_name["bigquery_options"] @@ -1938,11 +1474,6 @@ _LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ "options" ] -_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK _CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK _UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK @@ -1965,13 +1496,8 @@ _UPDATECMEKSETTINGSREQUEST.fields_by_name[ "update_mask" ].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS -DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST -DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE -DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST -DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST @@ -1990,58 +1516,21 @@ "UpdateCmekSettingsRequest" ] = _UPDATECMEKSETTINGSREQUEST DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS -DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogBucket = _reflection.GeneratedProtocolMessageType( - "LogBucket", - (_message.Message,), - { - "DESCRIPTOR": _LOGBUCKET, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a repository of logs (Beta). - - Attributes: - name: - The resource name of the bucket. For example: “projects/my- - project-id/locations/my-location/buckets/my-bucket-id The - supported locations are:”global" “us-central1” For the - location of ``global`` it is unspecified where logs are - actually stored. Once a bucket has been created, the location - can not be changed. - description: - Describes this bucket. - create_time: - Output only. The creation timestamp of the bucket. This is not - set for any of the default buckets. - update_time: - Output only. The last update timestamp of the bucket. - retention_days: - Logs will be retained by default for this amount of time, - after which they will automatically be deleted. The minimum - retention period is 1 day. If this value is set to zero at - bucket creation time, the default time of 30 days will be - used. - lifecycle_state: - Output only. The bucket lifecycle state. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) - }, -) -_sym_db.RegisterMessage(LogBucket) - LogSink = _reflection.GeneratedProtocolMessageType( "LogSink", (_message.Message,), - { - "DESCRIPTOR": _LOGSINK, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a sink used to export log entries to one of the following - destinations in any project: a Cloud Storage bucket, a BigQuery - dataset, or a Cloud Pub/Sub topic. A logs filter controls which log - entries are exported. The sink must be created within a project, + dict( + DESCRIPTOR=_LOGSINK, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Describes a sink used to export log entries to one of the + following destinations in any project: a Cloud Storage bucket, a + BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which + log entries are exported. The sink must be created within a project, organization, billing account, or folder. + Attributes: name: Required. The client-assigned sink identifier, unique within @@ -2052,22 +1541,20 @@ has to be alphanumeric. destination: Required. The export destination: :: - "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis. - com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.googl - eapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink’s - ``writer_identity``, set when the sink is created, must have - permission to write to the destination or else the log entries - are not exported. For more information, see `Exporting Logs - with Sinks - `__. + "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis + .com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.goo + gleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The + sink's ``writer_identity``, set when the sink is created, must + have permission to write to the destination or else the log + entries are not exported. For more information, see `Exporting + Logs with Sinks `__. filter: Optional. An `advanced logs filter - `__. The only exported log entries are those that are - in the resource owning the sink and that match the filter. For - example: :: logName="projects/[PROJECT_ID]/logs/[LOG_ID]" - AND severity>=ERROR + `__. The only exported + log entries are those that are in the resource owning the sink + and that match the filter. For example: :: + logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND + severity>=ERROR description: Optional. A description of this sink. The maximum length of the description is 8000 characters. @@ -2075,10 +1562,12 @@ Optional. If set to True, then this sink is disabled and it does not export any log entries. output_version_format: - Deprecated. This field is unused. + Deprecated. The log entry format to use for this sink's + exported log entries. The v2 format is used by default and + cannot be changed. writer_identity: - Output only. An IAM identity–a service account or group—under - which Logging writes the exported log entries to the sink’s + Output only. An IAM identity—a service account or group—under + which Logging writes the exported log entries to the sink's destination. This field is set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and @@ -2087,27 +1576,27 @@ methods. Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see `Granting Access for a Resource - `_ - _. Consult the destination service’s documentation to - determine the appropriate IAM roles to assign to the identity. + `__. Consult the + destination service's documentation to determine the + appropriate IAM roles to assign to the identity. include_children: Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, - only the logs owned by the sink’s parent resource are + only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the - sink’s parent resource are also available for export. Whether + sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends - on the sink’s filter expression. For example, if this field is + on the sink's filter expression. For example, if this field is true, then the filter ``resource.type=gce_instance`` would export all Compute Engine VM instance log entries from all - projects in the sink’s parent. To only export entries from + projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log - name: :: logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + name: :: logName:("projects/test-project1/" OR + "projects/test-project2/") AND resource.type=gce_instance options: - Destination dependent options. + Optional. Destination dependent options. bigquery_options: Optional. Options that affect sinks exporting data to BigQuery. @@ -2117,175 +1606,63 @@ update_time: Output only. The last update timestamp of the sink. This field may not be present for older sinks. + start_time: + Do not use. This field is ignored. + end_time: + Do not use. This field is ignored. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - }, + ), ) _sym_db.RegisterMessage(LogSink) BigQueryOptions = _reflection.GeneratedProtocolMessageType( "BigQueryOptions", (_message.Message,), - { - "DESCRIPTOR": _BIGQUERYOPTIONS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Options that change functionality of a sink exporting data to - BigQuery. + dict( + DESCRIPTOR=_BIGQUERYOPTIONS, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Options that change functionality of a sink exporting data + to BigQuery. + Attributes: use_partitioned_tables: - Optional. Whether to use `BigQuery’s partition tables - `__. By default, Logging creates dated tables based on - the log entries’ timestamps, e.g. syslog_20170523. With - partitioned tables the date suffix is no longer present and - `special query syntax - `__ has to be used instead. In both cases, tables are - sharded based on UTC timezone. + Optional. Whether to use `BigQuery's partition tables + `__. By default, Logging + creates dated tables based on the log entries' timestamps, + e.g. syslog\_20170523. With partitioned tables the date suffix + is no longer present and `special query syntax + `__ has to be used + instead. In both cases, tables are sharded based on UTC + timezone. uses_timestamp_column_partitioning: Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use. All new sinks will have this field set true and will use - timestamp column based partitioning. If use_partitioned_tables - is false, this value has no meaning and will be false. Legacy - sinks using partitioned tables will have this field set to - false. + timestamp column based partitioning. If + use\_partitioned\_tables is false, this value has no meaning + and will be false. Legacy sinks using partitioned tables will + have this field set to false. """, # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - }, + ), ) _sym_db.RegisterMessage(BigQueryOptions) -ListBucketsRequest = _reflection.GeneratedProtocolMessageType( - "ListBucketsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListBuckets`` (Beta). - - Attributes: - parent: - Required. The parent resource whose buckets are to be listed: - :: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The - locations portion of the resource must be specified, but - supplying the character ``-`` in place of [LOCATION_ID] will - return all buckets. - page_token: - Optional. If present, then retrieve the next batch of results - from the preceding call to this method. ``pageToken`` must be - the value of ``nextPageToken`` from the previous response. The - values of other method parameters should be identical to those - in the previous call. - page_size: - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more results - might be available. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) - }, -) -_sym_db.RegisterMessage(ListBucketsRequest) - -ListBucketsResponse = _reflection.GeneratedProtocolMessageType( - "ListBucketsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The response from ListBuckets (Beta). - - Attributes: - buckets: - A list of buckets. - next_page_token: - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) - }, -) -_sym_db.RegisterMessage(ListBucketsResponse) - -UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( - "UpdateBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateBucket`` (Beta). - - Attributes: - name: - Required. The full resource name of the bucket to update. :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET - _ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ - ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ - ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[ - FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - Example: ``"projects/my-project-id/locations/my- - location/buckets/my-bucket-id"``. Also requires permission - “resourcemanager.projects.updateLiens” to set the locked - property - bucket: - Required. The updated bucket. - update_mask: - Required. Field mask that specifies the fields in ``bucket`` - that need an update. A bucket field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. For a detailed ``FieldMask`` - definition, see https://developers.google.com/protocol-buffers - /docs/reference/google.protobuf#google.protobuf.FieldMask - Example: ``updateMask=retention_days``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) - }, -) -_sym_db.RegisterMessage(UpdateBucketRequest) - -GetBucketRequest = _reflection.GeneratedProtocolMessageType( - "GetBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetBucket`` (Beta). - - Attributes: - name: - Required. The resource name of the bucket: :: "projects/[ - PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "o - rganizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets - /[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locatio - ns/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/ - locations/[LOCATION_ID]/buckets/[BUCKET_ID]" Example: - ``"projects/my-project-id/locations/my-location/buckets/my- - bucket-id"``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) - }, -) -_sym_db.RegisterMessage(GetBucketRequest) - ListSinksRequest = _reflection.GeneratedProtocolMessageType( "ListSinksRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListSinks``. + dict( + DESCRIPTOR=_LISTSINKSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``ListSinks``. + Attributes: parent: Required. The parent resource whose sinks are to be listed: - :: "projects/[PROJECT_ID]" + :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" @@ -2302,17 +1679,18 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - }, + ), ) _sym_db.RegisterMessage(ListSinksRequest) ListSinksResponse = _reflection.GeneratedProtocolMessageType( "ListSinksResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Result returned from ``ListSinks``. + dict( + DESCRIPTOR=_LISTSINKSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Result returned from ``ListSinks``. + Attributes: sinks: @@ -2324,17 +1702,18 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - }, + ), ) _sym_db.RegisterMessage(ListSinksResponse) GetSinkRequest = _reflection.GeneratedProtocolMessageType( "GetSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _GETSINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetSink``. + dict( + DESCRIPTOR=_GETSINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``GetSink``. + Attributes: sink_name: @@ -2346,22 +1725,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - }, + ), ) _sym_db.RegisterMessage(GetSinkRequest) CreateSinkRequest = _reflection.GeneratedProtocolMessageType( "CreateSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _CREATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``CreateSink``. + dict( + DESCRIPTOR=_CREATESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``CreateSink``. + Attributes: parent: Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Examples: ``"projects/my-logging- project"``, ``"organizations/123456789"``. @@ -2371,10 +1751,10 @@ unique_writer_identity: Optional. Determines the kind of IAM identity returned as ``writer_identity`` in the new sink. If this value is omitted - or set to false, and if the sink’s parent is a project, then + or set to false, and if the sink's parent is a project, then the value returned as ``writer_identity`` is the same group or service account used by Logging before the addition of writer - identities to this API. The sink’s destination must be in the + identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of ``writer_identity`` will @@ -2383,17 +1763,18 @@ [LogSink][google.logging.v2.LogSink]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - }, + ), ) _sym_db.RegisterMessage(CreateSinkRequest) UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( "UpdateSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateSink``. + dict( + DESCRIPTOR=_UPDATESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``UpdateSink``. + Attributes: sink_name: @@ -2415,7 +1796,7 @@ the updated sink depends on both the old and new values of this field: - If the old and new values of this field are both false or both true, then there is no change to the - sink’s ``writer_identity``. - If the old value is false and + sink's ``writer_identity``. - If the old value is false and the new value is true, then ``writer_identity`` is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or @@ -2435,17 +1816,18 @@ ``updateMask=filter``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateSinkRequest) DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( "DeleteSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``DeleteSink``. + dict( + DESCRIPTOR=_DELETESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``DeleteSink``. + Attributes: sink_name: @@ -2458,23 +1840,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteSinkRequest) LogExclusion = _reflection.GeneratedProtocolMessageType( "LogExclusion", (_message.Message,), - { - "DESCRIPTOR": _LOGEXCLUSION, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Specifies a set of log entries that are not to be stored in Logging. - If your GCP resource receives a large volume of logs, you can use - exclusions to reduce your chargeable logs. Exclusions are processed - after log sinks, so you can export log entries before they are - excluded. Note that organization-level and folder-level exclusions - don’t apply to child resources, and that you can’t exclude audit log - entries. + dict( + DESCRIPTOR=_LOGEXCLUSION, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Specifies a set of log entries that are not to be stored + in Logging. If your GCP resource receives a large volume of logs, you + can use exclusions to reduce your chargeable logs. Exclusions are + processed after log sinks, so you can export log entries before they are + excluded. Note that organization-level and folder-level exclusions don't + apply to child resources, and that you can't exclude audit log entries. + Attributes: name: @@ -2486,15 +1868,14 @@ Optional. A description of this exclusion. filter: Required. An `advanced logs filter - `__ that matches the log entries to be excluded. By - using the `sample function - `__, you can exclude less than 100% of the - matching log entries. For example, the following query matches - 99% of low-severity log entries from Google Cloud Storage - buckets: ``"resource.type=gcs_bucket severity`__ that matches the log + entries to be excluded. By using the `sample function + `__, you can + exclude less than 100% of the matching log entries. For + example, the following query matches 99% of low-severity log + entries from Google Cloud Storage buckets: + ``"resource.type=gcs_bucket severity`__ - for more information. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: Required. The resource for which to retrieve CMEK settings. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2699,25 +2088,28 @@ folders in the GCP organization. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - }, + ), ) _sym_db.RegisterMessage(GetCmekSettingsRequest) UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( "UpdateCmekSettingsRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService - V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router - `__ - for more information. + dict( + DESCRIPTOR=_UPDATECMEKSETTINGSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to + [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: Required. The resource name for the CMEK settings to update. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2727,9 +2119,8 @@ folders in the GCP organization. cmek_settings: Required. The CMEK settings to update. See `Enabling CMEK for - Logs Router - `__ for more information. + Logs Router `__ for + more information. update_mask: Optional. Field mask identifying which fields from ``cmek_settings`` should be updated. A field will be @@ -2739,32 +2130,36 @@ Example: ``"updateMask=kmsKeyName"`` """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) CmekSettings = _reflection.GeneratedProtocolMessageType( "CmekSettings", (_message.Message,), - { - "DESCRIPTOR": _CMEKSETTINGS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes the customer-managed encryption key (CMEK) settings - associated with a project, folder, organization, billing account, or - flexible resource. Note: CMEK for the Logs Router can currently only - be configured for GCP organizations. Once configured, it applies to - all projects and folders in the GCP organization. See `Enabling CMEK - for Logs Router - `__ - for more information. + dict( + DESCRIPTOR=_CMEKSETTINGS, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Describes the customer-managed encryption key (CMEK) + settings associated with a project, folder, organization, billing + account, or flexible resource. + + Note: CMEK for the Logs Router can currently only be configured for GCP + organizations. Once configured, it applies to all projects and folders + in the GCP organization. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: - Output only. The resource name of the CMEK settings. + Output Only. The resource name of the CMEK settings. kms_key_name: The resource name for the configured Cloud KMS key. KMS key - name format: “projects/[PROJECT_ID]/locations/[LOCATION]/keyRi - ngs/[KEYRING]/cryptoKeys/[KEY]” For example: ``"projects/my- + name format: "projects/[PROJECT\_ID]/locations/[LOCATION]/keyR + ings/[KEYRING]/cryptoKeys/[KEY]" For example: ``"projects/my- project-id/locations/my-region/keyRings/key-ring- name/cryptoKeys/key-name"`` To enable CMEK for the Logs Router, set this field to a valid ``kms_key_name`` for which @@ -2778,248 +2173,193 @@ used at the time of encryption unless access to that key has been revoked. To disable CMEK for the Logs Router, set this field to an empty string. See `Enabling CMEK for Logs Router - `__ for more information. + `__ for more + information. service_account_id: - Output only. The service account that will be used by the Logs + Output Only. The service account that will be used by the Logs Router to access your Cloud KMS key. Before enabling CMEK for Logs Router, you must first assign the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to the service account that the Logs Router will use to access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.G etCmekSettings] to obtain the service account ID. See - `Enabling CMEK for Logs Router - `__ for more information. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - }, + ), ) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None -_LOGBUCKET.fields_by_name["create_time"]._options = None -_LOGBUCKET.fields_by_name["update_time"]._options = None -_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None -_LOGBUCKET._options = None -_LOGSINK.fields_by_name["name"]._options = None _LOGSINK.fields_by_name["destination"]._options = None -_LOGSINK.fields_by_name["filter"]._options = None -_LOGSINK.fields_by_name["description"]._options = None -_LOGSINK.fields_by_name["disabled"]._options = None _LOGSINK.fields_by_name["output_version_format"]._options = None _LOGSINK.fields_by_name["writer_identity"]._options = None -_LOGSINK.fields_by_name["include_children"]._options = None -_LOGSINK.fields_by_name["bigquery_options"]._options = None _LOGSINK.fields_by_name["create_time"]._options = None _LOGSINK.fields_by_name["update_time"]._options = None +_LOGSINK.fields_by_name["start_time"]._options = None +_LOGSINK.fields_by_name["end_time"]._options = None _LOGSINK._options = None -_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None _BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None -_GETBUCKETREQUEST.fields_by_name["name"]._options = None _LISTSINKSREQUEST.fields_by_name["parent"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None _GETSINKREQUEST.fields_by_name["sink_name"]._options = None _CREATESINKREQUEST.fields_by_name["parent"]._options = None _CREATESINKREQUEST.fields_by_name["sink"]._options = None -_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None _UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None _UPDATESINKREQUEST.fields_by_name["sink"]._options = None -_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None -_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None _DELETESINKREQUEST.fields_by_name["sink_name"]._options = None -_LOGEXCLUSION.fields_by_name["name"]._options = None -_LOGEXCLUSION.fields_by_name["description"]._options = None -_LOGEXCLUSION.fields_by_name["filter"]._options = None -_LOGEXCLUSION.fields_by_name["disabled"]._options = None -_LOGEXCLUSION.fields_by_name["create_time"]._options = None -_LOGEXCLUSION.fields_by_name["update_time"]._options = None _LOGEXCLUSION._options = None _LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None _GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None _CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None _DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None -_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None -_CMEKSETTINGS.fields_by_name["name"]._options = None -_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None -_CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( name="ConfigServiceV2", full_name="google.logging.v2.ConfigServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", - create_key=_descriptor._internal_create_key, - serialized_start=4745, - serialized_end=9784, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + ), + serialized_start=3320, + serialized_end=7318, methods=[ - _descriptor.MethodDescriptor( - name="ListBuckets", - full_name="google.logging.v2.ConfigServiceV2.ListBuckets", - index=0, - containing_service=None, - input_type=_LISTBUCKETSREQUEST, - output_type=_LISTBUCKETSRESPONSE, - serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetBucket", - full_name="google.logging.v2.ConfigServiceV2.GetBucket", - index=1, - containing_service=None, - input_type=_GETBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateBucket", - full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", - index=2, - containing_service=None, - input_type=_UPDATEBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", - create_key=_descriptor._internal_create_key, - ), _descriptor.MethodDescriptor( name="ListSinks", full_name="google.logging.v2.ConfigServiceV2.ListSinks", - index=3, + index=0, containing_service=None, input_type=_LISTSINKSREQUEST, output_type=_LISTSINKSRESPONSE, - serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent' + ), ), _descriptor.MethodDescriptor( name="GetSink", full_name="google.logging.v2.ConfigServiceV2.GetSink", - index=4, + index=1, containing_service=None, input_type=_GETSINKREQUEST, output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" + ), ), _descriptor.MethodDescriptor( name="CreateSink", full_name="google.logging.v2.ConfigServiceV2.CreateSink", - index=5, + index=2, containing_service=None, input_type=_CREATESINKREQUEST, output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink' + ), ), _descriptor.MethodDescriptor( name="UpdateSink", full_name="google.logging.v2.ConfigServiceV2.UpdateSink", - index=6, + index=3, containing_service=None, input_type=_UPDATESINKREQUEST, output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink" + ), ), _descriptor.MethodDescriptor( name="DeleteSink", full_name="google.logging.v2.ConfigServiceV2.DeleteSink", - index=7, + index=4, containing_service=None, input_type=_DELETESINKREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" + ), ), _descriptor.MethodDescriptor( name="ListExclusions", full_name="google.logging.v2.ConfigServiceV2.ListExclusions", - index=8, + index=5, containing_service=None, input_type=_LISTEXCLUSIONSREQUEST, output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent" + ), ), _descriptor.MethodDescriptor( name="GetExclusion", full_name="google.logging.v2.ConfigServiceV2.GetExclusion", - index=9, + index=6, containing_service=None, input_type=_GETEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" + ), ), _descriptor.MethodDescriptor( name="CreateExclusion", full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", - index=10, + index=7, containing_service=None, input_type=_CREATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion' + ), ), _descriptor.MethodDescriptor( name="UpdateExclusion", full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", - index=11, + index=8, containing_service=None, input_type=_UPDATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask" + ), ), _descriptor.MethodDescriptor( name="DeleteExclusion", full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", - index=12, + index=9, containing_service=None, input_type=_DELETEEXCLUSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" + ), ), _descriptor.MethodDescriptor( name="GetCmekSettings", full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", - index=13, + index=10, containing_service=None, input_type=_GETCMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings" + ), ), _descriptor.MethodDescriptor( name="UpdateCmekSettings", full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - index=14, + index=11, containing_service=None, input_type=_UPDATECMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index d3bd11324..62e751bf5 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,23 +14,8 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ - self.ListBuckets = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/ListBuckets", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - ) - self.GetBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) - self.UpdateBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) self.ListSinks = channel.unary_unary( "/google.logging.v2.ConfigServiceV2/ListSinks", request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, @@ -97,35 +81,6 @@ def __init__(self, channel): class ConfigServiceV2Servicer(object): """Service for configuring sinks used to route log entries.""" - def ListBuckets(self, request, context): - """Lists buckets (Beta).""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - - def GetBucket(self, request, context): - """Gets a bucket (Beta).""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - - def UpdateBucket(self, request, context): - """Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: `retention_period` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - will be returned. - - A buckets region may not be modified after it is created. - This method is in Beta. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - def ListSinks(self, request, context): """Lists sinks.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -208,8 +163,7 @@ def GetCmekSettings(self, request, context): the GCP organization. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Router](/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -229,8 +183,7 @@ def UpdateCmekSettings(self, request, context): 3) access to the key is disabled. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Router](/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -239,21 +192,6 @@ def UpdateCmekSettings(self, request, context): def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - "ListBuckets": grpc.unary_unary_rpc_method_handler( - servicer.ListBuckets, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, - ), - "GetBucket": grpc.unary_unary_rpc_method_handler( - servicer.GetBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - "UpdateBucket": grpc.unary_unary_rpc_method_handler( - servicer.UpdateBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), "ListSinks": grpc.unary_unary_rpc_method_handler( servicer.ListSinks, request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, @@ -319,413 +257,3 @@ def add_ConfigServiceV2Servicer_to_server(servicer, server): "google.logging.v2.ConfigServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class ConfigServiceV2(object): - """Service for configuring sinks used to route log entries.""" - - @staticmethod - def ListBuckets( - 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.logging.v2.ConfigServiceV2/ListBuckets", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetBucket( - 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.logging.v2.ConfigServiceV2/GetBucket", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateBucket( - 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.logging.v2.ConfigServiceV2/UpdateBucket", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListSinks( - 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.logging.v2.ConfigServiceV2/ListSinks", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetSink( - 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.logging.v2.ConfigServiceV2/GetSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateSink( - 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.logging.v2.ConfigServiceV2/CreateSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateSink( - 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.logging.v2.ConfigServiceV2/UpdateSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteSink( - 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.logging.v2.ConfigServiceV2/DeleteSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListExclusions( - 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.logging.v2.ConfigServiceV2/ListExclusions", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetExclusion( - 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.logging.v2.ConfigServiceV2/GetExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateExclusion( - 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.logging.v2.ConfigServiceV2/CreateExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateExclusion( - 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.logging.v2.ConfigServiceV2/UpdateExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteExclusion( - 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.logging.v2.ConfigServiceV2/DeleteExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetCmekSettings( - 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.logging.v2.ConfigServiceV2/GetCmekSettings", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateCmekSettings( - 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.logging.v2.ConfigServiceV2/UpdateCmekSettings", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/google/cloud/logging_v2/proto/logging_metrics.proto b/google/cloud/logging_v2/proto/logging_metrics.proto index eb9f73ffa..582c067e6 100644 --- a/google/cloud/logging_v2/proto/logging_metrics.proto +++ b/google/cloud/logging_v2/proto/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; @@ -34,7 +35,6 @@ option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -option ruby_package = "Google::Cloud::Logging::V2"; // Service for configuring logs-based metrics. service MetricsServiceV2 { @@ -98,7 +98,7 @@ service MetricsServiceV2 { // by the bucket options. message LogMetric { option (google.api.resource) = { - type: "logging.googleapis.com/LogMetric" + type: "logging.googleapis.com/Metric" pattern: "projects/{project}/metrics/{metric}" }; @@ -124,20 +124,20 @@ message LogMetric { // However, when the metric identifier appears as the `[METRIC_ID]` part of a // `metric_name` API parameter, then the metric identifier must be // URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + string name = 1; // Optional. A description of this metric, which is used in documentation. // The maximum length of the description is 8000 characters. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; + string description = 2; - // Required. An [advanced logs - // filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - // is used to match log entries. Example: + // Required. An [advanced logs filter](/logging/docs/view/advanced_filters) + // which is used to match log entries. + // Example: // // "resource.type=gae_app AND severity>=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3 [(google.api.field_behavior) = REQUIRED]; + string filter = 3; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -160,7 +160,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; + google.api.MetricDescriptor metric_descriptor = 5; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -181,7 +181,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; + string value_extractor = 6; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -197,22 +197,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; + map label_extractors = 7; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; + google.api.Distribution.BucketOptions bucket_options = 8; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 9; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 10; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -235,12 +235,12 @@ message ListLogMetricsRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + string page_token = 2; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + int32 page_size = 3; } // Result returned from ListLogMetrics. @@ -262,7 +262,7 @@ message GetLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogMetric" + type: "logging.googleapis.com/Metric" } ]; } @@ -277,7 +277,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/LogMetric" + type: "logging.googleapis.com/Metric" } ]; @@ -298,7 +298,7 @@ message UpdateLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogMetric" + type: "logging.googleapis.com/Metric" } ]; @@ -314,7 +314,7 @@ message DeleteLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/LogMetric" + type: "logging.googleapis.com/Metric" } ]; } diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index f033fb679..08eaf8099 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -28,9 +31,12 @@ name="google/cloud/logging_v2/proto/logging_metrics.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xdc\x04\n\tLogMetric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x37\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fvalue_extractor\x18\x06 \x01(\t\x12K\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntry\x12>\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:G\xea\x41\x44\n\x1dlogging.googleapis.com/Metric\x12#projects/{project}/metrics/{metric}"\x83\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x13GetLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric"\x82\x01\n\x16\x43reateLogMetricRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x87\x01\n\x16UpdateLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"T\n\x16\x44\x65leteLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -51,29 +57,18 @@ full_name="google.logging.v2.LogMetric.ApiVersion", filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="V2", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V2", index=0, number=0, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="V1", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V1", index=1, number=1, serialized_options=None, type=None ), ], containing_type=None, serialized_options=None, - serialized_start=922, - serialized_end=950, + serialized_start=877, + serialized_end=905, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) @@ -84,7 +79,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -95,7 +89,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, @@ -103,7 +97,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -114,7 +107,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, @@ -122,19 +115,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=866, - serialized_end=920, + serialized_start=821, + serialized_end=875, ) _LOGMETRIC = _descriptor.Descriptor( @@ -143,7 +135,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -154,15 +145,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -173,15 +163,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -192,15 +181,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric_descriptor", @@ -217,9 +205,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value_extractor", @@ -230,15 +217,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_extractors", @@ -255,9 +241,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bucket_options", @@ -274,9 +259,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -293,9 +277,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -312,9 +295,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -331,9 +313,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\030\001", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -343,13 +324,15 @@ enum_types=[ _LOGMETRIC_APIVERSION, ], - serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", + serialized_options=_b( + "\352AD\n\035logging.googleapis.com/Metric\022#projects/{project}/metrics/{metric}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=374, - serialized_end=1026, + serialized_end=978, ) @@ -359,7 +342,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -370,15 +352,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=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -389,15 +372,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -414,9 +396,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -427,8 +408,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1029, - serialized_end=1170, + serialized_start=981, + serialized_end=1112, ) @@ -438,7 +419,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metrics", @@ -457,7 +437,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -468,7 +447,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, @@ -476,7 +455,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -487,8 +465,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1172, - serialized_end=1268, + serialized_start=1114, + serialized_end=1210, ) @@ -498,7 +476,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -509,15 +486,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -528,8 +506,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1270, - serialized_end=1354, + serialized_start=1212, + serialized_end=1293, ) @@ -539,7 +517,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -550,15 +527,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=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -575,9 +553,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -588,8 +565,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1357, - serialized_end=1490, + serialized_start=1296, + serialized_end=1426, ) @@ -599,7 +576,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -610,15 +586,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -635,9 +612,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -648,8 +624,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1493, - serialized_end=1631, + serialized_start=1429, + serialized_end=1564, ) @@ -659,7 +635,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -670,15 +645,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -689,8 +665,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1633, - serialized_end=1720, + serialized_start=1566, + serialized_end=1650, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC @@ -726,25 +702,28 @@ LogMetric = _reflection.GeneratedProtocolMessageType( "LogMetric", (_message.Message,), - { - "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelExtractorsEntry=_reflection.GeneratedProtocolMessageType( "LabelExtractorsEntry", (_message.Message,), - { - "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" + dict( + DESCRIPTOR=_LOGMETRIC_LABELEXTRACTORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - }, + ), ), - "DESCRIPTOR": _LOGMETRIC, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Describes a logs-based metric. The value of the metric is the number - of log entries that match a logs filter in a given time interval. + DESCRIPTOR=_LOGMETRIC, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""Describes a logs-based metric. The value of the metric is + the number of log entries that match a logs filter in a given time + interval. + Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. + Attributes: name: Required. The client-assigned metric identifier. Examples: @@ -765,16 +744,16 @@ documentation. The maximum length of the description is 8000 characters. filter: - Required. An `advanced logs filter `__ which is used to match - log entries. Example: :: "resource.type=gae_app AND - severity>=ERROR" The maximum length of the filter is 20000 - characters. + Required. An `advanced logs filter + `__ which is used to + match log entries. Example: :: "resource.type=gae_app + AND severity>=ERROR" The maximum length of the filter is + 20000 characters. metric_descriptor: Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and - a unit of “1”. Such a metric counts the number of log entries + a unit of "1". Such a metric counts the number of log entries matching the ``filter`` expression. The ``name``, ``type``, and ``description`` fields in the ``metric_descriptor`` are output only, and is constructed using the ``name`` and @@ -839,7 +818,7 @@ changed. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - }, + ), ) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) @@ -847,10 +826,11 @@ ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( "ListLogMetricsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to ListLogMetrics. + dict( + DESCRIPTOR=_LISTLOGMETRICSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to ListLogMetrics. + Attributes: parent: @@ -869,17 +849,18 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogMetricsRequest) ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( "ListLogMetricsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Result returned from ListLogMetrics. + dict( + DESCRIPTOR=_LISTLOGMETRICSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""Result returned from ListLogMetrics. + Attributes: metrics: @@ -891,17 +872,18 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogMetricsResponse) GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( "GetLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _GETLOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to GetLogMetric. + dict( + DESCRIPTOR=_GETLOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to GetLogMetric. + Attributes: metric_name: @@ -909,62 +891,65 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(GetLogMetricRequest) CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "CreateLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _CREATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to CreateLogMetric. + dict( + DESCRIPTOR=_CREATELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to CreateLogMetric. + Attributes: parent: Required. The resource name of the project in which to create - the metric: :: "projects/[PROJECT_ID]" The new metric + the metric: :: "projects/[PROJECT_ID]" The new metric must be provided in the request. metric: Required. The new logs-based metric, which must not have an identifier that already exists. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(CreateLogMetricRequest) UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "UpdateLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to UpdateLogMetric. + dict( + DESCRIPTOR=_UPDATELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to UpdateLogMetric. + Attributes: metric_name: Required. The resource name of the metric to update: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated - metric must be provided in the request and it’s ``name`` field + metric must be provided in the request and it's ``name`` field must be the same as ``[METRIC_ID]`` If the metric does not exist in ``[PROJECT_ID]``, then a new metric is created. metric: Required. The updated metric. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateLogMetricRequest) DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to DeleteLogMetric. + dict( + DESCRIPTOR=_DELETELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to DeleteLogMetric. + Attributes: metric_name: @@ -972,27 +957,16 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None -_LOGMETRIC.fields_by_name["name"]._options = None -_LOGMETRIC.fields_by_name["description"]._options = None -_LOGMETRIC.fields_by_name["filter"]._options = None -_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None -_LOGMETRIC.fields_by_name["value_extractor"]._options = None -_LOGMETRIC.fields_by_name["label_extractors"]._options = None -_LOGMETRIC.fields_by_name["bucket_options"]._options = None -_LOGMETRIC.fields_by_name["create_time"]._options = None -_LOGMETRIC.fields_by_name["update_time"]._options = None _LOGMETRIC.fields_by_name["version"]._options = None _LOGMETRIC._options = None _LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None _GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None @@ -1005,10 +979,11 @@ full_name="google.logging.v2.MetricsServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", - create_key=_descriptor._internal_create_key, - serialized_start=1723, - serialized_end=2793, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + ), + serialized_start=1653, + serialized_end=2723, methods=[ _descriptor.MethodDescriptor( name="ListLogMetrics", @@ -1017,8 +992,9 @@ containing_service=None, input_type=_LISTLOGMETRICSREQUEST, output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent" + ), ), _descriptor.MethodDescriptor( name="GetLogMetric", @@ -1027,8 +1003,9 @@ containing_service=None, input_type=_GETLOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" + ), ), _descriptor.MethodDescriptor( name="CreateLogMetric", @@ -1037,8 +1014,9 @@ containing_service=None, input_type=_CREATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric' + ), ), _descriptor.MethodDescriptor( name="UpdateLogMetric", @@ -1047,8 +1025,9 @@ containing_service=None, input_type=_UPDATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric" + ), ), _descriptor.MethodDescriptor( name="DeleteLogMetric", @@ -1057,8 +1036,9 @@ containing_service=None, input_type=_DELETELOGMETRICREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index c97379c14..a3a373368 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,7 +14,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( "/google.logging.v2.MetricsServiceV2/ListLogMetrics", @@ -110,143 +109,3 @@ def add_MetricsServiceV2Servicer_to_server(servicer, server): "google.logging.v2.MetricsServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class MetricsServiceV2(object): - """Service for configuring logs-based metrics.""" - - @staticmethod - def ListLogMetrics( - 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.logging.v2.MetricsServiceV2/ListLogMetrics", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetLogMetric( - 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.logging.v2.MetricsServiceV2/GetLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateLogMetric( - 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.logging.v2.MetricsServiceV2/CreateLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateLogMetric( - 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.logging.v2.MetricsServiceV2/UpdateLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteLogMetric( - 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.logging.v2.MetricsServiceV2/DeleteLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 7c4fa3929..08cc2b49e 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -12,6 +15,7 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import 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 ( @@ -26,20 +30,22 @@ ) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/logging_v2/proto/logging.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log"\xcf\x02\n\x16WriteLogEntriesRequest\x12\x31\n\x08log_name\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntry\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_success\x18\x05 \x01(\x08\x12\x0f\n\x07\x64ry_run\x18\x06 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb5\x01\n\x15ListLogEntriesRequest\x12\x17\n\x0bproject_ids\x18\x01 \x03(\tB\x02\x18\x01\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\'ListMonitoredResourceDescriptorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"i\n\x0fListLogsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, @@ -48,10 +54,8 @@ google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -62,7 +66,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -73,15 +76,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=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", + serialized_options=_b( + "\340A\002\372A\034\022\032logging.googleapis.com/Log" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -92,8 +96,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=470, - serialized_end=542, + serialized_start=436, + serialized_end=508, ) @@ -103,7 +107,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -114,7 +117,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, @@ -122,7 +125,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -133,7 +135,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, @@ -141,19 +143,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=858, - serialized_end=903, + serialized_start=801, + serialized_end=846, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( @@ -162,7 +163,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -173,15 +173,14 @@ 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=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", + serialized_options=_b("\372A\034\n\032logging.googleapis.com/Log"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -198,9 +197,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -217,9 +215,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entries", @@ -236,9 +233,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_success", @@ -255,9 +251,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="dry_run", @@ -274,9 +269,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -289,8 +283,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=545, - serialized_end=903, + serialized_start=511, + serialized_end=846, ) @@ -300,7 +294,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -310,8 +303,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=905, - serialized_end=930, + serialized_start=848, + serialized_end=873, ) @@ -321,7 +314,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -340,7 +332,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -359,19 +350,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1060, - serialized_end=1133, + serialized_start=1003, + serialized_end=1076, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( @@ -380,7 +370,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_entry_errors", @@ -399,7 +388,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -412,8 +400,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=933, - serialized_end=1133, + serialized_start=876, + serialized_end=1076, ) @@ -423,12 +411,29 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ + _descriptor.FieldDescriptor( + name="project_ids", + full_name="google.logging.v2.ListLogEntriesRequest.project_ids", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="resource_names", full_name="google.logging.v2.ListLogEntriesRequest.resource_names", - index=0, + index=1, number=8, type=9, cpp_type=9, @@ -440,52 +445,51 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + serialized_options=_b( + "\340A\002\372A\034\022\032logging.googleapis.com/Log" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", full_name="google.logging.v2.ListLogEntriesRequest.filter", - index=1, + index=2, number=2, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="order_by", full_name="google.logging.v2.ListLogEntriesRequest.order_by", - index=2, + index=3, number=3, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", full_name="google.logging.v2.ListLogEntriesRequest.page_size", - index=3, + index=4, number=4, type=5, cpp_type=1, @@ -497,28 +501,26 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", full_name="google.logging.v2.ListLogEntriesRequest.page_token", - index=4, + index=5, number=5, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -529,8 +531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1136, - serialized_end=1312, + serialized_start=1079, + serialized_end=1260, ) @@ -540,7 +542,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entries", @@ -559,7 +560,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -570,7 +570,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, @@ -578,7 +578,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -589,8 +588,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1314, - serialized_end=1409, + serialized_start=1262, + serialized_end=1357, ) @@ -600,7 +599,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="page_size", @@ -617,9 +615,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -630,15 +627,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -649,8 +645,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1411, - serialized_end=1501, + serialized_start=1359, + serialized_end=1439, ) @@ -660,7 +656,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="resource_descriptors", @@ -679,7 +674,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -690,7 +684,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, @@ -698,7 +692,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -709,8 +702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1504, - serialized_end=1642, + serialized_start=1442, + serialized_end=1580, ) @@ -720,7 +713,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -731,15 +723,14 @@ 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=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + serialized_options=_b("\372A\034\022\032logging.googleapis.com/Log"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -756,9 +747,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -769,15 +759,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -788,8 +777,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1644, - serialized_end=1762, + serialized_start=1582, + serialized_end=1687, ) @@ -799,7 +788,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_names", @@ -818,7 +806,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -829,7 +816,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, @@ -837,7 +824,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -848,8 +834,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1764, - serialized_end=1826, + serialized_start=1689, + serialized_end=1751, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -904,10 +890,11 @@ DeleteLogRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETELOGREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to DeleteLog. + dict( + DESCRIPTOR=_DELETELOGREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to DeleteLog. + Attributes: log_name: @@ -922,59 +909,60 @@ about log names, see [LogEntry][google.logging.v2.LogEntry]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteLogRequest) WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesRequest", (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" + dict( + DESCRIPTOR=_WRITELOGENTRIESREQUEST_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - }, + ), ), - "DESCRIPTOR": _WRITELOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to WriteLogEntries. + DESCRIPTOR=_WRITELOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to WriteLogEntries. + Attributes: log_name: Optional. A default log resource name that is assigned to all log entries in ``entries`` that do not specify a value for - ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL- - encoded. For example: :: "projects/my-project- - id/logs/syslog" "organizations/1234567890/logs/cloudresourc - emanager.googleapis.com%2Factivity" The permission - ``logging.logEntries.create`` is needed on each project, + encoded. For example: :: "projects/my-project- + id/logs/syslog" "organizations/1234567890/logs/cloudresour + cemanager.googleapis.com%2Factivity" The permission + logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new - log entries, whether the resource is specified in ``logName`` - or in an individual log entry. + log entries, whether the resource is specified in logName or + in an individual log entry. resource: Optional. A default monitored resource object that is assigned to all log entries in ``entries`` that do not specify a value - for ``resource``. Example: :: { "type": "gce_instance", - "labels": { "zone": "us-central1-a", "instance_id": + for ``resource``. Example: :: { "type": "gce_instance", + "labels": { "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels: Optional. Default labels that are added to the ``labels`` field of all log entries in ``entries``. If a log entry already has a label with the same key as a label in this - parameter, then the log entry’s label is not changed. See + parameter, then the log entry's label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries: Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this - method’s ``log_name``, ``resource``, and ``labels`` fields are + method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. If the @@ -985,33 +973,31 @@ their own values, the entries earlier in the list will sort before the entries later in the list. See the ``entries.list`` method. Log entries with timestamps that are more than the - `logs retention period - `__ in the past + `logs retention period `__ in the past or more than 24 hours in the future will not be available when calling ``entries.list``. However, those log entries can still - be `exported with LogSinks - `__. To improve throughput and to avoid exceeding the - `quota limit `__ for calls to ``entries.write``, you should try to - include several log entries in this list, rather than calling - this method for each individual log entry. + `quota limit `__ for calls to + ``entries.write``, you should try to include several log + entries in this list, rather than calling this method for each + individual log entry. partial_success: Optional. Whether valid entries should be written even if some - other entries fail due to INVALID_ARGUMENT or - PERMISSION_DENIED errors. If any entry is not written, then + other entries fail due to INVALID\_ARGUMENT or + PERMISSION\_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed - by the entries’ zero-based index in the ``entries.write`` + by the entries' zero-based index in the ``entries.write`` method. dry_run: Optional. If true, the request should expect normal response, - but the entries won’t be persisted nor exported. Useful for + but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) @@ -1019,42 +1005,45 @@ WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesResponse", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from WriteLogEntries.""", + dict( + DESCRIPTOR=_WRITELOGENTRIESRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from WriteLogEntries. empty + + """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesResponse) WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesPartialErrors", (_message.Message,), - { - "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LogEntryErrorsEntry=_reflection.GeneratedProtocolMessageType( "LogEntryErrorsEntry", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" + dict( + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - }, + ), ), - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Error details for WriteLogEntries with partial success. + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Error details for WriteLogEntries with partial success. + Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, records the error status for entries that were not written due - to a permanent error, keyed by the entry’s zero-based index in + to a permanent error, keyed by the entry's zero-based index in ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) @@ -1062,23 +1051,27 @@ ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "ListLogEntriesRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ``ListLogEntries``. + dict( + DESCRIPTOR=_LISTLOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ``ListLogEntries``. + Attributes: + project_ids: + Deprecated. Use ``resource_names`` instead. One or more + project identifiers or project numbers from which to retrieve + log entries. Example: ``"my-project-1A"``. resource_names: Required. Names of one or more parent resources from which to - retrieve log entries: :: "projects/[PROJECT_ID]" + retrieve log entries: :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Projects listed in the ``project_ids`` field are added to this list. filter: Optional. A filter that chooses which log entries to return. - See `Advanced Logs Queries - `__. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in ``resource_names``. Referencing a parent @@ -1096,8 +1089,7 @@ values. page_size: Optional. The maximum number of results to return from this - request. Default is 50. If the value is negative or exceeds - 1000, the request is rejected. The presence of + request. Non-positive values are ignored. The presence of ``next_page_token`` in the response indicates that more results might be available. page_token: @@ -1108,17 +1100,18 @@ those in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogEntriesRequest) ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "ListLogEntriesResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ``ListLogEntries``. + dict( + DESCRIPTOR=_LISTLOGENTRIESRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ``ListLogEntries``. + Attributes: entries: @@ -1140,17 +1133,18 @@ search. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogEntriesResponse) ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListMonitoredResourceDescriptors + dict( + DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ListMonitoredResourceDescriptors + Attributes: page_size: @@ -1166,17 +1160,18 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - }, + ), ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListMonitoredResourceDescriptors. + dict( + DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ListMonitoredResourceDescriptors. + Attributes: resource_descriptors: @@ -1188,22 +1183,23 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - }, + ), ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) ListLogsRequest = _reflection.GeneratedProtocolMessageType( "ListLogsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListLogs. + dict( + DESCRIPTOR=_LISTLOGSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ListLogs. + Attributes: parent: Required. The resource name that owns the logs: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" page_size: @@ -1219,17 +1215,18 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogsRequest) ListLogsResponse = _reflection.GeneratedProtocolMessageType( "ListLogsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListLogs. + dict( + DESCRIPTOR=_LISTLOGSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ListLogs. + Attributes: log_names: @@ -1243,7 +1240,7 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogsResponse) @@ -1252,32 +1249,22 @@ _DELETELOGREQUEST.fields_by_name["log_name"]._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None _WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None _WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["project_ids"]._options = None _LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None _LISTLOGSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( name="LoggingServiceV2", full_name="google.logging.v2.LoggingServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", - create_key=_descriptor._internal_create_key, - serialized_start=1829, - serialized_end=3202, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + ), + serialized_start=1754, + serialized_end=3127, methods=[ _descriptor.MethodDescriptor( name="DeleteLog", @@ -1286,8 +1273,9 @@ containing_service=None, input_type=_DELETELOGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name" + ), ), _descriptor.MethodDescriptor( name="WriteLogEntries", @@ -1296,8 +1284,9 @@ containing_service=None, input_type=_WRITELOGENTRIESREQUEST, output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries' + ), ), _descriptor.MethodDescriptor( name="ListLogEntries", @@ -1306,8 +1295,9 @@ containing_service=None, input_type=_LISTLOGENTRIESREQUEST, output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by' + ), ), _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1316,8 +1306,9 @@ containing_service=None, input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors' + ), ), _descriptor.MethodDescriptor( name="ListLogs", @@ -1326,8 +1317,9 @@ containing_service=None, input_type=_LISTLOGSREQUEST, output_type=_LISTLOGSRESPONSE, - serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 15c16bee0..2e444b925 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,7 +14,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( "/google.logging.v2.LoggingServiceV2/DeleteLog", @@ -73,8 +72,7 @@ def WriteLogEntries(self, request, context): def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log - entries, see [Exporting - Logs](https://cloud.google.com/logging/docs/export). + entries, see [Exporting Logs](/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -127,143 +125,3 @@ def add_LoggingServiceV2Servicer_to_server(servicer, server): "google.logging.v2.LoggingServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class LoggingServiceV2(object): - """Service for ingesting and querying logs.""" - - @staticmethod - def DeleteLog( - 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.logging.v2.LoggingServiceV2/DeleteLog", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def WriteLogEntries( - 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.logging.v2.LoggingServiceV2/WriteLogEntries", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListLogEntries( - 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.logging.v2.LoggingServiceV2/ListLogEntries", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListMonitoredResourceDescriptors( - 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListLogs( - 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.logging.v2.LoggingServiceV2/ListLogs", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index 21f6d2a26..ff599eb2a 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -20,27 +20,14 @@ ROOT=$( dirname "$DIR" ) # Work from the project root. cd $ROOT -# Prevent it from overriding files. -# We recommend that sample authors use their own service account files and cloud project. -# In that case, they are supposed to prepare these files by themselves. -if [[ -f "testing/test-env.sh" ]] || \ - [[ -f "testing/service-account.json" ]] || \ - [[ -f "testing/client-secrets.json" ]]; then - echo "One or more target files exist, aborting." - exit 1 -fi - # 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" \ - --project="${PROJECT_ID}" \ > testing/test-env.sh gcloud secrets versions access latest \ --secret="python-docs-samples-service-account" \ - --project="${PROJECT_ID}" \ > testing/service-account.json gcloud secrets versions access latest \ --secret="python-docs-samples-client-secrets" \ - --project="${PROJECT_ID}" \ - > testing/client-secrets.json + > 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 deleted file mode 100644 index d309d6e97..000000000 --- a/scripts/readme-gen/readme_gen.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 deleted file mode 100644 index 4fd239765..000000000 --- a/scripts/readme-gen/templates/README.tmpl.rst +++ /dev/null @@ -1,87 +0,0 @@ -{# 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 deleted file mode 100644 index 1446b94a5..000000000 --- a/scripts/readme-gen/templates/auth.tmpl.rst +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 11957ce27..000000000 --- a/scripts/readme-gen/templates/auth_api_key.tmpl.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index a0406dba8..000000000 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 5ea33d18c..000000000 --- a/scripts/readme-gen/templates/install_portaudio.tmpl.rst +++ /dev/null @@ -1,35 +0,0 @@ -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 a59e43327..a5616d3e5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,25 +1,32 @@ { "sources": [ + { + "generator": { + "name": "artman", + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, { "git": { "name": ".", - "remote": "https://github.com/googleapis/python-logging.git", - "sha": "0a1dd94811232634fdb849cb2c85bd44e870642f" + "remote": "git@github.com:googleapis/python-logging", + "sha": "a22a3bfdd4c8a4d6e9cc0c7d7504322ff31ad7ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8d73f9486fc193a150f6c907dfb9f49431aff3ff", - "internalRef": "332497859" + "sha": "aaff764c185e18a6c73227357c3df5fa60fec85a", + "internalRef": "309426927" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "27f4406999b1eee29e04b09b2423a8e4646c7e24" + "sha": "cdddf139b36000b3a7c65fd2a7781e253262359a" } } ], @@ -30,103 +37,9 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "bazel" + "generator": "gapic", + "config": "google/logging/artman_logging.yaml" } } - ], - "generatedFiles": [ - ".coveragerc", - ".flake8", - ".github/CONTRIBUTING.md", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/snippet-bot.yml", - ".gitignore", - ".kokoro/build.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/continuous.cfg", - ".kokoro/docker/docs/Dockerfile", - ".kokoro/docker/docs/fetch_gpg_keys.sh", - ".kokoro/docs/common.cfg", - ".kokoro/docs/docs-presubmit.cfg", - ".kokoro/docs/docs.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/presubmit.cfg", - ".kokoro/publish-docs.sh", - ".kokoro/release.sh", - ".kokoro/release/common.cfg", - ".kokoro/release/release.cfg", - ".kokoro/samples/lint/common.cfg", - ".kokoro/samples/lint/continuous.cfg", - ".kokoro/samples/lint/periodic.cfg", - ".kokoro/samples/lint/presubmit.cfg", - ".kokoro/samples/python3.6/common.cfg", - ".kokoro/samples/python3.6/continuous.cfg", - ".kokoro/samples/python3.6/periodic.cfg", - ".kokoro/samples/python3.6/presubmit.cfg", - ".kokoro/samples/python3.7/common.cfg", - ".kokoro/samples/python3.7/continuous.cfg", - ".kokoro/samples/python3.7/periodic.cfg", - ".kokoro/samples/python3.7/presubmit.cfg", - ".kokoro/samples/python3.8/common.cfg", - ".kokoro/samples/python3.8/continuous.cfg", - ".kokoro/samples/python3.8/periodic.cfg", - ".kokoro/samples/python3.8/presubmit.cfg", - ".kokoro/test-samples.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.rst", - "LICENSE", - "MANIFEST.in", - "docs/_static/custom.css", - "docs/_templates/layout.html", - "docs/conf.py", - "docs/gapic/v2/api.rst", - "docs/gapic/v2/types.rst", - "docs/multiprocessing.rst", - "google/cloud/logging_v2/gapic/__init__.py", - "google/cloud/logging_v2/gapic/config_service_v2_client.py", - "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/enums.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/transports/__init__.py", - "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", - "google/cloud/logging_v2/proto/__init__.py", - "google/cloud/logging_v2/proto/log_entry.proto", - "google/cloud/logging_v2/proto/log_entry_pb2.py", - "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging.proto", - "google/cloud/logging_v2/proto/logging_config.proto", - "google/cloud/logging_v2/proto/logging_config_pb2.py", - "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging_metrics.proto", - "google/cloud/logging_v2/proto/logging_metrics_pb2.py", - "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging_pb2.py", - "google/cloud/logging_v2/proto/logging_pb2_grpc.py", - "renovate.json", - "scripts/decrypt-secrets.sh", - "scripts/readme-gen/readme_gen.py", - "scripts/readme-gen/templates/README.tmpl.rst", - "scripts/readme-gen/templates/auth.tmpl.rst", - "scripts/readme-gen/templates/auth_api_key.tmpl.rst", - "scripts/readme-gen/templates/install_deps.tmpl.rst", - "scripts/readme-gen/templates/install_portaudio.tmpl.rst", - "setup.cfg", - "testing/.gitignore", - "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 1b267f75c..0483a4582 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -62,25 +62,36 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): - def test_delete_sink(self): - channel = ChannelStub() + def test_list_sinks(self): + # Setup Expected Response + next_page_token = "" + sinks_element = {} + sinks = [sinks_element] + expected_response = {"next_page_token": next_page_token, "sinks": sinks} + expected_response = logging_config_pb2.ListSinksResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + parent = client.project_path("[PROJECT]") - client.delete_sink(sink_name) + paged_list_response = client.list_sinks(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.sinks[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.ListSinksRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_sink_exception(self): - # Mock the API response + def test_list_sinks_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -88,12 +99,13 @@ def test_delete_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + parent = client.project_path("[PROJECT]") + paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - client.delete_sink(sink_name) + list(paged_list_response) - def test_update_sink(self): + def test_get_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -121,95 +133,18 @@ def test_update_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") - response = client.update_sink(sink_name, sink) + response = client.get_sink(sink_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, sink=sink - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_update_sink_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - sink_name = "sinkName-1391757129" - sink = {} - - with pytest.raises(CustomException): - client.update_sink(sink_name, sink) - - def test_delete_exclusion(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = "name3373707" - - client.delete_exclusion(name) - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_exclusion_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - name = "name3373707" - - with pytest.raises(CustomException): - client.delete_exclusion(name) - - def test_list_buckets(self): - # Setup Expected Response - next_page_token = "" - buckets_element = {} - buckets = [buckets_element] - expected_response = {"next_page_token": next_page_token, "buckets": buckets} - expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) - + def test_get_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") - - paged_list_response = client.list_buckets(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.buckets[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.ListBucketsRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_buckets_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -217,67 +152,30 @@ def test_list_buckets_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + sink_name = client.sink_path("[PROJECT]", "[SINK]") - paged_list_response = client.list_buckets(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.get_sink(sink_name) - def test_get_bucket(self): + def test_create_sink(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" - retention_days = 1544391896 - expected_response = { - "name": name_2, - "description": description, - "retention_days": retention_days, - } - expected_response = logging_config_pb2.LogBucket(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = "name3373707" - - response = client.get_bucket(name) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetBucketRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_get_bucket_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request name = "name3373707" - - with pytest.raises(CustomException): - client.get_bucket(name) - - def test_update_bucket(self): - # Setup Expected Response - name_2 = "name2-1052831874" + destination = "destination-1429847026" + filter_ = "filter-1274492040" description = "description-1724546052" - retention_days = 1544391896 + disabled = True + writer_identity = "writerIdentity775638794" + include_children = True expected_response = { - "name": name_2, + "name": name, + "destination": destination, + "filter": filter_, "description": description, - "retention_days": retention_days, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, } - expected_response = logging_config_pb2.LogBucket(**expected_response) + expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -287,21 +185,20 @@ def test_update_bucket(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" - bucket = {} - update_mask = {} + parent = client.project_path("[PROJECT]") + sink = {} - response = client.update_bucket(name, bucket, update_mask) + response = client.create_sink(parent, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateBucketRequest( - name=name, bucket=bucket, update_mask=update_mask + expected_request = logging_config_pb2.CreateSinkRequest( + parent=parent, sink=sink ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_bucket_exception(self): + def test_create_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -309,58 +206,14 @@ def test_update_bucket_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - bucket = {} - update_mask = {} - - with pytest.raises(CustomException): - client.update_bucket(name, bucket, update_mask) - - def test_list_sinks(self): - # Setup Expected Response - next_page_token = "" - sinks_element = {} - sinks = [sinks_element] - expected_response = {"next_page_token": next_page_token, "sinks": sinks} - expected_response = logging_config_pb2.ListSinksResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - parent = client.project_path("[PROJECT]") - - paged_list_response = client.list_sinks(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.sinks[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.ListSinksRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_sinks_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - # Setup request parent = client.project_path("[PROJECT]") + sink = {} - paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.create_sink(parent, sink) - def test_get_sink(self): + def test_update_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -388,17 +241,20 @@ def test_get_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink = {} - response = client.get_sink(sink_name) + response = client.update_sink(sink_name, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_sink_exception(self): + def test_update_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -407,53 +263,30 @@ def test_get_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink = {} with pytest.raises(CustomException): - client.get_sink(sink_name) - - def test_create_sink(self): - # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" - disabled = True - writer_identity = "writerIdentity775638794" - include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } - expected_response = logging_config_pb2.LogSink(**expected_response) + client.update_sink(sink_name, sink) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_sink(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") - response = client.create_sink(parent, sink) - assert expected_response == response + client.delete_sink(sink_name) assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateSinkRequest( - parent=parent, sink=sink - ) + expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_sink_exception(self): + def test_delete_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -462,11 +295,10 @@ def test_create_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") with pytest.raises(CustomException): - client.create_sink(parent, sink) + client.delete_sink(sink_name) def test_list_exclusions(self): # Setup Expected Response @@ -538,7 +370,7 @@ def test_get_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") response = client.get_exclusion(name) assert expected_response == response @@ -557,7 +389,7 @@ def test_get_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") with pytest.raises(CustomException): client.get_exclusion(name) @@ -634,7 +466,7 @@ def test_update_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") exclusion = {} update_mask = {} @@ -657,20 +489,51 @@ def test_update_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") exclusion = {} update_mask = {} with pytest.raises(CustomException): client.update_exclusion(name, exclusion, update_mask) + def test_delete_exclusion(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + + client.delete_exclusion(name) + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_exclusion_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + + with pytest.raises(CustomException): + client.delete_exclusion(name) + def test_get_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" + name = "name3373707" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name_2, + "name": name, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -683,14 +546,11 @@ def test_get_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup Request - name = "name3373707" - - response = client.get_cmek_settings(name) + response = client.get_cmek_settings() assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetCmekSettingsRequest(name=name) + expected_request = logging_config_pb2.GetCmekSettingsRequest() actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -702,19 +562,16 @@ def test_get_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - with pytest.raises(CustomException): - client.get_cmek_settings(name) + client.get_cmek_settings() def test_update_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" + name = "name3373707" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name_2, + "name": name, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -727,17 +584,11 @@ def test_update_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup Request - name = "name3373707" - cmek_settings = {} - - response = client.update_cmek_settings(name, cmek_settings) + response = client.update_cmek_settings() assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest( - name=name, cmek_settings=cmek_settings - ) + expected_request = logging_config_pb2.UpdateCmekSettingsRequest() actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -749,9 +600,5 @@ def test_update_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - cmek_settings = {} - with pytest.raises(CustomException): - client.update_cmek_settings(name, cmek_settings) + client.update_cmek_settings() diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index 9ece054d7..ef2abc733 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -71,7 +71,7 @@ def test_delete_log(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = "logName2013526694" + log_name = client.log_path("[PROJECT]", "[LOG]") client.delete_log(log_name) @@ -89,18 +89,15 @@ def test_delete_log_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = "logName2013526694" + log_name = client.log_path("[PROJECT]", "[LOG]") with pytest.raises(CustomException): client.delete_log(log_name) - def test_list_log_entries(self): + def test_write_log_entries(self): # Setup Expected Response - next_page_token = "" - entries_element = {} - entries = [entries_element] - expected_response = {"next_page_token": next_page_token, "entries": entries} - expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) + expected_response = {} + expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -110,22 +107,18 @@ def test_list_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - resource_names = [] - - paged_list_response = client.list_log_entries(resource_names) - resources = list(paged_list_response) - assert len(resources) == 1 + entries = [] - assert expected_response.entries[0] == resources[0] + response = client.write_log_entries(entries) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names - ) + expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_entries_exception(self): + def test_write_log_entries_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: @@ -133,16 +126,18 @@ def test_list_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - resource_names = [] + entries = [] - paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - list(paged_list_response) + client.write_log_entries(entries) - def test_write_log_entries(self): + def test_list_log_entries(self): # Setup Expected Response - expected_response = {} - expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + next_page_token = "" + entries_element = {} + entries = [entries_element] + expected_response = {"next_page_token": next_page_token, "entries": entries} + expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -152,18 +147,22 @@ def test_write_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - entries = [] + resource_names = [] - response = client.write_log_entries(entries) - assert expected_response == response + paged_list_response = client.list_log_entries(resource_names) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.entries[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) + expected_request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_write_log_entries_exception(self): - # Mock the API response + def test_list_log_entries_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -171,10 +170,11 @@ def test_write_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - entries = [] + resource_names = [] + paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - client.write_log_entries(entries) + list(paged_list_response) def test_list_monitored_resource_descriptors(self): # Setup Expected Response diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 6baefad82..35201f790 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -61,19 +61,15 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): - def test_update_log_metric(self): + def test_list_log_metrics(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + next_page_token = "" + metrics_element = {} + metrics = [metrics_element] + expected_response = {"next_page_token": next_page_token, "metrics": metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse( + **expected_response + ) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -83,21 +79,20 @@ def test_update_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} + parent = client.project_path("[PROJECT]") - response = client.update_log_metric(metric_name, metric) - assert expected_response == response + paged_list_response = client.list_log_metrics(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.metrics[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, metric=metric - ) + expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_log_metric_exception(self): - # Mock the API response + def test_list_log_metrics_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -105,32 +100,47 @@ def test_update_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} + parent = client.project_path("[PROJECT]") + paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - client.update_log_metric(metric_name, metric) + list(paged_list_response) - def test_delete_log_metric(self): - channel = ChannelStub() + def test_get_log_metric(self): + # Setup Expected Response + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") - client.delete_log_metric(metric_name) + response = client.get_log_metric(metric_name) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest( + expected_request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_log_metric_exception(self): + def test_get_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -139,20 +149,24 @@ def test_delete_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.delete_log_metric(metric_name) + client.get_log_metric(metric_name) - def test_list_log_metrics(self): + def test_create_log_metric(self): # Setup Expected Response - next_page_token = "" - metrics_element = {} - metrics = [metrics_element] - expected_response = {"next_page_token": next_page_token, "metrics": metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse( - **expected_response - ) + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -163,19 +177,20 @@ def test_list_log_metrics(self): # Setup Request parent = client.project_path("[PROJECT]") + metric = {} - paged_list_response = client.list_log_metrics(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.metrics[0] == resources[0] + response = client.create_log_metric(parent, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) + expected_request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_metrics_exception(self): + def test_create_log_metric_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: @@ -184,12 +199,12 @@ def test_list_log_metrics_exception(self): # Setup request parent = client.project_path("[PROJECT]") + metric = {} - paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.create_log_metric(parent, metric) - def test_get_log_metric(self): + def test_update_log_metric(self): # Setup Expected Response name = "name3373707" description = "description-1724546052" @@ -211,19 +226,20 @@ def test_get_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric = {} - response = client.get_log_metric(metric_name) + response = client.update_log_metric(metric_name, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest( - metric_name=metric_name + expected_request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, metric=metric ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_log_metric_exception(self): + def test_update_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -232,47 +248,32 @@ def test_get_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric = {} with pytest.raises(CustomException): - client.get_log_metric(metric_name) - - def test_create_log_metric(self): - # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + client.update_log_metric(metric_name, metric) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_log_metric(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - metric = {} + metric_name = client.metric_path("[PROJECT]", "[METRIC]") - response = client.create_log_metric(parent, metric) - assert expected_response == response + client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, metric=metric + expected_request = logging_metrics_pb2.DeleteLogMetricRequest( + metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_log_metric_exception(self): + def test_delete_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -281,8 +282,7 @@ def test_create_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") - metric = {} + metric_name = client.metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.create_log_metric(parent, metric) + client.delete_log_metric(metric_name) From f5a76ee6ae40f943aca91f1ee037ebb9c773d48d Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:23:31 -0700 Subject: [PATCH 34/39] Publish SLM logging proto for documentation PiperOrigin-RevId: 333125205 Source-Author: Google APIs Source-Date: Tue Sep 22 11:39:20 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4ede77543c77072a2ac9f78353de2de2f8c4c501 Source-Link: https://github.com/googleapis/googleapis/commit/4ede77543c77072a2ac9f78353de2de2f8c4c501 --- .flake8 | 2 + .github/snippet-bot.yml | 0 .gitignore | 5 +- .kokoro/populate-secrets.sh | 43 + .kokoro/release/common.cfg | 50 +- .kokoro/test-samples.sh | 8 +- .kokoro/trampoline.sh | 15 +- CONTRIBUTING.rst | 19 - MANIFEST.in | 3 + docs/_templates/layout.html | 4 +- docs/conf.py | 21 +- docs/gapic/v2/api.rst | 4 +- docs/gapic/v2/types.rst | 4 +- docs/multiprocessing.rst | 7 + .../gapic/config_service_v2_client.py | 992 ++++++---- .../gapic/config_service_v2_client_config.py | 126 +- google/cloud/logging_v2/gapic/enums.py | 42 +- .../gapic/logging_service_v2_client.py | 352 ++-- .../gapic/logging_service_v2_client_config.py | 64 +- .../gapic/metrics_service_v2_client.py | 296 ++- .../gapic/metrics_service_v2_client_config.py | 67 +- .../config_service_v2_grpc_transport.py | 135 +- .../logging_service_v2_grpc_transport.py | 32 +- .../metrics_service_v2_grpc_transport.py | 40 +- google/cloud/logging_v2/proto/log_entry.proto | 107 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 274 +-- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 + google/cloud/logging_v2/proto/logging.proto | 102 +- .../logging_v2/proto/logging_config.proto | 470 +++-- .../logging_v2/proto/logging_config_pb2.py | 1622 ++++++++++++----- .../proto/logging_config_pb2_grpc.py | 478 ++++- .../logging_v2/proto/logging_metrics.proto | 42 +- .../logging_v2/proto/logging_metrics_pb2.py | 326 ++-- .../proto/logging_metrics_pb2_grpc.py | 143 +- google/cloud/logging_v2/proto/logging_pb2.py | 442 ++--- .../logging_v2/proto/logging_pb2_grpc.py | 146 +- scripts/decrypt-secrets.sh | 15 +- scripts/readme-gen/readme_gen.py | 66 + scripts/readme-gen/templates/README.tmpl.rst | 87 + scripts/readme-gen/templates/auth.tmpl.rst | 9 + .../templates/auth_api_key.tmpl.rst | 14 + .../templates/install_deps.tmpl.rst | 29 + .../templates/install_portaudio.tmpl.rst | 35 + synth.metadata | 115 +- .../v2/test_config_service_v2_client_v2.py | 379 ++-- .../v2/test_logging_service_v2_client_v2.py | 64 +- .../v2/test_metrics_service_v2_client_v2.py | 166 +- 47 files changed, 5037 insertions(+), 2426 deletions(-) create mode 100644 .github/snippet-bot.yml create mode 100755 .kokoro/populate-secrets.sh create mode 100644 docs/multiprocessing.rst create mode 100644 scripts/readme-gen/readme_gen.py create mode 100644 scripts/readme-gen/templates/README.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth.tmpl.rst create mode 100644 scripts/readme-gen/templates/auth_api_key.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_deps.tmpl.rst create mode 100644 scripts/readme-gen/templates/install_portaudio.tmpl.rst diff --git a/.flake8 b/.flake8 index 20fe9bda2..ed9316381 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/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.gitignore b/.gitignore index 3fb06e09c..b9daa52f1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ dist build eggs +.eggs parts bin var @@ -45,14 +46,16 @@ pip-log.txt # Built documentation docs/_build bigquery/docs/generated +docs.metadata # Virtual environment env/ coverage.xml +sponge_log.xml # System test environment variables. system_tests/local_test_setup # Make sure a generated file isn't accidentally committed. pylintrc -pylintrc.test \ No newline at end of file +pylintrc.test diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 000000000..f52514257 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/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 +# +# 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. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 52c4b699b..9fedb82bb 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,42 +23,18 @@ env_vars: { value: "github/python-logging/.kokoro/release.sh" } -# Fetch the token needed for reporting release status to GitHub -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - -# Fetch PyPI password -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" - } - } -} - -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_pypi_password" + } + } } -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } -} +# Tokens needed to report release status back to GitHub +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} \ No newline at end of file diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index ba97b53d5..fee06244c 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,12 +28,6 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi -# Exit early if samples directory doesn't exist -if [ ! -d "./samples" ]; then - echo "No tests run. `./samples` not found" - exit 0 -fi - # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -107,4 +101,4 @@ cd "$ROOT" # Workaround for Kokoro permissions issue: delete secrets rm testing/{test-env.sh,client-secrets.json,service-account.json} -exit "$RTN" +exit "$RTN" \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index e8c4251f3..f39236e94 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -15,9 +15,14 @@ set -eo pipefail -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$? +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT -chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh -${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true - -exit ${ret_code} +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 64c917ca8..ef2706b77 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -80,25 +80,6 @@ We use `nox `__ to instrument our tests. .. nox: https://pypi.org/project/nox/ -Note on Editable Installs / Develop Mode -======================================== - -- As mentioned previously, using ``setuptools`` in `develop mode`_ - or a ``pip`` `editable install`_ is not possible with this - library. This is because this library uses `namespace packages`_. - For context see `Issue #2316`_ and the relevant `PyPA issue`_. - - Since ``editable`` / ``develop`` mode can't be used, packages - need to be installed directly. Hence your changes to the source - tree don't get incorporated into the **already installed** - package. - -.. _namespace packages: https://www.python.org/dev/peps/pep-0420/ -.. _Issue #2316: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2316 -.. _PyPA issue: https://github.com/pypa/packaging-problems/issues/12 -.. _develop mode: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode -.. _editable install: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs - ***************************************** I'm getting weird errors... Can you help? ***************************************** diff --git a/MANIFEST.in b/MANIFEST.in index 68855abc3..e9e29d120 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 228529efe..6316a537f 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 7a03936bb..b507b408e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,12 +20,16 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) +# For plugins that can not read conf.py. +# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85 +sys.path.insert(0, os.path.abspath(".")) + __version__ = "" # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" +needs_sphinx = "1.5.5" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -35,24 +39,22 @@ "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx.ext.coverage", + "sphinx.ext.doctest", "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'] @@ -93,7 +95,12 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build"] +exclude_patterns = [ + "_build", + "samples/AUTHORING_GUIDE.md", + "samples/CONTRIBUTING.md", + "samples/snippets/README.rst", +] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/gapic/v2/api.rst b/docs/gapic/v2/api.rst index 2dc6bf6fc..f54ac1620 100644 --- a/docs/gapic/v2/api.rst +++ b/docs/gapic/v2/api.rst @@ -1,5 +1,5 @@ -Client for Stackdriver Logging API -================================== +Client for Cloud Logging API +============================ .. automodule:: google.cloud.logging_v2 :members: diff --git a/docs/gapic/v2/types.rst b/docs/gapic/v2/types.rst index 5521d4f9b..1060f7bc8 100644 --- a/docs/gapic/v2/types.rst +++ b/docs/gapic/v2/types.rst @@ -1,5 +1,5 @@ -Types for Stackdriver Logging API Client -======================================== +Types for Cloud Logging API Client +================================== .. automodule:: google.cloud.logging_v2.types :members: \ No newline at end of file diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst new file mode 100644 index 000000000..1cb29d4ca --- /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/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index d3d08370e..e77426f1f 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -76,38 +76,28 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" + def billing_account_path(cls, billing_account): + """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) @classmethod - def billing_exclusion_path(cls, billing_account, exclusion): - """Return a fully-qualified billing_exclusion string.""" + def billing_account_location_path(cls, billing_account, location): + """Return a fully-qualified billing_account_location string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/exclusions/{exclusion}", + "billingAccounts/{billing_account}/locations/{location}", billing_account=billing_account, - exclusion=exclusion, - ) - - @classmethod - def billing_sink_path(cls, billing_account, sink): - """Return a fully-qualified billing_sink string.""" - return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/sinks/{sink}", - billing_account=billing_account, - sink=sink, + location=location, ) @classmethod - def exclusion_path(cls, project, exclusion): - """Return a fully-qualified exclusion string.""" + def cmek_settings_path(cls, project): + """Return a fully-qualified cmek_settings string.""" return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", + "projects/{project}/cmekSettings", project=project, - exclusion=exclusion, ) @classmethod @@ -119,64 +109,74 @@ def folder_path(cls, folder): ) @classmethod - def folder_exclusion_path(cls, folder, exclusion): - """Return a fully-qualified folder_exclusion string.""" + def folder_location_path(cls, folder, location): + """Return a fully-qualified folder_location string.""" return google.api_core.path_template.expand( - "folders/{folder}/exclusions/{exclusion}", + "folders/{folder}/locations/{location}", folder=folder, - exclusion=exclusion, + location=location, ) @classmethod - def folder_sink_path(cls, folder, sink): - """Return a fully-qualified folder_sink string.""" + def location_path(cls, project, location): + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( - "folders/{folder}/sinks/{sink}", - folder=folder, - sink=sink, + "projects/{project}/locations/{location}", + project=project, + location=location, ) @classmethod - def organization_path(cls, organization): - """Return a fully-qualified organization string.""" + def log_bucket_path(cls, project, location, bucket): + """Return a fully-qualified log_bucket string.""" return google.api_core.path_template.expand( - "organizations/{organization}", - organization=organization, + "projects/{project}/locations/{location}/buckets/{bucket}", + project=project, + location=location, + bucket=bucket, ) @classmethod - def organization_exclusion_path(cls, organization, exclusion): - """Return a fully-qualified organization_exclusion string.""" + def log_exclusion_path(cls, project, exclusion): + """Return a fully-qualified log_exclusion string.""" return google.api_core.path_template.expand( - "organizations/{organization}/exclusions/{exclusion}", - organization=organization, + "projects/{project}/exclusions/{exclusion}", + project=project, exclusion=exclusion, ) @classmethod - def organization_sink_path(cls, organization, sink): - """Return a fully-qualified organization_sink string.""" + def log_sink_path(cls, project, sink): + """Return a fully-qualified log_sink string.""" return google.api_core.path_template.expand( - "organizations/{organization}/sinks/{sink}", - organization=organization, + "projects/{project}/sinks/{sink}", + project=project, sink=sink, ) @classmethod - def project_path(cls, project): - """Return a fully-qualified project string.""" + def organization_path(cls, organization): + """Return a fully-qualified organization string.""" return google.api_core.path_template.expand( - "projects/{project}", - project=project, + "organizations/{organization}", + organization=organization, ) @classmethod - def sink_path(cls, project, sink): - """Return a fully-qualified sink string.""" + def organization_location_path(cls, organization, location): + """Return a fully-qualified organization_location string.""" return google.api_core.path_template.expand( - "projects/{project}/sinks/{sink}", + "organizations/{organization}/locations/{location}", + organization=organization, + location=location, + ) + + @classmethod + def project_path(cls, project): + """Return a fully-qualified project string.""" + return google.api_core.path_template.expand( + "projects/{project}", project=project, - sink=sink, ) def __init__( @@ -296,7 +296,293 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_sinks( + def delete_sink( + self, + sink_name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' + >>> + >>> client.delete_sink(sink_name) + + Args: + sink_name (str): Required. The full resource name of the sink to delete, including + the parent resource and the sink identifier: + + :: + + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + + Example: ``"projects/my-project-id/sinks/my-sink-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_sink" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_sink, + default_retry=self._method_configs["DeleteSink"].retry, + default_timeout=self._method_configs["DeleteSink"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteSinkRequest( + sink_name=sink_name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def update_sink( + self, + sink_name, + sink, + unique_writer_identity=None, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' + >>> + >>> # TODO: Initialize `sink`: + >>> sink = {} + >>> + >>> response = client.update_sink(sink_name, sink) + + Args: + sink_name (str): Required. The full resource name of the sink to update, including + the parent resource and the sink identifier: + + :: + + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" + + Example: ``"projects/my-project-id/sinks/my-sink-id"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that + appears as part of ``sink_name``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When + updating a sink, the effect of this field on the value of + ``writer_identity`` in the updated sink depends on both the old and new + values of this field: + + - If the old and new values of this field are both false or both true, + then there is no change to the sink's ``writer_identity``. + - If the old value is false and the new value is true, then + ``writer_identity`` is changed to a unique service account. + - It is an error if the old value is true and the new value is set to + false or defaulted to false. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need + an update. A sink field will be overwritten if, and only if, it is in + the update mask. ``name`` and output only fields cannot be updated. + + An empty updateMask is temporarily treated as using the following mask + for backwards compatibility purposes: destination,filter,includeChildren + At some point in the future, behavior will be removed and specifying an + empty updateMask will be an error. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=filter``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.logging_v2.types.LogSink` 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 "update_sink" not in self._inner_api_calls: + self._inner_api_calls[ + "update_sink" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_sink, + default_retry=self._method_configs["UpdateSink"].retry, + default_timeout=self._method_configs["UpdateSink"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, + sink=sink, + unique_writer_identity=unique_writer_identity, + update_mask=update_mask, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_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["update_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_exclusion( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes an exclusion. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> client.delete_exclusion(name) + + Args: + name (str): Required. The resource name of an existing exclusion to delete: + + :: + + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + + Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_exclusion, + default_retry=self._method_configs["DeleteExclusion"].retry, + default_timeout=self._method_configs["DeleteExclusion"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteExclusionRequest( + name=name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def list_buckets( self, parent, page_size=None, @@ -305,17 +591,17 @@ def list_sinks( metadata=None, ): """ - Lists sinks. + Lists buckets (Beta). Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') + >>> parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') >>> >>> # Iterate over all results - >>> for element in client.list_sinks(parent): + >>> for element in client.list_buckets(parent): ... # process element ... pass >>> @@ -323,20 +609,24 @@ def list_sinks( >>> # Alternatively: >>> >>> # Iterate over results one page at a time - >>> for page in client.list_sinks(parent).pages: + >>> for page in client.list_buckets(parent).pages: ... for element in page: ... # process element ... pass Args: - parent (str): Required. The parent resource whose sinks are to be listed: + parent (str): Required. The parent resource whose buckets are to be listed: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the resource must be specified, but + supplying the character ``-`` in place of [LOCATION_ID] will return all + buckets. 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 @@ -353,7 +643,7 @@ def list_sinks( Returns: A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. + An iterable of :class:`~google.cloud.logging_v2.types.LogBucket` instances. You can also iterate over the pages of the response using its `pages` property. @@ -365,17 +655,17 @@ def list_sinks( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_sinks" not in self._inner_api_calls: + if "list_buckets" not in self._inner_api_calls: self._inner_api_calls[ - "list_sinks" + "list_buckets" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_sinks, - default_retry=self._method_configs["ListSinks"].retry, - default_timeout=self._method_configs["ListSinks"].timeout, + self.transport.list_buckets, + default_retry=self._method_configs["ListBuckets"].retry, + default_timeout=self._method_configs["ListBuckets"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.ListSinksRequest( + request = logging_config_pb2.ListBucketsRequest( parent=parent, page_size=page_size, ) @@ -395,48 +685,50 @@ def list_sinks( iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._inner_api_calls["list_sinks"], + self._inner_api_calls["list_buckets"], retry=retry, timeout=timeout, metadata=metadata, ), request=request, - items_field="sinks", + items_field="buckets", request_token_field="page_token", response_token_field="next_page_token", ) return iterator - def get_sink( + def get_bucket( self, - sink_name, + name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Gets a sink. + Gets a bucket (Beta). Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> - >>> response = client.get_sink(sink_name) + >>> response = client.get_bucket(name) Args: - sink_name (str): Required. The resource name of the sink: + name (str): Required. The resource name of the bucket: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - Example: ``"projects/my-project-id/sinks/my-sink-id"``. + Example: + ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. 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. @@ -447,7 +739,7 @@ def get_sink( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` instance. + A :class:`~google.cloud.logging_v2.types.LogBucket` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -457,24 +749,24 @@ def get_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_sink" not in self._inner_api_calls: + if "get_bucket" not in self._inner_api_calls: self._inner_api_calls[ - "get_sink" + "get_bucket" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_sink, - default_retry=self._method_configs["GetSink"].retry, - default_timeout=self._method_configs["GetSink"].timeout, + self.transport.get_bucket, + default_retry=self._method_configs["GetBucket"].retry, + default_timeout=self._method_configs["GetBucket"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.GetSinkRequest( - sink_name=sink_name, + request = logging_config_pb2.GetBucketRequest( + name=name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [("name", name)] except AttributeError: pass else: @@ -483,24 +775,140 @@ def get_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_sink"]( + return self._inner_api_calls["get_bucket"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_sink( + def update_bucket( + self, + name, + bucket, + update_mask, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: ``retention_period`` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, + FAILED_PRECONDITION will be returned. + + A buckets region may not be modified after it is created. This method is + in Beta. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> # TODO: Initialize `bucket`: + >>> bucket = {} + >>> + >>> # TODO: Initialize `update_mask`: + >>> update_mask = {} + >>> + >>> response = client.update_bucket(name, bucket, update_mask) + + Args: + name (str): Required. The full resource name of the bucket to update. + + :: + + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + + Example: + ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. + Also requires permission "resourcemanager.projects.updateLiens" to set + the locked property + bucket (Union[dict, ~google.cloud.logging_v2.types.LogBucket]): Required. The updated bucket. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogBucket` + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. Field mask that specifies the fields in ``bucket`` that + need an update. A bucket field will be overwritten if, and only if, it + is in the update mask. ``name`` and output only fields cannot be + updated. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=retention_days``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.logging_v2.types.LogBucket` 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 "update_bucket" not in self._inner_api_calls: + self._inner_api_calls[ + "update_bucket" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_bucket, + default_retry=self._method_configs["UpdateBucket"].retry, + default_timeout=self._method_configs["UpdateBucket"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.UpdateBucketRequest( + name=name, + bucket=bucket, + update_mask=update_mask, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["update_bucket"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def list_sinks( self, parent, - sink, - unique_writer_identity=None, + page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a sink that exports specified log entries to a destination. The - export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Lists sinks. Example: >>> from google.cloud import logging_v2 @@ -509,39 +917,34 @@ def create_sink( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} + >>> # Iterate over all results + >>> for element in client.list_sinks(parent): + ... # process element + ... pass >>> - >>> response = client.create_sink(parent, sink) + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_sinks(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - parent (str): Required. The resource in which to create the sink: + parent (str): Required. The parent resource whose sinks are to be listed: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Examples: ``"projects/my-logging-project"``, - ``"organizations/123456789"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink identifier - that is not already in use. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is omitted or set to - false, and if the sink's parent is a project, then the value returned as - ``writer_identity`` is the same group or service account used by Logging - before the addition of writer identities to this API. The sink's - destination must be in the same project as the sink itself. - - If this field is set to true, or if the sink is owned by a non-project - resource such as an organization, then the value of ``writer_identity`` - will be a unique service account used only for exports from the new - sink. For more information, see ``writer_identity`` in ``LogSink``. + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. 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. @@ -552,7 +955,10 @@ def create_sink( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -562,20 +968,19 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_sink" not in self._inner_api_calls: + if "list_sinks" not in self._inner_api_calls: self._inner_api_calls[ - "create_sink" + "list_sinks" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_sink, - default_retry=self._method_configs["CreateSink"].retry, - default_timeout=self._method_configs["CreateSink"].timeout, + self.transport.list_sinks, + default_retry=self._method_configs["ListSinks"].retry, + default_timeout=self._method_configs["ListSinks"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.CreateSinkRequest( + request = logging_config_pb2.ListSinksRequest( parent=parent, - sink=sink, - unique_writer_identity=unique_writer_identity, + page_size=page_size, ) if metadata is None: metadata = [] @@ -590,84 +995,52 @@ def create_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_sinks"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="sinks", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def update_sink( + def get_sink( self, sink_name, - sink, - unique_writer_identity=None, - update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. + Gets a sink. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} + >>> # TODO: Initialize `sink_name`: + >>> sink_name = '' >>> - >>> response = client.update_sink(sink_name, sink) + >>> response = client.get_sink(sink_name) Args: - sink_name (str): Required. The full resource name of the sink to update, including the - parent resource and the sink identifier: + sink_name (str): Required. The resource name of the sink: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that - appears as part of ``sink_name``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When - updating a sink, the effect of this field on the value of - ``writer_identity`` in the updated sink depends on both the old and new - values of this field: - - - If the old and new values of this field are both false or both true, - then there is no change to the sink's ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service account. - - It is an error if the old value is true and the new value is set to - false or defaulted to false. - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need an - update. A sink field will be overwritten if, and only if, it is in the - update mask. ``name`` and output only fields cannot be updated. - - An empty updateMask is temporarily treated as using the following mask - for backwards compatibility purposes: destination,filter,includeChildren - At some point in the future, behavior will be removed and specifying an - empty updateMask will be an error. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - - Example: ``updateMask=filter``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -688,21 +1061,18 @@ def update_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_sink" not in self._inner_api_calls: + if "get_sink" not in self._inner_api_calls: self._inner_api_calls[ - "update_sink" + "get_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_sink, - default_retry=self._method_configs["UpdateSink"].retry, - default_timeout=self._method_configs["UpdateSink"].timeout, + self.transport.get_sink, + default_retry=self._method_configs["GetSink"].retry, + default_timeout=self._method_configs["GetSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.UpdateSinkRequest( + request = logging_config_pb2.GetSinkRequest( sink_name=sink_name, - sink=sink, - unique_writer_identity=unique_writer_identity, - update_mask=update_mask, ) if metadata is None: metadata = [] @@ -717,42 +1087,65 @@ def update_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_sink"]( + return self._inner_api_calls["get_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_sink( + def create_sink( self, - sink_name, + parent, + sink, + unique_writer_identity=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes a sink. If the sink has a unique ``writer_identity``, then that - service account is also deleted. + Creates a sink that exports specified log entries to a destination. + The export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') + >>> parent = client.project_path('[PROJECT]') + >>> + >>> # TODO: Initialize `sink`: + >>> sink = {} >>> - >>> client.delete_sink(sink_name) + >>> response = client.create_sink(parent, sink) Args: - sink_name (str): Required. The full resource name of the sink to delete, including the - parent resource and the sink identifier: + parent (str): Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" - Example: ``"projects/my-project-id/sinks/my-sink-id"``. + Examples: ``"projects/my-logging-project"``, + ``"organizations/123456789"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink + identifier that is not already in use. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as + ``writer_identity`` in the new sink. If this value is omitted or set to + false, and if the sink's parent is a project, then the value returned as + ``writer_identity`` is the same group or service account used by Logging + before the addition of writer identities to this API. The sink's + destination must be in the same project as the sink itself. + + If this field is set to true, or if the sink is owned by a non-project + resource such as an organization, then the value of ``writer_identity`` + will be a unique service account used only for exports from the new + sink. For more information, see ``writer_identity`` in ``LogSink``. 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. @@ -762,6 +1155,9 @@ def delete_sink( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogSink` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -770,24 +1166,26 @@ def delete_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_sink" not in self._inner_api_calls: + if "create_sink" not in self._inner_api_calls: self._inner_api_calls[ - "delete_sink" + "create_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_sink, - default_retry=self._method_configs["DeleteSink"].retry, - default_timeout=self._method_configs["DeleteSink"].timeout, + self.transport.create_sink, + default_retry=self._method_configs["CreateSink"].retry, + default_timeout=self._method_configs["CreateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.DeleteSinkRequest( - sink_name=sink_name, + request = logging_config_pb2.CreateSinkRequest( + parent=parent, + sink=sink, + unique_writer_identity=unique_writer_identity, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("sink_name", sink_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -796,7 +1194,7 @@ def delete_sink( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_sink"]( + return self._inner_api_calls["create_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -837,10 +1235,10 @@ def list_exclusions( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -926,7 +1324,8 @@ def get_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_exclusion(name) @@ -935,10 +1334,10 @@ def get_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1021,15 +1420,15 @@ def create_exclusion( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging-project"``, ``"organizations/123456789"``. - exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an exclusion - name that is not already used in the parent resource. + exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an + exclusion name that is not already used in the parent resource. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogExclusion` @@ -1101,7 +1500,8 @@ def update_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> # TODO: Initialize `exclusion`: >>> exclusion = {} @@ -1116,10 +1516,10 @@ def update_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. New values for the existing exclusion. Only the fields @@ -1190,86 +1590,9 @@ def update_exclusion( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes an exclusion. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') - >>> - >>> client.delete_exclusion(name) - - Args: - name (str): Required. The resource name of an existing exclusion to delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - - Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_exclusion, - default_retry=self._method_configs["DeleteExclusion"].retry, - default_timeout=self._method_configs["DeleteExclusion"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteExclusionRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def get_cmek_settings( self, - name=None, + name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -1290,17 +1613,20 @@ def get_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> response = client.get_cmek_settings() + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> response = client.get_cmek_settings(name) Args: name (str): Required. The resource for which to retrieve CMEK settings. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. @@ -1359,8 +1685,8 @@ def get_cmek_settings( def update_cmek_settings( self, - name=None, - cmek_settings=None, + name, + cmek_settings, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, @@ -1376,9 +1702,7 @@ def update_cmek_settings( ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or - - 3) access to the key is disabled. + key, or 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ @@ -1389,17 +1713,23 @@ def update_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> response = client.update_cmek_settings() + >>> # TODO: Initialize `name`: + >>> name = '' + >>> + >>> # TODO: Initialize `cmek_settings`: + >>> cmek_settings = {} + >>> + >>> response = client.update_cmek_settings(name, cmek_settings) Args: name (str): Required. The resource name for the CMEK settings to update. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 00c7146e2..2edc1e079 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,90 +2,118 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], - "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "no_retry_2_codes": [], + "no_retry_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], }, "retry_params": { - "default": { + "retry_policy_3_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, }, - "write_sink": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000, }, }, "methods": { + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "UpdateSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", + }, + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", + }, "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetSink": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateSink": { "timeout_millis": 120000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "UpdateSink": { - "timeout_millis": 120000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "UpdateExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params", }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "idempotent2", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, "UpdateCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, }, } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index ee1a098a5..159669d6e 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -26,6 +26,8 @@ class LaunchStage(enum.IntEnum): Attributes: LAUNCH_STAGE_UNSPECIFIED (int): Do not use this default value. + UNIMPLEMENTED (int): The feature is not yet implemented. Users can not use it. + PRELAUNCH (int): Prelaunch features are hidden from users and are only visible internally. EARLY_ACCESS (int): Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may @@ -47,14 +49,16 @@ class LaunchStage(enum.IntEnum): limited production use cases. GA (int): GA features are open to all developers and are considered stable and fully qualified for production use. - DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more - information, see the “Deprecation Policy” section of our `Terms of + DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For + more information, see the “Deprecation Policy” section of our `Terms of Service `__ and the `Google Cloud Platform Subject to the Deprecation Policy `__ documentation. """ LAUNCH_STAGE_UNSPECIFIED = 0 + UNIMPLEMENTED = 6 + PRELAUNCH = 7 EARLY_ACCESS = 1 ALPHA = 2 BETA = 3 @@ -62,10 +66,26 @@ class LaunchStage(enum.IntEnum): DEPRECATED = 5 +class LifecycleState(enum.IntEnum): + """ + LogBucket lifecycle states (Beta). + + Attributes: + LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing + unset values. + ACTIVE (int): The normal and active state. + DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. + """ + + LIFECYCLE_STATE_UNSPECIFIED = 0 + ACTIVE = 1 + DELETE_REQUESTED = 2 + + class LogSeverity(enum.IntEnum): """ - The severity of the event described in a log entry, expressed as one of - the standard severity levels listed below. For your reference, the + The severity of the event described in a log entry, expressed as one + of the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined. @@ -75,7 +95,7 @@ class LogSeverity(enum.IntEnum): :: - severity > DEBUG AND severity <= WARNING + severity > DEBUG AND severity <= WARNING If you are writing log entries, you should map other severity encodings to one of these standard levels. For example, you might map all of @@ -109,8 +129,8 @@ class LogSeverity(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value for - the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value + for the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -154,9 +174,7 @@ class ApiVersion(enum.IntEnum): class LogSink(object): class VersionFormat(enum.IntEnum): """ - Available log entry formats. Log entries can be written to - Logging in either format and can be exported in either format. - Version 2 is the preferred format. + Deprecated. This is unused. Attributes: VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2. @@ -196,8 +214,8 @@ class ValueType(enum.IntEnum): Attributes: VALUE_TYPE_UNSPECIFIED (int): Do not use this default value. - BOOL (int): The value is a boolean. This value type can be used only if the metric - kind is ``GAUGE``. + BOOL (int): The value is a boolean. This value type can be used only if the + metric kind is ``GAUGE``. INT64 (int): The value is a signed 64-bit integer. DOUBLE (int): The value is a double precision floating point number. STRING (int): The value is a text string. This value type can be used only if the diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index c823deacb..1882b2b8b 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -80,22 +80,13 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" + def billing_account_path(cls, billing_account): + """Return a fully-qualified billing_account string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) - @classmethod - def billing_log_path(cls, billing_account, log): - """Return a fully-qualified billing_log string.""" - return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/logs/{log}", - billing_account=billing_account, - log=log, - ) - @classmethod def folder_path(cls, folder): """Return a fully-qualified folder string.""" @@ -104,15 +95,6 @@ def folder_path(cls, folder): folder=folder, ) - @classmethod - def folder_log_path(cls, folder, log): - """Return a fully-qualified folder_log string.""" - return google.api_core.path_template.expand( - "folders/{folder}/logs/{log}", - folder=folder, - log=log, - ) - @classmethod def log_path(cls, project, log): """Return a fully-qualified log string.""" @@ -130,15 +112,6 @@ def organization_path(cls, organization): organization=organization, ) - @classmethod - def organization_log_path(cls, organization, log): - """Return a fully-qualified organization_log string.""" - return google.api_core.path_template.expand( - "organizations/{organization}/logs/{log}", - organization=organization, - log=log, - ) - @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -282,7 +255,8 @@ def delete_log( >>> >>> client = logging_v2.LoggingServiceV2Client() >>> - >>> log_name = client.log_path('[PROJECT]', '[LOG]') + >>> # TODO: Initialize `log_name`: + >>> log_name = '' >>> >>> client.delete_log(log_name) @@ -291,10 +265,10 @@ def delete_log( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example, ``"projects/my-project-id/logs/syslog"``, @@ -347,6 +321,130 @@ def delete_log( request, retry=retry, timeout=timeout, metadata=metadata ) + def list_log_entries( + self, + resource_names, + filter_=None, + order_by=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.LoggingServiceV2Client() + >>> + >>> # TODO: Initialize `resource_names`: + >>> resource_names = [] + >>> + >>> # Iterate over all results + >>> for element in client.list_log_entries(resource_names): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_entries(resource_names).pages: + ... for element in page: + ... # process element + ... pass + + Args: + resource_names (list[str]): Required. Names of one or more parent resources from which to + retrieve log entries: + + :: + + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + + Projects listed in the ``project_ids`` field are added to this list. + filter_ (str): Optional. A filter that chooses which log entries to return. See + `Advanced Logs + Queries `__. + Only log entries that match the filter are returned. An empty filter + matches all log entries in the resources listed in ``resource_names``. + Referencing a parent resource that is not listed in ``resource_names`` + will cause the filter to return no results. The maximum length of the + filter is 20000 characters. + order_by (str): Optional. How the results should be sorted. Presently, the only + permitted values are ``"timestamp asc"`` (default) and + ``"timestamp desc"``. The first option returns entries in order of + increasing values of ``LogEntry.timestamp`` (oldest first), and the + second option returns entries in order of decreasing timestamps (newest + first). Entries with equal timestamps are returned in order of their + ``insert_id`` values. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + 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.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + 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 "list_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "list_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_log_entries, + default_retry=self._method_configs["ListLogEntries"].retry, + default_timeout=self._method_configs["ListLogEntries"].timeout, + client_info=self._client_info, + ) + + request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names, + filter=filter_, + order_by=order_by, + page_size=page_size, + ) + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_entries"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="entries", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + def write_log_entries( self, entries, @@ -379,8 +477,8 @@ def write_log_entries( >>> response = client.write_log_entries(entries) Args: - entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log entries - in this list does not matter. Values supplied in this method's + entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log + entries in this list does not matter. Values supplied in this method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the ``LogEntry`` type. @@ -410,46 +508,45 @@ def write_log_entries( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example: :: - "projects/my-project-id/logs/syslog" - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + "projects/my-project-id/logs/syslog" + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - The permission logging.logEntries.create is needed on each project, + The permission ``logging.logEntries.create`` is needed on each project, organization, billing account, or folder that is receiving new log - entries, whether the resource is specified in logName or in an + entries, whether the resource is specified in ``logName`` or in an individual log entry. - resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to all - log entries in ``entries`` that do not specify a value for ``resource``. - Example: + resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to + all log entries in ``entries`` that do not specify a value for + ``resource``. Example: :: - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + { "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See ``LogEntry``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.MonitoredResource` - labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of all - log entries in ``entries``. If a log entry already has a label with the - same key as a label in this parameter, then the log entry's label is not - changed. See ``LogEntry``. + labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of + all log entries in ``entries``. If a log entry already has a label with + the same key as a label in this parameter, then the log entry's label is + not changed. See ``LogEntry``. partial_success (bool): Optional. Whether valid entries should be written even if some other - entries fail due to INVALID\_ARGUMENT or PERMISSION\_DENIED errors. If - any entry is not written, then the response status is the error - associated with one of the failed entries and the response includes - error details keyed by the entries' zero-based index in the - ``entries.write`` method. + entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any + entry is not written, then the response status is the error associated + with one of the failed entries and the response includes error details + keyed by the entries' zero-based index in the ``entries.write`` method. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. @@ -495,135 +592,6 @@ def write_log_entries( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_log_entries( - self, - resource_names, - project_ids=None, - filter_=None, - order_by=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.LoggingServiceV2Client() - >>> - >>> # TODO: Initialize `resource_names`: - >>> resource_names = [] - >>> - >>> # Iterate over all results - >>> for element in client.list_log_entries(resource_names): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_entries(resource_names).pages: - ... for element in page: - ... # process element - ... pass - - Args: - resource_names (list[str]): Required. Names of one or more parent resources from which to retrieve - log entries: - - :: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Projects listed in the ``project_ids`` field are added to this list. - project_ids (list[str]): Deprecated. Use ``resource_names`` instead. One or more project - identifiers or project numbers from which to retrieve log entries. - Example: ``"my-project-1A"``. - filter_ (str): Optional. A filter that chooses which log entries to return. See - `Advanced Logs - Queries `__. - Only log entries that match the filter are returned. An empty filter - matches all log entries in the resources listed in ``resource_names``. - Referencing a parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum length of the - filter is 20000 characters. - order_by (str): Optional. How the results should be sorted. Presently, the only - permitted values are ``"timestamp asc"`` (default) and - ``"timestamp desc"``. The first option returns entries in order of - increasing values of ``LogEntry.timestamp`` (oldest first), and the - second option returns entries in order of decreasing timestamps (newest - first). Entries with equal timestamps are returned in order of their - ``insert_id`` values. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - 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.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - 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 "list_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "list_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_entries, - default_retry=self._method_configs["ListLogEntries"].retry, - default_timeout=self._method_configs["ListLogEntries"].timeout, - client_info=self._client_info, - ) - - request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names, - project_ids=project_ids, - filter=filter_, - order_by=order_by, - page_size=page_size, - ) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_entries"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="entries", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - def list_monitored_resource_descriptors( self, page_size=None, @@ -752,10 +720,10 @@ def list_logs( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index b3da612f6..6c4e8c8e4 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,59 +2,77 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, }, - "list": { + "retry_policy_2_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 3600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, }, }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", "bundling": { "element_count_threshold": 1000, "request_byte_threshold": 1048576, "delay_threshold_millis": 50, }, }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index 87cf5b89d..c3d1f2f4c 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -82,38 +82,14 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_path(cls, billing_account): - """Return a fully-qualified billing string.""" - return google.api_core.path_template.expand( - "billingAccounts/{billing_account}", - billing_account=billing_account, - ) - - @classmethod - def folder_path(cls, folder): - """Return a fully-qualified folder string.""" - return google.api_core.path_template.expand( - "folders/{folder}", - folder=folder, - ) - - @classmethod - def metric_path(cls, project, metric): - """Return a fully-qualified metric string.""" + def log_metric_path(cls, project, metric): + """Return a fully-qualified log_metric string.""" return google.api_core.path_template.expand( "projects/{project}/metrics/{metric}", project=project, metric=metric, ) - @classmethod - def organization_path(cls, organization): - """Return a fully-qualified organization string.""" - return google.api_core.path_template.expand( - "organizations/{organization}", - organization=organization, - ) - @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -239,49 +215,43 @@ def __init__( self._inner_api_calls = {} # Service calls - def list_log_metrics( + def update_log_metric( self, - parent, - page_size=None, + metric_name, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists logs-based metrics. + Creates or updates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # Iterate over all results - >>> for element in client.list_log_metrics(parent): - ... # process element - ... pass - >>> + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> # Alternatively: + >>> # TODO: Initialize `metric`: + >>> metric = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_metrics(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.update_log_metric(metric_name, metric) Args: - parent (str): Required. The name of the project containing the metrics: + metric_name (str): Required. The resource name of the metric to update: :: - "projects/[PROJECT_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + + The updated metric must be provided in the request and it's ``name`` + field must be the same as ``[METRIC_ID]`` If the metric does not exist + in ``[PROJECT_ID]``, then a new metric is created. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -292,10 +262,7 @@ def list_log_metrics( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -305,25 +272,25 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_metrics" not in self._inner_api_calls: + if "update_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "list_log_metrics" + "update_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_metrics, - default_retry=self._method_configs["ListLogMetrics"].retry, - default_timeout=self._method_configs["ListLogMetrics"].timeout, + self.transport.update_log_metric, + default_retry=self._method_configs["UpdateLogMetric"].retry, + default_timeout=self._method_configs["UpdateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.ListLogMetricsRequest( - parent=parent, - page_size=page_size, + request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, + metric=metric, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: @@ -332,22 +299,11 @@ def list_log_metrics( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_metrics"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="metrics", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["update_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_log_metric( + def delete_log_metric( self, metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -355,23 +311,23 @@ def get_log_metric( metadata=None, ): """ - Gets a logs-based metric. + Deletes a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.get_log_metric(metric_name) + >>> client.delete_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the desired metric: + metric_name (str): Required. The resource name of the metric to delete: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -381,9 +337,6 @@ def get_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -392,17 +345,17 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_log_metric" not in self._inner_api_calls: + if "delete_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "get_log_metric" + "delete_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_log_metric, - default_retry=self._method_configs["GetLogMetric"].retry, - default_timeout=self._method_configs["GetLogMetric"].timeout, + self.transport.delete_log_metric, + default_retry=self._method_configs["DeleteLogMetric"].retry, + default_timeout=self._method_configs["DeleteLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.GetLogMetricRequest( + request = logging_metrics_pb2.DeleteLogMetricRequest( metric_name=metric_name, ) if metadata is None: @@ -418,20 +371,20 @@ def get_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_log_metric"]( + self._inner_api_calls["delete_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_log_metric( + def list_log_metrics( self, parent, - metric, + page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a logs-based metric. + Lists logs-based metrics. Example: >>> from google.cloud import logging_v2 @@ -440,25 +393,31 @@ def create_log_metric( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> # Iterate over all results + >>> for element in client.list_log_metrics(parent): + ... # process element + ... pass >>> - >>> response = client.create_log_metric(parent, metric) + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_metrics(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - parent (str): Required. The resource name of the project in which to create the - metric: + parent (str): Required. The name of the project containing the metrics: :: - "projects/[PROJECT_ID]" - - The new metric must be provided in the request. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that - already exists. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. 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. @@ -469,7 +428,10 @@ def create_log_metric( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -479,19 +441,19 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_log_metric" not in self._inner_api_calls: + if "list_log_metrics" not in self._inner_api_calls: self._inner_api_calls[ - "create_log_metric" + "list_log_metrics" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_log_metric, - default_retry=self._method_configs["CreateLogMetric"].retry, - default_timeout=self._method_configs["CreateLogMetric"].timeout, + self.transport.list_log_metrics, + default_retry=self._method_configs["ListLogMetrics"].retry, + default_timeout=self._method_configs["ListLogMetrics"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.CreateLogMetricRequest( + request = logging_metrics_pb2.ListLogMetricsRequest( parent=parent, - metric=metric, + page_size=page_size, ) if metadata is None: metadata = [] @@ -506,47 +468,46 @@ def create_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_metrics"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="metrics", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def update_log_metric( + def get_log_metric( self, metric_name, - metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates or updates a logs-based metric. + Gets a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') - >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.update_log_metric(metric_name, metric) + >>> response = client.get_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the metric to update: + metric_name (str): Required. The resource name of the desired metric: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - - The updated metric must be provided in the request and it's ``name`` - field must be the same as ``[METRIC_ID]`` If the metric does not exist - in ``[PROJECT_ID]``, then a new metric is created. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -567,19 +528,18 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_log_metric" not in self._inner_api_calls: + if "get_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "update_log_metric" + "get_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_log_metric, - default_retry=self._method_configs["UpdateLogMetric"].retry, - default_timeout=self._method_configs["UpdateLogMetric"].timeout, + self.transport.get_log_metric, + default_retry=self._method_configs["GetLogMetric"].retry, + default_timeout=self._method_configs["GetLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.UpdateLogMetricRequest( + request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name, - metric=metric, ) if metadata is None: metadata = [] @@ -594,35 +554,47 @@ def update_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_log_metric"]( + return self._inner_api_calls["get_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_log_metric( + def create_log_metric( self, - metric_name, + parent, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes a logs-based metric. + Creates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') + >>> parent = client.project_path('[PROJECT]') + >>> + >>> # TODO: Initialize `metric`: + >>> metric = {} >>> - >>> client.delete_log_metric(metric_name) + >>> response = client.create_log_metric(parent, metric) Args: - metric_name (str): Required. The resource name of the metric to delete: + parent (str): Required. The resource name of the project in which to create the + metric: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]" + + The new metric must be provided in the request. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that + already exists. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -632,6 +604,9 @@ def delete_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -640,24 +615,25 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log_metric" not in self._inner_api_calls: + if "create_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "delete_log_metric" + "create_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_log_metric, - default_retry=self._method_configs["DeleteLogMetric"].retry, - default_timeout=self._method_configs["DeleteLogMetric"].timeout, + self.transport.create_log_metric, + default_retry=self._method_configs["CreateLogMetric"].retry, + default_timeout=self._method_configs["CreateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.DeleteLogMetricRequest( - metric_name=metric_name, + request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, + metric=metric, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -666,6 +642,6 @@ def delete_log_metric( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_log_metric"]( + return self._inner_api_calls["create_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index 133abec23..d4bc0e960 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,45 +2,68 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE", + ], + "no_retry_codes": [], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_4_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, }, "methods": { - "ListLogMetrics": { + "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, - "GetLogMetric": { + "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, - "CreateLogMetric": { + "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, - "UpdateLogMetric": { + "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, - "DeleteLogMetric": { + "CreateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index f3132ede0..3cb7e0870 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -116,78 +116,140 @@ def channel(self): return self._channel @property - def list_sinks(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. + def delete_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - Lists sinks. + Deletes a sink. If the sink has a unique ``writer_identity``, then + that service account is also deleted. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListSinks + return self._stubs["config_service_v2_stub"].DeleteSink @property - def get_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. + def update_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - Gets a sink. + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetSink + return self._stubs["config_service_v2_stub"].UpdateSink @property - def create_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. + def delete_exclusion(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. - Creates a sink that exports specified log entries to a destination. The - export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Deletes an exclusion. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].CreateSink + return self._stubs["config_service_v2_stub"].DeleteExclusion @property - def update_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. + def list_buckets(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_buckets`. - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. + Lists buckets (Beta). - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].ListBuckets + + @property + def get_bucket(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_bucket`. + + Gets a bucket (Beta). Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateSink + return self._stubs["config_service_v2_stub"].GetBucket @property - def delete_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. + def update_bucket(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_bucket`. - Deletes a sink. If the sink has a unique ``writer_identity``, then that - service account is also deleted. + Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: ``retention_period`` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, + FAILED_PRECONDITION will be returned. + + A buckets region may not be modified after it is created. This method is + in Beta. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].DeleteSink + return self._stubs["config_service_v2_stub"].UpdateBucket + + @property + def list_sinks(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. + + Lists sinks. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].ListSinks + + @property + def get_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. + + Gets a sink. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].GetSink + + @property + def create_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. + + Creates a sink that exports specified log entries to a destination. + The export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].CreateSink @property def list_exclusions(self): @@ -243,19 +305,6 @@ def update_exclusion(self): """ return self._stubs["config_service_v2_stub"].UpdateExclusion - @property - def delete_exclusion(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. - - Deletes an exclusion. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteExclusion - @property def get_cmek_settings(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_cmek_settings`. @@ -290,9 +339,7 @@ def update_cmek_settings(self): ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or - - 3) access to the key is disabled. + key, or 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 4cf843caf..07ca0603f 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -129,6 +129,22 @@ def delete_log(self): """ return self._stubs["logging_service_v2_stub"].DeleteLog + @property + def list_log_entries(self): + """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. + + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["logging_service_v2_stub"].ListLogEntries + @property def write_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. @@ -148,22 +164,6 @@ def write_log_entries(self): """ return self._stubs["logging_service_v2_stub"].WriteLogEntries - @property - def list_log_entries(self): - """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. - - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["logging_service_v2_stub"].ListLogEntries - @property def list_monitored_resource_descriptors(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_monitored_resource_descriptors`. diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index 605bc118e..f1d75af56 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -116,66 +116,66 @@ def channel(self): return self._channel @property - def list_log_metrics(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. + def update_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. - Lists logs-based metrics. + Creates or updates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].ListLogMetrics + return self._stubs["metrics_service_v2_stub"].UpdateLogMetric @property - def get_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. + def delete_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. - Gets a logs-based metric. + Deletes a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].GetLogMetric + return self._stubs["metrics_service_v2_stub"].DeleteLogMetric @property - def create_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. + def list_log_metrics(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. - Creates a logs-based metric. + Lists logs-based metrics. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].CreateLogMetric + return self._stubs["metrics_service_v2_stub"].ListLogMetrics @property - def update_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. + def get_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. - Creates or updates a logs-based metric. + Gets a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].UpdateLogMetric + return self._stubs["metrics_service_v2_stub"].GetLogMetric @property - def delete_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. + def create_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. - Deletes a logs-based metric. + Creates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].DeleteLogMetric + return self._stubs["metrics_service_v2_stub"].CreateLogMetric diff --git a/google/cloud/logging_v2/proto/log_entry.proto b/google/cloud/logging_v2/proto/log_entry.proto index 3f9c3d51d..3ad2cfbb5 100644 --- a/google/cloud/logging_v2/proto/log_entry.proto +++ b/google/cloud/logging_v2/proto/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // 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.logging.v2; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/logging/type/http_request.proto"; @@ -34,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LogEntryProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // An individual entry in a log. // @@ -55,9 +56,9 @@ message LogEntry { // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]" // - // A project number may optionally be used in place of PROJECT_ID. The project - // number is translated to its corresponding PROJECT_ID internally and the - // `log_name` field will contain PROJECT_ID in queries and exports. + // A project number may be used in place of PROJECT_ID. The project number is + // translated to its corresponding PROJECT_ID internally and the `log_name` + // field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -70,16 +71,16 @@ message LogEntry { // forward-slash is removed. Listing the log entry will not show the leading // slash and filtering for a log name with a leading slash will never return // any results. - string log_name = 12; + string log_name = 12 [(google.api.field_behavior) = REQUIRED]; // Required. The monitored resource that produced this log entry. // // Example: a log entry that reports a database error would be associated with // the monitored resource designating the particular database that reported // the error. - google.api.MonitoredResource resource = 8; + google.api.MonitoredResource resource = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The log entry payload, which can be one of multiple types. + // The log entry payload, which can be one of multiple types. oneof payload { // The log entry payload, represented as a protocol buffer. Some Google // Cloud Platform services use this field for their log entry payloads. @@ -99,29 +100,27 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. This - // time is used to compute the log entry's age and to enforce the logs - // retention period. If this field is omitted in a new log entry, then Logging - // assigns it the current time. Timestamps have nanosecond accuracy, but - // trailing zeros in the fractional seconds might be omitted when the - // timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This time is used + // to compute the log entry's age and to enforce the logs retention period. + // If this field is omitted in a new log entry, then Logging assigns it the + // current time. Timestamps have nanosecond accuracy, but trailing zeros in + // the fractional seconds might be omitted when the timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than the [logs - // retention period](/logging/quotas) in the past, and no more than 24 hours - // in the future. Log entries outside those time boundaries will not be - // available when calling `entries.list`, but those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). - google.protobuf.Timestamp timestamp = 9; + // Incoming log entries must have timestamps that don't exceed the + // [logs retention + // period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + // the past, and that don't exceed 24 hours in the future. Log entries outside + // those time boundaries aren't ingested by Logging. + google.protobuf.Timestamp timestamp = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the log entry was received by Logging. - google.protobuf.Timestamp receive_timestamp = 24; + google.protobuf.Timestamp receive_timestamp = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; + // Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`. + google.logging.type.LogSeverity severity = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, with the same + // Optional. A unique identifier for the log entry. If you provide a value, then + // Logging considers other log entries in the same project, with the same // `timestamp`, and with the same `insert_id` to be duplicates which are // removed in a single query result. However, there are no guarantees of // de-duplication in the export of logs. @@ -131,43 +130,32 @@ message LogEntry { // // In queries, the `insert_id` is also used to order log entries that have // the same `log_name` and `timestamp` values. - string insert_id = 4; + string insert_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Information about the HTTP request associated with this log - // entry, if applicable. - google.logging.type.HttpRequest http_request = 7; + // Optional. Information about the HTTP request associated with this log entry, if + // applicable. + google.logging.type.HttpRequest http_request = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. - map labels = 11; - - // Deprecated. Output only. Additional metadata about the monitored resource. - // - // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated for GKE versions older than 1.12.6. For GKE versions - // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes - // pod labels that used to be in `metadata.userLabels` will now be present in - // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system - // labels that were present in the `metadata.systemLabels` field will no - // longer be available in the LogEntry. - google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about an operation associated with the log entry, if // applicable. - LogEntryOperation operation = 15; + LogEntryOperation operation = 15 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Resource name of the trace associated with the log entry, if any. - // If it contains a relative resource name, the name is assumed to be relative - // to `//tracing.googleapis.com`. Example: + // Optional. Resource name of the trace associated with the log entry, if any. If it + // contains a relative resource name, the name is assumed to be relative to + // `//tracing.googleapis.com`. Example: // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - string trace = 22; + string trace = 22 [(google.api.field_behavior) = OPTIONAL]; // Optional. The span ID within the trace associated with the log entry. // // For Trace spans, this is the same format that the Trace API v2 uses: a // 16-character hexadecimal encoding of an 8-byte array, such as - // "000000000000004a". - string span_id = 27; + // `000000000000004a`. + string span_id = 27 [(google.api.field_behavior) = OPTIONAL]; // Optional. The sampling decision of the trace associated with the log entry. // @@ -176,11 +164,10 @@ message LogEntry { // for storage when this log entry was written, or the sampling decision was // unknown at the time. A non-sampled `trace` value is still useful as a // request correlation identifier. The default is False. - bool trace_sampled = 30; + bool trace_sampled = 30 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source code location information associated with the log entry, - // if any. - LogEntrySourceLocation source_location = 23; + // Optional. Source code location information associated with the log entry, if any. + LogEntrySourceLocation source_location = 23 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about a potentially long-running operation with which @@ -188,18 +175,18 @@ message LogEntry { message LogEntryOperation { // Optional. An arbitrary operation identifier. Log entries with the same // identifier are assumed to be part of the same operation. - string id = 1; + string id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. An arbitrary producer identifier. The combination of `id` and // `producer` must be globally unique. Examples for `producer`: // `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - string producer = 2; + string producer = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; + bool first = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; + bool last = 4 [(google.api.field_behavior) = OPTIONAL]; } // Additional information about the source code location that produced the log @@ -207,11 +194,11 @@ message LogEntryOperation { message LogEntrySourceLocation { // Optional. Source file name. Depending on the runtime environment, this // might be a simple name or a fully-qualified name. - string file = 1; + string file = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Line within the source file. 1-based; 0 indicates no line number // available. - int64 line = 2; + int64 line = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Human-readable name of the function or method being invoked, with // optional context such as the class or package name. This information may be @@ -219,5 +206,5 @@ message LogEntrySourceLocation { // less meaningful. The format can vary by language. For example: // `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` // (Python). - string function = 3; + string function = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index 9b0ef2205..bd5c29b01 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""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 @@ -15,6 +12,7 @@ _sym_db = _symbol_database.Default() +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) @@ -36,13 +34,11 @@ name="google/cloud/logging_v2/proto/log_entry.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xce\x07\n\x08LogEntry\x12\x10\n\x08log_name\x18\x0c \x01(\t\x12/\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12-\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverity\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x36\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequest\x12\x37\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntry\x12;\n\x08metadata\x18\x19 \x01(\x0b\x32%.google.api.MonitoredResourceMetadataB\x02\x18\x01\x12\x37\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperation\x12\r\n\x05trace\x18\x16 \x01(\t\x12\x0f\n\x07span_id\x18\x1b \x01(\t\x12\x15\n\rtrace_sampled\x18\x1e \x01(\x08\x12\x42\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, @@ -62,6 +58,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -72,7 +69,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, @@ -80,6 +77,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -90,7 +88,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, @@ -98,18 +96,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1084, - serialized_end=1129, + serialized_start=1121, + serialized_end=1166, ) _LOGENTRY = _descriptor.Descriptor( @@ -118,6 +117,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -128,14 +128,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="resource", @@ -152,8 +153,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="proto_payload", @@ -172,6 +174,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_payload", @@ -182,7 +185,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, @@ -190,6 +193,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="json_payload", @@ -208,6 +212,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="timestamp", @@ -224,8 +229,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="receive_timestamp", @@ -242,8 +248,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="severity", @@ -260,8 +267,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="insert_id", @@ -272,14 +280,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="http_request", @@ -296,8 +305,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="labels", @@ -314,31 +324,14 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="metadata", - full_name="google.logging.v2.LogEntry.metadata", - index=11, - number=25, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="operation", full_name="google.logging.v2.LogEntry.operation", - index=12, + index=11, number=15, type=11, cpp_type=10, @@ -350,49 +343,52 @@ 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="trace", full_name="google.logging.v2.LogEntry.trace", - index=13, + index=12, number=22, type=9, 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="span_id", full_name="google.logging.v2.LogEntry.span_id", - index=14, + index=13, number=27, type=9, 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="trace_sampled", full_name="google.logging.v2.LogEntry.trace_sampled", - index=15, + index=14, number=30, type=8, cpp_type=7, @@ -404,13 +400,14 @@ 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="source_location", full_name="google.logging.v2.LogEntry.source_location", - index=16, + index=15, number=23, type=11, cpp_type=10, @@ -422,8 +419,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=[], @@ -431,9 +429,7 @@ _LOGENTRY_LABELSENTRY, ], enum_types=[], - serialized_options=_b( - "\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name" - ), + serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -443,11 +439,12 @@ full_name="google.logging.v2.LogEntry.payload", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ), ], - serialized_start=358, - serialized_end=1332, + serialized_start=391, + serialized_end=1369, ) @@ -457,6 +454,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="id", @@ -467,14 +465,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="producer", @@ -485,14 +484,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="first", @@ -509,8 +509,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="last", @@ -527,8 +528,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=[], @@ -539,8 +541,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1334, - serialized_end=1412, + serialized_start=1371, + serialized_end=1469, ) @@ -550,6 +552,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="file", @@ -560,14 +563,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="line", @@ -584,8 +588,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="function", @@ -596,14 +601,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=[], @@ -614,8 +620,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1414, - serialized_end=1484, + serialized_start=1471, + serialized_end=1556, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY @@ -641,9 +647,6 @@ "http_request" ].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST _LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY -_LOGENTRY.fields_by_name[ - "metadata" -].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEMETADATA _LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION _LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION _LOGENTRY.oneofs_by_name["payload"].fields.append( @@ -672,31 +675,30 @@ LogEntry = _reflection.GeneratedProtocolMessageType( "LogEntry", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRY_LABELSENTRY, - __module__="google.cloud.logging_v2.proto.log_entry_pb2" + { + "DESCRIPTOR": _LOGENTRY_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - ), + }, ), - DESCRIPTOR=_LOGENTRY, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""An individual entry in a log. - + "DESCRIPTOR": _LOGENTRY, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """An individual entry in a log. Attributes: log_name: Required. The resource name of the log to which this log entry - belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may - optionally be used in place of PROJECT\_ID. The project number - is translated to its corresponding PROJECT\_ID internally and - the ``log_name`` field will contain PROJECT\_ID in queries and + "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be + used in place of PROJECT_ID. The project number is translated + to its corresponding PROJECT_ID internally and the + ``log_name`` field will contain PROJECT_ID in queries and exports. ``[LOG_ID]`` must be URL-encoded within ``log_name``. Example: ``"organizations/1234567890/logs/cloudr esourcemanager.googleapis.com%2Factivity"``. ``[LOG_ID]`` must @@ -715,15 +717,14 @@ associated with the monitored resource designating the particular database that reported the error. payload: - Optional. The log entry payload, which can be one of multiple - types. + The log entry payload, which can be one of multiple types. proto_payload: The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. The following protocol buffer types are supported; user-defined types are not supported: - "type.googleapis.com/google.cloud.audit.AuditLog" - "type.googleapis.com/google.appengine.logging.v1.RequestLog" + “type.googleapis.com/google.cloud.audit.AuditLog” + “type.googleapis.com/google.appengine.logging.v1.RequestLog” text_payload: The log entry payload, represented as a Unicode string (UTF-8). @@ -732,18 +733,16 @@ expressed as a JSON object. timestamp: Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry's age and + occurred. This time is used to compute the log entry’s age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is - displayed. Incoming log entries should have timestamps that - are no more than the `logs retention period - `__ in the past, and no more than 24 hours in - the future. Log entries outside those time boundaries will not - be available when calling ``entries.list``, but those log - entries can still be `exported with LogSinks - `__. + displayed. Incoming log entries must have timestamps that + don’t exceed the `logs retention period `__ in the past, and + that don’t exceed 24 hours in the future. Log entries outside + those time boundaries aren’t ingested by Logging. receive_timestamp: Output only. The time the log entry was received by Logging. severity: @@ -766,18 +765,6 @@ labels: Optional. A set of user-defined (key, value) data that provides additional information about the log entry. - metadata: - Deprecated. Output only. Additional metadata about the - monitored resource. Only ``k8s_container``, ``k8s_pod``, and - ``k8s_node`` MonitoredResources have this field populated for - GKE versions older than 1.12.6. For GKE versions 1.12.6 and - above, the ``metadata`` field has been deprecated. The - Kubernetes pod labels that used to be in - ``metadata.userLabels`` will now be present in the ``labels`` - field with a key prefix of ``k8s-pod/``. The Stackdriver - system labels that were present in the - ``metadata.systemLabels`` field will no longer be available in - the LogEntry. operation: Optional. Information about an operation associated with the log entry, if applicable. @@ -791,7 +778,7 @@ Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an - 8-byte array, such as "000000000000004a". + 8-byte array, such as ``000000000000004a``. trace_sampled: Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the @@ -806,7 +793,7 @@ log entry, if any. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - ), + }, ) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) @@ -814,12 +801,11 @@ LogEntryOperation = _reflection.GeneratedProtocolMessageType( "LogEntryOperation", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRYOPERATION, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""Additional information about a potentially long-running - operation with which a log entry is associated. - + { + "DESCRIPTOR": _LOGENTRYOPERATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about a potentially long-running operation with + which a log entry is associated. Attributes: id: @@ -839,19 +825,18 @@ the operation. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - ), + }, ) _sym_db.RegisterMessage(LogEntryOperation) LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( "LogEntrySourceLocation", (_message.Message,), - dict( - DESCRIPTOR=_LOGENTRYSOURCELOCATION, - __module__="google.cloud.logging_v2.proto.log_entry_pb2", - __doc__="""Additional information about the source code location that - produced the log entry. - + { + "DESCRIPTOR": _LOGENTRYSOURCELOCATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about the source code location that produced + the log entry. Attributes: file: @@ -871,13 +856,32 @@ (Go), ``function`` (Python). """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - ), + }, ) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name["metadata"]._options = None +_LOGENTRY.fields_by_name["log_name"]._options = None +_LOGENTRY.fields_by_name["resource"]._options = None +_LOGENTRY.fields_by_name["timestamp"]._options = None +_LOGENTRY.fields_by_name["receive_timestamp"]._options = None +_LOGENTRY.fields_by_name["severity"]._options = None +_LOGENTRY.fields_by_name["insert_id"]._options = None +_LOGENTRY.fields_by_name["http_request"]._options = None +_LOGENTRY.fields_by_name["labels"]._options = None +_LOGENTRY.fields_by_name["operation"]._options = None +_LOGENTRY.fields_by_name["trace"]._options = None +_LOGENTRY.fields_by_name["span_id"]._options = None +_LOGENTRY.fields_by_name["trace_sampled"]._options = None +_LOGENTRY.fields_by_name["source_location"]._options = None _LOGENTRY._options = None +_LOGENTRYOPERATION.fields_by_name["id"]._options = None +_LOGENTRYOPERATION.fields_by_name["producer"]._options = None +_LOGENTRYOPERATION.fields_by_name["first"]._options = None +_LOGENTRYOPERATION.fields_by_name["last"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None +_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_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/logging_v2/proto/logging.proto b/google/cloud/logging_v2/proto/logging.proto index c3a524633..58647b92f 100644 --- a/google/cloud/logging_v2/proto/logging.proto +++ b/google/cloud/logging_v2/proto/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,11 @@ // 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.logging.v2; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; @@ -26,8 +24,10 @@ import "google/logging/v2/log_entry.proto"; import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -36,6 +36,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { @@ -87,7 +88,8 @@ service LoggingServiceV2 { // Lists log entries. Use this method to retrieve log entries that originated // from a project/folder/organization/billing account. For ways to export log - // entries, see [Exporting Logs](/logging/docs/export). + // entries, see [Exporting + // Logs](https://cloud.google.com/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -142,7 +144,7 @@ message DeleteLogRequest { string log_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" + type: "logging.googleapis.com/Log" } ]; } @@ -162,13 +164,16 @@ message WriteLogEntriesRequest { // "projects/my-project-id/logs/syslog" // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" // - // The permission logging.logEntries.create is needed on each - // project, organization, billing account, or folder that is receiving - // new log entries, whether the resource is specified in - // logName or in an individual log entry. - string log_name = 1 [(google.api.resource_reference) = { - type: "logging.googleapis.com/Log" - }]; + // The permission `logging.logEntries.create` is needed on each project, + // organization, billing account, or folder that is receiving new log + // entries, whether the resource is specified in `logName` or in an + // individual log entry. + string log_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "logging.googleapis.com/Log" + } + ]; // Optional. A default monitored resource object that is assigned to all log // entries in `entries` that do not specify a value for `resource`. Example: @@ -178,13 +183,13 @@ message WriteLogEntriesRequest { // "zone": "us-central1-a", "instance_id": "00000000000000000000" }} // // See [LogEntry][google.logging.v2.LogEntry]. - google.api.MonitoredResource resource = 2; + google.api.MonitoredResource resource = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Default labels that are added to the `labels` field of all log // entries in `entries`. If a log entry already has a label with the same key // as a label in this parameter, then the log entry's label is not changed. // See [LogEntry][google.logging.v2.LogEntry]. - map labels = 3; + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; // Required. The log entries to send to Logging. The order of log // entries in this list does not matter. Values supplied in this method's @@ -200,15 +205,16 @@ message WriteLogEntriesRequest { // the entries later in the list. See the `entries.list` method. // // Log entries with timestamps that are more than the - // [logs retention period](/logging/quota-policy) in the past or more than - // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be - // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). + // [logs retention period](https://cloud.google.com/logging/quota-policy) in + // the past or more than 24 hours in the future will not be available when + // calling `entries.list`. However, those log entries can still be [exported + // with + // LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the - // [quota limit](/logging/quota-policy) for calls to `entries.write`, - // you should try to include several log entries in this list, - // rather than calling this method for each individual log entry. + // [quota limit](https://cloud.google.com/logging/quota-policy) for calls to + // `entries.write`, you should try to include several log entries in this + // list, rather than calling this method for each individual log entry. repeated LogEntry entries = 4 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether valid entries should be written even if some other @@ -216,19 +222,16 @@ message WriteLogEntriesRequest { // entry is not written, then the response status is the error associated // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. - bool partial_success = 5; + bool partial_success = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, the request should expect normal response, but the // entries won't be persisted nor exported. Useful for checking whether the // logging API endpoints are working properly before sending valuable data. - bool dry_run = 6; + bool dry_run = 6 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from WriteLogEntries. -// empty -message WriteLogEntriesResponse { - -} +message WriteLogEntriesResponse {} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -243,11 +246,6 @@ message WriteLogEntriesPartialErrors { // The parameters to `ListLogEntries`. message ListLogEntriesRequest { - // Deprecated. Use `resource_names` instead. One or more project identifiers - // or project numbers from which to retrieve log entries. Example: - // `"my-project-1A"`. - repeated string project_ids = 1 [deprecated = true]; - // Required. Names of one or more parent resources from which to // retrieve log entries: // @@ -266,13 +264,13 @@ message ListLogEntriesRequest { ]; // Optional. A filter that chooses which log entries to return. See [Advanced - // Logs Queries](/logging/docs/view/advanced-queries). Only log entries that - // match the filter are returned. An empty filter matches all log entries in - // the resources listed in `resource_names`. Referencing a parent resource - // that is not listed in `resource_names` will cause the filter to return no - // results. - // The maximum length of the filter is 20000 characters. - string filter = 2; + // Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + // Only log entries that match the filter are returned. An empty filter + // matches all log entries in the resources listed in `resource_names`. + // Referencing a parent resource that is not listed in `resource_names` will + // cause the filter to return no results. The maximum length of the filter is + // 20000 characters. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. How the results should be sorted. Presently, the only permitted // values are `"timestamp asc"` (default) and `"timestamp desc"`. The first @@ -280,18 +278,19 @@ message ListLogEntriesRequest { // `LogEntry.timestamp` (oldest first), and the second option returns entries // in order of decreasing timestamps (newest first). Entries with equal // timestamps are returned in order of their `insert_id` values. - string order_by = 3; + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `next_page_token` in the + // Default is 50. If the value is negative or exceeds 1000, + // the request is rejected. The presence of `next_page_token` in the // response indicates that more results might be available. - int32 page_size = 4; + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `page_token` must be the value of // `next_page_token` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 5; + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListLogEntries`. @@ -319,13 +318,13 @@ message ListMonitoredResourceDescriptorsRequest { // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 1; + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListMonitoredResourceDescriptors. @@ -347,20 +346,23 @@ message ListLogsRequest { // "organizations/[ORGANIZATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" - string parent = 1 [(google.api.resource_reference) = { - child_type: "logging.googleapis.com/Log" - }]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/Log" + } + ]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogs. diff --git a/google/cloud/logging_v2/proto/logging_config.proto b/google/cloud/logging_v2/proto/logging_config.proto index 7fb830ded..9486f4a9a 100644 --- a/google/cloud/logging_v2/proto/logging_config.proto +++ b/google/cloud/logging_v2/proto/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -33,6 +32,19 @@ option java_multiple_files = true; option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "logging.googleapis.com/BillingAccountLocation" + pattern: "billingAccounts/{billing_account}/locations/{location}" +}; // Service for configuring sinks used to route log entries. service ConfigServiceV2 { @@ -43,6 +55,79 @@ service ConfigServiceV2 { "https://www.googleapis.com/auth/logging.admin," "https://www.googleapis.com/auth/logging.read"; + // Lists buckets (Beta). + rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { + option (google.api.http) = { + get: "/v2/{parent=*/*/locations/*}/buckets" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=folders/*/locations/*}/buckets" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*/locations/*}/buckets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a bucket (Beta). + rpc GetBucket(GetBucketRequest) returns (LogBucket) { + option (google.api.http) = { + get: "/v2/{name=*/*/locations/*/buckets/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/locations/*/buckets/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/buckets/*}" + } + }; + } + + // Updates a bucket. This method replaces the following fields in the + // existing bucket with values from the new bucket: `retention_period` + // + // If the retention period is decreased and the bucket is locked, + // FAILED_PRECONDITION will be returned. + // + // If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + // will be returned. + // + // A buckets region may not be modified after it is created. + // This method is in Beta. + rpc UpdateBucket(UpdateBucketRequest) returns (LogBucket) { + option (google.api.http) = { + patch: "/v2/{name=*/*/locations/*/buckets/*}" + body: "bucket" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=folders/*/locations/*/buckets/*}" + body: "bucket" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/locations/*/buckets/*}" + body: "bucket" + } + }; + } + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { @@ -297,7 +382,8 @@ service ConfigServiceV2 { // the GCP organization. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc GetCmekSettings(GetCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { get: "/v2/{name=*/*}/cmekSettings" @@ -320,7 +406,8 @@ service ConfigServiceV2 { // 3) access to the key is disabled. // // See [Enabling CMEK for Logs - // Router](/logging/docs/routing/managed-encryption) for more information. + // Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + // for more information. rpc UpdateCmekSettings(UpdateCmekSettingsRequest) returns (CmekSettings) { option (google.api.http) = { patch: "/v2/{name=*/*}/cmekSettings" @@ -333,6 +420,48 @@ service ConfigServiceV2 { } } +// Describes a repository of logs (Beta). +message LogBucket { + option (google.api.resource) = { + type: "logging.googleapis.com/LogBucket" + pattern: "projects/{project}/locations/{location}/buckets/{bucket}" + pattern: "organizations/{organization}/locations/{location}/buckets/{bucket}" + pattern: "folders/{folder}/locations/{location}/buckets/{bucket}" + pattern: "billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}" + }; + + // The resource name of the bucket. + // For example: + // "projects/my-project-id/locations/my-location/buckets/my-bucket-id The + // supported locations are: + // "global" + // "us-central1" + // + // For the location of `global` it is unspecified where logs are actually + // stored. + // Once a bucket has been created, the location can not be changed. + string name = 1; + + // Describes this bucket. + string description = 3; + + // Output only. The creation timestamp of the bucket. This is not set for any of the + // default buckets. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of the bucket. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Logs will be retained by default for this amount of time, after which they + // will automatically be deleted. The minimum retention period is 1 day. + // If this value is set to zero at bucket creation time, the default time of + // 30 days will be used. + int32 retention_days = 11; + + // Output only. The bucket lifecycle state. + LifecycleState lifecycle_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a // Cloud Pub/Sub topic. A logs filter controls which log entries are exported. @@ -340,16 +469,14 @@ service ConfigServiceV2 { // folder. message LogSink { option (google.api.resource) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" pattern: "projects/{project}/sinks/{sink}" pattern: "organizations/{organization}/sinks/{sink}" pattern: "folders/{folder}/sinks/{sink}" pattern: "billingAccounts/{billing_account}/sinks/{sink}" }; - // Available log entry formats. Log entries can be written to - // Logging in either format and can be exported in either format. - // Version 2 is the preferred format. + // Deprecated. This is unused. enum VersionFormat { // An unspecified format version that will default to V2. VERSION_FORMAT_UNSPECIFIED = 0; @@ -361,12 +488,12 @@ message LogSink { V1 = 2; } - // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are - // limited to 100 characters and can include only the following characters: - // upper and lower-case alphanumeric characters, underscores, hyphens, and - // periods. First character has to be alphanumeric. - string name = 1; + // Required. The client-assigned sink identifier, unique within the project. Example: + // `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited to 100 + // characters and can include only the following characters: upper and + // lower-case alphanumeric characters, underscores, hyphens, and periods. + // First character has to be alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The export destination: // @@ -377,42 +504,44 @@ message LogSink { // The sink's `writer_identity`, set when the sink is created, must // have permission to write to the destination or else the log // entries are not exported. For more information, see - // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). - string destination = 3 [(google.api.resource_reference) = { - type: "*" - }]; + // [Exporting Logs with + // Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + string destination = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "*" + } + ]; - // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only - // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // Optional. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + // only exported log entries are those that are in the resource owning the + // sink and that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - string filter = 5; + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A description of this sink. // The maximum length of the description is 8000 characters. - string description = 18; + string description = 18 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set to True, then this sink is disabled and it does not // export any log entries. - bool disabled = 19; + bool disabled = 19 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. The log entry format to use for this sink's exported log - // entries. The v2 format is used by default and cannot be changed. + // Deprecated. This field is unused. VersionFormat output_version_format = 6 [deprecated = true]; - // Output only. An IAM identity—a service account or group—under - // which Logging writes the exported log entries to the sink's destination. - // This field is set by - // [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - // and - // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - // based on the value of `unique_writer_identity` in those methods. + // Output only. An IAM identity–a service account or group—under which Logging + // writes the exported log entries to the sink's destination. This field is + // set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + // [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + // value of `unique_writer_identity` in those methods. // // Until you grant this identity write-access to the destination, log entry // exports from this sink will fail. For more information, // see [Granting Access for a - // Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + // Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. string writer_identity = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -430,12 +559,12 @@ message LogSink { // // logName:("projects/test-project1/" OR "projects/test-project2/") AND // resource.type=gce_instance - bool include_children = 9; + bool include_children = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Destination dependent options. + // Destination dependent options. oneof options { // Optional. Options that affect sinks exporting data to BigQuery. - BigQueryOptions bigquery_options = 12; + BigQueryOptions bigquery_options = 12 [(google.api.field_behavior) = OPTIONAL]; } // Output only. The creation timestamp of the sink. @@ -447,24 +576,19 @@ message LogSink { // // This field may not be present for older sinks. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; - - // Do not use. This field is ignored. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // Options that change functionality of a sink exporting data to BigQuery. message BigQueryOptions { // Optional. Whether to use [BigQuery's partition - // tables](/bigquery/docs/partitioned-tables). By default, Logging - // creates dated tables based on the log entries' timestamps, e.g. - // syslog_20170523. With partitioned tables the date suffix is no longer + // tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + // default, Logging creates dated tables based on the log entries' timestamps, + // e.g. syslog_20170523. With partitioned tables the date suffix is no longer // present and [special query - // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. - // In both cases, tables are sharded based on UTC timezone. - bool use_partitioned_tables = 1; + // syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + // has to be used instead. In both cases, tables are sharded based on UTC + // timezone. + bool use_partitioned_tables = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. True if new timestamp column based partitioning is in use, // false if legacy ingestion-time partitioning is in use. @@ -475,6 +599,114 @@ message BigQueryOptions { bool uses_timestamp_column_partitioning = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// LogBucket lifecycle states (Beta). +enum LifecycleState { + // Unspecified state. This is only used/useful for distinguishing + // unset values. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The normal and active state. + ACTIVE = 1; + + // The bucket has been marked for deletion by the user. + DELETE_REQUESTED = 2; +} + +// The parameters to `ListBuckets` (Beta). +message ListBucketsRequest { + // Required. The parent resource whose buckets are to be listed: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + // + // Note: The locations portion of the resource must be specified, but + // supplying the character `-` in place of [LOCATION_ID] will return all + // buckets. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "logging.googleapis.com/LogBucket" + } + ]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `pageToken` must be the value of + // `nextPageToken` from the previous response. The values of other method + // parameters should be identical to those in the previous call. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to return from this request. + // Non-positive values are ignored. The presence of `nextPageToken` in the + // response indicates that more results might be available. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from ListBuckets (Beta). +message ListBucketsResponse { + // A list of buckets. + repeated LogBucket buckets = 1; + + // If there might be more results than appear in this response, then + // `nextPageToken` is included. To get the next set of results, call the same + // method again using the value of `nextPageToken` as `pageToken`. + string next_page_token = 2; +} + +// The parameters to `UpdateBucket` (Beta). +message UpdateBucketRequest { + // Required. The full resource name of the bucket to update. + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. Also + // requires permission "resourcemanager.projects.updateLiens" to set the + // locked property + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; + + // Required. The updated bucket. + LogBucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask that specifies the fields in `bucket` that need an update. A + // bucket field will be overwritten if, and only if, it is in the update + // mask. `name` and output only fields cannot be updated. + // + // For a detailed `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + // + // Example: `updateMask=retention_days`. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// The parameters to `GetBucket` (Beta). +message GetBucketRequest { + // Required. The resource name of the bucket: + // + // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + // + // Example: + // `"projects/my-project-id/locations/my-location/buckets/my-bucket-id"`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "logging.googleapis.com/LogBucket" + } + ]; +} + // The parameters to `ListSinks`. message ListSinksRequest { // Required. The parent resource whose sinks are to be listed: @@ -486,7 +718,7 @@ message ListSinksRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -494,12 +726,12 @@ message ListSinksRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from `ListSinks`. @@ -526,7 +758,7 @@ message GetSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -544,7 +776,7 @@ message CreateSinkRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "logging.googleapis.com/Sink" + child_type: "logging.googleapis.com/LogSink" } ]; @@ -563,13 +795,13 @@ message CreateSinkRequest { // resource such as an organization, then the value of `writer_identity` will // be a unique service account used only for exports from the new sink. For // more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `UpdateSink`. message UpdateSinkRequest { - // Required. The full resource name of the sink to update, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to update, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -580,12 +812,12 @@ message UpdateSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; - // Required. The updated sink, whose name is the same identifier that appears - // as part of `sink_name`. + // Required. The updated sink, whose name is the same identifier that appears as part + // of `sink_name`. LogSink sink = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] @@ -599,7 +831,7 @@ message UpdateSinkRequest { // `writer_identity` is changed to a unique service account. // + It is an error if the old value is true and the new value is // set to false or defaulted to false. - bool unique_writer_identity = 3; + bool unique_writer_identity = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Field mask that specifies the fields in `sink` that need // an update. A sink field will be overwritten if, and only if, it is @@ -615,13 +847,13 @@ message UpdateSinkRequest { // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask // // Example: `updateMask=filter`. - google.protobuf.FieldMask update_mask = 4; + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; } // The parameters to `DeleteSink`. message DeleteSinkRequest { - // Required. The full resource name of the sink to delete, including the - // parent resource and the sink identifier: + // Required. The full resource name of the sink to delete, including the parent + // resource and the sink identifier: // // "projects/[PROJECT_ID]/sinks/[SINK_ID]" // "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" @@ -632,7 +864,7 @@ message DeleteSinkRequest { string sink_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Sink" + type: "logging.googleapis.com/LogSink" } ]; } @@ -645,47 +877,48 @@ message DeleteSinkRequest { // apply to child resources, and that you can't exclude audit log entries. message LogExclusion { option (google.api.resource) = { - type: "logging.googleapis.com/Exclusion" + type: "logging.googleapis.com/LogExclusion" pattern: "projects/{project}/exclusions/{exclusion}" pattern: "organizations/{organization}/exclusions/{exclusion}" pattern: "folders/{folder}/exclusions/{exclusion}" pattern: "billingAccounts/{billing_account}/exclusions/{exclusion}" }; - // Required. A client-assigned identifier, such as - // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - // can include only letters, digits, underscores, hyphens, and periods. - // First character has to be alphanumeric. - string name = 1; + // Required. A client-assigned identifier, such as `"load-balancer-exclusion"`. + // Identifiers are limited to 100 characters and can include only letters, + // digits, underscores, hyphens, and periods. First character has to be + // alphanumeric. + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this exclusion. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) - // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced-queries#sample), + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + // matches the log entries to be excluded. By using the [sample + // function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. // For example, the following query matches 99% of low-severity log // entries from Google Cloud Storage buckets: // // `"resource.type=gcs_bucket severity\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsH\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\nstart_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x30\n\x08\x65nd_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbc\x01\xea\x41\xb8\x01\n\x1blogging.googleapis.com/Sink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"b\n\x0f\x42igQueryOptions\x12\x1e\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"n\n\x10ListSinksRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x0eGetSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\x97\x01\n\x11\x43reateSinkRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08"\xcb\x01\n\x11UpdateSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x11\x44\x65leteSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\xa1\x03\n\x0cLogExclusion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe9\x01\xea\x41\xe5\x01\n logging.googleapis.com/Exclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"x\n\x15ListExclusionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"M\n\x13GetExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"\x86\x01\n\x16\x43reateExclusionRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion"\xbf\x01\n\x16UpdateExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"P\n\x16\x44\x65leteExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"&\n\x16GetCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x92\x01\n\x19UpdateCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"N\n\x0c\x43mekSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1a\n\x12service_account_id\x18\x03 \x01(\t2\x9e\x1f\n\x0f\x43onfigServiceV2\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\x9e\x01\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -47,12 +42,57 @@ ], ) +_LIFECYCLESTATE = _descriptor.EnumDescriptor( + name="LifecycleState", + full_name="google.logging.v2.LifecycleState", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="LIFECYCLE_STATE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="ACTIVE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="DELETE_REQUESTED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=4659, + serialized_end=4742, +) +_sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) + +LifecycleState = enum_type_wrapper.EnumTypeWrapper(_LIFECYCLESTATE) +LIFECYCLE_STATE_UNSPECIFIED = 0 +ACTIVE = 1 +DELETE_REQUESTED = 2 + _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( name="VersionFormat", full_name="google.logging.v2.LogSink.VersionFormat", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="VERSION_FORMAT_UNSPECIFIED", @@ -60,28 +100,176 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V2", index=1, number=1, serialized_options=None, type=None + name="V2", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V1", index=2, number=2, serialized_options=None, type=None + name="V1", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=833, - serialized_end=896, + serialized_start=1306, + serialized_end=1369, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) +_LOGBUCKET = _descriptor.Descriptor( + name="LogBucket", + full_name="google.logging.v2.LogBucket", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogBucket.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogBucket.description", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogBucket.create_time", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogBucket.update_time", + index=3, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="retention_days", + full_name="google.logging.v2.LogBucket.retention_days", + index=4, + number=11, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="lifecycle_state", + full_name="google.logging.v2.LogBucket.lifecycle_state", + index=5, + number=12, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=317, + serialized_end=856, +) + + _LOGSINK = _descriptor.Descriptor( name="LogSink", full_name="google.logging.v2.LogSink", filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -92,14 +280,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="destination", @@ -110,14 +299,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=_b("\372A\003\n\001*"), + serialized_options=b"\340A\002\372A\003\n\001*", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -128,14 +318,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="description", @@ -146,14 +337,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="disabled", @@ -170,8 +362,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="output_version_format", @@ -188,8 +381,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="writer_identity", @@ -200,14 +394,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=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="include_children", @@ -224,19 +419,249 @@ 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="bigquery_options", - full_name="google.logging.v2.LogSink.bigquery_options", - index=8, - number=12, + name="bigquery_options", + full_name="google.logging.v2.LogSink.bigquery_options", + index=8, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogSink.create_time", + index=9, + number=13, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogSink.update_time", + index=10, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[ + _LOGSINK_VERSIONFORMAT, + ], + serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="options", + full_name="google.logging.v2.LogSink.options", + index=0, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[], + ), + ], + serialized_start=859, + serialized_end=1574, +) + + +_BIGQUERYOPTIONS = _descriptor.Descriptor( + name="BigQueryOptions", + full_name="google.logging.v2.BigQueryOptions", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="use_partitioned_tables", + full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="uses_timestamp_column_partitioning", + full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", + index=1, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1576, + serialized_end=1679, +) + + +_LISTBUCKETSREQUEST = _descriptor.Descriptor( + name="ListBucketsRequest", + full_name="google.logging.v2.ListBucketsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListBucketsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListBucketsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListBucketsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1681, + serialized_end=1808, +) + + +_LISTBUCKETSRESPONSE = _descriptor.Descriptor( + name="ListBucketsResponse", + full_name="google.logging.v2.ListBucketsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="buckets", + full_name="google.logging.v2.ListBucketsResponse.buckets", + index=0, + number=1, type=11, cpp_type=10, - label=1, + label=3, has_default_value=False, - default_value=None, + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -244,48 +669,73 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogSink.create_time", - index=9, - number=13, - type=11, - cpp_type=10, + name="next_page_token", + full_name="google.logging.v2.ListBucketsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, label=1, has_default_value=False, - default_value=None, + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1810, + serialized_end=1903, +) + + +_UPDATEBUCKETREQUEST = _descriptor.Descriptor( + name="UpdateBucketRequest", + full_name="google.logging.v2.UpdateBucketRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogSink.update_time", - index=10, - number=14, - type=11, - cpp_type=10, + name="name", + full_name="google.logging.v2.UpdateBucketRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, label=1, has_default_value=False, - default_value=None, + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="start_time", - full_name="google.logging.v2.LogSink.start_time", - index=11, - number=10, + name="bucket", + full_name="google.logging.v2.UpdateBucketRequest.bucket", + index=1, + number=2, type=11, cpp_type=10, label=1, @@ -296,14 +746,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="end_time", - full_name="google.logging.v2.LogSink.end_time", - index=12, - number=11, + name="update_mask", + full_name="google.logging.v2.UpdateBucketRequest.update_mask", + index=2, + number=4, type=11, cpp_type=10, label=1, @@ -314,77 +765,50 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[ - _LOGSINK_VERSIONFORMAT, - ], - serialized_options=_b( - "\352A\270\001\n\033logging.googleapis.com/Sink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}" - ), + enum_types=[], + serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="options", - full_name="google.logging.v2.LogSink.options", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=317, - serialized_end=1098, + oneofs=[], + serialized_start=1906, + serialized_end=2088, ) -_BIGQUERYOPTIONS = _descriptor.Descriptor( - name="BigQueryOptions", - full_name="google.logging.v2.BigQueryOptions", +_GETBUCKETREQUEST = _descriptor.Descriptor( + name="GetBucketRequest", + full_name="google.logging.v2.GetBucketRequest", filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name="use_partitioned_tables", - full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", + name="name", + full_name="google.logging.v2.GetBucketRequest.name", index=0, number=1, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="uses_timestamp_column_partitioning", - full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", - index=1, - number=3, - type=8, - cpp_type=7, + type=9, + cpp_type=9, label=1, has_default_value=False, - default_value=False, + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -395,8 +819,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1100, - serialized_end=1198, + serialized_start=2090, + serialized_end=2164, ) @@ -406,6 +830,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -416,16 +841,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=_b( - "\340A\002\372A\035\022\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -436,14 +860,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="page_size", @@ -460,8 +885,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=[], @@ -472,8 +898,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1200, - serialized_end=1310, + serialized_start=2166, + serialized_end=2289, ) @@ -483,6 +909,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sinks", @@ -501,6 +928,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -511,7 +939,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, @@ -519,6 +947,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -529,8 +958,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1312, - serialized_end=1399, + serialized_start=2291, + serialized_end=2378, ) @@ -540,6 +969,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -550,16 +980,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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -570,8 +999,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1401, - serialized_end=1473, + serialized_start=2380, + serialized_end=2455, ) @@ -581,6 +1010,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -591,16 +1021,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=_b( - "\340A\002\372A\035\022\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -617,8 +1046,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -635,8 +1065,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=[], @@ -647,8 +1078,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1476, - serialized_end=1627, + serialized_start=2458, + serialized_end=2617, ) @@ -658,6 +1089,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -668,16 +1100,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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -694,8 +1125,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -712,8 +1144,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="update_mask", @@ -730,8 +1163,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=[], @@ -742,8 +1176,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1630, - serialized_end=1833, + serialized_start=2620, + serialized_end=2836, ) @@ -753,6 +1187,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -763,16 +1198,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=_b( - "\340A\002\372A\035\n\033logging.googleapis.com/Sink" - ), + serialized_options=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -783,8 +1217,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1835, - serialized_end=1910, + serialized_start=2838, + serialized_end=2916, ) @@ -794,6 +1228,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -804,14 +1239,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="description", @@ -822,14 +1258,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="filter", @@ -840,14 +1277,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="disabled", @@ -864,8 +1302,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="create_time", @@ -882,8 +1321,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -900,22 +1340,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352A\345\001\n logging.googleapis.com/Exclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}" - ), + serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1913, - serialized_end=2330, + serialized_start=2919, + serialized_end=3369, ) @@ -925,6 +1364,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -935,16 +1375,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=_b( - '\340A\002\372A"\022 logging.googleapis.com/Exclusion' - ), + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -955,14 +1394,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="page_size", @@ -979,8 +1419,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=[], @@ -991,8 +1432,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2332, - serialized_end=2452, + serialized_start=3372, + serialized_end=3505, ) @@ -1002,6 +1443,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="exclusions", @@ -1020,6 +1462,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1030,7 +1473,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, @@ -1038,6 +1481,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1048,8 +1492,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2454, - serialized_end=2556, + serialized_start=3507, + serialized_end=3609, ) @@ -1059,6 +1503,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1069,14 +1514,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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1087,8 +1533,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2558, - serialized_end=2635, + serialized_start=3611, + serialized_end=3691, ) @@ -1098,6 +1544,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1108,16 +1555,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=_b( - '\340A\002\372A"\022 logging.googleapis.com/Exclusion' - ), + serialized_options=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1134,8 +1580,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=[], @@ -1146,8 +1593,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2638, - serialized_end=2772, + serialized_start=3694, + serialized_end=3836, ) @@ -1157,6 +1604,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1167,14 +1615,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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1191,8 +1640,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1209,8 +1659,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1221,8 +1672,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2775, - serialized_end=2966, + serialized_start=3839, + serialized_end=4033, ) @@ -1232,6 +1683,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1242,14 +1694,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=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), + serialized_options=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1260,8 +1713,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2968, - serialized_end=3048, + serialized_start=4035, + serialized_end=4118, ) @@ -1271,6 +1724,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1281,14 +1735,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#logging.googleapis.com/CmekSettings", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1299,8 +1754,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3050, - serialized_end=3088, + serialized_start=4120, + serialized_end=4203, ) @@ -1310,6 +1765,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1320,14 +1776,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="cmek_settings", @@ -1344,8 +1801,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="update_mask", @@ -1362,8 +1820,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=[], @@ -1374,8 +1833,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3091, - serialized_end=3237, + serialized_start=4206, + serialized_end=4367, ) @@ -1385,6 +1844,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1395,14 +1855,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\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kms_key_name", @@ -1413,7 +1874,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, @@ -1421,6 +1882,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="service_account_id", @@ -1431,41 +1893,43 @@ 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\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3239, - serialized_end=3317, + serialized_start=4370, + serialized_end=4657, ) -_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT -_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS -_LOGSINK.fields_by_name[ +_LOGBUCKET.fields_by_name[ "create_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGSINK.fields_by_name[ +_LOGBUCKET.fields_by_name[ "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE +_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT +_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS _LOGSINK.fields_by_name[ - "start_time" + "create_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK.fields_by_name[ - "end_time" + "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK _LOGSINK.oneofs_by_name["options"].fields.append( @@ -1474,6 +1938,11 @@ _LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ "options" ] +_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET +_UPDATEBUCKETREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK _CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK _UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK @@ -1496,8 +1965,13 @@ _UPDATECMEKSETTINGSREQUEST.fields_by_name[ "update_mask" ].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS +DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST +DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE +DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST +DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST @@ -1516,21 +1990,58 @@ "UpdateCmekSettingsRequest" ] = _UPDATECMEKSETTINGSREQUEST DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS +DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) +LogBucket = _reflection.GeneratedProtocolMessageType( + "LogBucket", + (_message.Message,), + { + "DESCRIPTOR": _LOGBUCKET, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a repository of logs (Beta). + + Attributes: + name: + The resource name of the bucket. For example: “projects/my- + project-id/locations/my-location/buckets/my-bucket-id The + supported locations are:”global" “us-central1” For the + location of ``global`` it is unspecified where logs are + actually stored. Once a bucket has been created, the location + can not be changed. + description: + Describes this bucket. + create_time: + Output only. The creation timestamp of the bucket. This is not + set for any of the default buckets. + update_time: + Output only. The last update timestamp of the bucket. + retention_days: + Logs will be retained by default for this amount of time, + after which they will automatically be deleted. The minimum + retention period is 1 day. If this value is set to zero at + bucket creation time, the default time of 30 days will be + used. + lifecycle_state: + Output only. The bucket lifecycle state. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) + }, +) +_sym_db.RegisterMessage(LogBucket) + LogSink = _reflection.GeneratedProtocolMessageType( "LogSink", (_message.Message,), - dict( - DESCRIPTOR=_LOGSINK, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Describes a sink used to export log entries to one of the - following destinations in any project: a Cloud Storage bucket, a - BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which - log entries are exported. The sink must be created within a project, + { + "DESCRIPTOR": _LOGSINK, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes a sink used to export log entries to one of the following + destinations in any project: a Cloud Storage bucket, a BigQuery + dataset, or a Cloud Pub/Sub topic. A logs filter controls which log + entries are exported. The sink must be created within a project, organization, billing account, or folder. - Attributes: name: Required. The client-assigned sink identifier, unique within @@ -1541,20 +2052,22 @@ has to be alphanumeric. destination: Required. The export destination: :: - "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis - .com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.goo - gleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The - sink's ``writer_identity``, set when the sink is created, must - have permission to write to the destination or else the log - entries are not exported. For more information, see `Exporting - Logs with Sinks `__. + "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis. + com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.googl + eapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink’s + ``writer_identity``, set when the sink is created, must have + permission to write to the destination or else the log entries + are not exported. For more information, see `Exporting Logs + with Sinks + `__. filter: Optional. An `advanced logs filter - `__. The only exported - log entries are those that are in the resource owning the sink - and that match the filter. For example: :: - logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND - severity>=ERROR + `__. The only exported log entries are those that are + in the resource owning the sink and that match the filter. For + example: :: logName="projects/[PROJECT_ID]/logs/[LOG_ID]" + AND severity>=ERROR description: Optional. A description of this sink. The maximum length of the description is 8000 characters. @@ -1562,12 +2075,10 @@ Optional. If set to True, then this sink is disabled and it does not export any log entries. output_version_format: - Deprecated. The log entry format to use for this sink's - exported log entries. The v2 format is used by default and - cannot be changed. + Deprecated. This field is unused. writer_identity: - Output only. An IAM identity—a service account or group—under - which Logging writes the exported log entries to the sink's + Output only. An IAM identity–a service account or group—under + which Logging writes the exported log entries to the sink’s destination. This field is set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and @@ -1576,27 +2087,27 @@ methods. Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see `Granting Access for a Resource - `__. Consult the - destination service's documentation to determine the - appropriate IAM roles to assign to the identity. + `_ + _. Consult the destination service’s documentation to + determine the appropriate IAM roles to assign to the identity. include_children: Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, - only the logs owned by the sink's parent resource are + only the logs owned by the sink’s parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the - sink's parent resource are also available for export. Whether + sink’s parent resource are also available for export. Whether a particular log entry from the children is exported depends - on the sink's filter expression. For example, if this field is + on the sink’s filter expression. For example, if this field is true, then the filter ``resource.type=gce_instance`` would export all Compute Engine VM instance log entries from all - projects in the sink's parent. To only export entries from + projects in the sink’s parent. To only export entries from certain child projects, filter on the project part of the log - name: :: logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + name: :: logName:("projects/test-project1/" OR + "projects/test-project2/") AND resource.type=gce_instance options: - Optional. Destination dependent options. + Destination dependent options. bigquery_options: Optional. Options that affect sinks exporting data to BigQuery. @@ -1606,63 +2117,175 @@ update_time: Output only. The last update timestamp of the sink. This field may not be present for older sinks. - start_time: - Do not use. This field is ignored. - end_time: - Do not use. This field is ignored. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - ), + }, ) _sym_db.RegisterMessage(LogSink) BigQueryOptions = _reflection.GeneratedProtocolMessageType( "BigQueryOptions", (_message.Message,), - dict( - DESCRIPTOR=_BIGQUERYOPTIONS, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Options that change functionality of a sink exporting data - to BigQuery. - + { + "DESCRIPTOR": _BIGQUERYOPTIONS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Options that change functionality of a sink exporting data to + BigQuery. Attributes: use_partitioned_tables: - Optional. Whether to use `BigQuery's partition tables - `__. By default, Logging - creates dated tables based on the log entries' timestamps, - e.g. syslog\_20170523. With partitioned tables the date suffix - is no longer present and `special query syntax - `__ has to be used - instead. In both cases, tables are sharded based on UTC - timezone. + Optional. Whether to use `BigQuery’s partition tables + `__. By default, Logging creates dated tables based on + the log entries’ timestamps, e.g. syslog_20170523. With + partitioned tables the date suffix is no longer present and + `special query syntax + `__ has to be used instead. In both cases, tables are + sharded based on UTC timezone. uses_timestamp_column_partitioning: Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use. All new sinks will have this field set true and will use - timestamp column based partitioning. If - use\_partitioned\_tables is false, this value has no meaning - and will be false. Legacy sinks using partitioned tables will - have this field set to false. + timestamp column based partitioning. If use_partitioned_tables + is false, this value has no meaning and will be false. Legacy + sinks using partitioned tables will have this field set to + false. """, # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - ), + }, ) _sym_db.RegisterMessage(BigQueryOptions) +ListBucketsRequest = _reflection.GeneratedProtocolMessageType( + "ListBucketsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListBuckets`` (Beta). + + Attributes: + parent: + Required. The parent resource whose buckets are to be listed: + :: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The + locations portion of the resource must be specified, but + supplying the character ``-`` in place of [LOCATION_ID] will + return all buckets. + page_token: + Optional. If present, then retrieve the next batch of results + from the preceding call to this method. ``pageToken`` must be + the value of ``nextPageToken`` from the previous response. The + values of other method parameters should be identical to those + in the previous call. + page_size: + Optional. The maximum number of results to return from this + request. Non-positive values are ignored. The presence of + ``nextPageToken`` in the response indicates that more results + might be available. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) + }, +) +_sym_db.RegisterMessage(ListBucketsRequest) + +ListBucketsResponse = _reflection.GeneratedProtocolMessageType( + "ListBucketsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTBUCKETSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The response from ListBuckets (Beta). + + Attributes: + buckets: + A list of buckets. + next_page_token: + If there might be more results than appear in this response, + then ``nextPageToken`` is included. To get the next set of + results, call the same method again using the value of + ``nextPageToken`` as ``pageToken``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) + }, +) +_sym_db.RegisterMessage(ListBucketsResponse) + +UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( + "UpdateBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _UPDATEBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateBucket`` (Beta). + + Attributes: + name: + Required. The full resource name of the bucket to update. :: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET + _ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ + ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ + ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[ + FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Example: ``"projects/my-project-id/locations/my- + location/buckets/my-bucket-id"``. Also requires permission + “resourcemanager.projects.updateLiens” to set the locked + property + bucket: + Required. The updated bucket. + update_mask: + Required. Field mask that specifies the fields in ``bucket`` + that need an update. A bucket field will be overwritten if, + and only if, it is in the update mask. ``name`` and output + only fields cannot be updated. For a detailed ``FieldMask`` + definition, see https://developers.google.com/protocol-buffers + /docs/reference/google.protobuf#google.protobuf.FieldMask + Example: ``updateMask=retention_days``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) + }, +) +_sym_db.RegisterMessage(UpdateBucketRequest) + +GetBucketRequest = _reflection.GeneratedProtocolMessageType( + "GetBucketRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETBUCKETREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetBucket`` (Beta). + + Attributes: + name: + Required. The resource name of the bucket: :: "projects/[ + PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "o + rganizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets + /[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locatio + ns/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/ + locations/[LOCATION_ID]/buckets/[BUCKET_ID]" Example: + ``"projects/my-project-id/locations/my-location/buckets/my- + bucket-id"``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) + }, +) +_sym_db.RegisterMessage(GetBucketRequest) + ListSinksRequest = _reflection.GeneratedProtocolMessageType( "ListSinksRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTSINKSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``ListSinks``. - + { + "DESCRIPTOR": _LISTSINKSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``ListSinks``. Attributes: parent: Required. The parent resource whose sinks are to be listed: - :: "projects/[PROJECT_ID]" + :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" @@ -1679,18 +2302,17 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - ), + }, ) _sym_db.RegisterMessage(ListSinksRequest) ListSinksResponse = _reflection.GeneratedProtocolMessageType( "ListSinksResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTSINKSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Result returned from ``ListSinks``. - + { + "DESCRIPTOR": _LISTSINKSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Result returned from ``ListSinks``. Attributes: sinks: @@ -1702,18 +2324,17 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - ), + }, ) _sym_db.RegisterMessage(ListSinksResponse) GetSinkRequest = _reflection.GeneratedProtocolMessageType( "GetSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``GetSink``. - + { + "DESCRIPTOR": _GETSINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``GetSink``. Attributes: sink_name: @@ -1725,23 +2346,22 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - ), + }, ) _sym_db.RegisterMessage(GetSinkRequest) CreateSinkRequest = _reflection.GeneratedProtocolMessageType( "CreateSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``CreateSink``. - + { + "DESCRIPTOR": _CREATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``CreateSink``. Attributes: parent: Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Examples: ``"projects/my-logging- project"``, ``"organizations/123456789"``. @@ -1751,10 +2371,10 @@ unique_writer_identity: Optional. Determines the kind of IAM identity returned as ``writer_identity`` in the new sink. If this value is omitted - or set to false, and if the sink's parent is a project, then + or set to false, and if the sink’s parent is a project, then the value returned as ``writer_identity`` is the same group or service account used by Logging before the addition of writer - identities to this API. The sink's destination must be in the + identities to this API. The sink’s destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of ``writer_identity`` will @@ -1763,18 +2383,17 @@ [LogSink][google.logging.v2.LogSink]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - ), + }, ) _sym_db.RegisterMessage(CreateSinkRequest) UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( "UpdateSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``UpdateSink``. - + { + "DESCRIPTOR": _UPDATESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``UpdateSink``. Attributes: sink_name: @@ -1796,7 +2415,7 @@ the updated sink depends on both the old and new values of this field: - If the old and new values of this field are both false or both true, then there is no change to the - sink's ``writer_identity``. - If the old value is false and + sink’s ``writer_identity``. - If the old value is false and the new value is true, then ``writer_identity`` is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or @@ -1816,18 +2435,17 @@ ``updateMask=filter``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateSinkRequest) DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( "DeleteSinkRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETESINKREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to ``DeleteSink``. - + { + "DESCRIPTOR": _DELETESINKREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to ``DeleteSink``. Attributes: sink_name: @@ -1840,23 +2458,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteSinkRequest) LogExclusion = _reflection.GeneratedProtocolMessageType( "LogExclusion", (_message.Message,), - dict( - DESCRIPTOR=_LOGEXCLUSION, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Specifies a set of log entries that are not to be stored - in Logging. If your GCP resource receives a large volume of logs, you - can use exclusions to reduce your chargeable logs. Exclusions are - processed after log sinks, so you can export log entries before they are - excluded. Note that organization-level and folder-level exclusions don't - apply to child resources, and that you can't exclude audit log entries. - + { + "DESCRIPTOR": _LOGEXCLUSION, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Specifies a set of log entries that are not to be stored in Logging. + If your GCP resource receives a large volume of logs, you can use + exclusions to reduce your chargeable logs. Exclusions are processed + after log sinks, so you can export log entries before they are + excluded. Note that organization-level and folder-level exclusions + don’t apply to child resources, and that you can’t exclude audit log + entries. Attributes: name: @@ -1868,14 +2486,15 @@ Optional. A description of this exclusion. filter: Required. An `advanced logs filter - `__ that matches the log - entries to be excluded. By using the `sample function - `__, you can - exclude less than 100% of the matching log entries. For - example, the following query matches 99% of low-severity log - entries from Google Cloud Storage buckets: - ``"resource.type=gcs_bucket severity`__ that matches the log entries to be excluded. By + using the `sample function + `__, you can exclude less than 100% of the + matching log entries. For example, the following query matches + 99% of low-severity log entries from Google Cloud Storage + buckets: ``"resource.type=gcs_bucket severity`__ for more - information. - + See `Enabling CMEK for Logs Router + `__ + for more information. Attributes: name: Required. The resource for which to retrieve CMEK settings. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2088,28 +2699,25 @@ folders in the GCP organization. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - ), + }, ) _sym_db.RegisterMessage(GetCmekSettingsRequest) UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( "UpdateCmekSettingsRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATECMEKSETTINGSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""The parameters to - [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - - See `Enabling CMEK for Logs - Router `__ for more - information. - + { + "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService + V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router + `__ + for more information. Attributes: name: Required. The resource name for the CMEK settings to update. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2119,8 +2727,9 @@ folders in the GCP organization. cmek_settings: Required. The CMEK settings to update. See `Enabling CMEK for - Logs Router `__ for - more information. + Logs Router + `__ for more information. update_mask: Optional. Field mask identifying which fields from ``cmek_settings`` should be updated. A field will be @@ -2130,36 +2739,32 @@ Example: ``"updateMask=kmsKeyName"`` """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) CmekSettings = _reflection.GeneratedProtocolMessageType( "CmekSettings", (_message.Message,), - dict( - DESCRIPTOR=_CMEKSETTINGS, - __module__="google.cloud.logging_v2.proto.logging_config_pb2", - __doc__="""Describes the customer-managed encryption key (CMEK) - settings associated with a project, folder, organization, billing - account, or flexible resource. - - Note: CMEK for the Logs Router can currently only be configured for GCP - organizations. Once configured, it applies to all projects and folders - in the GCP organization. - - See `Enabling CMEK for Logs - Router `__ for more - information. - + { + "DESCRIPTOR": _CMEKSETTINGS, + "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", + "__doc__": """Describes the customer-managed encryption key (CMEK) settings + associated with a project, folder, organization, billing account, or + flexible resource. Note: CMEK for the Logs Router can currently only + be configured for GCP organizations. Once configured, it applies to + all projects and folders in the GCP organization. See `Enabling CMEK + for Logs Router + `__ + for more information. Attributes: name: - Output Only. The resource name of the CMEK settings. + Output only. The resource name of the CMEK settings. kms_key_name: The resource name for the configured Cloud KMS key. KMS key - name format: "projects/[PROJECT\_ID]/locations/[LOCATION]/keyR - ings/[KEYRING]/cryptoKeys/[KEY]" For example: ``"projects/my- + name format: “projects/[PROJECT_ID]/locations/[LOCATION]/keyRi + ngs/[KEYRING]/cryptoKeys/[KEY]” For example: ``"projects/my- project-id/locations/my-region/keyRings/key-ring- name/cryptoKeys/key-name"`` To enable CMEK for the Logs Router, set this field to a valid ``kms_key_name`` for which @@ -2173,193 +2778,248 @@ used at the time of encryption unless access to that key has been revoked. To disable CMEK for the Logs Router, set this field to an empty string. See `Enabling CMEK for Logs Router - `__ for more - information. + `__ for more information. service_account_id: - Output Only. The service account that will be used by the Logs + Output only. The service account that will be used by the Logs Router to access your Cloud KMS key. Before enabling CMEK for Logs Router, you must first assign the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to the service account that the Logs Router will use to access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.G etCmekSettings] to obtain the service account ID. See - `Enabling CMEK for Logs Router `__ for more information. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - ), + }, ) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None +_LOGBUCKET.fields_by_name["create_time"]._options = None +_LOGBUCKET.fields_by_name["update_time"]._options = None +_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None +_LOGBUCKET._options = None +_LOGSINK.fields_by_name["name"]._options = None _LOGSINK.fields_by_name["destination"]._options = None +_LOGSINK.fields_by_name["filter"]._options = None +_LOGSINK.fields_by_name["description"]._options = None +_LOGSINK.fields_by_name["disabled"]._options = None _LOGSINK.fields_by_name["output_version_format"]._options = None _LOGSINK.fields_by_name["writer_identity"]._options = None +_LOGSINK.fields_by_name["include_children"]._options = None +_LOGSINK.fields_by_name["bigquery_options"]._options = None _LOGSINK.fields_by_name["create_time"]._options = None _LOGSINK.fields_by_name["update_time"]._options = None -_LOGSINK.fields_by_name["start_time"]._options = None -_LOGSINK.fields_by_name["end_time"]._options = None _LOGSINK._options = None +_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None _BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None +_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None +_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None +_GETBUCKETREQUEST.fields_by_name["name"]._options = None _LISTSINKSREQUEST.fields_by_name["parent"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None +_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None _GETSINKREQUEST.fields_by_name["sink_name"]._options = None _CREATESINKREQUEST.fields_by_name["parent"]._options = None _CREATESINKREQUEST.fields_by_name["sink"]._options = None +_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None _UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None _UPDATESINKREQUEST.fields_by_name["sink"]._options = None +_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None +_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None _DELETESINKREQUEST.fields_by_name["sink_name"]._options = None +_LOGEXCLUSION.fields_by_name["name"]._options = None +_LOGEXCLUSION.fields_by_name["description"]._options = None +_LOGEXCLUSION.fields_by_name["filter"]._options = None +_LOGEXCLUSION.fields_by_name["disabled"]._options = None +_LOGEXCLUSION.fields_by_name["create_time"]._options = None +_LOGEXCLUSION.fields_by_name["update_time"]._options = None _LOGEXCLUSION._options = None _LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None +_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None _GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None _CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None +_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None _DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None +_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None +_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None +_CMEKSETTINGS.fields_by_name["name"]._options = None +_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None +_CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( name="ConfigServiceV2", full_name="google.logging.v2.ConfigServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" - ), - serialized_start=3320, - serialized_end=7318, + serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", + create_key=_descriptor._internal_create_key, + serialized_start=4745, + serialized_end=9784, methods=[ + _descriptor.MethodDescriptor( + name="ListBuckets", + full_name="google.logging.v2.ConfigServiceV2.ListBuckets", + index=0, + containing_service=None, + input_type=_LISTBUCKETSREQUEST, + output_type=_LISTBUCKETSRESPONSE, + serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="GetBucket", + full_name="google.logging.v2.ConfigServiceV2.GetBucket", + index=1, + containing_service=None, + input_type=_GETBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="UpdateBucket", + full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", + index=2, + containing_service=None, + input_type=_UPDATEBUCKETREQUEST, + output_type=_LOGBUCKET, + serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name="ListSinks", full_name="google.logging.v2.ConfigServiceV2.ListSinks", - index=0, + index=3, containing_service=None, input_type=_LISTSINKSREQUEST, output_type=_LISTSINKSRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent' - ), + serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSink", full_name="google.logging.v2.ConfigServiceV2.GetSink", - index=1, + index=4, containing_service=None, input_type=_GETSINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateSink", full_name="google.logging.v2.ConfigServiceV2.CreateSink", - index=2, + index=5, containing_service=None, input_type=_CREATESINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - '\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink' - ), + serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateSink", full_name="google.logging.v2.ConfigServiceV2.UpdateSink", - index=3, + index=6, containing_service=None, input_type=_UPDATESINKREQUEST, output_type=_LOGSINK, - serialized_options=_b( - "\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink" - ), + serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteSink", full_name="google.logging.v2.ConfigServiceV2.DeleteSink", - index=4, + index=7, containing_service=None, input_type=_DELETESINKREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" - ), + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListExclusions", full_name="google.logging.v2.ConfigServiceV2.ListExclusions", - index=5, + index=8, containing_service=None, input_type=_LISTEXCLUSIONSREQUEST, output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetExclusion", full_name="google.logging.v2.ConfigServiceV2.GetExclusion", - index=6, + index=9, containing_service=None, input_type=_GETEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - "\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateExclusion", full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", - index=7, + index=10, containing_service=None, input_type=_CREATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - '\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion' - ), + serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateExclusion", full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", - index=8, + index=11, containing_service=None, input_type=_UPDATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=_b( - "\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask" - ), + serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteExclusion", full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", - index=9, + index=12, containing_service=None, input_type=_DELETEEXCLUSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetCmekSettings", full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", - index=10, + index=13, containing_service=None, input_type=_GETCMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=_b( - "\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings" - ), + serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateCmekSettings", full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - index=11, + index=14, containing_service=None, input_type=_UPDATECMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=_b( - "\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings" - ), + serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index 62e751bf5..d3bd11324 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,8 +15,23 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ + self.ListBuckets = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/ListBuckets", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + ) + self.GetBucket = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/GetBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) + self.UpdateBucket = channel.unary_unary( + "/google.logging.v2.ConfigServiceV2/UpdateBucket", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + ) self.ListSinks = channel.unary_unary( "/google.logging.v2.ConfigServiceV2/ListSinks", request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, @@ -81,6 +97,35 @@ def __init__(self, channel): class ConfigServiceV2Servicer(object): """Service for configuring sinks used to route log entries.""" + def ListBuckets(self, request, context): + """Lists buckets (Beta).""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetBucket(self, request, context): + """Gets a bucket (Beta).""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateBucket(self, request, context): + """Updates a bucket. This method replaces the following fields in the + existing bucket with values from the new bucket: `retention_period` + + If the retention period is decreased and the bucket is locked, + FAILED_PRECONDITION will be returned. + + If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION + will be returned. + + A buckets region may not be modified after it is created. + This method is in Beta. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def ListSinks(self, request, context): """Lists sinks.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -163,7 +208,8 @@ def GetCmekSettings(self, request, context): the GCP organization. See [Enabling CMEK for Logs - Router](/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -183,7 +229,8 @@ def UpdateCmekSettings(self, request, context): 3) access to the key is disabled. See [Enabling CMEK for Logs - Router](/logging/docs/routing/managed-encryption) for more information. + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -192,6 +239,21 @@ def UpdateCmekSettings(self, request, context): def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { + "ListBuckets": grpc.unary_unary_rpc_method_handler( + servicer.ListBuckets, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, + ), + "GetBucket": grpc.unary_unary_rpc_method_handler( + servicer.GetBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), + "UpdateBucket": grpc.unary_unary_rpc_method_handler( + servicer.UpdateBucket, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, + ), "ListSinks": grpc.unary_unary_rpc_method_handler( servicer.ListSinks, request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, @@ -257,3 +319,413 @@ def add_ConfigServiceV2Servicer_to_server(servicer, server): "google.logging.v2.ConfigServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ConfigServiceV2(object): + """Service for configuring sinks used to route log entries.""" + + @staticmethod + def ListBuckets( + 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.logging.v2.ConfigServiceV2/ListBuckets", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetBucket( + 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.logging.v2.ConfigServiceV2/GetBucket", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateBucket( + 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.logging.v2.ConfigServiceV2/UpdateBucket", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListSinks( + 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.logging.v2.ConfigServiceV2/ListSinks", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSink( + 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.logging.v2.ConfigServiceV2/GetSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateSink( + 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.logging.v2.ConfigServiceV2/CreateSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateSink( + 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.logging.v2.ConfigServiceV2/UpdateSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteSink( + 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.logging.v2.ConfigServiceV2/DeleteSink", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListExclusions( + 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.logging.v2.ConfigServiceV2/ListExclusions", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetExclusion( + 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.logging.v2.ConfigServiceV2/GetExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateExclusion( + 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.logging.v2.ConfigServiceV2/CreateExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateExclusion( + 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.logging.v2.ConfigServiceV2/UpdateExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteExclusion( + 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.logging.v2.ConfigServiceV2/DeleteExclusion", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetCmekSettings( + 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.logging.v2.ConfigServiceV2/GetCmekSettings", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateCmekSettings( + 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.logging.v2.ConfigServiceV2/UpdateCmekSettings", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_metrics.proto b/google/cloud/logging_v2/proto/logging_metrics.proto index 582c067e6..eb9f73ffa 100644 --- a/google/cloud/logging_v2/proto/logging_metrics.proto +++ b/google/cloud/logging_v2/proto/logging_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -35,6 +34,7 @@ option java_multiple_files = true; option java_outer_classname = "LoggingMetricsProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; +option ruby_package = "Google::Cloud::Logging::V2"; // Service for configuring logs-based metrics. service MetricsServiceV2 { @@ -98,7 +98,7 @@ service MetricsServiceV2 { // by the bucket options. message LogMetric { option (google.api.resource) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" pattern: "projects/{project}/metrics/{metric}" }; @@ -124,20 +124,20 @@ message LogMetric { // However, when the metric identifier appears as the `[METRIC_ID]` part of a // `metric_name` API parameter, then the metric identifier must be // URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A description of this metric, which is used in documentation. // The maximum length of the description is 8000 characters. - string description = 2; + string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. An [advanced logs filter](/logging/docs/view/advanced_filters) - // which is used to match log entries. - // Example: + // Required. An [advanced logs + // filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + // is used to match log entries. Example: // // "resource.type=gae_app AND severity>=ERROR" // // The maximum length of the filter is 20000 characters. - string filter = 3; + string filter = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. The metric descriptor associated with the logs-based metric. // If unspecified, it uses a default metric descriptor with a DELTA metric @@ -160,7 +160,7 @@ message LogMetric { // be updated once initially configured. New labels can be added in the // `metric_descriptor`, but existing labels cannot be modified except for // their description. - google.api.MetricDescriptor metric_descriptor = 5; + google.api.MetricDescriptor metric_descriptor = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A `value_extractor` is required when using a distribution // logs-based metric to extract the values to record from a log entry. @@ -181,7 +181,7 @@ message LogMetric { // distribution. // // Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - string value_extractor = 6; + string value_extractor = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. A map from a label key string to an extractor expression which is // used to extract data from a log entry field and assign as the label value. @@ -197,22 +197,22 @@ message LogMetric { // // Note that there are upper bounds on the maximum number of labels and the // number of active time series that are allowed in a project. - map label_extractors = 7; + map label_extractors = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `bucket_options` are required when the logs-based metric is // using a DISTRIBUTION value type and it describes the bucket boundaries // used to create a histogram of the extracted values. - google.api.Distribution.BucketOptions bucket_options = 8; + google.api.Distribution.BucketOptions bucket_options = 8 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp create_time = 9; + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of the metric. // // This field may not be present for older metrics. - google.protobuf.Timestamp update_time = 10; + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Deprecated. The API version that created or updated this metric. // The v2 format is used by default and cannot be changed. @@ -235,12 +235,12 @@ message ListLogMetricsRequest { // preceding call to this method. `pageToken` must be the value of // `nextPageToken` from the previous response. The values of other method // parameters should be identical to those in the previous call. - string page_token = 2; + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of results to return from this request. // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. - int32 page_size = 3; + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; } // Result returned from ListLogMetrics. @@ -262,7 +262,7 @@ message GetLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } @@ -277,7 +277,7 @@ message CreateLogMetricRequest { string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + child_type: "logging.googleapis.com/LogMetric" } ]; @@ -298,7 +298,7 @@ message UpdateLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; @@ -314,7 +314,7 @@ message DeleteLogMetricRequest { string metric_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "logging.googleapis.com/Metric" + type: "logging.googleapis.com/LogMetric" } ]; } diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index 08eaf8099..f033fb679 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""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 @@ -31,12 +28,9 @@ name="google/cloud/logging_v2/proto/logging_metrics.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xdc\x04\n\tLogMetric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x37\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fvalue_extractor\x18\x06 \x01(\t\x12K\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntry\x12>\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:G\xea\x41\x44\n\x1dlogging.googleapis.com/Metric\x12#projects/{project}/metrics/{metric}"\x83\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x13GetLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric"\x82\x01\n\x16\x43reateLogMetricRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x87\x01\n\x16UpdateLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"T\n\x16\x44\x65leteLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -57,18 +51,29 @@ full_name="google.logging.v2.LogMetric.ApiVersion", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="V2", index=0, number=0, serialized_options=None, type=None + name="V2", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V1", index=1, number=1, serialized_options=None, type=None + name="V1", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=877, - serialized_end=905, + serialized_start=922, + serialized_end=950, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) @@ -79,6 +84,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -89,7 +95,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, @@ -97,6 +103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -107,7 +114,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, @@ -115,18 +122,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=821, - serialized_end=875, + serialized_start=866, + serialized_end=920, ) _LOGMETRIC = _descriptor.Descriptor( @@ -135,6 +143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -145,14 +154,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="description", @@ -163,14 +173,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="filter", @@ -181,14 +192,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="metric_descriptor", @@ -205,8 +217,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="value_extractor", @@ -217,14 +230,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="label_extractors", @@ -241,8 +255,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="bucket_options", @@ -259,8 +274,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="create_time", @@ -277,8 +293,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -295,8 +312,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -313,8 +331,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -324,15 +343,13 @@ enum_types=[ _LOGMETRIC_APIVERSION, ], - serialized_options=_b( - "\352AD\n\035logging.googleapis.com/Metric\022#projects/{project}/metrics/{metric}" - ), + serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=374, - serialized_end=978, + serialized_end=1026, ) @@ -342,6 +359,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -352,16 +370,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=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -372,14 +389,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="page_size", @@ -396,8 +414,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=[], @@ -408,8 +427,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=981, - serialized_end=1112, + serialized_start=1029, + serialized_end=1170, ) @@ -419,6 +438,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metrics", @@ -437,6 +457,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -447,7 +468,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, @@ -455,6 +476,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -465,8 +487,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1114, - serialized_end=1210, + serialized_start=1172, + serialized_end=1268, ) @@ -476,6 +498,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -486,16 +509,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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -506,8 +528,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1212, - serialized_end=1293, + serialized_start=1270, + serialized_end=1354, ) @@ -517,6 +539,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -527,16 +550,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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -553,8 +575,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -565,8 +588,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1296, - serialized_end=1426, + serialized_start=1357, + serialized_end=1490, ) @@ -576,6 +599,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -586,16 +610,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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -612,8 +635,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -624,8 +648,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1429, - serialized_end=1564, + serialized_start=1493, + serialized_end=1631, ) @@ -635,6 +659,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -645,16 +670,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=_b( - "\340A\002\372A\037\n\035logging.googleapis.com/Metric" - ), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -665,8 +689,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1566, - serialized_end=1650, + serialized_start=1633, + serialized_end=1720, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC @@ -702,28 +726,25 @@ LogMetric = _reflection.GeneratedProtocolMessageType( "LogMetric", (_message.Message,), - dict( - LabelExtractorsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( "LabelExtractorsEntry", (_message.Message,), - dict( - DESCRIPTOR=_LOGMETRIC_LABELEXTRACTORSENTRY, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2" + { + "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - ), + }, ), - DESCRIPTOR=_LOGMETRIC, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""Describes a logs-based metric. The value of the metric is - the number of log entries that match a logs filter in a given time - interval. - + "DESCRIPTOR": _LOGMETRIC, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Describes a logs-based metric. The value of the metric is the number + of log entries that match a logs filter in a given time interval. Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. - Attributes: name: Required. The client-assigned metric identifier. Examples: @@ -744,16 +765,16 @@ documentation. The maximum length of the description is 8000 characters. filter: - Required. An `advanced logs filter - `__ which is used to - match log entries. Example: :: "resource.type=gae_app - AND severity>=ERROR" The maximum length of the filter is - 20000 characters. + Required. An `advanced logs filter `__ which is used to match + log entries. Example: :: "resource.type=gae_app AND + severity>=ERROR" The maximum length of the filter is 20000 + characters. metric_descriptor: Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and - a unit of "1". Such a metric counts the number of log entries + a unit of “1”. Such a metric counts the number of log entries matching the ``filter`` expression. The ``name``, ``type``, and ``description`` fields in the ``metric_descriptor`` are output only, and is constructed using the ``name`` and @@ -818,7 +839,7 @@ changed. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - ), + }, ) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) @@ -826,11 +847,10 @@ ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( "ListLogMetricsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGMETRICSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to ListLogMetrics. - + { + "DESCRIPTOR": _LISTLOGMETRICSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to ListLogMetrics. Attributes: parent: @@ -849,18 +869,17 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogMetricsRequest) ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( "ListLogMetricsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGMETRICSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""Result returned from ListLogMetrics. - + { + "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """Result returned from ListLogMetrics. Attributes: metrics: @@ -872,18 +891,17 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogMetricsResponse) GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( "GetLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETLOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to GetLogMetric. - + { + "DESCRIPTOR": _GETLOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to GetLogMetric. Attributes: metric_name: @@ -891,65 +909,62 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(GetLogMetricRequest) CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "CreateLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to CreateLogMetric. - + { + "DESCRIPTOR": _CREATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to CreateLogMetric. Attributes: parent: Required. The resource name of the project in which to create - the metric: :: "projects/[PROJECT_ID]" The new metric + the metric: :: "projects/[PROJECT_ID]" The new metric must be provided in the request. metric: Required. The new logs-based metric, which must not have an identifier that already exists. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(CreateLogMetricRequest) UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "UpdateLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to UpdateLogMetric. - + { + "DESCRIPTOR": _UPDATELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to UpdateLogMetric. Attributes: metric_name: Required. The resource name of the metric to update: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated - metric must be provided in the request and it's ``name`` field + metric must be provided in the request and it’s ``name`` field must be the same as ``[METRIC_ID]`` If the metric does not exist in ``[PROJECT_ID]``, then a new metric is created. metric: Required. The updated metric. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateLogMetricRequest) DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogMetricRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETELOGMETRICREQUEST, - __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", - __doc__="""The parameters to DeleteLogMetric. - + { + "DESCRIPTOR": _DELETELOGMETRICREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", + "__doc__": """The parameters to DeleteLogMetric. Attributes: metric_name: @@ -957,16 +972,27 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None +_LOGMETRIC.fields_by_name["name"]._options = None +_LOGMETRIC.fields_by_name["description"]._options = None +_LOGMETRIC.fields_by_name["filter"]._options = None +_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None +_LOGMETRIC.fields_by_name["value_extractor"]._options = None +_LOGMETRIC.fields_by_name["label_extractors"]._options = None +_LOGMETRIC.fields_by_name["bucket_options"]._options = None +_LOGMETRIC.fields_by_name["create_time"]._options = None +_LOGMETRIC.fields_by_name["update_time"]._options = None _LOGMETRIC.fields_by_name["version"]._options = None _LOGMETRIC._options = None _LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None +_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None _GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None @@ -979,11 +1005,10 @@ full_name="google.logging.v2.MetricsServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - ), - serialized_start=1653, - serialized_end=2723, + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + create_key=_descriptor._internal_create_key, + serialized_start=1723, + serialized_end=2793, methods=[ _descriptor.MethodDescriptor( name="ListLogMetrics", @@ -992,9 +1017,8 @@ containing_service=None, input_type=_LISTLOGMETRICSREQUEST, output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetLogMetric", @@ -1003,9 +1027,8 @@ containing_service=None, input_type=_GETLOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - "\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" - ), + serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateLogMetric", @@ -1014,9 +1037,8 @@ containing_service=None, input_type=_CREATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - '\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric' - ), + serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateLogMetric", @@ -1025,9 +1047,8 @@ containing_service=None, input_type=_UPDATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=_b( - "\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric" - ), + serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteLogMetric", @@ -1036,9 +1057,8 @@ containing_service=None, input_type=_DELETELOGMETRICREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" - ), + serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index a3a373368..c97379c14 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,7 +15,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( "/google.logging.v2.MetricsServiceV2/ListLogMetrics", @@ -109,3 +110,143 @@ def add_MetricsServiceV2Servicer_to_server(servicer, server): "google.logging.v2.MetricsServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class MetricsServiceV2(object): + """Service for configuring logs-based metrics.""" + + @staticmethod + def ListLogMetrics( + 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.logging.v2.MetricsServiceV2/ListLogMetrics", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetLogMetric( + 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.logging.v2.MetricsServiceV2/GetLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateLogMetric( + 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.logging.v2.MetricsServiceV2/CreateLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateLogMetric( + 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.logging.v2.MetricsServiceV2/UpdateLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteLogMetric( + 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.logging.v2.MetricsServiceV2/DeleteLogMetric", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 08cc2b49e..7c4fa3929 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""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 @@ -15,7 +12,6 @@ _sym_db = _symbol_database.Default() -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 ( @@ -30,22 +26,20 @@ ) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/logging_v2/proto/logging.proto", package="google.logging.v2", syntax="proto3", - serialized_options=_b( - "\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" - ), - serialized_pb=_b( - '\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log"\xcf\x02\n\x16WriteLogEntriesRequest\x12\x31\n\x08log_name\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntry\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_success\x18\x05 \x01(\x08\x12\x0f\n\x07\x64ry_run\x18\x06 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb5\x01\n\x15ListLogEntriesRequest\x12\x17\n\x0bproject_ids\x18\x01 \x03(\tB\x02\x18\x01\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\'ListMonitoredResourceDescriptorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"i\n\x0fListLogsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' - ), + serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', dependencies=[ - google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, @@ -54,8 +48,10 @@ google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -66,6 +62,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -76,16 +73,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=_b( - "\340A\002\372A\034\022\032logging.googleapis.com/Log" - ), + serialized_options=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -96,8 +92,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=436, - serialized_end=508, + serialized_start=470, + serialized_end=542, ) @@ -107,6 +103,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -117,7 +114,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, @@ -125,6 +122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -135,7 +133,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, @@ -143,18 +141,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=801, - serialized_end=846, + serialized_start=858, + serialized_end=903, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( @@ -163,6 +162,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -173,14 +173,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=_b("\372A\034\n\032logging.googleapis.com/Log"), + serialized_options=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -197,8 +198,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="labels", @@ -215,8 +217,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="entries", @@ -233,8 +236,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_success", @@ -251,8 +255,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="dry_run", @@ -269,8 +274,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=[], @@ -283,8 +289,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=511, - serialized_end=846, + serialized_start=545, + serialized_end=903, ) @@ -294,6 +300,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -303,8 +310,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=848, - serialized_end=873, + serialized_start=905, + serialized_end=930, ) @@ -314,6 +321,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -332,6 +340,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -350,18 +359,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1003, - serialized_end=1076, + serialized_start=1060, + serialized_end=1133, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( @@ -370,6 +380,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_entry_errors", @@ -388,6 +399,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -400,8 +412,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=876, - serialized_end=1076, + serialized_start=933, + serialized_end=1133, ) @@ -411,29 +423,12 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ - _descriptor.FieldDescriptor( - name="project_ids", - full_name="google.logging.v2.ListLogEntriesRequest.project_ids", - index=0, - number=1, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=_b("\030\001"), - file=DESCRIPTOR, - ), _descriptor.FieldDescriptor( name="resource_names", full_name="google.logging.v2.ListLogEntriesRequest.resource_names", - index=1, + index=0, number=8, type=9, cpp_type=9, @@ -445,51 +440,52 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A\034\022\032logging.googleapis.com/Log" - ), + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", full_name="google.logging.v2.ListLogEntriesRequest.filter", - index=2, + index=1, number=2, type=9, 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="order_by", full_name="google.logging.v2.ListLogEntriesRequest.order_by", - index=3, + index=2, number=3, type=9, 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="page_size", full_name="google.logging.v2.ListLogEntriesRequest.page_size", - index=4, + index=3, number=4, type=5, cpp_type=1, @@ -501,26 +497,28 @@ 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", full_name="google.logging.v2.ListLogEntriesRequest.page_token", - index=5, + index=4, number=5, type=9, 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=[], @@ -531,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1079, - serialized_end=1260, + serialized_start=1136, + serialized_end=1312, ) @@ -542,6 +540,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entries", @@ -560,6 +559,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -570,7 +570,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, @@ -578,6 +578,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -588,8 +589,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1262, - serialized_end=1357, + serialized_start=1314, + serialized_end=1409, ) @@ -599,6 +600,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="page_size", @@ -615,8 +617,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", @@ -627,14 +630,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=[], @@ -645,8 +649,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1359, - serialized_end=1439, + serialized_start=1411, + serialized_end=1501, ) @@ -656,6 +660,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="resource_descriptors", @@ -674,6 +679,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -684,7 +690,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, @@ -692,6 +698,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -702,8 +709,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1442, - serialized_end=1580, + serialized_start=1504, + serialized_end=1642, ) @@ -713,6 +720,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -723,14 +731,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=_b("\372A\034\022\032logging.googleapis.com/Log"), + serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -747,8 +756,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", @@ -759,14 +769,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=[], @@ -777,8 +788,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1582, - serialized_end=1687, + serialized_start=1644, + serialized_end=1762, ) @@ -788,6 +799,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_names", @@ -806,6 +818,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -816,7 +829,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, @@ -824,6 +837,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -834,8 +848,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1689, - serialized_end=1751, + serialized_start=1764, + serialized_end=1826, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -890,11 +904,10 @@ DeleteLogRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETELOGREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to DeleteLog. - + { + "DESCRIPTOR": _DELETELOGREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to DeleteLog. Attributes: log_name: @@ -909,60 +922,59 @@ about log names, see [LogEntry][google.logging.v2.LogEntry]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteLogRequest) WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESREQUEST_LABELSENTRY, - __module__="google.cloud.logging_v2.proto.logging_pb2" + { + "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_WRITELOGENTRIESREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to WriteLogEntries. - + "DESCRIPTOR": _WRITELOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to WriteLogEntries. Attributes: log_name: Optional. A default log resource name that is assigned to all log entries in ``entries`` that do not specify a value for - ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL- - encoded. For example: :: "projects/my-project- - id/logs/syslog" "organizations/1234567890/logs/cloudresour - cemanager.googleapis.com%2Factivity" The permission - logging.logEntries.create is needed on each project, + encoded. For example: :: "projects/my-project- + id/logs/syslog" "organizations/1234567890/logs/cloudresourc + emanager.googleapis.com%2Factivity" The permission + ``logging.logEntries.create`` is needed on each project, organization, billing account, or folder that is receiving new - log entries, whether the resource is specified in logName or - in an individual log entry. + log entries, whether the resource is specified in ``logName`` + or in an individual log entry. resource: Optional. A default monitored resource object that is assigned to all log entries in ``entries`` that do not specify a value - for ``resource``. Example: :: { "type": "gce_instance", - "labels": { "zone": "us-central1-a", "instance_id": + for ``resource``. Example: :: { "type": "gce_instance", + "labels": { "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels: Optional. Default labels that are added to the ``labels`` field of all log entries in ``entries``. If a log entry already has a label with the same key as a label in this - parameter, then the log entry's label is not changed. See + parameter, then the log entry’s label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries: Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this - method's ``log_name``, ``resource``, and ``labels`` fields are + method’s ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. If the @@ -973,31 +985,33 @@ their own values, the entries earlier in the list will sort before the entries later in the list. See the ``entries.list`` method. Log entries with timestamps that are more than the - `logs retention period `__ in the past + `logs retention period + `__ in the past or more than 24 hours in the future will not be available when calling ``entries.list``. However, those log entries can still - be `exported with LogSinks `__. To improve throughput and to avoid exceeding the - `quota limit `__ for calls to - ``entries.write``, you should try to include several log - entries in this list, rather than calling this method for each - individual log entry. + `quota limit `__ for calls to ``entries.write``, you should try to + include several log entries in this list, rather than calling + this method for each individual log entry. partial_success: Optional. Whether valid entries should be written even if some - other entries fail due to INVALID\_ARGUMENT or - PERMISSION\_DENIED errors. If any entry is not written, then + other entries fail due to INVALID_ARGUMENT or + PERMISSION_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed - by the entries' zero-based index in the ``entries.write`` + by the entries’ zero-based index in the ``entries.write`` method. dry_run: Optional. If true, the request should expect normal response, - but the entries won't be persisted nor exported. Useful for + but the entries won’t be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) @@ -1005,45 +1019,42 @@ WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesResponse", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from WriteLogEntries. empty - - """, + { + "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from WriteLogEntries.""", # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesResponse) WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesPartialErrors", (_message.Message,), - dict( - LogEntryErrorsEntry=_reflection.GeneratedProtocolMessageType( + { + "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( "LogEntryErrorsEntry", (_message.Message,), - dict( - DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - __module__="google.cloud.logging_v2.proto.logging_pb2" + { + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + "__module__": "google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - ), + }, ), - DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Error details for WriteLogEntries with partial success. - + "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Error details for WriteLogEntries with partial success. Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, records the error status for entries that were not written due - to a permanent error, keyed by the entry's zero-based index in + to a permanent error, keyed by the entry’s zero-based index in ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - ), + }, ) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) @@ -1051,27 +1062,23 @@ ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "ListLogEntriesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGENTRIESREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ``ListLogEntries``. - + { + "DESCRIPTOR": _LISTLOGENTRIESREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ``ListLogEntries``. Attributes: - project_ids: - Deprecated. Use ``resource_names`` instead. One or more - project identifiers or project numbers from which to retrieve - log entries. Example: ``"my-project-1A"``. resource_names: Required. Names of one or more parent resources from which to - retrieve log entries: :: "projects/[PROJECT_ID]" + retrieve log entries: :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Projects listed in the ``project_ids`` field are added to this list. filter: Optional. A filter that chooses which log entries to return. - See `Advanced Logs Queries `__. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in ``resource_names``. Referencing a parent @@ -1089,7 +1096,8 @@ values. page_size: Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of + request. Default is 50. If the value is negative or exceeds + 1000, the request is rejected. The presence of ``next_page_token`` in the response indicates that more results might be available. page_token: @@ -1100,18 +1108,17 @@ those in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogEntriesRequest) ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "ListLogEntriesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGENTRIESRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ``ListLogEntries``. - + { + "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ``ListLogEntries``. Attributes: entries: @@ -1133,18 +1140,17 @@ search. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogEntriesResponse) ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ListMonitoredResourceDescriptors - + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListMonitoredResourceDescriptors Attributes: page_size: @@ -1160,18 +1166,17 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - ), + }, ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ListMonitoredResourceDescriptors. - + { + "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListMonitoredResourceDescriptors. Attributes: resource_descriptors: @@ -1183,23 +1188,22 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - ), + }, ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) ListLogsRequest = _reflection.GeneratedProtocolMessageType( "ListLogsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGSREQUEST, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""The parameters to ListLogs. - + { + "DESCRIPTOR": _LISTLOGSREQUEST, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """The parameters to ListLogs. Attributes: parent: Required. The resource name that owns the logs: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" page_size: @@ -1215,18 +1219,17 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - ), + }, ) _sym_db.RegisterMessage(ListLogsRequest) ListLogsResponse = _reflection.GeneratedProtocolMessageType( "ListLogsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTLOGSRESPONSE, - __module__="google.cloud.logging_v2.proto.logging_pb2", - __doc__="""Result returned from ListLogs. - + { + "DESCRIPTOR": _LISTLOGSRESPONSE, + "__module__": "google.cloud.logging_v2.proto.logging_pb2", + "__doc__": """Result returned from ListLogs. Attributes: log_names: @@ -1240,7 +1243,7 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogsResponse) @@ -1249,22 +1252,32 @@ _DELETELOGREQUEST.fields_by_name["log_name"]._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None _WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None _WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None +_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["project_ids"]._options = None _LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None _LISTLOGSREQUEST.fields_by_name["parent"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None +_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( name="LoggingServiceV2", full_name="google.logging.v2.LoggingServiceV2", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" - ), - serialized_start=1754, - serialized_end=3127, + serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", + create_key=_descriptor._internal_create_key, + serialized_start=1829, + serialized_end=3202, methods=[ _descriptor.MethodDescriptor( name="DeleteLog", @@ -1273,9 +1286,8 @@ containing_service=None, input_type=_DELETELOGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name" - ), + serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="WriteLogEntries", @@ -1284,9 +1296,8 @@ containing_service=None, input_type=_WRITELOGENTRIESREQUEST, output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries' - ), + serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListLogEntries", @@ -1295,9 +1306,8 @@ containing_service=None, input_type=_LISTLOGENTRIESREQUEST, output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by' - ), + serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1306,9 +1316,8 @@ containing_service=None, input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=_b( - '\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors' - ), + serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListLogs", @@ -1317,9 +1326,8 @@ containing_service=None, input_type=_LISTLOGSREQUEST, output_type=_LISTLOGSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 2e444b925..15c16bee0 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -1,4 +1,5 @@ # 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.logging_v2.proto import ( @@ -14,7 +15,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( "/google.logging.v2.LoggingServiceV2/DeleteLog", @@ -72,7 +73,8 @@ def WriteLogEntries(self, request, context): def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log - entries, see [Exporting Logs](/logging/docs/export). + entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -125,3 +127,143 @@ def add_LoggingServiceV2Servicer_to_server(servicer, server): "google.logging.v2.LoggingServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class LoggingServiceV2(object): + """Service for ingesting and querying logs.""" + + @staticmethod + def DeleteLog( + 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.logging.v2.LoggingServiceV2/DeleteLog", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def WriteLogEntries( + 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.logging.v2.LoggingServiceV2/WriteLogEntries", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListLogEntries( + 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.logging.v2.LoggingServiceV2/ListLogEntries", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListMonitoredResourceDescriptors( + 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListLogs( + 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.logging.v2.LoggingServiceV2/ListLogs", + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index ff599eb2a..21f6d2a26 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -20,14 +20,27 @@ ROOT=$( dirname "$DIR" ) # Work from the project root. cd $ROOT +# Prevent it from overriding files. +# We recommend that sample authors use their own service account files and cloud project. +# In that case, they are supposed to prepare these files by themselves. +if [[ -f "testing/test-env.sh" ]] || \ + [[ -f "testing/service-account.json" ]] || \ + [[ -f "testing/client-secrets.json" ]]; then + echo "One or more target files exist, aborting." + exit 1 +fi + # 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" \ + --project="${PROJECT_ID}" \ > testing/test-env.sh gcloud secrets versions access latest \ --secret="python-docs-samples-service-account" \ + --project="${PROJECT_ID}" \ > 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 + --project="${PROJECT_ID}" \ + > testing/client-secrets.json diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py new file mode 100644 index 000000000..d309d6e97 --- /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 000000000..4fd239765 --- /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 000000000..1446b94a5 --- /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 000000000..11957ce27 --- /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 000000000..a0406dba8 --- /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 000000000..5ea33d18c --- /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 a5616d3e5..fea7c12ef 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-logging", - "sha": "a22a3bfdd4c8a4d6e9cc0c7d7504322ff31ad7ea" + "remote": "https://github.com/googleapis/python-logging.git", + "sha": "0a1dd94811232634fdb849cb2c85bd44e870642f" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aaff764c185e18a6c73227357c3df5fa60fec85a", - "internalRef": "309426927" + "sha": "4ede77543c77072a2ac9f78353de2de2f8c4c501", + "internalRef": "333125205" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "cdddf139b36000b3a7c65fd2a7781e253262359a" + "sha": "a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d" } } ], @@ -37,9 +30,103 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "generator": "bazel" } } + ], + "generatedFiles": [ + ".coveragerc", + ".flake8", + ".github/CONTRIBUTING.md", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".github/snippet-bot.yml", + ".gitignore", + ".kokoro/build.sh", + ".kokoro/continuous/common.cfg", + ".kokoro/continuous/continuous.cfg", + ".kokoro/docker/docs/Dockerfile", + ".kokoro/docker/docs/fetch_gpg_keys.sh", + ".kokoro/docs/common.cfg", + ".kokoro/docs/docs-presubmit.cfg", + ".kokoro/docs/docs.cfg", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/common.cfg", + ".kokoro/presubmit/presubmit.cfg", + ".kokoro/publish-docs.sh", + ".kokoro/release.sh", + ".kokoro/release/common.cfg", + ".kokoro/release/release.cfg", + ".kokoro/samples/lint/common.cfg", + ".kokoro/samples/lint/continuous.cfg", + ".kokoro/samples/lint/periodic.cfg", + ".kokoro/samples/lint/presubmit.cfg", + ".kokoro/samples/python3.6/common.cfg", + ".kokoro/samples/python3.6/continuous.cfg", + ".kokoro/samples/python3.6/periodic.cfg", + ".kokoro/samples/python3.6/presubmit.cfg", + ".kokoro/samples/python3.7/common.cfg", + ".kokoro/samples/python3.7/continuous.cfg", + ".kokoro/samples/python3.7/periodic.cfg", + ".kokoro/samples/python3.7/presubmit.cfg", + ".kokoro/samples/python3.8/common.cfg", + ".kokoro/samples/python3.8/continuous.cfg", + ".kokoro/samples/python3.8/periodic.cfg", + ".kokoro/samples/python3.8/presubmit.cfg", + ".kokoro/test-samples.sh", + ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", + ".trampolinerc", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.rst", + "LICENSE", + "MANIFEST.in", + "docs/_static/custom.css", + "docs/_templates/layout.html", + "docs/conf.py", + "docs/gapic/v2/api.rst", + "docs/gapic/v2/types.rst", + "docs/multiprocessing.rst", + "google/cloud/logging_v2/gapic/__init__.py", + "google/cloud/logging_v2/gapic/config_service_v2_client.py", + "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/enums.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client.py", + "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", + "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", + "google/cloud/logging_v2/gapic/transports/__init__.py", + "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", + "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", + "google/cloud/logging_v2/proto/__init__.py", + "google/cloud/logging_v2/proto/log_entry.proto", + "google/cloud/logging_v2/proto/log_entry_pb2.py", + "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging.proto", + "google/cloud/logging_v2/proto/logging_config.proto", + "google/cloud/logging_v2/proto/logging_config_pb2.py", + "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_metrics.proto", + "google/cloud/logging_v2/proto/logging_metrics_pb2.py", + "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", + "google/cloud/logging_v2/proto/logging_pb2.py", + "google/cloud/logging_v2/proto/logging_pb2_grpc.py", + "renovate.json", + "scripts/decrypt-secrets.sh", + "scripts/readme-gen/readme_gen.py", + "scripts/readme-gen/templates/README.tmpl.rst", + "scripts/readme-gen/templates/auth.tmpl.rst", + "scripts/readme-gen/templates/auth_api_key.tmpl.rst", + "scripts/readme-gen/templates/install_deps.tmpl.rst", + "scripts/readme-gen/templates/install_portaudio.tmpl.rst", + "setup.cfg", + "testing/.gitignore", + "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", + "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 0483a4582..1b267f75c 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -62,36 +62,25 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): - def test_list_sinks(self): - # Setup Expected Response - next_page_token = "" - sinks_element = {} - sinks = [sinks_element] - expected_response = {"next_page_token": next_page_token, "sinks": sinks} - expected_response = logging_config_pb2.ListSinksResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_sink(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - - paged_list_response = client.list_sinks(parent) - resources = list(paged_list_response) - assert len(resources) == 1 + sink_name = "sinkName-1391757129" - assert expected_response.sinks[0] == resources[0] + client.delete_sink(sink_name) assert len(channel.requests) == 1 - expected_request = logging_config_pb2.ListSinksRequest(parent=parent) + expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_sinks_exception(self): + def test_delete_sink_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: @@ -99,13 +88,12 @@ def test_list_sinks_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + sink_name = "sinkName-1391757129" - paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.delete_sink(sink_name) - def test_get_sink(self): + def test_update_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -133,17 +121,20 @@ def test_get_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" + sink = {} - response = client.get_sink(sink_name) + response = client.update_sink(sink_name, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_sink_exception(self): + def test_update_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -152,30 +143,141 @@ def test_get_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink_name = "sinkName-1391757129" + sink = {} with pytest.raises(CustomException): - client.get_sink(sink_name) + client.update_sink(sink_name, sink) - def test_create_sink(self): + def test_delete_exclusion(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = "name3373707" + + client.delete_exclusion(name) + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_exclusion_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = "name3373707" + + with pytest.raises(CustomException): + client.delete_exclusion(name) + + def test_list_buckets(self): + # Setup Expected Response + next_page_token = "" + buckets_element = {} + buckets = [buckets_element] + expected_response = {"next_page_token": next_page_token, "buckets": buckets} + expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + + paged_list_response = client.list_buckets(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.buckets[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.ListBucketsRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_buckets_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + + paged_list_response = client.list_buckets(parent) + with pytest.raises(CustomException): + list(paged_list_response) + + def test_get_bucket(self): # Setup Expected Response + name_2 = "name2-1052831874" + description = "description-1724546052" + retention_days = 1544391896 + expected_response = { + "name": name_2, + "description": description, + "retention_days": retention_days, + } + expected_response = logging_config_pb2.LogBucket(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" + + response = client.get_bucket(name) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.GetBucketRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_bucket_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = "name3373707" + + with pytest.raises(CustomException): + client.get_bucket(name) + + def test_update_bucket(self): + # Setup Expected Response + name_2 = "name2-1052831874" description = "description-1724546052" - disabled = True - writer_identity = "writerIdentity775638794" - include_children = True + retention_days = 1544391896 expected_response = { - "name": name, - "destination": destination, - "filter": filter_, + "name": name_2, "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, + "retention_days": retention_days, } - expected_response = logging_config_pb2.LogSink(**expected_response) + expected_response = logging_config_pb2.LogBucket(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -185,20 +287,21 @@ def test_create_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - sink = {} + name = "name3373707" + bucket = {} + update_mask = {} - response = client.create_sink(parent, sink) + response = client.update_bucket(name, bucket, update_mask) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateSinkRequest( - parent=parent, sink=sink + expected_request = logging_config_pb2.UpdateBucketRequest( + name=name, bucket=bucket, update_mask=update_mask ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_sink_exception(self): + def test_update_bucket_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -207,13 +310,57 @@ def test_create_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request + name = "name3373707" + bucket = {} + update_mask = {} + + with pytest.raises(CustomException): + client.update_bucket(name, bucket, update_mask) + + def test_list_sinks(self): + # Setup Expected Response + next_page_token = "" + sinks_element = {} + sinks = [sinks_element] + expected_response = {"next_page_token": next_page_token, "sinks": sinks} + expected_response = logging_config_pb2.ListSinksResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request parent = client.project_path("[PROJECT]") - sink = {} + paged_list_response = client.list_sinks(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.sinks[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.ListSinksRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_sinks_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + parent = client.project_path("[PROJECT]") + + paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - client.create_sink(parent, sink) + list(paged_list_response) - def test_update_sink(self): + def test_get_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -241,20 +388,17 @@ def test_update_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") - sink = {} + sink_name = "sinkName-1391757129" - response = client.update_sink(sink_name, sink) + response = client.get_sink(sink_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, sink=sink - ) + expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_sink_exception(self): + def test_get_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -263,30 +407,53 @@ def test_update_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") - sink = {} + sink_name = "sinkName-1391757129" with pytest.raises(CustomException): - client.update_sink(sink_name, sink) + client.get_sink(sink_name) - def test_delete_sink(self): - channel = ChannelStub() + def test_create_sink(self): + # Setup Expected Response + name = "name3373707" + destination = "destination-1429847026" + filter_ = "filter-1274492040" + description = "description-1724546052" + disabled = True + writer_identity = "writerIdentity775638794" + include_children = True + expected_response = { + "name": name, + "destination": destination, + "filter": filter_, + "description": description, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, + } + expected_response = logging_config_pb2.LogSink(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + parent = client.project_path("[PROJECT]") + sink = {} - client.delete_sink(sink_name) + response = client.create_sink(parent, sink) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.CreateSinkRequest( + parent=parent, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_sink_exception(self): + def test_create_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -295,10 +462,11 @@ def test_delete_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = client.sink_path("[PROJECT]", "[SINK]") + parent = client.project_path("[PROJECT]") + sink = {} with pytest.raises(CustomException): - client.delete_sink(sink_name) + client.create_sink(parent, sink) def test_list_exclusions(self): # Setup Expected Response @@ -370,7 +538,7 @@ def test_get_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" response = client.get_exclusion(name) assert expected_response == response @@ -389,7 +557,7 @@ def test_get_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" with pytest.raises(CustomException): client.get_exclusion(name) @@ -466,7 +634,7 @@ def test_update_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" exclusion = {} update_mask = {} @@ -489,51 +657,20 @@ def test_update_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + name = "name3373707" exclusion = {} update_mask = {} with pytest.raises(CustomException): client.update_exclusion(name, exclusion, update_mask) - def test_delete_exclusion(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") - - client.delete_exclusion(name) - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_delete_exclusion_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") - - with pytest.raises(CustomException): - client.delete_exclusion(name) - def test_get_cmek_settings(self): # Setup Expected Response - name = "name3373707" + name_2 = "name2-1052831874" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name, + "name": name_2, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -546,11 +683,14 @@ def test_get_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - response = client.get_cmek_settings() + # Setup Request + name = "name3373707" + + response = client.get_cmek_settings(name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetCmekSettingsRequest() + expected_request = logging_config_pb2.GetCmekSettingsRequest(name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -562,16 +702,19 @@ def test_get_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() + # Setup request + name = "name3373707" + with pytest.raises(CustomException): - client.get_cmek_settings() + client.get_cmek_settings(name) def test_update_cmek_settings(self): # Setup Expected Response - name = "name3373707" + name_2 = "name2-1052831874" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name, + "name": name_2, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -584,11 +727,17 @@ def test_update_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - response = client.update_cmek_settings() + # Setup Request + name = "name3373707" + cmek_settings = {} + + response = client.update_cmek_settings(name, cmek_settings) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest() + expected_request = logging_config_pb2.UpdateCmekSettingsRequest( + name=name, cmek_settings=cmek_settings + ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -600,5 +749,9 @@ def test_update_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() + # Setup request + name = "name3373707" + cmek_settings = {} + with pytest.raises(CustomException): - client.update_cmek_settings() + client.update_cmek_settings(name, cmek_settings) diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index ef2abc733..9ece054d7 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -71,7 +71,7 @@ def test_delete_log(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = client.log_path("[PROJECT]", "[LOG]") + log_name = "logName2013526694" client.delete_log(log_name) @@ -89,15 +89,18 @@ def test_delete_log_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = client.log_path("[PROJECT]", "[LOG]") + log_name = "logName2013526694" with pytest.raises(CustomException): client.delete_log(log_name) - def test_write_log_entries(self): + def test_list_log_entries(self): # Setup Expected Response - expected_response = {} - expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + next_page_token = "" + entries_element = {} + entries = [entries_element] + expected_response = {"next_page_token": next_page_token, "entries": entries} + expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -107,18 +110,22 @@ def test_write_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - entries = [] + resource_names = [] - response = client.write_log_entries(entries) - assert expected_response == response + paged_list_response = client.list_log_entries(resource_names) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.entries[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) + expected_request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_write_log_entries_exception(self): - # Mock the API response + def test_list_log_entries_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -126,18 +133,16 @@ def test_write_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - entries = [] + resource_names = [] + paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - client.write_log_entries(entries) + list(paged_list_response) - def test_list_log_entries(self): + def test_write_log_entries(self): # Setup Expected Response - next_page_token = "" - entries_element = {} - entries = [entries_element] - expected_response = {"next_page_token": next_page_token, "entries": entries} - expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) + expected_response = {} + expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -147,22 +152,18 @@ def test_list_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - resource_names = [] - - paged_list_response = client.list_log_entries(resource_names) - resources = list(paged_list_response) - assert len(resources) == 1 + entries = [] - assert expected_response.entries[0] == resources[0] + response = client.write_log_entries(entries) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names - ) + expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_entries_exception(self): + def test_write_log_entries_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: @@ -170,11 +171,10 @@ def test_list_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - resource_names = [] + entries = [] - paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - list(paged_list_response) + client.write_log_entries(entries) def test_list_monitored_resource_descriptors(self): # Setup Expected Response diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 35201f790..6baefad82 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -61,15 +61,19 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): - def test_list_log_metrics(self): + def test_update_log_metric(self): # Setup Expected Response - next_page_token = "" - metrics_element = {} - metrics = [metrics_element] - expected_response = {"next_page_token": next_page_token, "metrics": metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse( - **expected_response - ) + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -79,20 +83,21 @@ def test_list_log_metrics(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - - paged_list_response = client.list_log_metrics(parent) - resources = list(paged_list_response) - assert len(resources) == 1 + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric = {} - assert expected_response.metrics[0] == resources[0] + response = client.update_log_metric(metric_name, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) + expected_request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_metrics_exception(self): + def test_update_log_metric_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: @@ -100,47 +105,32 @@ def test_list_log_metrics_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric = {} - paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - list(paged_list_response) - - def test_get_log_metric(self): - # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + client.update_log_metric(metric_name, metric) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_log_metric(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - response = client.get_log_metric(metric_name) - assert expected_response == response + client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest( + expected_request = logging_metrics_pb2.DeleteLogMetricRequest( metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_log_metric_exception(self): + def test_delete_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -149,24 +139,20 @@ def test_get_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.get_log_metric(metric_name) + client.delete_log_metric(metric_name) - def test_create_log_metric(self): + def test_list_log_metrics(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + next_page_token = "" + metrics_element = {} + metrics = [metrics_element] + expected_response = {"next_page_token": next_page_token, "metrics": metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse( + **expected_response + ) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -177,20 +163,19 @@ def test_create_log_metric(self): # Setup Request parent = client.project_path("[PROJECT]") - metric = {} - response = client.create_log_metric(parent, metric) - assert expected_response == response + paged_list_response = client.list_log_metrics(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.metrics[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, metric=metric - ) + expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_log_metric_exception(self): - # Mock the API response + def test_list_log_metrics_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -199,12 +184,12 @@ def test_create_log_metric_exception(self): # Setup request parent = client.project_path("[PROJECT]") - metric = {} + paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - client.create_log_metric(parent, metric) + list(paged_list_response) - def test_update_log_metric(self): + def test_get_log_metric(self): # Setup Expected Response name = "name3373707" description = "description-1724546052" @@ -226,20 +211,19 @@ def test_update_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") - metric = {} + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - response = client.update_log_metric(metric_name, metric) + response = client.get_log_metric(metric_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, metric=metric + expected_request = logging_metrics_pb2.GetLogMetricRequest( + metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_log_metric_exception(self): + def test_get_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -248,32 +232,47 @@ def test_update_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") - metric = {} + metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.update_log_metric(metric_name, metric) + client.get_log_metric(metric_name) - def test_delete_log_metric(self): - channel = ChannelStub() + def test_create_log_metric(self): + # Setup Expected Response + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + parent = client.project_path("[PROJECT]") + metric = {} - client.delete_log_metric(metric_name) + response = client.create_log_metric(parent, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest( - metric_name=metric_name + expected_request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, metric=metric ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_log_metric_exception(self): + def test_create_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -282,7 +281,8 @@ def test_delete_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.metric_path("[PROJECT]", "[METRIC]") + parent = client.project_path("[PROJECT]") + metric = {} with pytest.raises(CustomException): - client.delete_log_metric(metric_name) + client.create_log_metric(parent, metric) From 153f08ed922c0c1ece48b82b0b365959a3227d13 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:23:58 -0700 Subject: [PATCH 35/39] chore(python): skip reporting coverage for namespace package Source-Author: Tres Seaver Source-Date: Wed Sep 23 10:58:13 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: f3c04883d6c43261ff13db1f52d03a283be06871 Source-Link: https://github.com/googleapis/synthtool/commit/f3c04883d6c43261ff13db1f52d03a283be06871 --- .coveragerc | 5 ++++- synth.metadata | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index dd39c8546..0d8e6297d 100644 --- a/.coveragerc +++ b/.coveragerc @@ -17,6 +17,8 @@ # Generated by synthtool. DO NOT EDIT! [run] branch = True +omit = + google/cloud/__init__.py [report] fail_under = 100 @@ -32,4 +34,5 @@ omit = */gapic/*.py */proto/*.py */core/*.py - */site-packages/*.py \ No newline at end of file + */site-packages/*.py + google/cloud/__init__.py diff --git a/synth.metadata b/synth.metadata index fea7c12ef..fa30852f2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4ede77543c77072a2ac9f78353de2de2f8c4c501", - "internalRef": "333125205" + "sha": "3dbeac0d54125b123c8dfd39c774b37473c36944", + "internalRef": "333159182" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d" + "sha": "f3c04883d6c43261ff13db1f52d03a283be06871" } } ], From 1e325d0eabccd1b3b83357b50343d46d66e44aac Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:25:38 -0700 Subject: [PATCH 36/39] chore(python): use BUILD_SPECIFIC_GCLOUD_PROJECT for samples https://github.com/googleapis/python-talent/blob/ef045e8eb348db36d7a2a611e6f26b11530d273b/samples/snippets/noxfile_config.py#L27-L32 `BUILD_SPECIFIC_GCLOUD_PROJECT` is an alternate project used for sample tests that do poorly with concurrent runs on the same project. Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Sep 30 13:06:03 2020 -0600 Source-Repo: googleapis/synthtool Source-Sha: 9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4 Source-Link: https://github.com/googleapis/synthtool/commit/9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4 --- .kokoro/samples/python3.6/common.cfg | 6 ++++++ .kokoro/samples/python3.7/common.cfg | 6 ++++++ .kokoro/samples/python3.8/common.cfg | 6 ++++++ synth.metadata | 6 +++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg index a9d6d48c4..1bfa98c11 100644 --- a/.kokoro/samples/python3.6/common.cfg +++ b/.kokoro/samples/python3.6/common.cfg @@ -13,6 +13,12 @@ env_vars: { value: "py-3.6" } +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-py36" +} + env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-logging/.kokoro/test-samples.sh" diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg index 1f7cc1973..0f8e2c95d 100644 --- a/.kokoro/samples/python3.7/common.cfg +++ b/.kokoro/samples/python3.7/common.cfg @@ -13,6 +13,12 @@ env_vars: { value: "py-3.7" } +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-py37" +} + env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-logging/.kokoro/test-samples.sh" diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg index 9ba81c4b7..6c1d661d2 100644 --- a/.kokoro/samples/python3.8/common.cfg +++ b/.kokoro/samples/python3.8/common.cfg @@ -13,6 +13,12 @@ env_vars: { value: "py-3.8" } +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-py38" +} + env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/python-logging/.kokoro/test-samples.sh" diff --git a/synth.metadata b/synth.metadata index fa30852f2..f2ec255da 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3dbeac0d54125b123c8dfd39c774b37473c36944", - "internalRef": "333159182" + "sha": "c941026e5e3d600817a20e9ab4d4be03dff21a68", + "internalRef": "334645418" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f3c04883d6c43261ff13db1f52d03a283be06871" + "sha": "9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4" } } ], From 3a087b11c03fbeae867f89a90e24e24d0abd8bd9 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:26:56 -0700 Subject: [PATCH 37/39] chore: use python microgenerator rules for logging PiperOrigin-RevId: 336682434 Source-Author: Google APIs Source-Date: Mon Oct 12 09:45:22 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 438e61571a44e1cd58f99cf8a8eb6163d0f0ee39 Source-Link: https://github.com/googleapis/googleapis/commit/438e61571a44e1cd58f99cf8a8eb6163d0f0ee39 --- docs/gapic/v2/api.rst | 4 +- docs/gapic/v2/types.rst | 4 +- .../gapic/config_service_v2_client.py | 992 ++++------ .../gapic/config_service_v2_client_config.py | 126 +- google/cloud/logging_v2/gapic/enums.py | 42 +- .../gapic/logging_service_v2_client.py | 352 ++-- .../gapic/logging_service_v2_client_config.py | 64 +- .../gapic/metrics_service_v2_client.py | 296 +-- .../gapic/metrics_service_v2_client_config.py | 67 +- .../config_service_v2_grpc_transport.py | 135 +- .../logging_service_v2_grpc_transport.py | 32 +- .../metrics_service_v2_grpc_transport.py | 40 +- .../cloud/logging_v2/proto/log_entry_pb2.py | 274 ++- .../logging_v2/proto/log_entry_pb2_grpc.py | 1 - .../logging_v2/proto/logging_config_pb2.py | 1638 +++++------------ .../proto/logging_config_pb2_grpc.py | 478 +---- .../logging_v2/proto/logging_metrics_pb2.py | 326 ++-- .../proto/logging_metrics_pb2_grpc.py | 143 +- google/cloud/logging_v2/proto/logging_pb2.py | 442 +++-- .../logging_v2/proto/logging_pb2_grpc.py | 146 +- synth.metadata | 34 +- .../v2/test_config_service_v2_client_v2.py | 379 ++-- .../v2/test_logging_service_v2_client_v2.py | 64 +- .../v2/test_metrics_service_v2_client_v2.py | 166 +- 24 files changed, 2105 insertions(+), 4140 deletions(-) diff --git a/docs/gapic/v2/api.rst b/docs/gapic/v2/api.rst index f54ac1620..2dc6bf6fc 100644 --- a/docs/gapic/v2/api.rst +++ b/docs/gapic/v2/api.rst @@ -1,5 +1,5 @@ -Client for Cloud Logging API -============================ +Client for Stackdriver Logging API +================================== .. automodule:: google.cloud.logging_v2 :members: diff --git a/docs/gapic/v2/types.rst b/docs/gapic/v2/types.rst index 1060f7bc8..5521d4f9b 100644 --- a/docs/gapic/v2/types.rst +++ b/docs/gapic/v2/types.rst @@ -1,5 +1,5 @@ -Types for Cloud Logging API Client -================================== +Types for Stackdriver Logging API Client +======================================== .. automodule:: google.cloud.logging_v2.types :members: \ No newline at end of file diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client.py b/google/cloud/logging_v2/gapic/config_service_v2_client.py index e77426f1f..d3d08370e 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -76,28 +76,38 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_account_path(cls, billing_account): - """Return a fully-qualified billing_account string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) @classmethod - def billing_account_location_path(cls, billing_account, location): - """Return a fully-qualified billing_account_location string.""" + def billing_exclusion_path(cls, billing_account, exclusion): + """Return a fully-qualified billing_exclusion string.""" return google.api_core.path_template.expand( - "billingAccounts/{billing_account}/locations/{location}", + "billingAccounts/{billing_account}/exclusions/{exclusion}", billing_account=billing_account, - location=location, + exclusion=exclusion, + ) + + @classmethod + def billing_sink_path(cls, billing_account, sink): + """Return a fully-qualified billing_sink string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}/sinks/{sink}", + billing_account=billing_account, + sink=sink, ) @classmethod - def cmek_settings_path(cls, project): - """Return a fully-qualified cmek_settings string.""" + def exclusion_path(cls, project, exclusion): + """Return a fully-qualified exclusion string.""" return google.api_core.path_template.expand( - "projects/{project}/cmekSettings", + "projects/{project}/exclusions/{exclusion}", project=project, + exclusion=exclusion, ) @classmethod @@ -109,48 +119,20 @@ def folder_path(cls, folder): ) @classmethod - def folder_location_path(cls, folder, location): - """Return a fully-qualified folder_location string.""" + def folder_exclusion_path(cls, folder, exclusion): + """Return a fully-qualified folder_exclusion string.""" return google.api_core.path_template.expand( - "folders/{folder}/locations/{location}", + "folders/{folder}/exclusions/{exclusion}", folder=folder, - location=location, - ) - - @classmethod - def location_path(cls, project, location): - """Return a fully-qualified location string.""" - return google.api_core.path_template.expand( - "projects/{project}/locations/{location}", - project=project, - location=location, - ) - - @classmethod - def log_bucket_path(cls, project, location, bucket): - """Return a fully-qualified log_bucket string.""" - return google.api_core.path_template.expand( - "projects/{project}/locations/{location}/buckets/{bucket}", - project=project, - location=location, - bucket=bucket, - ) - - @classmethod - def log_exclusion_path(cls, project, exclusion): - """Return a fully-qualified log_exclusion string.""" - return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", - project=project, exclusion=exclusion, ) @classmethod - def log_sink_path(cls, project, sink): - """Return a fully-qualified log_sink string.""" + def folder_sink_path(cls, folder, sink): + """Return a fully-qualified folder_sink string.""" return google.api_core.path_template.expand( - "projects/{project}/sinks/{sink}", - project=project, + "folders/{folder}/sinks/{sink}", + folder=folder, sink=sink, ) @@ -163,12 +145,21 @@ def organization_path(cls, organization): ) @classmethod - def organization_location_path(cls, organization, location): - """Return a fully-qualified organization_location string.""" + def organization_exclusion_path(cls, organization, exclusion): + """Return a fully-qualified organization_exclusion string.""" return google.api_core.path_template.expand( - "organizations/{organization}/locations/{location}", + "organizations/{organization}/exclusions/{exclusion}", organization=organization, - location=location, + exclusion=exclusion, + ) + + @classmethod + def organization_sink_path(cls, organization, sink): + """Return a fully-qualified organization_sink string.""" + return google.api_core.path_template.expand( + "organizations/{organization}/sinks/{sink}", + organization=organization, + sink=sink, ) @classmethod @@ -179,6 +170,15 @@ def project_path(cls, project): project=project, ) + @classmethod + def sink_path(cls, project, sink): + """Return a fully-qualified sink string.""" + return google.api_core.path_template.expand( + "projects/{project}/sinks/{sink}", + project=project, + sink=sink, + ) + def __init__( self, transport=None, @@ -296,293 +296,7 @@ def __init__( self._inner_api_calls = {} # Service calls - def delete_sink( - self, - sink_name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' - >>> - >>> client.delete_sink(sink_name) - - Args: - sink_name (str): Required. The full resource name of the sink to delete, including - the parent resource and the sink identifier: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" - - Example: ``"projects/my-project-id/sinks/my-sink-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_sink" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_sink, - default_retry=self._method_configs["DeleteSink"].retry, - default_timeout=self._method_configs["DeleteSink"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteSinkRequest( - sink_name=sink_name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("sink_name", sink_name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_sink( - self, - sink_name, - sink, - unique_writer_identity=None, - update_mask=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} - >>> - >>> response = client.update_sink(sink_name, sink) - - Args: - sink_name (str): Required. The full resource name of the sink to update, including - the parent resource and the sink identifier: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" - - Example: ``"projects/my-project-id/sinks/my-sink-id"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that - appears as part of ``sink_name``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When - updating a sink, the effect of this field on the value of - ``writer_identity`` in the updated sink depends on both the old and new - values of this field: - - - If the old and new values of this field are both false or both true, - then there is no change to the sink's ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service account. - - It is an error if the old value is true and the new value is set to - false or defaulted to false. - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need - an update. A sink field will be overwritten if, and only if, it is in - the update mask. ``name`` and output only fields cannot be updated. - - An empty updateMask is temporarily treated as using the following mask - for backwards compatibility purposes: destination,filter,includeChildren - At some point in the future, behavior will be removed and specifying an - empty updateMask will be an error. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - - Example: ``updateMask=filter``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` 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 "update_sink" not in self._inner_api_calls: - self._inner_api_calls[ - "update_sink" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_sink, - default_retry=self._method_configs["UpdateSink"].retry, - default_timeout=self._method_configs["UpdateSink"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, - sink=sink, - unique_writer_identity=unique_writer_identity, - update_mask=update_mask, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("sink_name", sink_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["update_sink"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def delete_exclusion( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Deletes an exclusion. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> client.delete_exclusion(name) - - Args: - name (str): Required. The resource name of an existing exclusion to delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - - Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. - retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will - be retried using a default configuration. - timeout (Optional[float]): The amount of time, in seconds, to wait - for the request to complete. Note that if ``retry`` is - specified, the timeout applies to each individual attempt. - metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata - that is provided to the method. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - google.api_core.exceptions.RetryError: If the request failed due - to a retryable error and retry attempts failed. - ValueError: If the parameters are invalid. - """ - # Wrap the transport method to add retry and timeout logic. - if "delete_exclusion" not in self._inner_api_calls: - self._inner_api_calls[ - "delete_exclusion" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_exclusion, - default_retry=self._method_configs["DeleteExclusion"].retry, - default_timeout=self._method_configs["DeleteExclusion"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.DeleteExclusionRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - self._inner_api_calls["delete_exclusion"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def list_buckets( + def list_sinks( self, parent, page_size=None, @@ -591,17 +305,17 @@ def list_buckets( metadata=None, ): """ - Lists buckets (Beta). + Lists sinks. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> parent = client.organization_location_path('[ORGANIZATION]', '[LOCATION]') + >>> parent = client.project_path('[PROJECT]') >>> >>> # Iterate over all results - >>> for element in client.list_buckets(parent): + >>> for element in client.list_sinks(parent): ... # process element ... pass >>> @@ -609,24 +323,20 @@ def list_buckets( >>> # Alternatively: >>> >>> # Iterate over results one page at a time - >>> for page in client.list_buckets(parent).pages: + >>> for page in client.list_sinks(parent).pages: ... for element in page: ... # process element ... pass Args: - parent (str): Required. The parent resource whose buckets are to be listed: + parent (str): Required. The parent resource whose sinks are to be listed: :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be specified, but - supplying the character ``-`` in place of [LOCATION_ID] will return all - buckets. + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -643,7 +353,7 @@ def list_buckets( Returns: A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogBucket` instances. + An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. You can also iterate over the pages of the response using its `pages` property. @@ -655,17 +365,17 @@ def list_buckets( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_buckets" not in self._inner_api_calls: + if "list_sinks" not in self._inner_api_calls: self._inner_api_calls[ - "list_buckets" + "list_sinks" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_buckets, - default_retry=self._method_configs["ListBuckets"].retry, - default_timeout=self._method_configs["ListBuckets"].timeout, + self.transport.list_sinks, + default_retry=self._method_configs["ListSinks"].retry, + default_timeout=self._method_configs["ListSinks"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.ListBucketsRequest( + request = logging_config_pb2.ListSinksRequest( parent=parent, page_size=page_size, ) @@ -685,168 +395,48 @@ def list_buckets( iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._inner_api_calls["list_buckets"], + self._inner_api_calls["list_sinks"], retry=retry, timeout=timeout, metadata=metadata, ), request=request, - items_field="buckets", + items_field="sinks", request_token_field="page_token", response_token_field="next_page_token", ) return iterator - def get_bucket( - self, - name, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Gets a bucket (Beta). - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.ConfigServiceV2Client() - >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> response = client.get_bucket(name) - - Args: - name (str): Required. The resource name of the bucket: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - - Example: - ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. - 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.logging_v2.types.LogBucket` 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 "get_bucket" not in self._inner_api_calls: - self._inner_api_calls[ - "get_bucket" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_bucket, - default_retry=self._method_configs["GetBucket"].retry, - default_timeout=self._method_configs["GetBucket"].timeout, - client_info=self._client_info, - ) - - request = logging_config_pb2.GetBucketRequest( - name=name, - ) - if metadata is None: - metadata = [] - metadata = list(metadata) - try: - routing_header = [("name", name)] - except AttributeError: - pass - else: - routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( - routing_header - ) - metadata.append(routing_metadata) - - return self._inner_api_calls["get_bucket"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - - def update_bucket( + def get_sink( self, - name, - bucket, - update_mask, + sink_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: ``retention_period`` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, - FAILED_PRECONDITION will be returned. - - A buckets region may not be modified after it is created. This method is - in Beta. + Gets a sink. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> # TODO: Initialize `bucket`: - >>> bucket = {} - >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_bucket(name, bucket, update_mask) + >>> response = client.get_sink(sink_name) Args: - name (str): Required. The full resource name of the bucket to update. + sink_name (str): Required. The resource name of the sink: :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - - Example: - ``"projects/my-project-id/locations/my-location/buckets/my-bucket-id"``. - Also requires permission "resourcemanager.projects.updateLiens" to set - the locked property - bucket (Union[dict, ~google.cloud.logging_v2.types.LogBucket]): Required. The updated bucket. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogBucket` - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. Field mask that specifies the fields in ``bucket`` that - need an update. A bucket field will be overwritten if, and only if, it - is in the update mask. ``name`` and output only fields cannot be - updated. - - For a detailed ``FieldMask`` definition, see - https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" - Example: ``updateMask=retention_days``. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.FieldMask` + Example: ``"projects/my-project-id/sinks/my-sink-id"``. 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. @@ -857,7 +447,7 @@ def update_bucket( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogBucket` instance. + A :class:`~google.cloud.logging_v2.types.LogSink` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -867,26 +457,24 @@ def update_bucket( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_bucket" not in self._inner_api_calls: + if "get_sink" not in self._inner_api_calls: self._inner_api_calls[ - "update_bucket" + "get_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_bucket, - default_retry=self._method_configs["UpdateBucket"].retry, - default_timeout=self._method_configs["UpdateBucket"].timeout, + self.transport.get_sink, + default_retry=self._method_configs["GetSink"].retry, + default_timeout=self._method_configs["GetSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.UpdateBucketRequest( - name=name, - bucket=bucket, - update_mask=update_mask, + request = logging_config_pb2.GetSinkRequest( + sink_name=sink_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("name", name)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: @@ -895,20 +483,24 @@ def update_bucket( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_bucket"]( + return self._inner_api_calls["get_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_sinks( + def create_sink( self, parent, - page_size=None, + sink, + unique_writer_identity=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists sinks. + Creates a sink that exports specified log entries to a destination. The + export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Example: >>> from google.cloud import logging_v2 @@ -917,34 +509,39 @@ def list_sinks( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # Iterate over all results - >>> for element in client.list_sinks(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> # TODO: Initialize `sink`: + >>> sink = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_sinks(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.create_sink(parent, sink) Args: - parent (str): Required. The parent resource whose sinks are to be listed: + parent (str): Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + + Examples: ``"projects/my-logging-project"``, + ``"organizations/123456789"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink identifier + that is not already in use. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as + ``writer_identity`` in the new sink. If this value is omitted or set to + false, and if the sink's parent is a project, then the value returned as + ``writer_identity`` is the same group or service account used by Logging + before the addition of writer identities to this API. The sink's + destination must be in the same project as the sink itself. + + If this field is set to true, or if the sink is owned by a non-project + resource such as an organization, then the value of ``writer_identity`` + will be a unique service account used only for exports from the new + sink. For more information, see ``writer_identity`` in ``LogSink``. 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. @@ -955,10 +552,7 @@ def list_sinks( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogSink` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogSink` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -968,19 +562,20 @@ def list_sinks( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_sinks" not in self._inner_api_calls: + if "create_sink" not in self._inner_api_calls: self._inner_api_calls[ - "list_sinks" + "create_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_sinks, - default_retry=self._method_configs["ListSinks"].retry, - default_timeout=self._method_configs["ListSinks"].timeout, + self.transport.create_sink, + default_retry=self._method_configs["CreateSink"].retry, + default_timeout=self._method_configs["CreateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.ListSinksRequest( + request = logging_config_pb2.CreateSinkRequest( parent=parent, - page_size=page_size, + sink=sink, + unique_writer_identity=unique_writer_identity, ) if metadata is None: metadata = [] @@ -995,52 +590,84 @@ def list_sinks( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_sinks"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="sinks", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["create_sink"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_sink( + def update_sink( self, sink_name, + sink, + unique_writer_identity=None, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Gets a sink. + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `sink_name`: - >>> sink_name = '' + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> response = client.get_sink(sink_name) + >>> # TODO: Initialize `sink`: + >>> sink = {} + >>> + >>> response = client.update_sink(sink_name, sink) Args: - sink_name (str): Required. The resource name of the sink: + sink_name (str): Required. The full resource name of the sink to update, including the + parent resource and the sink identifier: :: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: ``"projects/my-project-id/sinks/my-sink-id"``. + sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The updated sink, whose name is the same identifier that + appears as part of ``sink_name``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogSink` + unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When + updating a sink, the effect of this field on the value of + ``writer_identity`` in the updated sink depends on both the old and new + values of this field: + + - If the old and new values of this field are both false or both true, + then there is no change to the sink's ``writer_identity``. + - If the old value is false and the new value is true, then + ``writer_identity`` is changed to a unique service account. + - It is an error if the old value is true and the new value is set to + false or defaulted to false. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Optional. Field mask that specifies the fields in ``sink`` that need an + update. A sink field will be overwritten if, and only if, it is in the + update mask. ``name`` and output only fields cannot be updated. + + An empty updateMask is temporarily treated as using the following mask + for backwards compatibility purposes: destination,filter,includeChildren + At some point in the future, behavior will be removed and specifying an + empty updateMask will be an error. + + For a detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + + Example: ``updateMask=filter``. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1061,18 +688,21 @@ def get_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_sink" not in self._inner_api_calls: + if "update_sink" not in self._inner_api_calls: self._inner_api_calls[ - "get_sink" + "update_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_sink, - default_retry=self._method_configs["GetSink"].retry, - default_timeout=self._method_configs["GetSink"].timeout, + self.transport.update_sink, + default_retry=self._method_configs["UpdateSink"].retry, + default_timeout=self._method_configs["UpdateSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.GetSinkRequest( + request = logging_config_pb2.UpdateSinkRequest( sink_name=sink_name, + sink=sink, + unique_writer_identity=unique_writer_identity, + update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1087,65 +717,42 @@ def get_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_sink"]( + return self._inner_api_calls["update_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_sink( + def delete_sink( self, - parent, - sink, - unique_writer_identity=None, + sink_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a sink that exports specified log entries to a destination. - The export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Deletes a sink. If the sink has a unique ``writer_identity``, then that + service account is also deleted. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `sink`: - >>> sink = {} + >>> sink_name = client.sink_path('[PROJECT]', '[SINK]') >>> - >>> response = client.create_sink(parent, sink) + >>> client.delete_sink(sink_name) Args: - parent (str): Required. The resource in which to create the sink: + sink_name (str): Required. The full resource name of the sink to delete, including the + parent resource and the sink identifier: :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Examples: ``"projects/my-logging-project"``, - ``"organizations/123456789"``. - sink (Union[dict, ~google.cloud.logging_v2.types.LogSink]): Required. The new sink, whose ``name`` parameter is a sink - identifier that is not already in use. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is omitted or set to - false, and if the sink's parent is a project, then the value returned as - ``writer_identity`` is the same group or service account used by Logging - before the addition of writer identities to this API. The sink's - destination must be in the same project as the sink itself. + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" - If this field is set to true, or if the sink is owned by a non-project - resource such as an organization, then the value of ``writer_identity`` - will be a unique service account used only for exports from the new - sink. For more information, see ``writer_identity`` in ``LogSink``. + Example: ``"projects/my-project-id/sinks/my-sink-id"``. 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. @@ -1155,9 +762,6 @@ def create_sink( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogSink` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -1166,26 +770,24 @@ def create_sink( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_sink" not in self._inner_api_calls: + if "delete_sink" not in self._inner_api_calls: self._inner_api_calls[ - "create_sink" + "delete_sink" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_sink, - default_retry=self._method_configs["CreateSink"].retry, - default_timeout=self._method_configs["CreateSink"].timeout, + self.transport.delete_sink, + default_retry=self._method_configs["DeleteSink"].retry, + default_timeout=self._method_configs["DeleteSink"].timeout, client_info=self._client_info, ) - request = logging_config_pb2.CreateSinkRequest( - parent=parent, - sink=sink, - unique_writer_identity=unique_writer_identity, + request = logging_config_pb2.DeleteSinkRequest( + sink_name=sink_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("sink_name", sink_name)] except AttributeError: pass else: @@ -1194,7 +796,7 @@ def create_sink( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_sink"]( + self._inner_api_calls["delete_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -1235,10 +837,10 @@ def list_exclusions( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 @@ -1324,8 +926,7 @@ def get_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') >>> >>> response = client.get_exclusion(name) @@ -1334,10 +935,10 @@ def get_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1420,15 +1021,15 @@ def create_exclusion( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging-project"``, ``"organizations/123456789"``. - exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an - exclusion name that is not already used in the parent resource. + exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. The new exclusion, whose ``name`` parameter is an exclusion + name that is not already used in the parent resource. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogExclusion` @@ -1500,8 +1101,7 @@ def update_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') >>> >>> # TODO: Initialize `exclusion`: >>> exclusion = {} @@ -1516,10 +1116,10 @@ def update_exclusion( :: - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. exclusion (Union[dict, ~google.cloud.logging_v2.types.LogExclusion]): Required. New values for the existing exclusion. Only the fields @@ -1590,12 +1190,89 @@ def update_exclusion( request, retry=retry, timeout=timeout, metadata=metadata ) - def get_cmek_settings( + def delete_exclusion( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, + ): + """ + Deletes an exclusion. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.ConfigServiceV2Client() + >>> + >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> + >>> client.delete_exclusion(name) + + Args: + name (str): Required. The resource name of an existing exclusion to delete: + + :: + + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + + Example: ``"projects/my-project-id/exclusions/my-exclusion-id"``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_exclusion" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_exclusion" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_exclusion, + default_retry=self._method_configs["DeleteExclusion"].retry, + default_timeout=self._method_configs["DeleteExclusion"].timeout, + client_info=self._client_info, + ) + + request = logging_config_pb2.DeleteExclusionRequest( + name=name, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + self._inner_api_calls["delete_exclusion"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_cmek_settings( + self, + name=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, ): """ Gets the Logs Router CMEK settings for the given resource. @@ -1613,20 +1290,17 @@ def get_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> response = client.get_cmek_settings(name) + >>> response = client.get_cmek_settings() Args: name (str): Required. The resource for which to retrieve CMEK settings. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. @@ -1685,8 +1359,8 @@ def get_cmek_settings( def update_cmek_settings( self, - name, - cmek_settings, + name=None, + cmek_settings=None, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, @@ -1702,7 +1376,9 @@ def update_cmek_settings( ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or 3) access to the key is disabled. + key, or + + 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ @@ -1713,23 +1389,17 @@ def update_cmek_settings( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> # TODO: Initialize `name`: - >>> name = '' - >>> - >>> # TODO: Initialize `cmek_settings`: - >>> cmek_settings = {} - >>> - >>> response = client.update_cmek_settings(name, cmek_settings) + >>> response = client.update_cmek_settings() Args: name (str): Required. The resource name for the CMEK settings to update. :: - "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "projects/[PROJECT_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" Example: ``"organizations/12345/cmekSettings"``. diff --git a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py index 2edc1e079..00c7146e2 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client_config.py @@ -2,118 +2,90 @@ "interfaces": { "google.logging.v2.ConfigServiceV2": { "retry_codes": { - "no_retry_2_codes": [], - "no_retry_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], }, "retry_params": { - "retry_policy_3_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, + "write_sink": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, }, "methods": { - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "UpdateSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", - }, - "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, - "UpdateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", - }, "ListSinks": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetSink": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "CreateSink": { "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "UpdateSink": { + "timeout_millis": 120000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "ListExclusions": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetExclusion": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "CreateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, "UpdateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "GetCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", + "retry_codes_name": "idempotent2", + "retry_params_name": "default", }, "UpdateCmekSettings": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/enums.py b/google/cloud/logging_v2/gapic/enums.py index 159669d6e..ee1a098a5 100644 --- a/google/cloud/logging_v2/gapic/enums.py +++ b/google/cloud/logging_v2/gapic/enums.py @@ -26,8 +26,6 @@ class LaunchStage(enum.IntEnum): Attributes: LAUNCH_STAGE_UNSPECIFIED (int): Do not use this default value. - UNIMPLEMENTED (int): The feature is not yet implemented. Users can not use it. - PRELAUNCH (int): Prelaunch features are hidden from users and are only visible internally. EARLY_ACCESS (int): Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may @@ -49,16 +47,14 @@ class LaunchStage(enum.IntEnum): limited production use cases. GA (int): GA features are open to all developers and are considered stable and fully qualified for production use. - DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For - more information, see the “Deprecation Policy” section of our `Terms of + DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more + information, see the “Deprecation Policy” section of our `Terms of Service `__ and the `Google Cloud Platform Subject to the Deprecation Policy `__ documentation. """ LAUNCH_STAGE_UNSPECIFIED = 0 - UNIMPLEMENTED = 6 - PRELAUNCH = 7 EARLY_ACCESS = 1 ALPHA = 2 BETA = 3 @@ -66,26 +62,10 @@ class LaunchStage(enum.IntEnum): DEPRECATED = 5 -class LifecycleState(enum.IntEnum): - """ - LogBucket lifecycle states (Beta). - - Attributes: - LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing - unset values. - ACTIVE (int): The normal and active state. - DELETE_REQUESTED (int): The bucket has been marked for deletion by the user. - """ - - LIFECYCLE_STATE_UNSPECIFIED = 0 - ACTIVE = 1 - DELETE_REQUESTED = 2 - - class LogSeverity(enum.IntEnum): """ - The severity of the event described in a log entry, expressed as one - of the standard severity levels listed below. For your reference, the + The severity of the event described in a log entry, expressed as one of + the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined. @@ -95,7 +75,7 @@ class LogSeverity(enum.IntEnum): :: - severity > DEBUG AND severity <= WARNING + severity > DEBUG AND severity <= WARNING If you are writing log entries, you should map other severity encodings to one of these standard levels. For example, you might map all of @@ -129,8 +109,8 @@ class LogSeverity(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value - for the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value for + the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -174,7 +154,9 @@ class ApiVersion(enum.IntEnum): class LogSink(object): class VersionFormat(enum.IntEnum): """ - Deprecated. This is unused. + Available log entry formats. Log entries can be written to + Logging in either format and can be exported in either format. + Version 2 is the preferred format. Attributes: VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2. @@ -214,8 +196,8 @@ class ValueType(enum.IntEnum): Attributes: VALUE_TYPE_UNSPECIFIED (int): Do not use this default value. - BOOL (int): The value is a boolean. This value type can be used only if the - metric kind is ``GAUGE``. + BOOL (int): The value is a boolean. This value type can be used only if the metric + kind is ``GAUGE``. INT64 (int): The value is a signed 64-bit integer. DOUBLE (int): The value is a double precision floating point number. STRING (int): The value is a text string. This value type can be used only if the diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 1882b2b8b..c823deacb 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -80,13 +80,22 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def billing_account_path(cls, billing_account): - """Return a fully-qualified billing_account string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" return google.api_core.path_template.expand( "billingAccounts/{billing_account}", billing_account=billing_account, ) + @classmethod + def billing_log_path(cls, billing_account, log): + """Return a fully-qualified billing_log string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}/logs/{log}", + billing_account=billing_account, + log=log, + ) + @classmethod def folder_path(cls, folder): """Return a fully-qualified folder string.""" @@ -95,6 +104,15 @@ def folder_path(cls, folder): folder=folder, ) + @classmethod + def folder_log_path(cls, folder, log): + """Return a fully-qualified folder_log string.""" + return google.api_core.path_template.expand( + "folders/{folder}/logs/{log}", + folder=folder, + log=log, + ) + @classmethod def log_path(cls, project, log): """Return a fully-qualified log string.""" @@ -112,6 +130,15 @@ def organization_path(cls, organization): organization=organization, ) + @classmethod + def organization_log_path(cls, organization, log): + """Return a fully-qualified organization_log string.""" + return google.api_core.path_template.expand( + "organizations/{organization}/logs/{log}", + organization=organization, + log=log, + ) + @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -255,8 +282,7 @@ def delete_log( >>> >>> client = logging_v2.LoggingServiceV2Client() >>> - >>> # TODO: Initialize `log_name`: - >>> log_name = '' + >>> log_name = client.log_path('[PROJECT]', '[LOG]') >>> >>> client.delete_log(log_name) @@ -265,10 +291,10 @@ def delete_log( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example, ``"projects/my-project-id/logs/syslog"``, @@ -321,130 +347,6 @@ def delete_log( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_log_entries( - self, - resource_names, - filter_=None, - order_by=None, - page_size=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Example: - >>> from google.cloud import logging_v2 - >>> - >>> client = logging_v2.LoggingServiceV2Client() - >>> - >>> # TODO: Initialize `resource_names`: - >>> resource_names = [] - >>> - >>> # Iterate over all results - >>> for element in client.list_log_entries(resource_names): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: - >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_entries(resource_names).pages: - ... for element in page: - ... # process element - ... pass - - Args: - resource_names (list[str]): Required. Names of one or more parent resources from which to - retrieve log entries: - - :: - - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" - - Projects listed in the ``project_ids`` field are added to this list. - filter_ (str): Optional. A filter that chooses which log entries to return. See - `Advanced Logs - Queries `__. - Only log entries that match the filter are returned. An empty filter - matches all log entries in the resources listed in ``resource_names``. - Referencing a parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum length of the - filter is 20000 characters. - order_by (str): Optional. How the results should be sorted. Presently, the only - permitted values are ``"timestamp asc"`` (default) and - ``"timestamp desc"``. The first option returns entries in order of - increasing values of ``LogEntry.timestamp`` (oldest first), and the - second option returns entries in order of decreasing timestamps (newest - first). Entries with equal timestamps are returned in order of their - ``insert_id`` values. - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. - 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.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. - You can also iterate over the pages of the response - using its `pages` property. - - Raises: - google.api_core.exceptions.GoogleAPICallError: If the request - failed for any reason. - 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 "list_log_entries" not in self._inner_api_calls: - self._inner_api_calls[ - "list_log_entries" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_entries, - default_retry=self._method_configs["ListLogEntries"].retry, - default_timeout=self._method_configs["ListLogEntries"].timeout, - client_info=self._client_info, - ) - - request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names, - filter=filter_, - order_by=order_by, - page_size=page_size, - ) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_entries"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="entries", - request_token_field="page_token", - response_token_field="next_page_token", - ) - return iterator - def write_log_entries( self, entries, @@ -477,8 +379,8 @@ def write_log_entries( >>> response = client.write_log_entries(entries) Args: - entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log - entries in this list does not matter. Values supplied in this method's + entries (list[Union[dict, ~google.cloud.logging_v2.types.LogEntry]]): Required. The log entries to send to Logging. The order of log entries + in this list does not matter. Values supplied in this method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the ``LogEntry`` type. @@ -508,45 +410,46 @@ def write_log_entries( :: - "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" + "projects/[PROJECT_ID]/logs/[LOG_ID]" + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL-encoded. For example: :: - "projects/my-project-id/logs/syslog" - "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" + "projects/my-project-id/logs/syslog" + "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed on each project, + The permission logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new log - entries, whether the resource is specified in ``logName`` or in an + entries, whether the resource is specified in logName or in an individual log entry. - resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to - all log entries in ``entries`` that do not specify a value for - ``resource``. Example: + resource (Union[dict, ~google.cloud.logging_v2.types.MonitoredResource]): Optional. A default monitored resource object that is assigned to all + log entries in ``entries`` that do not specify a value for ``resource``. + Example: :: - { "type": "gce_instance", - "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + { "type": "gce_instance", + "labels": { + "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See ``LogEntry``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.MonitoredResource` - labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of - all log entries in ``entries``. If a log entry already has a label with - the same key as a label in this parameter, then the log entry's label is - not changed. See ``LogEntry``. + labels (dict[str -> str]): Optional. Default labels that are added to the ``labels`` field of all + log entries in ``entries``. If a log entry already has a label with the + same key as a label in this parameter, then the log entry's label is not + changed. See ``LogEntry``. partial_success (bool): Optional. Whether valid entries should be written even if some other - entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any - entry is not written, then the response status is the error associated - with one of the failed entries and the response includes error details - keyed by the entries' zero-based index in the ``entries.write`` method. + entries fail due to INVALID\_ARGUMENT or PERMISSION\_DENIED errors. If + any entry is not written, then the response status is the error + associated with one of the failed entries and the response includes + error details keyed by the entries' zero-based index in the + ``entries.write`` method. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. @@ -592,6 +495,135 @@ def write_log_entries( request, retry=retry, timeout=timeout, metadata=metadata ) + def list_log_entries( + self, + resource_names, + project_ids=None, + filter_=None, + order_by=None, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Example: + >>> from google.cloud import logging_v2 + >>> + >>> client = logging_v2.LoggingServiceV2Client() + >>> + >>> # TODO: Initialize `resource_names`: + >>> resource_names = [] + >>> + >>> # Iterate over all results + >>> for element in client.list_log_entries(resource_names): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_entries(resource_names).pages: + ... for element in page: + ... # process element + ... pass + + Args: + resource_names (list[str]): Required. Names of one or more parent resources from which to retrieve + log entries: + + :: + + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + + Projects listed in the ``project_ids`` field are added to this list. + project_ids (list[str]): Deprecated. Use ``resource_names`` instead. One or more project + identifiers or project numbers from which to retrieve log entries. + Example: ``"my-project-1A"``. + filter_ (str): Optional. A filter that chooses which log entries to return. See + `Advanced Logs + Queries `__. + Only log entries that match the filter are returned. An empty filter + matches all log entries in the resources listed in ``resource_names``. + Referencing a parent resource that is not listed in ``resource_names`` + will cause the filter to return no results. The maximum length of the + filter is 20000 characters. + order_by (str): Optional. How the results should be sorted. Presently, the only + permitted values are ``"timestamp asc"`` (default) and + ``"timestamp desc"``. The first option returns entries in order of + increasing values of ``LogEntry.timestamp`` (oldest first), and the + second option returns entries in order of decreasing timestamps (newest + first). Entries with equal timestamps are returned in order of their + ``insert_id`` values. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + 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.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogEntry` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + 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 "list_log_entries" not in self._inner_api_calls: + self._inner_api_calls[ + "list_log_entries" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_log_entries, + default_retry=self._method_configs["ListLogEntries"].retry, + default_timeout=self._method_configs["ListLogEntries"].timeout, + client_info=self._client_info, + ) + + request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names, + project_ids=project_ids, + filter=filter_, + order_by=order_by, + page_size=page_size, + ) + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_entries"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="entries", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + def list_monitored_resource_descriptors( self, page_size=None, @@ -720,10 +752,10 @@ def list_logs( :: - "projects/[PROJECT_ID]" - "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" 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 diff --git a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py index 6c4e8c8e4..b3da612f6 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py @@ -2,77 +2,59 @@ "interfaces": { "google.logging.v2.LoggingServiceV2": { "retry_codes": { - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], }, "retry_params": { - "retry_policy_1_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, - "retry_policy_2_params": { + "list": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, }, }, "methods": { "DeleteLog": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - }, - "ListLogEntries": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "WriteLogEntries": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", "bundling": { "element_count_threshold": 1000, "request_byte_threshold": 1048576, "delay_threshold_millis": 50, }, }, + "ListLogEntries": { + "timeout_millis": 10000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "ListMonitoredResourceDescriptors": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, "ListLogs": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index c3d1f2f4c..87cf5b89d 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -82,14 +82,38 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def log_metric_path(cls, project, metric): - """Return a fully-qualified log_metric string.""" + def billing_path(cls, billing_account): + """Return a fully-qualified billing string.""" + return google.api_core.path_template.expand( + "billingAccounts/{billing_account}", + billing_account=billing_account, + ) + + @classmethod + def folder_path(cls, folder): + """Return a fully-qualified folder string.""" + return google.api_core.path_template.expand( + "folders/{folder}", + folder=folder, + ) + + @classmethod + def metric_path(cls, project, metric): + """Return a fully-qualified metric string.""" return google.api_core.path_template.expand( "projects/{project}/metrics/{metric}", project=project, metric=metric, ) + @classmethod + def organization_path(cls, organization): + """Return a fully-qualified organization string.""" + return google.api_core.path_template.expand( + "organizations/{organization}", + organization=organization, + ) + @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -215,43 +239,49 @@ def __init__( self._inner_api_calls = {} # Service calls - def update_log_metric( + def list_log_metrics( self, - metric_name, - metric, + parent, + page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates or updates a logs-based metric. + Lists logs-based metrics. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> parent = client.project_path('[PROJECT]') >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> # Iterate over all results + >>> for element in client.list_log_metrics(parent): + ... # process element + ... pass >>> - >>> response = client.update_log_metric(metric_name, metric) + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_log_metrics(parent).pages: + ... for element in page: + ... # process element + ... pass Args: - metric_name (str): Required. The resource name of the metric to update: + parent (str): Required. The name of the project containing the metrics: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - - The updated metric must be provided in the request and it's ``name`` - field must be the same as ``[METRIC_ID]`` If the metric does not exist - in ``[PROJECT_ID]``, then a new metric is created. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]" + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. 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. @@ -262,7 +292,10 @@ def update_log_metric( that is provided to the method. Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -272,25 +305,25 @@ def update_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "update_log_metric" not in self._inner_api_calls: + if "list_log_metrics" not in self._inner_api_calls: self._inner_api_calls[ - "update_log_metric" + "list_log_metrics" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.update_log_metric, - default_retry=self._method_configs["UpdateLogMetric"].retry, - default_timeout=self._method_configs["UpdateLogMetric"].timeout, + self.transport.list_log_metrics, + default_retry=self._method_configs["ListLogMetrics"].retry, + default_timeout=self._method_configs["ListLogMetrics"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, - metric=metric, + request = logging_metrics_pb2.ListLogMetricsRequest( + parent=parent, + page_size=page_size, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("metric_name", metric_name)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -299,11 +332,22 @@ def update_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_log_metric"]( - request, retry=retry, timeout=timeout, metadata=metadata + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_log_metrics"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="metrics", + request_token_field="page_token", + response_token_field="next_page_token", ) + return iterator - def delete_log_metric( + def get_log_metric( self, metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -311,23 +355,23 @@ def delete_log_metric( metadata=None, ): """ - Deletes a logs-based metric. + Gets a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> client.delete_log_metric(metric_name) + >>> response = client.get_log_metric(metric_name) Args: - metric_name (str): Required. The resource name of the metric to delete: + metric_name (str): Required. The resource name of the desired metric: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -337,6 +381,9 @@ def delete_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -345,17 +392,17 @@ def delete_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_log_metric" not in self._inner_api_calls: + if "get_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "delete_log_metric" + "get_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_log_metric, - default_retry=self._method_configs["DeleteLogMetric"].retry, - default_timeout=self._method_configs["DeleteLogMetric"].timeout, + self.transport.get_log_metric, + default_retry=self._method_configs["GetLogMetric"].retry, + default_timeout=self._method_configs["GetLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.DeleteLogMetricRequest( + request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name, ) if metadata is None: @@ -371,20 +418,20 @@ def delete_log_metric( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_log_metric"]( + return self._inner_api_calls["get_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def list_log_metrics( + def create_log_metric( self, parent, - page_size=None, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Lists logs-based metrics. + Creates a logs-based metric. Example: >>> from google.cloud import logging_v2 @@ -393,31 +440,25 @@ def list_log_metrics( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> # Iterate over all results - >>> for element in client.list_log_metrics(parent): - ... # process element - ... pass - >>> - >>> - >>> # Alternatively: + >>> # TODO: Initialize `metric`: + >>> metric = {} >>> - >>> # Iterate over results one page at a time - >>> for page in client.list_log_metrics(parent).pages: - ... for element in page: - ... # process element - ... pass + >>> response = client.create_log_metric(parent, metric) Args: - parent (str): Required. The name of the project containing the metrics: + parent (str): Required. The resource name of the project in which to create the + metric: :: - "projects/[PROJECT_ID]" - page_size (int): The maximum number of resources contained in the - underlying API response. If page streaming is performed per- - resource, this parameter does not affect the return value. If page - streaming is performed per-page, this determines the maximum number - of resources in a page. + "projects/[PROJECT_ID]" + + The new metric must be provided in the request. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that + already exists. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -428,10 +469,7 @@ def list_log_metrics( that is provided to the method. Returns: - A :class:`~google.api_core.page_iterator.PageIterator` instance. - An iterable of :class:`~google.cloud.logging_v2.types.LogMetric` instances. - You can also iterate over the pages of the response - using its `pages` property. + A :class:`~google.cloud.logging_v2.types.LogMetric` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -441,19 +479,19 @@ def list_log_metrics( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "list_log_metrics" not in self._inner_api_calls: + if "create_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "list_log_metrics" + "create_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.list_log_metrics, - default_retry=self._method_configs["ListLogMetrics"].retry, - default_timeout=self._method_configs["ListLogMetrics"].timeout, + self.transport.create_log_metric, + default_retry=self._method_configs["CreateLogMetric"].retry, + default_timeout=self._method_configs["CreateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.ListLogMetricsRequest( + request = logging_metrics_pb2.CreateLogMetricRequest( parent=parent, - page_size=page_size, + metric=metric, ) if metadata is None: metadata = [] @@ -468,46 +506,47 @@ def list_log_metrics( ) metadata.append(routing_metadata) - iterator = google.api_core.page_iterator.GRPCIterator( - client=None, - method=functools.partial( - self._inner_api_calls["list_log_metrics"], - retry=retry, - timeout=timeout, - metadata=metadata, - ), - request=request, - items_field="metrics", - request_token_field="page_token", - response_token_field="next_page_token", + return self._inner_api_calls["create_log_metric"]( + request, retry=retry, timeout=timeout, metadata=metadata ) - return iterator - def get_log_metric( + def update_log_metric( self, metric_name, + metric, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Gets a logs-based metric. + Creates or updates a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> metric_name = client.log_metric_path('[PROJECT]', '[METRIC]') + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.get_log_metric(metric_name) + >>> # TODO: Initialize `metric`: + >>> metric = {} + >>> + >>> response = client.update_log_metric(metric_name, metric) Args: - metric_name (str): Required. The resource name of the desired metric: + metric_name (str): Required. The resource name of the metric to update: :: - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + + The updated metric must be provided in the request and it's ``name`` + field must be the same as ``[METRIC_ID]`` If the metric does not exist + in ``[PROJECT_ID]``, then a new metric is created. + metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The updated metric. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.logging_v2.types.LogMetric` 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. @@ -528,18 +567,19 @@ def get_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_log_metric" not in self._inner_api_calls: + if "update_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "get_log_metric" + "update_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_log_metric, - default_retry=self._method_configs["GetLogMetric"].retry, - default_timeout=self._method_configs["GetLogMetric"].timeout, + self.transport.update_log_metric, + default_retry=self._method_configs["UpdateLogMetric"].retry, + default_timeout=self._method_configs["UpdateLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.GetLogMetricRequest( + request = logging_metrics_pb2.UpdateLogMetricRequest( metric_name=metric_name, + metric=metric, ) if metadata is None: metadata = [] @@ -554,47 +594,35 @@ def get_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_log_metric"]( + return self._inner_api_calls["update_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def create_log_metric( + def delete_log_metric( self, - parent, - metric, + metric_name, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates a logs-based metric. + Deletes a logs-based metric. Example: >>> from google.cloud import logging_v2 >>> >>> client = logging_v2.MetricsServiceV2Client() >>> - >>> parent = client.project_path('[PROJECT]') - >>> - >>> # TODO: Initialize `metric`: - >>> metric = {} + >>> metric_name = client.metric_path('[PROJECT]', '[METRIC]') >>> - >>> response = client.create_log_metric(parent, metric) + >>> client.delete_log_metric(metric_name) Args: - parent (str): Required. The resource name of the project in which to create the - metric: + metric_name (str): Required. The resource name of the metric to delete: :: - "projects/[PROJECT_ID]" - - The new metric must be provided in the request. - metric (Union[dict, ~google.cloud.logging_v2.types.LogMetric]): Required. The new logs-based metric, which must not have an identifier that - already exists. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.logging_v2.types.LogMetric` + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" 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. @@ -604,9 +632,6 @@ def create_log_metric( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.logging_v2.types.LogMetric` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -615,25 +640,24 @@ def create_log_metric( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "create_log_metric" not in self._inner_api_calls: + if "delete_log_metric" not in self._inner_api_calls: self._inner_api_calls[ - "create_log_metric" + "delete_log_metric" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.create_log_metric, - default_retry=self._method_configs["CreateLogMetric"].retry, - default_timeout=self._method_configs["CreateLogMetric"].timeout, + self.transport.delete_log_metric, + default_retry=self._method_configs["DeleteLogMetric"].retry, + default_timeout=self._method_configs["DeleteLogMetric"].timeout, client_info=self._client_info, ) - request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, - metric=metric, + request = logging_metrics_pb2.DeleteLogMetricRequest( + metric_name=metric_name, ) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("metric_name", metric_name)] except AttributeError: pass else: @@ -642,6 +666,6 @@ def create_log_metric( ) metadata.append(routing_metadata) - return self._inner_api_calls["create_log_metric"]( + self._inner_api_calls["delete_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py index d4bc0e960..133abec23 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py @@ -2,68 +2,45 @@ "interfaces": { "google.logging.v2.MetricsServiceV2": { "retry_codes": { - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE", - ], - "no_retry_codes": [], - "no_retry_1_codes": [], + "idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"], + "non_idempotent": [], }, "retry_params": { - "retry_policy_4_params": { + "default": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 20000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0, - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000, - }, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, + } }, "methods": { - "UpdateLogMetric": { + "ListLogMetrics": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "DeleteLogMetric": { + "GetLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "ListLogMetrics": { + "CreateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", }, - "GetLogMetric": { + "UpdateLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, - "CreateLogMetric": { + "DeleteLogMetric": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params", + "retry_codes_name": "idempotent", + "retry_params_name": "default", }, }, } diff --git a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 3cb7e0870..f3132ede0 100644 --- a/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -116,140 +116,78 @@ def channel(self): return self._channel @property - def delete_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - - Deletes a sink. If the sink has a unique ``writer_identity``, then - that service account is also deleted. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteSink - - @property - def update_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, and - ``filter``. - - The updated sink might also have a new ``writer_identity``; see the - ``unique_writer_identity`` field. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].UpdateSink - - @property - def delete_exclusion(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. - - Deletes an exclusion. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].DeleteExclusion - - @property - def list_buckets(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_buckets`. + def list_sinks(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. - Lists buckets (Beta). + Lists sinks. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].ListBuckets + return self._stubs["config_service_v2_stub"].ListSinks @property - def get_bucket(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_bucket`. + def get_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. - Gets a bucket (Beta). + Gets a sink. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetBucket + return self._stubs["config_service_v2_stub"].GetSink @property - def update_bucket(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_bucket`. - - Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: ``retention_period`` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, - FAILED_PRECONDITION will be returned. + def create_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. - A buckets region may not be modified after it is created. This method is - in Beta. + Creates a sink that exports specified log entries to a destination. The + export of newly-ingested log entries begins immediately, unless the + sink's ``writer_identity`` is not permitted to write to the destination. + A sink can export log entries only from the resource owning the sink. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].UpdateBucket + return self._stubs["config_service_v2_stub"].CreateSink @property - def list_sinks(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.list_sinks`. - - Lists sinks. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["config_service_v2_stub"].ListSinks + def update_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.update_sink`. - @property - def get_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_sink`. + Updates a sink. This method replaces the following fields in the + existing sink with values from the new sink: ``destination``, and + ``filter``. - Gets a sink. + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].GetSink + return self._stubs["config_service_v2_stub"].UpdateSink @property - def create_sink(self): - """Return the gRPC stub for :meth:`ConfigServiceV2Client.create_sink`. + def delete_sink(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_sink`. - Creates a sink that exports specified log entries to a destination. - The export of newly-ingested log entries begins immediately, unless the - sink's ``writer_identity`` is not permitted to write to the destination. - A sink can export log entries only from the resource owning the sink. + Deletes a sink. If the sink has a unique ``writer_identity``, then that + service account is also deleted. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["config_service_v2_stub"].CreateSink + return self._stubs["config_service_v2_stub"].DeleteSink @property def list_exclusions(self): @@ -305,6 +243,19 @@ def update_exclusion(self): """ return self._stubs["config_service_v2_stub"].UpdateExclusion + @property + def delete_exclusion(self): + """Return the gRPC stub for :meth:`ConfigServiceV2Client.delete_exclusion`. + + Deletes an exclusion. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["config_service_v2_stub"].DeleteExclusion + @property def get_cmek_settings(self): """Return the gRPC stub for :meth:`ConfigServiceV2Client.get_cmek_settings`. @@ -339,7 +290,9 @@ def update_cmek_settings(self): ``UpdateCmekSettings`` will fail if 1) ``kms_key_name`` is invalid, or 2) the associated service account does not have the required ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for the - key, or 3) access to the key is disabled. + key, or + + 3) access to the key is disabled. See `Enabling CMEK for Logs Router `__ diff --git a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index 07ca0603f..4cf843caf 100644 --- a/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -129,22 +129,6 @@ def delete_log(self): """ return self._stubs["logging_service_v2_stub"].DeleteLog - @property - def list_log_entries(self): - """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. - - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. For ways - to export log entries, see `Exporting - Logs `__. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["logging_service_v2_stub"].ListLogEntries - @property def write_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.write_log_entries`. @@ -164,6 +148,22 @@ def write_log_entries(self): """ return self._stubs["logging_service_v2_stub"].WriteLogEntries + @property + def list_log_entries(self): + """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. + + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting + Logs `__. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["logging_service_v2_stub"].ListLogEntries + @property def list_monitored_resource_descriptors(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_monitored_resource_descriptors`. diff --git a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py index f1d75af56..605bc118e 100644 --- a/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py +++ b/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py @@ -116,66 +116,66 @@ def channel(self): return self._channel @property - def update_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. + def list_log_metrics(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. - Creates or updates a logs-based metric. + Lists logs-based metrics. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].UpdateLogMetric + return self._stubs["metrics_service_v2_stub"].ListLogMetrics @property - def delete_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. + def get_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. - Deletes a logs-based metric. + Gets a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].DeleteLogMetric + return self._stubs["metrics_service_v2_stub"].GetLogMetric @property - def list_log_metrics(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.list_log_metrics`. + def create_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. - Lists logs-based metrics. + Creates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].ListLogMetrics + return self._stubs["metrics_service_v2_stub"].CreateLogMetric @property - def get_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.get_log_metric`. + def update_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.update_log_metric`. - Gets a logs-based metric. + Creates or updates a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].GetLogMetric + return self._stubs["metrics_service_v2_stub"].UpdateLogMetric @property - def create_log_metric(self): - """Return the gRPC stub for :meth:`MetricsServiceV2Client.create_log_metric`. + def delete_log_metric(self): + """Return the gRPC stub for :meth:`MetricsServiceV2Client.delete_log_metric`. - Creates a logs-based metric. + Deletes a logs-based metric. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["metrics_service_v2_stub"].CreateLogMetric + return self._stubs["metrics_service_v2_stub"].DeleteLogMetric diff --git a/google/cloud/logging_v2/proto/log_entry_pb2.py b/google/cloud/logging_v2/proto/log_entry_pb2.py index bd5c29b01..9b0ef2205 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -12,7 +15,6 @@ _sym_db = _symbol_database.Default() -from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import ( monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, ) @@ -34,11 +36,13 @@ name="google/cloud/logging_v2/proto/log_entry.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xd2\x07\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xb6\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\rLogEntryProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n-google/cloud/logging_v2/proto/log_entry.proto\x12\x11google.logging.v2\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"\xce\x07\n\x08LogEntry\x12\x10\n\x08log_name\x18\x0c \x01(\t\x12/\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12-\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverity\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x36\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequest\x12\x37\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntry\x12;\n\x08metadata\x18\x19 \x01(\x0b\x32%.google.api.MonitoredResourceMetadataB\x02\x18\x01\x12\x37\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperation\x12\r\n\x05trace\x18\x16 \x01(\t\x12\x0f\n\x07span_id\x18\x1b \x01(\t\x12\x15\n\rtrace_sampled\x18\x1e \x01(\x08\x12\x42\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ - google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, @@ -58,7 +62,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -69,7 +72,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, @@ -77,7 +80,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -88,7 +90,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, @@ -96,19 +98,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1121, - serialized_end=1166, + serialized_start=1084, + serialized_end=1129, ) _LOGENTRY = _descriptor.Descriptor( @@ -117,7 +118,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -128,15 +128,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -153,9 +152,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="proto_payload", @@ -174,7 +172,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_payload", @@ -185,7 +182,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, @@ -193,7 +190,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="json_payload", @@ -212,7 +208,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="timestamp", @@ -229,9 +224,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="receive_timestamp", @@ -248,9 +242,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="severity", @@ -267,9 +260,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="insert_id", @@ -280,15 +272,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="http_request", @@ -305,9 +296,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -324,14 +314,31 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metadata", + full_name="google.logging.v2.LogEntry.metadata", + index=11, + number=25, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="operation", full_name="google.logging.v2.LogEntry.operation", - index=11, + index=12, number=15, type=11, cpp_type=10, @@ -343,52 +350,49 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace", full_name="google.logging.v2.LogEntry.trace", - index=12, + index=13, number=22, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="span_id", full_name="google.logging.v2.LogEntry.span_id", - index=13, + index=14, number=27, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="trace_sampled", full_name="google.logging.v2.LogEntry.trace_sampled", - index=14, + index=15, number=30, type=8, cpp_type=7, @@ -400,14 +404,13 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_location", full_name="google.logging.v2.LogEntry.source_location", - index=15, + index=16, number=23, type=11, cpp_type=10, @@ -419,9 +422,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -429,7 +431,9 @@ _LOGENTRY_LABELSENTRY, ], enum_types=[], - serialized_options=b"\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name", + serialized_options=_b( + "\352A\271\001\n\032logging.googleapis.com/Log\022\035projects/{project}/logs/{log}\022'organizations/{organization}/logs/{log}\022\033folders/{folder}/logs/{log}\022,billingAccounts/{billing_account}/logs/{log}\032\010log_name" + ), is_extendable=False, syntax="proto3", extension_ranges=[], @@ -439,12 +443,11 @@ full_name="google.logging.v2.LogEntry.payload", index=0, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[], ), ], - serialized_start=391, - serialized_end=1369, + serialized_start=358, + serialized_end=1332, ) @@ -454,7 +457,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="id", @@ -465,15 +467,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="producer", @@ -484,15 +485,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="first", @@ -509,9 +509,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="last", @@ -528,9 +527,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -541,8 +539,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1371, - serialized_end=1469, + serialized_start=1334, + serialized_end=1412, ) @@ -552,7 +550,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="file", @@ -563,15 +560,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="line", @@ -588,9 +584,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="function", @@ -601,15 +596,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -620,8 +614,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1471, - serialized_end=1556, + serialized_start=1414, + serialized_end=1484, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY @@ -647,6 +641,9 @@ "http_request" ].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST _LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY +_LOGENTRY.fields_by_name[ + "metadata" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEMETADATA _LOGENTRY.fields_by_name["operation"].message_type = _LOGENTRYOPERATION _LOGENTRY.fields_by_name["source_location"].message_type = _LOGENTRYSOURCELOCATION _LOGENTRY.oneofs_by_name["payload"].fields.append( @@ -675,30 +672,31 @@ LogEntry = _reflection.GeneratedProtocolMessageType( "LogEntry", (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRY_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2" + dict( + DESCRIPTOR=_LOGENTRY_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) - }, + ), ), - "DESCRIPTOR": _LOGENTRY, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """An individual entry in a log. + DESCRIPTOR=_LOGENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""An individual entry in a log. + Attributes: log_name: Required. The resource name of the log to which this log entry - belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + belongs: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be - used in place of PROJECT_ID. The project number is translated - to its corresponding PROJECT_ID internally and the - ``log_name`` field will contain PROJECT_ID in queries and + "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may + optionally be used in place of PROJECT\_ID. The project number + is translated to its corresponding PROJECT\_ID internally and + the ``log_name`` field will contain PROJECT\_ID in queries and exports. ``[LOG_ID]`` must be URL-encoded within ``log_name``. Example: ``"organizations/1234567890/logs/cloudr esourcemanager.googleapis.com%2Factivity"``. ``[LOG_ID]`` must @@ -717,14 +715,15 @@ associated with the monitored resource designating the particular database that reported the error. payload: - The log entry payload, which can be one of multiple types. + Optional. The log entry payload, which can be one of multiple + types. proto_payload: The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads. The following protocol buffer types are supported; user-defined types are not supported: - “type.googleapis.com/google.cloud.audit.AuditLog” - “type.googleapis.com/google.appengine.logging.v1.RequestLog” + "type.googleapis.com/google.cloud.audit.AuditLog" + "type.googleapis.com/google.appengine.logging.v1.RequestLog" text_payload: The log entry payload, represented as a Unicode string (UTF-8). @@ -733,16 +732,18 @@ expressed as a JSON object. timestamp: Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry’s age and + occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is - displayed. Incoming log entries must have timestamps that - don’t exceed the `logs retention period `__ in the past, and - that don’t exceed 24 hours in the future. Log entries outside - those time boundaries aren’t ingested by Logging. + displayed. Incoming log entries should have timestamps that + are no more than the `logs retention period + `__ in the past, and no more than 24 hours in + the future. Log entries outside those time boundaries will not + be available when calling ``entries.list``, but those log + entries can still be `exported with LogSinks + `__. receive_timestamp: Output only. The time the log entry was received by Logging. severity: @@ -765,6 +766,18 @@ labels: Optional. A set of user-defined (key, value) data that provides additional information about the log entry. + metadata: + Deprecated. Output only. Additional metadata about the + monitored resource. Only ``k8s_container``, ``k8s_pod``, and + ``k8s_node`` MonitoredResources have this field populated for + GKE versions older than 1.12.6. For GKE versions 1.12.6 and + above, the ``metadata`` field has been deprecated. The + Kubernetes pod labels that used to be in + ``metadata.userLabels`` will now be present in the ``labels`` + field with a key prefix of ``k8s-pod/``. The Stackdriver + system labels that were present in the + ``metadata.systemLabels`` field will no longer be available in + the LogEntry. operation: Optional. Information about an operation associated with the log entry, if applicable. @@ -778,7 +791,7 @@ Optional. The span ID within the trace associated with the log entry. For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an - 8-byte array, such as ``000000000000004a``. + 8-byte array, such as "000000000000004a". trace_sampled: Optional. The sampling decision of the trace associated with the log entry. True means that the trace resource name in the @@ -793,7 +806,7 @@ log entry, if any. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - }, + ), ) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) @@ -801,11 +814,12 @@ LogEntryOperation = _reflection.GeneratedProtocolMessageType( "LogEntryOperation", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYOPERATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about a potentially long-running operation with - which a log entry is associated. + dict( + DESCRIPTOR=_LOGENTRYOPERATION, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""Additional information about a potentially long-running + operation with which a log entry is associated. + Attributes: id: @@ -825,18 +839,19 @@ the operation. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) - }, + ), ) _sym_db.RegisterMessage(LogEntryOperation) LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( "LogEntrySourceLocation", (_message.Message,), - { - "DESCRIPTOR": _LOGENTRYSOURCELOCATION, - "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", - "__doc__": """Additional information about the source code location that produced - the log entry. + dict( + DESCRIPTOR=_LOGENTRYSOURCELOCATION, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""Additional information about the source code location that + produced the log entry. + Attributes: file: @@ -856,32 +871,13 @@ (Go), ``function`` (Python). """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntrySourceLocation) - }, + ), ) _sym_db.RegisterMessage(LogEntrySourceLocation) DESCRIPTOR._options = None _LOGENTRY_LABELSENTRY._options = None -_LOGENTRY.fields_by_name["log_name"]._options = None -_LOGENTRY.fields_by_name["resource"]._options = None -_LOGENTRY.fields_by_name["timestamp"]._options = None -_LOGENTRY.fields_by_name["receive_timestamp"]._options = None -_LOGENTRY.fields_by_name["severity"]._options = None -_LOGENTRY.fields_by_name["insert_id"]._options = None -_LOGENTRY.fields_by_name["http_request"]._options = None -_LOGENTRY.fields_by_name["labels"]._options = None -_LOGENTRY.fields_by_name["operation"]._options = None -_LOGENTRY.fields_by_name["trace"]._options = None -_LOGENTRY.fields_by_name["span_id"]._options = None -_LOGENTRY.fields_by_name["trace_sampled"]._options = None -_LOGENTRY.fields_by_name["source_location"]._options = None +_LOGENTRY.fields_by_name["metadata"]._options = None _LOGENTRY._options = None -_LOGENTRYOPERATION.fields_by_name["id"]._options = None -_LOGENTRYOPERATION.fields_by_name["producer"]._options = None -_LOGENTRYOPERATION.fields_by_name["first"]._options = None -_LOGENTRYOPERATION.fields_by_name["last"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["file"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["line"]._options = None -_LOGENTRYSOURCELOCATION.fields_by_name["function"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py index 8a9393943..07cb78fe0 100644 --- a/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py @@ -1,3 +1,2 @@ # 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/logging_v2/proto/logging_config_pb2.py b/google/cloud/logging_v2/proto/logging_config_pb2.py index 20191acac..7e4ae83dd 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_config.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -27,9 +29,12 @@ name="google/cloud/logging_v2/proto/logging_config.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2\352A`\n+logging.googleapis.com/OrganizationLocation\0221organizations/{organization}/locations/{location}\352AN\n%logging.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}\352Ag\n-logging.googleapis.com/BillingAccountLocation\0226billingAccounts/{billing_account}/locations/{location}", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x9b\x04\n\tLogBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\x0eretention_days\x18\x0b \x01(\x05\x12?\n\x0flifecycle_state\x18\x0c \x01(\x0e\x32!.google.logging.v2.LifecycleStateB\x03\xe0\x41\x03:\xa5\x02\xea\x41\xa1\x02\n logging.googleapis.com/LogBucket\x12\x38projects/{project}/locations/{location}/buckets/{bucket}\x12\x42organizations/{organization}/locations/{location}/buckets/{bucket}\x12\x36\x66olders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}"\xcb\x05\n\x07LogSink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0b\x64\x65stination\x18\x03 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x12 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10include_children\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsB\x03\xe0\x41\x01H\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbf\x01\xea\x41\xbb\x01\n\x1elogging.googleapis.com/LogSink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"g\n\x0f\x42igQueryOptions\x12#\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"\x7f\n\x12ListBucketsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogBucket\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"]\n\x13ListBucketsResponse\x12-\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogBucket\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb6\x01\n\x13UpdateBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket\x12\x31\n\x06\x62ucket\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogBucketB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"J\n\x10GetBucketRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogBucket"{\n\x10ListSinksRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"K\n\x0eGetSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\x9f\x01\n\x11\x43reateSinkRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \x12\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01"\xd8\x01\n\x11UpdateSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12#\n\x16unique_writer_identity\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"N\n\x11\x44\x65leteSinkRequest\x12\x39\n\tsink_name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1elogging.googleapis.com/LogSink"\xc2\x03\n\x0cLogExclusion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xec\x01\xea\x41\xe8\x01\n#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"\x85\x01\n\x15ListExclusionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\x13GetExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"\x8e\x01\n\x16\x43reateExclusionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02"\xc2\x01\n\x16UpdateExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"S\n\x16\x44\x65leteExclusionRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/LogExclusion"S\n\x16GetCmekSettingsRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#logging.googleapis.com/CmekSettings"\xa1\x01\n\x19UpdateCmekSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x9f\x02\n\x0c\x43mekSettings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1f\n\x12service_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n#logging.googleapis.com/CmekSettings\x12\x1fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1d\x66olders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings*S\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x14\n\x10\x44\x45LETE_REQUESTED\x10\x02\x32\xaf\'\n\x0f\x43onfigServiceV2\x12\xdc\x02\n\x0bListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1a&.google.logging.v2.ListBucketsResponse"\xfd\x01\x82\xd3\xe4\x93\x02\xed\x01\x12$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x12\x30/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x12\x32/v2/{parent=billingAccounts/*/locations/*}/buckets\xda\x41\x06parent\x12\xb9\x02\n\tGetBucket\x12#.google.logging.v2.GetBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\x12$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x12\x30/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z(\x12&/v2/{name=billingAccounts/*/buckets/*}\x12\xf3\x02\n\x0cUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1a\x1c.google.logging.v2.LogBucket"\x9c\x02\x82\xd3\xe4\x93\x02\x95\x02\x32$/v2/{name=*/*/locations/*/buckets/*}:\x06\x62ucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06\x62ucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06\x62ucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06\x62ucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06\x62ucket\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xd9\x03\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2\xea\x41`\n+logging.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41N\n%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41g\n-logging.googleapis.com/BillingAccountLocation\x12\x36\x62illingAccounts/{billing_account}/locations/{location}b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8d\x06\n\x07LogSink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0b\x64\x65stination\x18\x03 \x01(\tB\x06\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x12 \x01(\t\x12\x10\n\x08\x64isabled\x18\x13 \x01(\x08\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1c\n\x0fwriter_identity\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x10include_children\x18\t \x01(\x08\x12>\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsH\x00\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x32\n\nstart_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x30\n\x08\x65nd_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02:\xbc\x01\xea\x41\xb8\x01\n\x1blogging.googleapis.com/Sink\x12\x1fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1d\x66olders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\t\n\x07options"b\n\x0f\x42igQueryOptions\x12\x1e\n\x16use_partitioned_tables\x18\x01 \x01(\x08\x12/\n"uses_timestamp_column_partitioning\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03"n\n\x10ListSinksRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"W\n\x11ListSinksResponse\x12)\n\x05sinks\x18\x01 \x03(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x0eGetSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\x97\x01\n\x11\x43reateSinkRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08"\xcb\x01\n\x11UpdateSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink\x12-\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSinkB\x03\xe0\x41\x02\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x11\x44\x65leteSinkRequest\x12\x36\n\tsink_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1blogging.googleapis.com/Sink"\xa1\x03\n\x0cLogExclusion\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe9\x01\xea\x41\xe5\x01\n logging.googleapis.com/Exclusion\x12)projects/{project}/exclusions/{exclusion}\x12\x33organizations/{organization}/exclusions/{exclusion}\x12\'folders/{folder}/exclusions/{exclusion}\x12\x38\x62illingAccounts/{billing_account}/exclusions/{exclusion}"x\n\x15ListExclusionsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"f\n\x16ListExclusionsResponse\x12\x33\n\nexclusions\x18\x01 \x03(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"M\n\x13GetExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"\x86\x01\n\x16\x43reateExclusionRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/Exclusion\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion"\xbf\x01\n\x16UpdateExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion\x12\x37\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"P\n\x16\x44\x65leteExclusionRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/Exclusion"&\n\x16GetCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x92\x01\n\x19UpdateCmekSettingsRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\rcmek_settings\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.CmekSettings\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"N\n\x0c\x43mekSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0ckms_key_name\x18\x02 \x01(\t\x12\x1a\n\x12service_account_id\x18\x03 \x01(\t2\x9e\x1f\n\x0f\x43onfigServiceV2\x12\x90\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xb7\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1f\x12\x1d/v2/{parent=projects/*}/sinksZ$\x12"/v2/{parent=organizations/*}/sinksZ\x1e\x12\x1c/v2/{parent=folders/*}/sinksZ&\x12$/v2/{parent=billingAccounts/*}/sinks\xda\x41\x06parent\x12\x9e\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{sink_name=*/*/sinks/*}Z$\x12"/v2/{sink_name=projects/*/sinks/*}Z)\x12\'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xab\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xda\x01\x82\xd3\xe4\x93\x02\xc5\x01"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%"\x1d/v2/{parent=projects/*}/sinks:\x04sinkZ*""/v2/{parent=organizations/*}/sinks:\x04sinkZ$"\x1c/v2/{parent=folders/*}/sinks:\x04sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\x04sink\xda\x41\x0bparent,sink\x12\x9f\x04\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xce\x03\x82\xd3\xe4\x93\x02\x99\x03\x1a\x1b/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1a"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1a\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1a!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1a)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2\'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\xda\x41\x1asink_name,sink,update_mask\xda\x41\x0esink_name,sink\x12\xa0\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xd3\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{sink_name=*/*/sinks/*}Z$*"/v2/{sink_name=projects/*/sinks/*}Z)*\'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\xda\x41\tsink_name\x12\xb8\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xd0\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{parent=*/*}/exclusionsZ$\x12"/v2/{parent=projects/*}/exclusionsZ)\x12\'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\xda\x41\x06parent\x12\xa8\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01\x12\x1b/v2/{name=*/*/exclusions/*}Z$\x12"/v2/{name=projects/*/exclusions/*}Z)\x12\'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xf1\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x91\x02\x82\xd3\xe4\x93\x02\xf7\x01"\x1b/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\xda\x41\x10parent,exclusion\x12\xfb\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\x9b\x02\x82\xd3\xe4\x93\x02\xf7\x01\x32\x1b/v2/{name=*/*/exclusions/*}:\texclusionZ/2"/v2/{name=projects/*/exclusions/*}:\texclusionZ42\'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\xda\x41\x1aname,exclusion,update_mask\x12\xa5\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xce\x01\x82\xd3\xe4\x93\x02\xc0\x01*\x1b/v2/{name=*/*/exclusions/*}Z$*"/v2/{name=projects/*/exclusions/*}Z)*\'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\xda\x41\x04name\x12\xad\x01\n\x0fGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"N\x82\xd3\xe4\x93\x02H\x12\x1b/v2/{name=*/*}/cmekSettingsZ)\x12\'/v2/{name=organizations/*}/cmekSettings\x12\xd1\x01\n\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1a\x1f.google.logging.v2.CmekSettings"l\x82\xd3\xe4\x93\x02\x66\x32\x1b/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82\'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\x9e\x01\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, @@ -42,57 +47,12 @@ ], ) -_LIFECYCLESTATE = _descriptor.EnumDescriptor( - name="LifecycleState", - full_name="google.logging.v2.LifecycleState", - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name="LIFECYCLE_STATE_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="ACTIVE", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.EnumValueDescriptor( - name="DELETE_REQUESTED", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=4659, - serialized_end=4742, -) -_sym_db.RegisterEnumDescriptor(_LIFECYCLESTATE) - -LifecycleState = enum_type_wrapper.EnumTypeWrapper(_LIFECYCLESTATE) -LIFECYCLE_STATE_UNSPECIFIED = 0 -ACTIVE = 1 -DELETE_REQUESTED = 2 - _LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( name="VersionFormat", full_name="google.logging.v2.LogSink.VersionFormat", filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="VERSION_FORMAT_UNSPECIFIED", @@ -100,176 +60,28 @@ number=0, serialized_options=None, type=None, - create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="V2", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V2", index=1, number=1, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="V1", - index=2, - number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V1", index=2, number=2, serialized_options=None, type=None ), ], containing_type=None, serialized_options=None, - serialized_start=1306, - serialized_end=1369, + serialized_start=833, + serialized_end=896, ) _sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) -_LOGBUCKET = _descriptor.Descriptor( - name="LogBucket", - full_name="google.logging.v2.LogBucket", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.LogBucket.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="google.logging.v2.LogBucket.description", - index=1, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogBucket.create_time", - index=2, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogBucket.update_time", - index=3, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="retention_days", - full_name="google.logging.v2.LogBucket.retention_days", - index=4, - number=11, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="lifecycle_state", - full_name="google.logging.v2.LogBucket.lifecycle_state", - index=5, - number=12, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=b"\352A\241\002\n logging.googleapis.com/LogBucket\0228projects/{project}/locations/{location}/buckets/{bucket}\022Borganizations/{organization}/locations/{location}/buckets/{bucket}\0226folders/{folder}/locations/{location}/buckets/{bucket}\022GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=317, - serialized_end=856, -) - - _LOGSINK = _descriptor.Descriptor( name="LogSink", full_name="google.logging.v2.LogSink", filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -280,15 +92,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="destination", @@ -299,15 +110,14 @@ 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=b"\340A\002\372A\003\n\001*", + serialized_options=_b("\372A\003\n\001*"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -318,15 +128,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -337,15 +146,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -362,9 +170,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_version_format", @@ -381,9 +188,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\030\001", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="writer_identity", @@ -394,15 +200,14 @@ 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=b"\340A\003", + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="include_children", @@ -413,255 +218,25 @@ cpp_type=7, label=1, has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="bigquery_options", - full_name="google.logging.v2.LogSink.bigquery_options", - index=8, - number=12, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="create_time", - full_name="google.logging.v2.LogSink.create_time", - index=9, - number=13, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="update_time", - full_name="google.logging.v2.LogSink.update_time", - index=10, - number=14, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _LOGSINK_VERSIONFORMAT, - ], - serialized_options=b"\352A\273\001\n\036logging.googleapis.com/LogSink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}", - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="options", - full_name="google.logging.v2.LogSink.options", - index=0, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[], - ), - ], - serialized_start=859, - serialized_end=1574, -) - - -_BIGQUERYOPTIONS = _descriptor.Descriptor( - name="BigQueryOptions", - full_name="google.logging.v2.BigQueryOptions", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="use_partitioned_tables", - full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", - index=0, - number=1, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="uses_timestamp_column_partitioning", - full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", - index=1, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\003", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1576, - serialized_end=1679, -) - - -_LISTBUCKETSREQUEST = _descriptor.Descriptor( - name="ListBucketsRequest", - full_name="google.logging.v2.ListBucketsRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name="parent", - full_name="google.logging.v2.ListBucketsRequest.parent", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b'\340A\002\372A"\022 logging.googleapis.com/LogBucket', - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_token", - full_name="google.logging.v2.ListBucketsRequest.page_token", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - _descriptor.FieldDescriptor( - name="page_size", - full_name="google.logging.v2.ListBucketsRequest.page_size", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=b"\340A\001", - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1681, - serialized_end=1808, -) - - -_LISTBUCKETSRESPONSE = _descriptor.Descriptor( - name="ListBucketsResponse", - full_name="google.logging.v2.ListBucketsResponse", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( - name="buckets", - full_name="google.logging.v2.ListBucketsResponse.buckets", - index=0, - number=1, + name="bigquery_options", + full_name="google.logging.v2.LogSink.bigquery_options", + index=8, + number=12, type=11, cpp_type=10, - label=3, + label=1, has_default_value=False, - default_value=[], + default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -669,73 +244,48 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="next_page_token", - full_name="google.logging.v2.ListBucketsResponse.next_page_token", - index=1, - number=2, - type=9, - cpp_type=9, + name="create_time", + full_name="google.logging.v2.LogSink.create_time", + index=9, + number=13, + type=11, + cpp_type=10, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1810, - serialized_end=1903, -) - - -_UPDATEBUCKETREQUEST = _descriptor.Descriptor( - name="UpdateBucketRequest", - full_name="google.logging.v2.UpdateBucketRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.UpdateBucketRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, + name="update_time", + full_name="google.logging.v2.LogSink.update_time", + index=10, + number=14, + type=11, + cpp_type=10, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="bucket", - full_name="google.logging.v2.UpdateBucketRequest.bucket", - index=1, - number=2, + name="start_time", + full_name="google.logging.v2.LogSink.start_time", + index=11, + number=10, type=11, cpp_type=10, label=1, @@ -746,15 +296,14 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( - name="update_mask", - full_name="google.logging.v2.UpdateBucketRequest.update_mask", - index=2, - number=4, + name="end_time", + full_name="google.logging.v2.LogSink.end_time", + index=12, + number=11, type=11, cpp_type=10, label=1, @@ -765,50 +314,77 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[], - serialized_options=None, + enum_types=[ + _LOGSINK_VERSIONFORMAT, + ], + serialized_options=_b( + "\352A\270\001\n\033logging.googleapis.com/Sink\022\037projects/{project}/sinks/{sink}\022)organizations/{organization}/sinks/{sink}\022\035folders/{folder}/sinks/{sink}\022.billingAccounts/{billing_account}/sinks/{sink}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], - oneofs=[], - serialized_start=1906, - serialized_end=2088, + oneofs=[ + _descriptor.OneofDescriptor( + name="options", + full_name="google.logging.v2.LogSink.options", + index=0, + containing_type=None, + fields=[], + ), + ], + serialized_start=317, + serialized_end=1098, ) -_GETBUCKETREQUEST = _descriptor.Descriptor( - name="GetBucketRequest", - full_name="google.logging.v2.GetBucketRequest", +_BIGQUERYOPTIONS = _descriptor.Descriptor( + name="BigQueryOptions", + full_name="google.logging.v2.BigQueryOptions", filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name="name", - full_name="google.logging.v2.GetBucketRequest.name", + name="use_partitioned_tables", + full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", index=0, number=1, - type=9, - cpp_type=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="uses_timestamp_column_partitioning", + full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", + index=1, + number=3, + type=8, + cpp_type=7, label=1, has_default_value=False, - default_value=b"".decode("utf-8"), + default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', + serialized_options=_b("\340A\003"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -819,8 +395,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2090, - serialized_end=2164, + serialized_start=1100, + serialized_end=1198, ) @@ -830,7 +406,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -841,15 +416,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=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\022\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -860,15 +436,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -885,9 +460,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -898,8 +472,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2166, - serialized_end=2289, + serialized_start=1200, + serialized_end=1310, ) @@ -909,7 +483,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sinks", @@ -928,7 +501,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -939,7 +511,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, @@ -947,7 +519,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -958,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2291, - serialized_end=2378, + serialized_start=1312, + serialized_end=1399, ) @@ -969,7 +540,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -980,15 +550,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -999,8 +570,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2380, - serialized_end=2455, + serialized_start=1401, + serialized_end=1473, ) @@ -1010,7 +581,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1021,15 +591,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=b"\340A\002\372A \022\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\022\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -1046,9 +617,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -1065,9 +635,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1078,8 +647,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2458, - serialized_end=2617, + serialized_start=1476, + serialized_end=1627, ) @@ -1089,7 +658,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1100,15 +668,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sink", @@ -1125,9 +694,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="unique_writer_identity", @@ -1144,9 +712,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1163,9 +730,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1176,8 +742,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2620, - serialized_end=2836, + serialized_start=1630, + serialized_end=1833, ) @@ -1187,7 +753,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="sink_name", @@ -1198,15 +763,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=b"\340A\002\372A \n\036logging.googleapis.com/LogSink", + serialized_options=_b( + "\340A\002\372A\035\n\033logging.googleapis.com/Sink" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1217,8 +783,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2838, - serialized_end=2916, + serialized_start=1835, + serialized_end=1910, ) @@ -1228,7 +794,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1239,15 +804,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1258,15 +822,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -1277,15 +840,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="disabled", @@ -1302,9 +864,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -1321,9 +882,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -1340,21 +900,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"\352A\350\001\n#logging.googleapis.com/LogExclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}", + serialized_options=_b( + "\352A\345\001\n logging.googleapis.com/Exclusion\022)projects/{project}/exclusions/{exclusion}\0223organizations/{organization}/exclusions/{exclusion}\022'folders/{folder}/exclusions/{exclusion}\0228billingAccounts/{billing_account}/exclusions/{exclusion}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2919, - serialized_end=3369, + serialized_start=1913, + serialized_end=2330, ) @@ -1364,7 +925,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1375,15 +935,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=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + serialized_options=_b( + '\340A\002\372A"\022 logging.googleapis.com/Exclusion' + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1394,15 +955,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1419,9 +979,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1432,8 +991,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3372, - serialized_end=3505, + serialized_start=2332, + serialized_end=2452, ) @@ -1443,7 +1002,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="exclusions", @@ -1462,7 +1020,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1473,7 +1030,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, @@ -1481,7 +1038,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1492,8 +1048,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3507, - serialized_end=3609, + serialized_start=2454, + serialized_end=2556, ) @@ -1503,7 +1059,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1514,15 +1069,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1533,8 +1087,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3611, - serialized_end=3691, + serialized_start=2558, + serialized_end=2635, ) @@ -1544,7 +1098,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1555,15 +1108,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=b"\340A\002\372A%\022#logging.googleapis.com/LogExclusion", + serialized_options=_b( + '\340A\002\372A"\022 logging.googleapis.com/Exclusion' + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1580,9 +1134,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1593,8 +1146,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3694, - serialized_end=3836, + serialized_start=2638, + serialized_end=2772, ) @@ -1604,7 +1157,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1615,15 +1167,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="exclusion", @@ -1640,9 +1191,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1659,9 +1209,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1672,8 +1221,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3839, - serialized_end=4033, + serialized_start=2775, + serialized_end=2966, ) @@ -1683,7 +1232,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1694,15 +1242,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/LogExclusion", + serialized_options=_b('\340A\002\372A"\n logging.googleapis.com/Exclusion'), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1713,8 +1260,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4035, - serialized_end=4118, + serialized_start=2968, + serialized_end=3048, ) @@ -1724,7 +1271,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1735,15 +1281,14 @@ 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=b"\340A\002\372A%\n#logging.googleapis.com/CmekSettings", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1754,8 +1299,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4120, - serialized_end=4203, + serialized_start=3050, + serialized_end=3088, ) @@ -1765,7 +1310,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1776,15 +1320,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="cmek_settings", @@ -1801,9 +1344,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1820,9 +1362,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1833,8 +1374,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4206, - serialized_end=4367, + serialized_start=3091, + serialized_end=3237, ) @@ -1844,7 +1385,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1855,15 +1395,14 @@ 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=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kms_key_name", @@ -1874,7 +1413,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, @@ -1882,7 +1421,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="service_account_id", @@ -1893,36 +1431,28 @@ 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=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"\352A\300\001\n#logging.googleapis.com/CmekSettings\022\037projects/{project}/cmekSettings\022)organizations/{organization}/cmekSettings\022\035folders/{folder}/cmekSettings\022.billingAccounts/{billing_account}/cmekSettings", + serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4370, - serialized_end=4657, + serialized_start=3239, + serialized_end=3317, ) -_LOGBUCKET.fields_by_name[ - "create_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name[ - "update_time" -].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_LOGBUCKET.fields_by_name["lifecycle_state"].enum_type = _LIFECYCLESTATE _LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT _LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS _LOGSINK.fields_by_name[ @@ -1931,6 +1461,12 @@ _LOGSINK.fields_by_name[ "update_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "start_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "end_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK _LOGSINK.oneofs_by_name["options"].fields.append( _LOGSINK.fields_by_name["bigquery_options"] @@ -1938,11 +1474,6 @@ _LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ "options" ] -_LISTBUCKETSRESPONSE.fields_by_name["buckets"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name["bucket"].message_type = _LOGBUCKET -_UPDATEBUCKETREQUEST.fields_by_name[ - "update_mask" -].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK _CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK _UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK @@ -1965,13 +1496,8 @@ _UPDATECMEKSETTINGSREQUEST.fields_by_name[ "update_mask" ].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK -DESCRIPTOR.message_types_by_name["LogBucket"] = _LOGBUCKET DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS -DESCRIPTOR.message_types_by_name["ListBucketsRequest"] = _LISTBUCKETSREQUEST -DESCRIPTOR.message_types_by_name["ListBucketsResponse"] = _LISTBUCKETSRESPONSE -DESCRIPTOR.message_types_by_name["UpdateBucketRequest"] = _UPDATEBUCKETREQUEST -DESCRIPTOR.message_types_by_name["GetBucketRequest"] = _GETBUCKETREQUEST DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST @@ -1990,58 +1516,21 @@ "UpdateCmekSettingsRequest" ] = _UPDATECMEKSETTINGSREQUEST DESCRIPTOR.message_types_by_name["CmekSettings"] = _CMEKSETTINGS -DESCRIPTOR.enum_types_by_name["LifecycleState"] = _LIFECYCLESTATE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogBucket = _reflection.GeneratedProtocolMessageType( - "LogBucket", - (_message.Message,), - { - "DESCRIPTOR": _LOGBUCKET, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a repository of logs (Beta). - - Attributes: - name: - The resource name of the bucket. For example: “projects/my- - project-id/locations/my-location/buckets/my-bucket-id The - supported locations are:”global" “us-central1” For the - location of ``global`` it is unspecified where logs are - actually stored. Once a bucket has been created, the location - can not be changed. - description: - Describes this bucket. - create_time: - Output only. The creation timestamp of the bucket. This is not - set for any of the default buckets. - update_time: - Output only. The last update timestamp of the bucket. - retention_days: - Logs will be retained by default for this amount of time, - after which they will automatically be deleted. The minimum - retention period is 1 day. If this value is set to zero at - bucket creation time, the default time of 30 days will be - used. - lifecycle_state: - Output only. The bucket lifecycle state. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.LogBucket) - }, -) -_sym_db.RegisterMessage(LogBucket) - LogSink = _reflection.GeneratedProtocolMessageType( "LogSink", (_message.Message,), - { - "DESCRIPTOR": _LOGSINK, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes a sink used to export log entries to one of the following - destinations in any project: a Cloud Storage bucket, a BigQuery - dataset, or a Cloud Pub/Sub topic. A logs filter controls which log - entries are exported. The sink must be created within a project, + dict( + DESCRIPTOR=_LOGSINK, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Describes a sink used to export log entries to one of the + following destinations in any project: a Cloud Storage bucket, a + BigQuery dataset, or a Cloud Pub/Sub topic. A logs filter controls which + log entries are exported. The sink must be created within a project, organization, billing account, or folder. + Attributes: name: Required. The client-assigned sink identifier, unique within @@ -2052,22 +1541,20 @@ has to be alphanumeric. destination: Required. The export destination: :: - "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis. - com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.googl - eapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink’s - ``writer_identity``, set when the sink is created, must have - permission to write to the destination or else the log entries - are not exported. For more information, see `Exporting Logs - with Sinks - `__. + "storage.googleapis.com/[GCS_BUCKET]" "bigquery.googleapis + .com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.goo + gleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The + sink's ``writer_identity``, set when the sink is created, must + have permission to write to the destination or else the log + entries are not exported. For more information, see `Exporting + Logs with Sinks `__. filter: Optional. An `advanced logs filter - `__. The only exported log entries are those that are - in the resource owning the sink and that match the filter. For - example: :: logName="projects/[PROJECT_ID]/logs/[LOG_ID]" - AND severity>=ERROR + `__. The only exported + log entries are those that are in the resource owning the sink + and that match the filter. For example: :: + logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND + severity>=ERROR description: Optional. A description of this sink. The maximum length of the description is 8000 characters. @@ -2075,10 +1562,12 @@ Optional. If set to True, then this sink is disabled and it does not export any log entries. output_version_format: - Deprecated. This field is unused. + Deprecated. The log entry format to use for this sink's + exported log entries. The v2 format is used by default and + cannot be changed. writer_identity: - Output only. An IAM identity–a service account or group—under - which Logging writes the exported log entries to the sink’s + Output only. An IAM identity—a service account or group—under + which Logging writes the exported log entries to the sink's destination. This field is set by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and @@ -2087,27 +1576,27 @@ methods. Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see `Granting Access for a Resource - `_ - _. Consult the destination service’s documentation to - determine the appropriate IAM roles to assign to the identity. + `__. Consult the + destination service's documentation to determine the + appropriate IAM roles to assign to the identity. include_children: Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, - only the logs owned by the sink’s parent resource are + only the logs owned by the sink's parent resource are available for export. If the field is true, then logs from all the projects, folders, and billing accounts contained in the - sink’s parent resource are also available for export. Whether + sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends - on the sink’s filter expression. For example, if this field is + on the sink's filter expression. For example, if this field is true, then the filter ``resource.type=gce_instance`` would export all Compute Engine VM instance log entries from all - projects in the sink’s parent. To only export entries from + projects in the sink's parent. To only export entries from certain child projects, filter on the project part of the log - name: :: logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + name: :: logName:("projects/test-project1/" OR + "projects/test-project2/") AND resource.type=gce_instance options: - Destination dependent options. + Optional. Destination dependent options. bigquery_options: Optional. Options that affect sinks exporting data to BigQuery. @@ -2117,175 +1606,63 @@ update_time: Output only. The last update timestamp of the sink. This field may not be present for older sinks. + start_time: + Do not use. This field is ignored. + end_time: + Do not use. This field is ignored. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) - }, + ), ) _sym_db.RegisterMessage(LogSink) BigQueryOptions = _reflection.GeneratedProtocolMessageType( "BigQueryOptions", (_message.Message,), - { - "DESCRIPTOR": _BIGQUERYOPTIONS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Options that change functionality of a sink exporting data to - BigQuery. + dict( + DESCRIPTOR=_BIGQUERYOPTIONS, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Options that change functionality of a sink exporting data + to BigQuery. + Attributes: use_partitioned_tables: - Optional. Whether to use `BigQuery’s partition tables - `__. By default, Logging creates dated tables based on - the log entries’ timestamps, e.g. syslog_20170523. With - partitioned tables the date suffix is no longer present and - `special query syntax - `__ has to be used instead. In both cases, tables are - sharded based on UTC timezone. + Optional. Whether to use `BigQuery's partition tables + `__. By default, Logging + creates dated tables based on the log entries' timestamps, + e.g. syslog\_20170523. With partitioned tables the date suffix + is no longer present and `special query syntax + `__ has to be used + instead. In both cases, tables are sharded based on UTC + timezone. uses_timestamp_column_partitioning: Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use. All new sinks will have this field set true and will use - timestamp column based partitioning. If use_partitioned_tables - is false, this value has no meaning and will be false. Legacy - sinks using partitioned tables will have this field set to - false. + timestamp column based partitioning. If + use\_partitioned\_tables is false, this value has no meaning + and will be false. Legacy sinks using partitioned tables will + have this field set to false. """, # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) - }, + ), ) _sym_db.RegisterMessage(BigQueryOptions) -ListBucketsRequest = _reflection.GeneratedProtocolMessageType( - "ListBucketsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListBuckets`` (Beta). - - Attributes: - parent: - Required. The parent resource whose buckets are to be listed: - :: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The - locations portion of the resource must be specified, but - supplying the character ``-`` in place of [LOCATION_ID] will - return all buckets. - page_token: - Optional. If present, then retrieve the next batch of results - from the preceding call to this method. ``pageToken`` must be - the value of ``nextPageToken`` from the previous response. The - values of other method parameters should be identical to those - in the previous call. - page_size: - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more results - might be available. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsRequest) - }, -) -_sym_db.RegisterMessage(ListBucketsRequest) - -ListBucketsResponse = _reflection.GeneratedProtocolMessageType( - "ListBucketsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTBUCKETSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The response from ListBuckets (Beta). - - Attributes: - buckets: - A list of buckets. - next_page_token: - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.ListBucketsResponse) - }, -) -_sym_db.RegisterMessage(ListBucketsResponse) - -UpdateBucketRequest = _reflection.GeneratedProtocolMessageType( - "UpdateBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateBucket`` (Beta). - - Attributes: - name: - Required. The full resource name of the bucket to update. :: - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET - _ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ - ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ - ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[ - FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - Example: ``"projects/my-project-id/locations/my- - location/buckets/my-bucket-id"``. Also requires permission - “resourcemanager.projects.updateLiens” to set the locked - property - bucket: - Required. The updated bucket. - update_mask: - Required. Field mask that specifies the fields in ``bucket`` - that need an update. A bucket field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. For a detailed ``FieldMask`` - definition, see https://developers.google.com/protocol-buffers - /docs/reference/google.protobuf#google.protobuf.FieldMask - Example: ``updateMask=retention_days``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateBucketRequest) - }, -) -_sym_db.RegisterMessage(UpdateBucketRequest) - -GetBucketRequest = _reflection.GeneratedProtocolMessageType( - "GetBucketRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETBUCKETREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetBucket`` (Beta). - - Attributes: - name: - Required. The resource name of the bucket: :: "projects/[ - PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "o - rganizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets - /[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locatio - ns/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/ - locations/[LOCATION_ID]/buckets/[BUCKET_ID]" Example: - ``"projects/my-project-id/locations/my-location/buckets/my- - bucket-id"``. - """, - # @@protoc_insertion_point(class_scope:google.logging.v2.GetBucketRequest) - }, -) -_sym_db.RegisterMessage(GetBucketRequest) - ListSinksRequest = _reflection.GeneratedProtocolMessageType( "ListSinksRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``ListSinks``. + dict( + DESCRIPTOR=_LISTSINKSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``ListSinks``. + Attributes: parent: Required. The parent resource whose sinks are to be listed: - :: "projects/[PROJECT_ID]" + :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" @@ -2302,17 +1679,18 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksRequest) - }, + ), ) _sym_db.RegisterMessage(ListSinksRequest) ListSinksResponse = _reflection.GeneratedProtocolMessageType( "ListSinksResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTSINKSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Result returned from ``ListSinks``. + dict( + DESCRIPTOR=_LISTSINKSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Result returned from ``ListSinks``. + Attributes: sinks: @@ -2324,17 +1702,18 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListSinksResponse) - }, + ), ) _sym_db.RegisterMessage(ListSinksResponse) GetSinkRequest = _reflection.GeneratedProtocolMessageType( "GetSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _GETSINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``GetSink``. + dict( + DESCRIPTOR=_GETSINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``GetSink``. + Attributes: sink_name: @@ -2346,22 +1725,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetSinkRequest) - }, + ), ) _sym_db.RegisterMessage(GetSinkRequest) CreateSinkRequest = _reflection.GeneratedProtocolMessageType( "CreateSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _CREATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``CreateSink``. + dict( + DESCRIPTOR=_CREATESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``CreateSink``. + Attributes: parent: Required. The resource in which to create the sink: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Examples: ``"projects/my-logging- project"``, ``"organizations/123456789"``. @@ -2371,10 +1751,10 @@ unique_writer_identity: Optional. Determines the kind of IAM identity returned as ``writer_identity`` in the new sink. If this value is omitted - or set to false, and if the sink’s parent is a project, then + or set to false, and if the sink's parent is a project, then the value returned as ``writer_identity`` is the same group or service account used by Logging before the addition of writer - identities to this API. The sink’s destination must be in the + identities to this API. The sink's destination must be in the same project as the sink itself. If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of ``writer_identity`` will @@ -2383,17 +1763,18 @@ [LogSink][google.logging.v2.LogSink]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateSinkRequest) - }, + ), ) _sym_db.RegisterMessage(CreateSinkRequest) UpdateSinkRequest = _reflection.GeneratedProtocolMessageType( "UpdateSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``UpdateSink``. + dict( + DESCRIPTOR=_UPDATESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``UpdateSink``. + Attributes: sink_name: @@ -2415,7 +1796,7 @@ the updated sink depends on both the old and new values of this field: - If the old and new values of this field are both false or both true, then there is no change to the - sink’s ``writer_identity``. - If the old value is false and + sink's ``writer_identity``. - If the old value is false and the new value is true, then ``writer_identity`` is changed to a unique service account. - It is an error if the old value is true and the new value is set to false or @@ -2435,17 +1816,18 @@ ``updateMask=filter``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateSinkRequest) DeleteSinkRequest = _reflection.GeneratedProtocolMessageType( "DeleteSinkRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETESINKREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to ``DeleteSink``. + dict( + DESCRIPTOR=_DELETESINKREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``DeleteSink``. + Attributes: sink_name: @@ -2458,23 +1840,23 @@ ``"projects/my-project-id/sinks/my-sink-id"``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteSinkRequest) LogExclusion = _reflection.GeneratedProtocolMessageType( "LogExclusion", (_message.Message,), - { - "DESCRIPTOR": _LOGEXCLUSION, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Specifies a set of log entries that are not to be stored in Logging. - If your GCP resource receives a large volume of logs, you can use - exclusions to reduce your chargeable logs. Exclusions are processed - after log sinks, so you can export log entries before they are - excluded. Note that organization-level and folder-level exclusions - don’t apply to child resources, and that you can’t exclude audit log - entries. + dict( + DESCRIPTOR=_LOGEXCLUSION, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Specifies a set of log entries that are not to be stored + in Logging. If your GCP resource receives a large volume of logs, you + can use exclusions to reduce your chargeable logs. Exclusions are + processed after log sinks, so you can export log entries before they are + excluded. Note that organization-level and folder-level exclusions don't + apply to child resources, and that you can't exclude audit log entries. + Attributes: name: @@ -2486,15 +1868,14 @@ Optional. A description of this exclusion. filter: Required. An `advanced logs filter - `__ that matches the log entries to be excluded. By - using the `sample function - `__, you can exclude less than 100% of the - matching log entries. For example, the following query matches - 99% of low-severity log entries from Google Cloud Storage - buckets: ``"resource.type=gcs_bucket severity`__ that matches the log + entries to be excluded. By using the `sample function + `__, you can + exclude less than 100% of the matching log entries. For + example, the following query matches 99% of low-severity log + entries from Google Cloud Storage buckets: + ``"resource.type=gcs_bucket severity`__ - for more information. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: Required. The resource for which to retrieve CMEK settings. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2699,25 +2088,28 @@ folders in the GCP organization. """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetCmekSettingsRequest) - }, + ), ) _sym_db.RegisterMessage(GetCmekSettingsRequest) UpdateCmekSettingsRequest = _reflection.GeneratedProtocolMessageType( "UpdateCmekSettingsRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATECMEKSETTINGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """The parameters to [UpdateCmekSettings][google.logging.v2.ConfigService - V2.UpdateCmekSettings]. See `Enabling CMEK for Logs Router - `__ - for more information. + dict( + DESCRIPTOR=_UPDATECMEKSETTINGSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to + [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: Required. The resource name for the CMEK settings to update. - :: "projects/[PROJECT_ID]/cmekSettings" + :: "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" Example: @@ -2727,9 +2119,8 @@ folders in the GCP organization. cmek_settings: Required. The CMEK settings to update. See `Enabling CMEK for - Logs Router - `__ for more information. + Logs Router `__ for + more information. update_mask: Optional. Field mask identifying which fields from ``cmek_settings`` should be updated. A field will be @@ -2739,32 +2130,36 @@ Example: ``"updateMask=kmsKeyName"`` """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateCmekSettingsRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateCmekSettingsRequest) CmekSettings = _reflection.GeneratedProtocolMessageType( "CmekSettings", (_message.Message,), - { - "DESCRIPTOR": _CMEKSETTINGS, - "__module__": "google.cloud.logging_v2.proto.logging_config_pb2", - "__doc__": """Describes the customer-managed encryption key (CMEK) settings - associated with a project, folder, organization, billing account, or - flexible resource. Note: CMEK for the Logs Router can currently only - be configured for GCP organizations. Once configured, it applies to - all projects and folders in the GCP organization. See `Enabling CMEK - for Logs Router - `__ - for more information. + dict( + DESCRIPTOR=_CMEKSETTINGS, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Describes the customer-managed encryption key (CMEK) + settings associated with a project, folder, organization, billing + account, or flexible resource. + + Note: CMEK for the Logs Router can currently only be configured for GCP + organizations. Once configured, it applies to all projects and folders + in the GCP organization. + + See `Enabling CMEK for Logs + Router `__ for more + information. + Attributes: name: - Output only. The resource name of the CMEK settings. + Output Only. The resource name of the CMEK settings. kms_key_name: The resource name for the configured Cloud KMS key. KMS key - name format: “projects/[PROJECT_ID]/locations/[LOCATION]/keyRi - ngs/[KEYRING]/cryptoKeys/[KEY]” For example: ``"projects/my- + name format: "projects/[PROJECT\_ID]/locations/[LOCATION]/keyR + ings/[KEYRING]/cryptoKeys/[KEY]" For example: ``"projects/my- project-id/locations/my-region/keyRings/key-ring- name/cryptoKeys/key-name"`` To enable CMEK for the Logs Router, set this field to a valid ``kms_key_name`` for which @@ -2778,248 +2173,193 @@ used at the time of encryption unless access to that key has been revoked. To disable CMEK for the Logs Router, set this field to an empty string. See `Enabling CMEK for Logs Router - `__ for more information. + `__ for more + information. service_account_id: - Output only. The service account that will be used by the Logs + Output Only. The service account that will be used by the Logs Router to access your Cloud KMS key. Before enabling CMEK for Logs Router, you must first assign the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to the service account that the Logs Router will use to access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.G etCmekSettings] to obtain the service account ID. See - `Enabling CMEK for Logs Router - `__ for more information. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CmekSettings) - }, + ), ) _sym_db.RegisterMessage(CmekSettings) DESCRIPTOR._options = None -_LOGBUCKET.fields_by_name["create_time"]._options = None -_LOGBUCKET.fields_by_name["update_time"]._options = None -_LOGBUCKET.fields_by_name["lifecycle_state"]._options = None -_LOGBUCKET._options = None -_LOGSINK.fields_by_name["name"]._options = None _LOGSINK.fields_by_name["destination"]._options = None -_LOGSINK.fields_by_name["filter"]._options = None -_LOGSINK.fields_by_name["description"]._options = None -_LOGSINK.fields_by_name["disabled"]._options = None _LOGSINK.fields_by_name["output_version_format"]._options = None _LOGSINK.fields_by_name["writer_identity"]._options = None -_LOGSINK.fields_by_name["include_children"]._options = None -_LOGSINK.fields_by_name["bigquery_options"]._options = None _LOGSINK.fields_by_name["create_time"]._options = None _LOGSINK.fields_by_name["update_time"]._options = None +_LOGSINK.fields_by_name["start_time"]._options = None +_LOGSINK.fields_by_name["end_time"]._options = None _LOGSINK._options = None -_BIGQUERYOPTIONS.fields_by_name["use_partitioned_tables"]._options = None _BIGQUERYOPTIONS.fields_by_name["uses_timestamp_column_partitioning"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["parent"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_token"]._options = None -_LISTBUCKETSREQUEST.fields_by_name["page_size"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["name"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["bucket"]._options = None -_UPDATEBUCKETREQUEST.fields_by_name["update_mask"]._options = None -_GETBUCKETREQUEST.fields_by_name["name"]._options = None _LISTSINKSREQUEST.fields_by_name["parent"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_token"]._options = None -_LISTSINKSREQUEST.fields_by_name["page_size"]._options = None _GETSINKREQUEST.fields_by_name["sink_name"]._options = None _CREATESINKREQUEST.fields_by_name["parent"]._options = None _CREATESINKREQUEST.fields_by_name["sink"]._options = None -_CREATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None _UPDATESINKREQUEST.fields_by_name["sink_name"]._options = None _UPDATESINKREQUEST.fields_by_name["sink"]._options = None -_UPDATESINKREQUEST.fields_by_name["unique_writer_identity"]._options = None -_UPDATESINKREQUEST.fields_by_name["update_mask"]._options = None _DELETESINKREQUEST.fields_by_name["sink_name"]._options = None -_LOGEXCLUSION.fields_by_name["name"]._options = None -_LOGEXCLUSION.fields_by_name["description"]._options = None -_LOGEXCLUSION.fields_by_name["filter"]._options = None -_LOGEXCLUSION.fields_by_name["disabled"]._options = None -_LOGEXCLUSION.fields_by_name["create_time"]._options = None -_LOGEXCLUSION.fields_by_name["update_time"]._options = None _LOGEXCLUSION._options = None _LISTEXCLUSIONSREQUEST.fields_by_name["parent"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_token"]._options = None -_LISTEXCLUSIONSREQUEST.fields_by_name["page_size"]._options = None _GETEXCLUSIONREQUEST.fields_by_name["name"]._options = None _CREATEEXCLUSIONREQUEST.fields_by_name["parent"]._options = None -_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["name"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"]._options = None _UPDATEEXCLUSIONREQUEST.fields_by_name["update_mask"]._options = None _DELETEEXCLUSIONREQUEST.fields_by_name["name"]._options = None -_GETCMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["name"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["cmek_settings"]._options = None -_UPDATECMEKSETTINGSREQUEST.fields_by_name["update_mask"]._options = None -_CMEKSETTINGS.fields_by_name["name"]._options = None -_CMEKSETTINGS.fields_by_name["service_account_id"]._options = None -_CMEKSETTINGS._options = None _CONFIGSERVICEV2 = _descriptor.ServiceDescriptor( name="ConfigServiceV2", full_name="google.logging.v2.ConfigServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read", - create_key=_descriptor._internal_create_key, - serialized_start=4745, - serialized_end=9784, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\302\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read" + ), + serialized_start=3320, + serialized_end=7318, methods=[ - _descriptor.MethodDescriptor( - name="ListBuckets", - full_name="google.logging.v2.ConfigServiceV2.ListBuckets", - index=0, - containing_service=None, - input_type=_LISTBUCKETSREQUEST, - output_type=_LISTBUCKETSRESPONSE, - serialized_options=b"\202\323\344\223\002\355\001\022$/v2/{parent=*/*/locations/*}/bucketsZ-\022+/v2/{parent=projects/*/locations/*}/bucketsZ2\0220/v2/{parent=organizations/*/locations/*}/bucketsZ,\022*/v2/{parent=folders/*/locations/*}/bucketsZ4\0222/v2/{parent=billingAccounts/*/locations/*}/buckets\332A\006parent", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="GetBucket", - full_name="google.logging.v2.ConfigServiceV2.GetBucket", - index=1, - containing_service=None, - input_type=_GETBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\341\001\022$/v2/{name=*/*/locations/*/buckets/*}Z-\022+/v2/{name=projects/*/locations/*/buckets/*}Z2\0220/v2/{name=organizations/*/locations/*/buckets/*}Z,\022*/v2/{name=folders/*/locations/*/buckets/*}Z(\022&/v2/{name=billingAccounts/*/buckets/*}", - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name="UpdateBucket", - full_name="google.logging.v2.ConfigServiceV2.UpdateBucket", - index=2, - containing_service=None, - input_type=_UPDATEBUCKETREQUEST, - output_type=_LOGBUCKET, - serialized_options=b"\202\323\344\223\002\225\0022$/v2/{name=*/*/locations/*/buckets/*}:\006bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\006bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\006bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\006bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\006bucket", - create_key=_descriptor._internal_create_key, - ), _descriptor.MethodDescriptor( name="ListSinks", full_name="google.logging.v2.ConfigServiceV2.ListSinks", - index=3, + index=0, containing_service=None, input_type=_LISTSINKSREQUEST, output_type=_LISTSINKSRESPONSE, - serialized_options=b'\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\247\001\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=projects/*}/sinksZ$\022"/v2/{parent=organizations/*}/sinksZ\036\022\034/v2/{parent=folders/*}/sinksZ&\022$/v2/{parent=billingAccounts/*}/sinks\332A\006parent' + ), ), _descriptor.MethodDescriptor( name="GetSink", full_name="google.logging.v2.ConfigServiceV2.GetSink", - index=4, + index=1, containing_service=None, input_type=_GETSINKREQUEST, output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z)\022'/v2/{sink_name=organizations/*/sinks/*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z+\022)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" + ), ), _descriptor.MethodDescriptor( name="CreateSink", full_name="google.logging.v2.ConfigServiceV2.CreateSink", - index=5, + index=2, containing_service=None, input_type=_CREATESINKREQUEST, output_type=_LOGSINK, - serialized_options=b'\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\305\001"\026/v2/{parent=*/*}/sinks:\004sinkZ%"\035/v2/{parent=projects/*}/sinks:\004sinkZ*""/v2/{parent=organizations/*}/sinks:\004sinkZ$"\034/v2/{parent=folders/*}/sinks:\004sinkZ,"$/v2/{parent=billingAccounts/*}/sinks:\004sink\332A\013parent,sink' + ), ), _descriptor.MethodDescriptor( name="UpdateSink", full_name="google.logging.v2.ConfigServiceV2.UpdateSink", - index=6, + index=3, containing_service=None, input_type=_UPDATESINKREQUEST, output_type=_LOGSINK, - serialized_options=b"\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\231\003\032\033/v2/{sink_name=*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/\032'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\004sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\004sink\332A\032sink_name,sink,update_mask\332A\016sink_name,sink" + ), ), _descriptor.MethodDescriptor( name="DeleteSink", full_name="google.logging.v2.ConfigServiceV2.DeleteSink", - index=7, + index=4, containing_service=None, input_type=_DELETESINKREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001*\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\332A\tsink_name" + ), ), _descriptor.MethodDescriptor( name="ListExclusions", full_name="google.logging.v2.ConfigServiceV2.ListExclusions", - index=8, + index=5, containing_service=None, input_type=_LISTEXCLUSIONSREQUEST, output_type=_LISTEXCLUSIONSRESPONSE, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{parent=*/*}/exclusionsZ$\022\"/v2/{parent=projects/*}/exclusionsZ)\022'/v2/{parent=organizations/*}/exclusionsZ#\022!/v2/{parent=folders/*}/exclusionsZ+\022)/v2/{parent=billingAccounts/*}/exclusions\332A\006parent" + ), ), _descriptor.MethodDescriptor( name="GetExclusion", full_name="google.logging.v2.ConfigServiceV2.GetExclusion", - index=9, + index=6, containing_service=None, input_type=_GETEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001\022\033/v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=projects/*/exclusions/*}Z)\022'/v2/{name=organizations/*/exclusions/*}Z#\022!/v2/{name=folders/*/exclusions/*}Z+\022)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" + ), ), _descriptor.MethodDescriptor( name="CreateExclusion", full_name="google.logging.v2.ConfigServiceV2.CreateExclusion", - index=10, + index=7, containing_service=None, input_type=_CREATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b'\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\367\001"\033/v2/{parent=*/*}/exclusions:\texclusionZ/""/v2/{parent=projects/*}/exclusions:\texclusionZ4"\'/v2/{parent=organizations/*}/exclusions:\texclusionZ."!/v2/{parent=folders/*}/exclusions:\texclusionZ6")/v2/{parent=billingAccounts/*}/exclusions:\texclusion\332A\020parent,exclusion' + ), ), _descriptor.MethodDescriptor( name="UpdateExclusion", full_name="google.logging.v2.ConfigServiceV2.UpdateExclusion", - index=11, + index=8, containing_service=None, input_type=_UPDATEEXCLUSIONREQUEST, output_type=_LOGEXCLUSION, - serialized_options=b"\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\texclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\texclusionZ42'/v2/{name=organizations/*/exclusions/*}:\texclusionZ.2!/v2/{name=folders/*/exclusions/*}:\texclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\texclusion\332A\032name,exclusion,update_mask" + ), ), _descriptor.MethodDescriptor( name="DeleteExclusion", full_name="google.logging.v2.ConfigServiceV2.DeleteExclusion", - index=12, + index=9, containing_service=None, input_type=_DELETEEXCLUSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\300\001*\033/v2/{name=*/*/exclusions/*}Z$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\332A\004name" + ), ), _descriptor.MethodDescriptor( name="GetCmekSettings", full_name="google.logging.v2.ConfigServiceV2.GetCmekSettings", - index=13, + index=10, containing_service=None, input_type=_GETCMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002H\022\033/v2/{name=*/*}/cmekSettingsZ)\022'/v2/{name=organizations/*}/cmekSettings" + ), ), _descriptor.MethodDescriptor( name="UpdateCmekSettings", full_name="google.logging.v2.ConfigServiceV2.UpdateCmekSettings", - index=14, + index=11, containing_service=None, input_type=_UPDATECMEKSETTINGSREQUEST, output_type=_CMEKSETTINGS, - serialized_options=b"\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002f2\033/v2/{name=*/*}/cmekSettings:\rcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\rcmek_settings" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py index d3bd11324..62e751bf5 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,23 +14,8 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ - self.ListBuckets = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/ListBuckets", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - ) - self.GetBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/GetBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) - self.UpdateBucket = channel.unary_unary( - "/google.logging.v2.ConfigServiceV2/UpdateBucket", - request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - ) self.ListSinks = channel.unary_unary( "/google.logging.v2.ConfigServiceV2/ListSinks", request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, @@ -97,35 +81,6 @@ def __init__(self, channel): class ConfigServiceV2Servicer(object): """Service for configuring sinks used to route log entries.""" - def ListBuckets(self, request, context): - """Lists buckets (Beta).""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - - def GetBucket(self, request, context): - """Gets a bucket (Beta).""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - - def UpdateBucket(self, request, context): - """Updates a bucket. This method replaces the following fields in the - existing bucket with values from the new bucket: `retention_period` - - If the retention period is decreased and the bucket is locked, - FAILED_PRECONDITION will be returned. - - If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION - will be returned. - - A buckets region may not be modified after it is created. - This method is in Beta. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - def ListSinks(self, request, context): """Lists sinks.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -208,8 +163,7 @@ def GetCmekSettings(self, request, context): the GCP organization. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Router](/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -229,8 +183,7 @@ def UpdateCmekSettings(self, request, context): 3) access to the key is disabled. See [Enabling CMEK for Logs - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Router](/logging/docs/routing/managed-encryption) for more information. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -239,21 +192,6 @@ def UpdateCmekSettings(self, request, context): def add_ConfigServiceV2Servicer_to_server(servicer, server): rpc_method_handlers = { - "ListBuckets": grpc.unary_unary_rpc_method_handler( - servicer.ListBuckets, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.SerializeToString, - ), - "GetBucket": grpc.unary_unary_rpc_method_handler( - servicer.GetBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), - "UpdateBucket": grpc.unary_unary_rpc_method_handler( - servicer.UpdateBucket, - request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.FromString, - response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.SerializeToString, - ), "ListSinks": grpc.unary_unary_rpc_method_handler( servicer.ListSinks, request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.FromString, @@ -319,413 +257,3 @@ def add_ConfigServiceV2Servicer_to_server(servicer, server): "google.logging.v2.ConfigServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class ConfigServiceV2(object): - """Service for configuring sinks used to route log entries.""" - - @staticmethod - def ListBuckets( - 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.logging.v2.ConfigServiceV2/ListBuckets", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListBucketsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetBucket( - 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.logging.v2.ConfigServiceV2/GetBucket", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetBucketRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateBucket( - 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.logging.v2.ConfigServiceV2/UpdateBucket", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateBucketRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogBucket.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListSinks( - 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.logging.v2.ConfigServiceV2/ListSinks", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListSinksResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetSink( - 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.logging.v2.ConfigServiceV2/GetSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateSink( - 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.logging.v2.ConfigServiceV2/CreateSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateSink( - 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.logging.v2.ConfigServiceV2/UpdateSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateSinkRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogSink.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteSink( - 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.logging.v2.ConfigServiceV2/DeleteSink", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteSinkRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListExclusions( - 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.logging.v2.ConfigServiceV2/ListExclusions", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.ListExclusionsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetExclusion( - 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.logging.v2.ConfigServiceV2/GetExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateExclusion( - 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.logging.v2.ConfigServiceV2/CreateExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CreateExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateExclusion( - 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.logging.v2.ConfigServiceV2/UpdateExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateExclusionRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.LogExclusion.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteExclusion( - 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.logging.v2.ConfigServiceV2/DeleteExclusion", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DeleteExclusionRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetCmekSettings( - 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.logging.v2.ConfigServiceV2/GetCmekSettings", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.GetCmekSettingsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateCmekSettings( - 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.logging.v2.ConfigServiceV2/UpdateCmekSettings", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.UpdateCmekSettingsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.CmekSettings.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2.py b/google/cloud/logging_v2/proto/logging_metrics_pb2.py index f033fb679..08eaf8099 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging_metrics.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -28,9 +31,12 @@ name="google/cloud/logging_v2/proto/logging_metrics.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8c\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xbc\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\023LoggingMetricsProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n3google/cloud/logging_v2/proto/logging_metrics.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xdc\x04\n\tLogMetric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x37\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptor\x12\x17\n\x0fvalue_extractor\x18\x06 \x01(\t\x12K\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntry\x12>\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:G\xea\x41\x44\n\x1dlogging.googleapis.com/Metric\x12#projects/{project}/metrics/{metric}"\x83\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x13GetLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric"\x82\x01\n\x16\x43reateLogMetricRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"\x87\x01\n\x16UpdateLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02"T\n\x16\x44\x65leteLogMetricRequest\x12:\n\x0bmetric_name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dlogging.googleapis.com/Metric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"?\x82\xd3\xe4\x93\x02)"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x9f\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_distribution__pb2.DESCRIPTOR, @@ -51,29 +57,18 @@ full_name="google.logging.v2.LogMetric.ApiVersion", filename=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="V2", - index=0, - number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V2", index=0, number=0, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="V1", - index=1, - number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key, + name="V1", index=1, number=1, serialized_options=None, type=None ), ], containing_type=None, serialized_options=None, - serialized_start=922, - serialized_end=950, + serialized_start=877, + serialized_end=905, ) _sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) @@ -84,7 +79,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -95,7 +89,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, @@ -103,7 +97,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -114,7 +107,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, @@ -122,19 +115,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=866, - serialized_end=920, + serialized_start=821, + serialized_end=875, ) _LOGMETRIC = _descriptor.Descriptor( @@ -143,7 +135,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -154,15 +145,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -173,15 +163,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -192,15 +181,14 @@ 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=b"\340A\002", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric_descriptor", @@ -217,9 +205,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value_extractor", @@ -230,15 +217,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_extractors", @@ -255,9 +241,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bucket_options", @@ -274,9 +259,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -293,9 +277,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -312,9 +295,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\003", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -331,9 +313,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\030\001", + serialized_options=_b("\030\001"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -343,13 +324,15 @@ enum_types=[ _LOGMETRIC_APIVERSION, ], - serialized_options=b"\352AG\n logging.googleapis.com/LogMetric\022#projects/{project}/metrics/{metric}", + serialized_options=_b( + "\352AD\n\035logging.googleapis.com/Metric\022#projects/{project}/metrics/{metric}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=374, - serialized_end=1026, + serialized_end=978, ) @@ -359,7 +342,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -370,15 +352,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=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -389,15 +372,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -414,9 +396,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -427,8 +408,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1029, - serialized_end=1170, + serialized_start=981, + serialized_end=1112, ) @@ -438,7 +419,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metrics", @@ -457,7 +437,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -468,7 +447,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, @@ -476,7 +455,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -487,8 +465,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1172, - serialized_end=1268, + serialized_start=1114, + serialized_end=1210, ) @@ -498,7 +476,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -509,15 +486,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -528,8 +506,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1270, - serialized_end=1354, + serialized_start=1212, + serialized_end=1293, ) @@ -539,7 +517,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -550,15 +527,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=b'\340A\002\372A"\022 logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -575,9 +553,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -588,8 +565,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1357, - serialized_end=1490, + serialized_start=1296, + serialized_end=1426, ) @@ -599,7 +576,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -610,15 +586,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="metric", @@ -635,9 +612,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -648,8 +624,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1493, - serialized_end=1631, + serialized_start=1429, + serialized_end=1564, ) @@ -659,7 +635,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="metric_name", @@ -670,15 +645,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=b'\340A\002\372A"\n logging.googleapis.com/LogMetric', + serialized_options=_b( + "\340A\002\372A\037\n\035logging.googleapis.com/Metric" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -689,8 +665,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1633, - serialized_end=1720, + serialized_start=1566, + serialized_end=1650, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC @@ -726,25 +702,28 @@ LogMetric = _reflection.GeneratedProtocolMessageType( "LogMetric", (_message.Message,), - { - "LabelExtractorsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelExtractorsEntry=_reflection.GeneratedProtocolMessageType( "LabelExtractorsEntry", (_message.Message,), - { - "DESCRIPTOR": _LOGMETRIC_LABELEXTRACTORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2" + dict( + DESCRIPTOR=_LOGMETRIC_LABELEXTRACTORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) - }, + ), ), - "DESCRIPTOR": _LOGMETRIC, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Describes a logs-based metric. The value of the metric is the number - of log entries that match a logs filter in a given time interval. + DESCRIPTOR=_LOGMETRIC, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""Describes a logs-based metric. The value of the metric is + the number of log entries that match a logs filter in a given time + interval. + Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options. + Attributes: name: Required. The client-assigned metric identifier. Examples: @@ -765,16 +744,16 @@ documentation. The maximum length of the description is 8000 characters. filter: - Required. An `advanced logs filter `__ which is used to match - log entries. Example: :: "resource.type=gae_app AND - severity>=ERROR" The maximum length of the filter is 20000 - characters. + Required. An `advanced logs filter + `__ which is used to + match log entries. Example: :: "resource.type=gae_app + AND severity>=ERROR" The maximum length of the filter is + 20000 characters. metric_descriptor: Optional. The metric descriptor associated with the logs-based metric. If unspecified, it uses a default metric descriptor with a DELTA metric kind, INT64 value type, with no labels and - a unit of “1”. Such a metric counts the number of log entries + a unit of "1". Such a metric counts the number of log entries matching the ``filter`` expression. The ``name``, ``type``, and ``description`` fields in the ``metric_descriptor`` are output only, and is constructed using the ``name`` and @@ -839,7 +818,7 @@ changed. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - }, + ), ) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) @@ -847,10 +826,11 @@ ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( "ListLogMetricsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to ListLogMetrics. + dict( + DESCRIPTOR=_LISTLOGMETRICSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to ListLogMetrics. + Attributes: parent: @@ -869,17 +849,18 @@ might be available. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogMetricsRequest) ListLogMetricsResponse = _reflection.GeneratedProtocolMessageType( "ListLogMetricsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGMETRICSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """Result returned from ListLogMetrics. + dict( + DESCRIPTOR=_LISTLOGMETRICSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""Result returned from ListLogMetrics. + Attributes: metrics: @@ -891,17 +872,18 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogMetricsResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogMetricsResponse) GetLogMetricRequest = _reflection.GeneratedProtocolMessageType( "GetLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _GETLOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to GetLogMetric. + dict( + DESCRIPTOR=_GETLOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to GetLogMetric. + Attributes: metric_name: @@ -909,62 +891,65 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.GetLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(GetLogMetricRequest) CreateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "CreateLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _CREATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to CreateLogMetric. + dict( + DESCRIPTOR=_CREATELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to CreateLogMetric. + Attributes: parent: Required. The resource name of the project in which to create - the metric: :: "projects/[PROJECT_ID]" The new metric + the metric: :: "projects/[PROJECT_ID]" The new metric must be provided in the request. metric: Required. The new logs-based metric, which must not have an identifier that already exists. """, # @@protoc_insertion_point(class_scope:google.logging.v2.CreateLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(CreateLogMetricRequest) UpdateLogMetricRequest = _reflection.GeneratedProtocolMessageType( "UpdateLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _UPDATELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to UpdateLogMetric. + dict( + DESCRIPTOR=_UPDATELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to UpdateLogMetric. + Attributes: metric_name: Required. The resource name of the metric to update: :: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated - metric must be provided in the request and it’s ``name`` field + metric must be provided in the request and it's ``name`` field must be the same as ``[METRIC_ID]`` If the metric does not exist in ``[PROJECT_ID]``, then a new metric is created. metric: Required. The updated metric. """, # @@protoc_insertion_point(class_scope:google.logging.v2.UpdateLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(UpdateLogMetricRequest) DeleteLogMetricRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogMetricRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETELOGMETRICREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_metrics_pb2", - "__doc__": """The parameters to DeleteLogMetric. + dict( + DESCRIPTOR=_DELETELOGMETRICREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to DeleteLogMetric. + Attributes: metric_name: @@ -972,27 +957,16 @@ "projects/[PROJECT_ID]/metrics/[METRIC_ID]" """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogMetricRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteLogMetricRequest) DESCRIPTOR._options = None _LOGMETRIC_LABELEXTRACTORSENTRY._options = None -_LOGMETRIC.fields_by_name["name"]._options = None -_LOGMETRIC.fields_by_name["description"]._options = None -_LOGMETRIC.fields_by_name["filter"]._options = None -_LOGMETRIC.fields_by_name["metric_descriptor"]._options = None -_LOGMETRIC.fields_by_name["value_extractor"]._options = None -_LOGMETRIC.fields_by_name["label_extractors"]._options = None -_LOGMETRIC.fields_by_name["bucket_options"]._options = None -_LOGMETRIC.fields_by_name["create_time"]._options = None -_LOGMETRIC.fields_by_name["update_time"]._options = None _LOGMETRIC.fields_by_name["version"]._options = None _LOGMETRIC._options = None _LISTLOGMETRICSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_token"]._options = None -_LISTLOGMETRICSREQUEST.fields_by_name["page_size"]._options = None _GETLOGMETRICREQUEST.fields_by_name["metric_name"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["parent"]._options = None _CREATELOGMETRICREQUEST.fields_by_name["metric"]._options = None @@ -1005,10 +979,11 @@ full_name="google.logging.v2.MetricsServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", - create_key=_descriptor._internal_create_key, - serialized_start=1723, - serialized_end=2793, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + ), + serialized_start=1653, + serialized_end=2723, methods=[ _descriptor.MethodDescriptor( name="ListLogMetrics", @@ -1017,8 +992,9 @@ containing_service=None, input_type=_LISTLOGMETRICSREQUEST, output_type=_LISTLOGMETRICSRESPONSE, - serialized_options=b"\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics\332A\006parent" + ), ), _descriptor.MethodDescriptor( name="GetLogMetric", @@ -1027,8 +1003,9 @@ containing_service=None, input_type=_GETLOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" + ), ), _descriptor.MethodDescriptor( name="CreateLogMetric", @@ -1037,8 +1014,9 @@ containing_service=None, input_type=_CREATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b'\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric\332A\rparent,metric' + ), ), _descriptor.MethodDescriptor( name="UpdateLogMetric", @@ -1047,8 +1025,9 @@ containing_service=None, input_type=_UPDATELOGMETRICREQUEST, output_type=_LOGMETRIC, - serialized_options=b"\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric\332A\022metric_name,metric" + ), ), _descriptor.MethodDescriptor( name="DeleteLogMetric", @@ -1057,8 +1036,9 @@ containing_service=None, input_type=_DELETELOGMETRICREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}\332A\013metric_name" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py index c97379c14..a3a373368 100644 --- a/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,7 +14,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.ListLogMetrics = channel.unary_unary( "/google.logging.v2.MetricsServiceV2/ListLogMetrics", @@ -110,143 +109,3 @@ def add_MetricsServiceV2Servicer_to_server(servicer, server): "google.logging.v2.MetricsServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class MetricsServiceV2(object): - """Service for configuring logs-based metrics.""" - - @staticmethod - def ListLogMetrics( - 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.logging.v2.MetricsServiceV2/ListLogMetrics", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def GetLogMetric( - 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.logging.v2.MetricsServiceV2/GetLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def CreateLogMetric( - 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.logging.v2.MetricsServiceV2/CreateLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def UpdateLogMetric( - 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.logging.v2.MetricsServiceV2/UpdateLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def DeleteLogMetric( - 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.logging.v2.MetricsServiceV2/DeleteLogMetric", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/google/cloud/logging_v2/proto/logging_pb2.py b/google/cloud/logging_v2/proto/logging_pb2.py index 7c4fa3929..08cc2b49e 100644 --- a/google/cloud/logging_v2/proto/logging_pb2.py +++ b/google/cloud/logging_v2/proto/logging_pb2.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/logging.proto -"""Generated protocol buffer code.""" + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -12,6 +15,7 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import 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 ( @@ -26,20 +30,22 @@ ) from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/logging_v2/proto/logging.proto", package="google.logging.v2", syntax="proto3", - serialized_options=b"\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2\352\002\032Google::Cloud::Logging::V2", - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/api/annotations.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\n\x1alogging.googleapis.com/Log"\xe6\x02\n\x16WriteLogEntriesRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x01\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12\x34\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_success\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07\x64ry_run\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb0\x01\n\x15ListLogEntriesRequest\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Z\n\'ListMonitoredResourceDescriptorsRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x0fListLogsRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb5\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3', + serialized_options=_b( + "\n\025com.google.logging.v2B\014LoggingProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n+google/cloud/logging_v2/proto/logging.proto\x12\x11google.logging.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/logging_v2/proto/log_entry.proto\x1a\x32google/cloud/logging_v2/proto/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"H\n\x10\x44\x65leteLogRequest\x12\x34\n\x08log_name\x18\x01 \x01(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log"\xcf\x02\n\x16WriteLogEntriesRequest\x12\x31\n\x08log_name\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1alogging.googleapis.com/Log\x12/\n\x08resource\x18\x02 \x01(\x0b\x32\x1d.google.api.MonitoredResource\x12\x45\n\x06labels\x18\x03 \x03(\x0b\x32\x35.google.logging.v2.WriteLogEntriesRequest.LabelsEntry\x12\x31\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntryB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_success\x18\x05 \x01(\x08\x12\x0f\n\x07\x64ry_run\x18\x06 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x19\n\x17WriteLogEntriesResponse"\xc8\x01\n\x1cWriteLogEntriesPartialErrors\x12]\n\x10log_entry_errors\x18\x01 \x03(\x0b\x32\x43.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1aI\n\x13LogEntryErrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status:\x02\x38\x01"\xb5\x01\n\x15ListLogEntriesRequest\x12\x17\n\x0bproject_ids\x18\x01 \x03(\tB\x02\x18\x01\x12:\n\x0eresource_names\x18\x08 \x03(\tB"\xe0\x41\x02\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"_\n\x16ListLogEntriesResponse\x12,\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"P\n\'ListMonitoredResourceDescriptorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"\x8a\x01\n(ListMonitoredResourceDescriptorsResponse\x12\x45\n\x14resource_descriptors\x18\x01 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"i\n\x0fListLogsRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\x12\x1alogging.googleapis.com/Log\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t">\n\x10ListLogsResponse\x12\x11\n\tlog_names\x18\x03 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xdd\n\n\x10LoggingServiceV2\x12\x93\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xc8\x01\x82\xd3\xe4\x93\x02\xb6\x01* /v2/{log_name=projects/*/logs/*}Z\x1b*\x19/v2/{log_name=*/*/logs/*}Z\'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1f/v2/{log_name=folders/*/logs/*}Z)*\'/v2/{log_name=billingAccounts/*/logs/*}\xda\x41\x08log_name\x12\xa9\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"?\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\xda\x41 log_name,resource,labels,entries\x12\xa3\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"<\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\xda\x41\x1eresource_names,filter,order_by\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\x88\x02\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xa2\x01\x12\x15/v2/{parent=*/*}/logsZ\x1e\x12\x1c/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1d\x12\x1b/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logs\xda\x41\x06parent\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\x98\x01\n\x15\x63om.google.logging.v2B\x0cLoggingProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, @@ -48,10 +54,8 @@ google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, - google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -62,7 +66,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -73,15 +76,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=b"\340A\002\372A\034\n\032logging.googleapis.com/Log", + serialized_options=_b( + "\340A\002\372A\034\022\032logging.googleapis.com/Log" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -92,8 +96,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=470, - serialized_end=542, + serialized_start=436, + serialized_end=508, ) @@ -103,7 +107,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -114,7 +117,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, @@ -122,7 +125,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -133,7 +135,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, @@ -141,19 +143,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=858, - serialized_end=903, + serialized_start=801, + serialized_end=846, ) _WRITELOGENTRIESREQUEST = _descriptor.Descriptor( @@ -162,7 +163,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_name", @@ -173,15 +173,14 @@ 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=b"\340A\001\372A\034\n\032logging.googleapis.com/Log", + serialized_options=_b("\372A\034\n\032logging.googleapis.com/Log"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="resource", @@ -198,9 +197,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -217,9 +215,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entries", @@ -236,9 +233,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002", + serialized_options=_b("\340A\002"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_success", @@ -255,9 +251,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="dry_run", @@ -274,9 +269,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -289,8 +283,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=545, - serialized_end=903, + serialized_start=511, + serialized_end=846, ) @@ -300,7 +294,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -310,8 +303,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=905, - serialized_end=930, + serialized_start=848, + serialized_end=873, ) @@ -321,7 +314,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -340,7 +332,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -359,19 +350,18 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=b"8\001", + serialized_options=_b("8\001"), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1060, - serialized_end=1133, + serialized_start=1003, + serialized_end=1076, ) _WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( @@ -380,7 +370,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_entry_errors", @@ -399,7 +388,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -412,8 +400,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=933, - serialized_end=1133, + serialized_start=876, + serialized_end=1076, ) @@ -423,12 +411,29 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ + _descriptor.FieldDescriptor( + name="project_ids", + full_name="google.logging.v2.ListLogEntriesRequest.project_ids", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="resource_names", full_name="google.logging.v2.ListLogEntriesRequest.resource_names", - index=0, + index=1, number=8, type=9, cpp_type=9, @@ -440,52 +445,51 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + serialized_options=_b( + "\340A\002\372A\034\022\032logging.googleapis.com/Log" + ), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", full_name="google.logging.v2.ListLogEntriesRequest.filter", - index=1, + index=2, number=2, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="order_by", full_name="google.logging.v2.ListLogEntriesRequest.order_by", - index=2, + index=3, number=3, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", full_name="google.logging.v2.ListLogEntriesRequest.page_size", - index=3, + index=4, number=4, type=5, cpp_type=1, @@ -497,28 +501,26 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", full_name="google.logging.v2.ListLogEntriesRequest.page_token", - index=4, + index=5, number=5, type=9, 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -529,8 +531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1136, - serialized_end=1312, + serialized_start=1079, + serialized_end=1260, ) @@ -540,7 +542,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entries", @@ -559,7 +560,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -570,7 +570,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, @@ -578,7 +578,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -589,8 +588,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1314, - serialized_end=1409, + serialized_start=1262, + serialized_end=1357, ) @@ -600,7 +599,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="page_size", @@ -617,9 +615,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -630,15 +627,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -649,8 +645,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1411, - serialized_end=1501, + serialized_start=1359, + serialized_end=1439, ) @@ -660,7 +656,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="resource_descriptors", @@ -679,7 +674,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -690,7 +684,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, @@ -698,7 +692,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -709,8 +702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1504, - serialized_end=1642, + serialized_start=1442, + serialized_end=1580, ) @@ -720,7 +713,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -731,15 +723,14 @@ 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=b"\340A\002\372A\034\022\032logging.googleapis.com/Log", + serialized_options=_b("\372A\034\022\032logging.googleapis.com/Log"), file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -756,9 +747,8 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -769,15 +759,14 @@ 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=b"\340A\001", + serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -788,8 +777,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1644, - serialized_end=1762, + serialized_start=1582, + serialized_end=1687, ) @@ -799,7 +788,6 @@ filename=None, file=DESCRIPTOR, containing_type=None, - create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="log_names", @@ -818,7 +806,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -829,7 +816,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, @@ -837,7 +824,6 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -848,8 +834,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1764, - serialized_end=1826, + serialized_start=1689, + serialized_end=1751, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -904,10 +890,11 @@ DeleteLogRequest = _reflection.GeneratedProtocolMessageType( "DeleteLogRequest", (_message.Message,), - { - "DESCRIPTOR": _DELETELOGREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to DeleteLog. + dict( + DESCRIPTOR=_DELETELOGREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to DeleteLog. + Attributes: log_name: @@ -922,59 +909,60 @@ about log names, see [LogEntry][google.logging.v2.LogEntry]. """, # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) - }, + ), ) _sym_db.RegisterMessage(DeleteLogRequest) WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesRequest", (_message.Message,), - { - "LabelsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESREQUEST_LABELSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" + dict( + DESCRIPTOR=_WRITELOGENTRIESREQUEST_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) - }, + ), ), - "DESCRIPTOR": _WRITELOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to WriteLogEntries. + DESCRIPTOR=_WRITELOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to WriteLogEntries. + Attributes: log_name: Optional. A default log resource name that is assigned to all log entries in ``entries`` that do not specify a value for - ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" + ``log_name``: :: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" ``[LOG_ID]`` must be URL- - encoded. For example: :: "projects/my-project- - id/logs/syslog" "organizations/1234567890/logs/cloudresourc - emanager.googleapis.com%2Factivity" The permission - ``logging.logEntries.create`` is needed on each project, + encoded. For example: :: "projects/my-project- + id/logs/syslog" "organizations/1234567890/logs/cloudresour + cemanager.googleapis.com%2Factivity" The permission + logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new - log entries, whether the resource is specified in ``logName`` - or in an individual log entry. + log entries, whether the resource is specified in logName or + in an individual log entry. resource: Optional. A default monitored resource object that is assigned to all log entries in ``entries`` that do not specify a value - for ``resource``. Example: :: { "type": "gce_instance", - "labels": { "zone": "us-central1-a", "instance_id": + for ``resource``. Example: :: { "type": "gce_instance", + "labels": { "zone": "us-central1-a", "instance_id": "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels: Optional. Default labels that are added to the ``labels`` field of all log entries in ``entries``. If a log entry already has a label with the same key as a label in this - parameter, then the log entry’s label is not changed. See + parameter, then the log entry's label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries: Required. The log entries to send to Logging. The order of log entries in this list does not matter. Values supplied in this - method’s ``log_name``, ``resource``, and ``labels`` fields are + method's ``log_name``, ``resource``, and ``labels`` fields are copied into those log entries in this list that do not include values for their corresponding fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. If the @@ -985,33 +973,31 @@ their own values, the entries earlier in the list will sort before the entries later in the list. See the ``entries.list`` method. Log entries with timestamps that are more than the - `logs retention period - `__ in the past + `logs retention period `__ in the past or more than 24 hours in the future will not be available when calling ``entries.list``. However, those log entries can still - be `exported with LogSinks - `__. To improve throughput and to avoid exceeding the - `quota limit `__ for calls to ``entries.write``, you should try to - include several log entries in this list, rather than calling - this method for each individual log entry. + `quota limit `__ for calls to + ``entries.write``, you should try to include several log + entries in this list, rather than calling this method for each + individual log entry. partial_success: Optional. Whether valid entries should be written even if some - other entries fail due to INVALID_ARGUMENT or - PERMISSION_DENIED errors. If any entry is not written, then + other entries fail due to INVALID\_ARGUMENT or + PERMISSION\_DENIED errors. If any entry is not written, then the response status is the error associated with one of the failed entries and the response includes error details keyed - by the entries’ zero-based index in the ``entries.write`` + by the entries' zero-based index in the ``entries.write`` method. dry_run: Optional. If true, the request should expect normal response, - but the entries won’t be persisted nor exported. Useful for + but the entries won't be persisted nor exported. Useful for checking whether the logging API endpoints are working properly before sending valuable data. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesRequest) _sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) @@ -1019,42 +1005,45 @@ WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesResponse", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from WriteLogEntries.""", + dict( + DESCRIPTOR=_WRITELOGENTRIESRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from WriteLogEntries. empty + + """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesResponse) WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( "WriteLogEntriesPartialErrors", (_message.Message,), - { - "LogEntryErrorsEntry": _reflection.GeneratedProtocolMessageType( + dict( + LogEntryErrorsEntry=_reflection.GeneratedProtocolMessageType( "LogEntryErrorsEntry", (_message.Message,), - { - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, - "__module__": "google.cloud.logging_v2.proto.logging_pb2" + dict( + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) - }, + ), ), - "DESCRIPTOR": _WRITELOGENTRIESPARTIALERRORS, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Error details for WriteLogEntries with partial success. + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Error details for WriteLogEntries with partial success. + Attributes: log_entry_errors: When ``WriteLogEntriesRequest.partial_success`` is true, records the error status for entries that were not written due - to a permanent error, keyed by the entry’s zero-based index in + to a permanent error, keyed by the entry's zero-based index in ``WriteLogEntriesRequest.entries``. Failed requests for which no entries are written will not include per-entry errors. """, # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors) - }, + ), ) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors) _sym_db.RegisterMessage(WriteLogEntriesPartialErrors.LogEntryErrorsEntry) @@ -1062,23 +1051,27 @@ ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( "ListLogEntriesRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ``ListLogEntries``. + dict( + DESCRIPTOR=_LISTLOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ``ListLogEntries``. + Attributes: + project_ids: + Deprecated. Use ``resource_names`` instead. One or more + project identifiers or project numbers from which to retrieve + log entries. Example: ``"my-project-1A"``. resource_names: Required. Names of one or more parent resources from which to - retrieve log entries: :: "projects/[PROJECT_ID]" + retrieve log entries: :: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" Projects listed in the ``project_ids`` field are added to this list. filter: Optional. A filter that chooses which log entries to return. - See `Advanced Logs Queries - `__. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in ``resource_names``. Referencing a parent @@ -1096,8 +1089,7 @@ values. page_size: Optional. The maximum number of results to return from this - request. Default is 50. If the value is negative or exceeds - 1000, the request is rejected. The presence of + request. Non-positive values are ignored. The presence of ``next_page_token`` in the response indicates that more results might be available. page_token: @@ -1108,17 +1100,18 @@ those in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogEntriesRequest) ListLogEntriesResponse = _reflection.GeneratedProtocolMessageType( "ListLogEntriesResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGENTRIESRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ``ListLogEntries``. + dict( + DESCRIPTOR=_LISTLOGENTRIESRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ``ListLogEntries``. + Attributes: entries: @@ -1140,17 +1133,18 @@ search. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogEntriesResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogEntriesResponse) ListMonitoredResourceDescriptorsRequest = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListMonitoredResourceDescriptors + dict( + DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ListMonitoredResourceDescriptors + Attributes: page_size: @@ -1166,17 +1160,18 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsRequest) - }, + ), ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsRequest) ListMonitoredResourceDescriptorsResponse = _reflection.GeneratedProtocolMessageType( "ListMonitoredResourceDescriptorsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListMonitoredResourceDescriptors. + dict( + DESCRIPTOR=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ListMonitoredResourceDescriptors. + Attributes: resource_descriptors: @@ -1188,22 +1183,23 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListMonitoredResourceDescriptorsResponse) - }, + ), ) _sym_db.RegisterMessage(ListMonitoredResourceDescriptorsResponse) ListLogsRequest = _reflection.GeneratedProtocolMessageType( "ListLogsRequest", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSREQUEST, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """The parameters to ListLogs. + dict( + DESCRIPTOR=_LISTLOGSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ListLogs. + Attributes: parent: Required. The resource name that owns the logs: :: - "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" page_size: @@ -1219,17 +1215,18 @@ in the previous call. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsRequest) - }, + ), ) _sym_db.RegisterMessage(ListLogsRequest) ListLogsResponse = _reflection.GeneratedProtocolMessageType( "ListLogsResponse", (_message.Message,), - { - "DESCRIPTOR": _LISTLOGSRESPONSE, - "__module__": "google.cloud.logging_v2.proto.logging_pb2", - "__doc__": """Result returned from ListLogs. + dict( + DESCRIPTOR=_LISTLOGSRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from ListLogs. + Attributes: log_names: @@ -1243,7 +1240,7 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - }, + ), ) _sym_db.RegisterMessage(ListLogsResponse) @@ -1252,32 +1249,22 @@ _DELETELOGREQUEST.fields_by_name["log_name"]._options = None _WRITELOGENTRIESREQUEST_LABELSENTRY._options = None _WRITELOGENTRIESREQUEST.fields_by_name["log_name"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["resource"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["labels"]._options = None _WRITELOGENTRIESREQUEST.fields_by_name["entries"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["partial_success"]._options = None -_WRITELOGENTRIESREQUEST.fields_by_name["dry_run"]._options = None _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["project_ids"]._options = None _LISTLOGENTRIESREQUEST.fields_by_name["resource_names"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["filter"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["order_by"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGENTRIESREQUEST.fields_by_name["page_token"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_size"]._options = None -_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST.fields_by_name["page_token"]._options = None _LISTLOGSREQUEST.fields_by_name["parent"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_size"]._options = None -_LISTLOGSREQUEST.fields_by_name["page_token"]._options = None _LOGGINGSERVICEV2 = _descriptor.ServiceDescriptor( name="LoggingServiceV2", full_name="google.logging.v2.LoggingServiceV2", file=DESCRIPTOR, index=0, - serialized_options=b"\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write", - create_key=_descriptor._internal_create_key, - serialized_start=1829, - serialized_end=3202, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + ), + serialized_start=1754, + serialized_end=3127, methods=[ _descriptor.MethodDescriptor( name="DeleteLog", @@ -1286,8 +1273,9 @@ containing_service=None, input_type=_DELETELOGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=b"\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\332A\010log_name" + ), ), _descriptor.MethodDescriptor( name="WriteLogEntries", @@ -1296,8 +1284,9 @@ containing_service=None, input_type=_WRITELOGENTRIESREQUEST, output_type=_WRITELOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\026"\021/v2/entries:write:\001*\332A log_name,resource,labels,entries' + ), ), _descriptor.MethodDescriptor( name="ListLogEntries", @@ -1306,8 +1295,9 @@ containing_service=None, input_type=_LISTLOGENTRIESREQUEST, output_type=_LISTLOGENTRIESRESPONSE, - serialized_options=b'\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002\025"\020/v2/entries:list:\001*\332A\036resource_names,filter,order_by' + ), ), _descriptor.MethodDescriptor( name="ListMonitoredResourceDescriptors", @@ -1316,8 +1306,9 @@ containing_service=None, input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, - serialized_options=b'\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors', - create_key=_descriptor._internal_create_key, + serialized_options=_b( + '\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors' + ), ), _descriptor.MethodDescriptor( name="ListLogs", @@ -1326,8 +1317,9 @@ containing_service=None, input_type=_LISTLOGSREQUEST, output_type=_LISTLOGSRESPONSE, - serialized_options=b"\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent", - create_key=_descriptor._internal_create_key, + serialized_options=_b( + "\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs\332A\006parent" + ), ), ], ) diff --git a/google/cloud/logging_v2/proto/logging_pb2_grpc.py b/google/cloud/logging_v2/proto/logging_pb2_grpc.py index 15c16bee0..2e444b925 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -1,5 +1,4 @@ # 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.logging_v2.proto import ( @@ -15,7 +14,7 @@ def __init__(self, channel): """Constructor. Args: - channel: A grpc.Channel. + channel: A grpc.Channel. """ self.DeleteLog = channel.unary_unary( "/google.logging.v2.LoggingServiceV2/DeleteLog", @@ -73,8 +72,7 @@ def WriteLogEntries(self, request, context): def ListLogEntries(self, request, context): """Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log - entries, see [Exporting - Logs](https://cloud.google.com/logging/docs/export). + entries, see [Exporting Logs](/logging/docs/export). """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -127,143 +125,3 @@ def add_LoggingServiceV2Servicer_to_server(servicer, server): "google.logging.v2.LoggingServiceV2", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) - - -# This class is part of an EXPERIMENTAL API. -class LoggingServiceV2(object): - """Service for ingesting and querying logs.""" - - @staticmethod - def DeleteLog( - 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.logging.v2.LoggingServiceV2/DeleteLog", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, - google_dot_protobuf_dot_empty__pb2.Empty.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def WriteLogEntries( - 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.logging.v2.LoggingServiceV2/WriteLogEntries", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListLogEntries( - 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.logging.v2.LoggingServiceV2/ListLogEntries", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListMonitoredResourceDescriptors( - 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.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - - @staticmethod - def ListLogs( - 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.logging.v2.LoggingServiceV2/ListLogs", - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, - google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, - options, - channel_credentials, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) diff --git a/synth.metadata b/synth.metadata index f2ec255da..077f70d0e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c941026e5e3d600817a20e9ab4d4be03dff21a68", - "internalRef": "334645418" + "sha": "438e61571a44e1cd58f99cf8a8eb6163d0f0ee39", + "internalRef": "336682434" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4" + "sha": "befc24dcdeb8e57ec1259826fd33120b05137e8f" } } ], @@ -87,34 +87,11 @@ "docs/_static/custom.css", "docs/_templates/layout.html", "docs/conf.py", - "docs/gapic/v2/api.rst", - "docs/gapic/v2/types.rst", "docs/multiprocessing.rst", - "google/cloud/logging_v2/gapic/__init__.py", - "google/cloud/logging_v2/gapic/config_service_v2_client.py", - "google/cloud/logging_v2/gapic/config_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/enums.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client.py", - "google/cloud/logging_v2/gapic/logging_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client.py", - "google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py", - "google/cloud/logging_v2/gapic/transports/__init__.py", - "google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py", - "google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py", - "google/cloud/logging_v2/proto/__init__.py", "google/cloud/logging_v2/proto/log_entry.proto", - "google/cloud/logging_v2/proto/log_entry_pb2.py", - "google/cloud/logging_v2/proto/log_entry_pb2_grpc.py", "google/cloud/logging_v2/proto/logging.proto", "google/cloud/logging_v2/proto/logging_config.proto", - "google/cloud/logging_v2/proto/logging_config_pb2.py", - "google/cloud/logging_v2/proto/logging_config_pb2_grpc.py", "google/cloud/logging_v2/proto/logging_metrics.proto", - "google/cloud/logging_v2/proto/logging_metrics_pb2.py", - "google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py", - "google/cloud/logging_v2/proto/logging_pb2.py", - "google/cloud/logging_v2/proto/logging_pb2_grpc.py", "renovate.json", "scripts/decrypt-secrets.sh", "scripts/readme-gen/readme_gen.py", @@ -124,9 +101,6 @@ "scripts/readme-gen/templates/install_deps.tmpl.rst", "scripts/readme-gen/templates/install_portaudio.tmpl.rst", "setup.cfg", - "testing/.gitignore", - "tests/unit/gapic/v2/test_config_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_logging_service_v2_client_v2.py", - "tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py" + "testing/.gitignore" ] } \ No newline at end of file diff --git a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py index 1b267f75c..0483a4582 100644 --- a/tests/unit/gapic/v2/test_config_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_config_service_v2_client_v2.py @@ -62,25 +62,36 @@ class CustomException(Exception): class TestConfigServiceV2Client(object): - def test_delete_sink(self): - channel = ChannelStub() + def test_list_sinks(self): + # Setup Expected Response + next_page_token = "" + sinks_element = {} + sinks = [sinks_element] + expected_response = {"next_page_token": next_page_token, "sinks": sinks} + expected_response = logging_config_pb2.ListSinksResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + parent = client.project_path("[PROJECT]") - client.delete_sink(sink_name) + paged_list_response = client.list_sinks(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.sinks[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.ListSinksRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_sink_exception(self): - # Mock the API response + def test_list_sinks_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -88,12 +99,13 @@ def test_delete_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + parent = client.project_path("[PROJECT]") + paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - client.delete_sink(sink_name) + list(paged_list_response) - def test_update_sink(self): + def test_get_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -121,95 +133,18 @@ def test_update_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") - response = client.update_sink(sink_name, sink) + response = client.get_sink(sink_name) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateSinkRequest( - sink_name=sink_name, sink=sink - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_update_sink_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - sink_name = "sinkName-1391757129" - sink = {} - - with pytest.raises(CustomException): - client.update_sink(sink_name, sink) - - def test_delete_exclusion(self): - channel = ChannelStub() - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = "name3373707" - - client.delete_exclusion(name) - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_exclusion_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request - name = "name3373707" - - with pytest.raises(CustomException): - client.delete_exclusion(name) - - def test_list_buckets(self): - # Setup Expected Response - next_page_token = "" - buckets_element = {} - buckets = [buckets_element] - expected_response = {"next_page_token": next_page_token, "buckets": buckets} - expected_response = logging_config_pb2.ListBucketsResponse(**expected_response) - + def test_get_sink_exception(self): # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") - - paged_list_response = client.list_buckets(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.buckets[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.ListBucketsRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_buckets_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -217,67 +152,30 @@ def test_list_buckets_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.organization_location_path("[ORGANIZATION]", "[LOCATION]") + sink_name = client.sink_path("[PROJECT]", "[SINK]") - paged_list_response = client.list_buckets(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.get_sink(sink_name) - def test_get_bucket(self): + def test_create_sink(self): # Setup Expected Response - name_2 = "name2-1052831874" - description = "description-1724546052" - retention_days = 1544391896 - expected_response = { - "name": name_2, - "description": description, - "retention_days": retention_days, - } - expected_response = logging_config_pb2.LogBucket(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - name = "name3373707" - - response = client.get_bucket(name) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetBucketRequest(name=name) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_get_bucket_exception(self): - # Mock the API response - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup request name = "name3373707" - - with pytest.raises(CustomException): - client.get_bucket(name) - - def test_update_bucket(self): - # Setup Expected Response - name_2 = "name2-1052831874" + destination = "destination-1429847026" + filter_ = "filter-1274492040" description = "description-1724546052" - retention_days = 1544391896 + disabled = True + writer_identity = "writerIdentity775638794" + include_children = True expected_response = { - "name": name_2, + "name": name, + "destination": destination, + "filter": filter_, "description": description, - "retention_days": retention_days, + "disabled": disabled, + "writer_identity": writer_identity, + "include_children": include_children, } - expected_response = logging_config_pb2.LogBucket(**expected_response) + expected_response = logging_config_pb2.LogSink(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -287,21 +185,20 @@ def test_update_bucket(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" - bucket = {} - update_mask = {} + parent = client.project_path("[PROJECT]") + sink = {} - response = client.update_bucket(name, bucket, update_mask) + response = client.create_sink(parent, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateBucketRequest( - name=name, bucket=bucket, update_mask=update_mask + expected_request = logging_config_pb2.CreateSinkRequest( + parent=parent, sink=sink ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_bucket_exception(self): + def test_create_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -309,58 +206,14 @@ def test_update_bucket_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - bucket = {} - update_mask = {} - - with pytest.raises(CustomException): - client.update_bucket(name, bucket, update_mask) - - def test_list_sinks(self): - # Setup Expected Response - next_page_token = "" - sinks_element = {} - sinks = [sinks_element] - expected_response = {"next_page_token": next_page_token, "sinks": sinks} - expected_response = logging_config_pb2.ListSinksResponse(**expected_response) - - # Mock the API response - channel = ChannelStub(responses=[expected_response]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - - # Setup Request - parent = client.project_path("[PROJECT]") - - paged_list_response = client.list_sinks(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.sinks[0] == resources[0] - - assert len(channel.requests) == 1 - expected_request = logging_config_pb2.ListSinksRequest(parent=parent) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_list_sinks_exception(self): - channel = ChannelStub(responses=[CustomException()]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = logging_v2.ConfigServiceV2Client() - # Setup request parent = client.project_path("[PROJECT]") + sink = {} - paged_list_response = client.list_sinks(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.create_sink(parent, sink) - def test_get_sink(self): + def test_update_sink(self): # Setup Expected Response name = "name3373707" destination = "destination-1429847026" @@ -388,17 +241,20 @@ def test_get_sink(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - sink_name = "sinkName-1391757129" + sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink = {} - response = client.get_sink(sink_name) + response = client.update_sink(sink_name, sink) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) + expected_request = logging_config_pb2.UpdateSinkRequest( + sink_name=sink_name, sink=sink + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_sink_exception(self): + def test_update_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -407,53 +263,30 @@ def test_get_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - sink_name = "sinkName-1391757129" + sink_name = client.sink_path("[PROJECT]", "[SINK]") + sink = {} with pytest.raises(CustomException): - client.get_sink(sink_name) - - def test_create_sink(self): - # Setup Expected Response - name = "name3373707" - destination = "destination-1429847026" - filter_ = "filter-1274492040" - description = "description-1724546052" - disabled = True - writer_identity = "writerIdentity775638794" - include_children = True - expected_response = { - "name": name, - "destination": destination, - "filter": filter_, - "description": description, - "disabled": disabled, - "writer_identity": writer_identity, - "include_children": include_children, - } - expected_response = logging_config_pb2.LogSink(**expected_response) + client.update_sink(sink_name, sink) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_sink(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") - response = client.create_sink(parent, sink) - assert expected_response == response + client.delete_sink(sink_name) assert len(channel.requests) == 1 - expected_request = logging_config_pb2.CreateSinkRequest( - parent=parent, sink=sink - ) + expected_request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_sink_exception(self): + def test_delete_sink_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -462,11 +295,10 @@ def test_create_sink_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") - sink = {} + sink_name = client.sink_path("[PROJECT]", "[SINK]") with pytest.raises(CustomException): - client.create_sink(parent, sink) + client.delete_sink(sink_name) def test_list_exclusions(self): # Setup Expected Response @@ -538,7 +370,7 @@ def test_get_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") response = client.get_exclusion(name) assert expected_response == response @@ -557,7 +389,7 @@ def test_get_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") with pytest.raises(CustomException): client.get_exclusion(name) @@ -634,7 +466,7 @@ def test_update_exclusion(self): client = logging_v2.ConfigServiceV2Client() # Setup Request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") exclusion = {} update_mask = {} @@ -657,20 +489,51 @@ def test_update_exclusion_exception(self): client = logging_v2.ConfigServiceV2Client() # Setup request - name = "name3373707" + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") exclusion = {} update_mask = {} with pytest.raises(CustomException): client.update_exclusion(name, exclusion, update_mask) + def test_delete_exclusion(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup Request + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + + client.delete_exclusion(name) + + assert len(channel.requests) == 1 + expected_request = logging_config_pb2.DeleteExclusionRequest(name=name) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_exclusion_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = logging_v2.ConfigServiceV2Client() + + # Setup request + name = client.exclusion_path("[PROJECT]", "[EXCLUSION]") + + with pytest.raises(CustomException): + client.delete_exclusion(name) + def test_get_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" + name = "name3373707" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name_2, + "name": name, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -683,14 +546,11 @@ def test_get_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup Request - name = "name3373707" - - response = client.get_cmek_settings(name) + response = client.get_cmek_settings() assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.GetCmekSettingsRequest(name=name) + expected_request = logging_config_pb2.GetCmekSettingsRequest() actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -702,19 +562,16 @@ def test_get_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - with pytest.raises(CustomException): - client.get_cmek_settings(name) + client.get_cmek_settings() def test_update_cmek_settings(self): # Setup Expected Response - name_2 = "name2-1052831874" + name = "name3373707" kms_key_name = "kmsKeyName2094986649" service_account_id = "serviceAccountId-111486921" expected_response = { - "name": name_2, + "name": name, "kms_key_name": kms_key_name, "service_account_id": service_account_id, } @@ -727,17 +584,11 @@ def test_update_cmek_settings(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup Request - name = "name3373707" - cmek_settings = {} - - response = client.update_cmek_settings(name, cmek_settings) + response = client.update_cmek_settings() assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_config_pb2.UpdateCmekSettingsRequest( - name=name, cmek_settings=cmek_settings - ) + expected_request = logging_config_pb2.UpdateCmekSettingsRequest() actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -749,9 +600,5 @@ def test_update_cmek_settings_exception(self): create_channel.return_value = channel client = logging_v2.ConfigServiceV2Client() - # Setup request - name = "name3373707" - cmek_settings = {} - with pytest.raises(CustomException): - client.update_cmek_settings(name, cmek_settings) + client.update_cmek_settings() diff --git a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py index 9ece054d7..ef2abc733 100644 --- a/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py @@ -71,7 +71,7 @@ def test_delete_log(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - log_name = "logName2013526694" + log_name = client.log_path("[PROJECT]", "[LOG]") client.delete_log(log_name) @@ -89,18 +89,15 @@ def test_delete_log_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - log_name = "logName2013526694" + log_name = client.log_path("[PROJECT]", "[LOG]") with pytest.raises(CustomException): client.delete_log(log_name) - def test_list_log_entries(self): + def test_write_log_entries(self): # Setup Expected Response - next_page_token = "" - entries_element = {} - entries = [entries_element] - expected_response = {"next_page_token": next_page_token, "entries": entries} - expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) + expected_response = {} + expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -110,22 +107,18 @@ def test_list_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - resource_names = [] - - paged_list_response = client.list_log_entries(resource_names) - resources = list(paged_list_response) - assert len(resources) == 1 + entries = [] - assert expected_response.entries[0] == resources[0] + response = client.write_log_entries(entries) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_pb2.ListLogEntriesRequest( - resource_names=resource_names - ) + expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_entries_exception(self): + def test_write_log_entries_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: @@ -133,16 +126,18 @@ def test_list_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - resource_names = [] + entries = [] - paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - list(paged_list_response) + client.write_log_entries(entries) - def test_write_log_entries(self): + def test_list_log_entries(self): # Setup Expected Response - expected_response = {} - expected_response = logging_pb2.WriteLogEntriesResponse(**expected_response) + next_page_token = "" + entries_element = {} + entries = [entries_element] + expected_response = {"next_page_token": next_page_token, "entries": entries} + expected_response = logging_pb2.ListLogEntriesResponse(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -152,18 +147,22 @@ def test_write_log_entries(self): client = logging_v2.LoggingServiceV2Client() # Setup Request - entries = [] + resource_names = [] - response = client.write_log_entries(entries) - assert expected_response == response + paged_list_response = client.list_log_entries(resource_names) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.entries[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_pb2.WriteLogEntriesRequest(entries=entries) + expected_request = logging_pb2.ListLogEntriesRequest( + resource_names=resource_names + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_write_log_entries_exception(self): - # Mock the API response + def test_list_log_entries_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -171,10 +170,11 @@ def test_write_log_entries_exception(self): client = logging_v2.LoggingServiceV2Client() # Setup request - entries = [] + resource_names = [] + paged_list_response = client.list_log_entries(resource_names) with pytest.raises(CustomException): - client.write_log_entries(entries) + list(paged_list_response) def test_list_monitored_resource_descriptors(self): # Setup Expected Response diff --git a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py index 6baefad82..35201f790 100644 --- a/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py +++ b/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py @@ -61,19 +61,15 @@ class CustomException(Exception): class TestMetricsServiceV2Client(object): - def test_update_log_metric(self): + def test_list_log_metrics(self): # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + next_page_token = "" + metrics_element = {} + metrics = [metrics_element] + expected_response = {"next_page_token": next_page_token, "metrics": metrics} + expected_response = logging_metrics_pb2.ListLogMetricsResponse( + **expected_response + ) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -83,21 +79,20 @@ def test_update_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} + parent = client.project_path("[PROJECT]") - response = client.update_log_metric(metric_name, metric) - assert expected_response == response + paged_list_response = client.list_log_metrics(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.metrics[0] == resources[0] assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.UpdateLogMetricRequest( - metric_name=metric_name, metric=metric - ) + expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_update_log_metric_exception(self): - # Mock the API response + def test_list_log_metrics_exception(self): channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: @@ -105,32 +100,47 @@ def test_update_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") - metric = {} + parent = client.project_path("[PROJECT]") + paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - client.update_log_metric(metric_name, metric) + list(paged_list_response) - def test_delete_log_metric(self): - channel = ChannelStub() + def test_get_log_metric(self): + # Setup Expected Response + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") - client.delete_log_metric(metric_name) + response = client.get_log_metric(metric_name) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.DeleteLogMetricRequest( + expected_request = logging_metrics_pb2.GetLogMetricRequest( metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_log_metric_exception(self): + def test_get_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -139,20 +149,24 @@ def test_delete_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.delete_log_metric(metric_name) + client.get_log_metric(metric_name) - def test_list_log_metrics(self): + def test_create_log_metric(self): # Setup Expected Response - next_page_token = "" - metrics_element = {} - metrics = [metrics_element] - expected_response = {"next_page_token": next_page_token, "metrics": metrics} - expected_response = logging_metrics_pb2.ListLogMetricsResponse( - **expected_response - ) + name = "name3373707" + description = "description-1724546052" + filter_ = "filter-1274492040" + value_extractor = "valueExtractor2047672534" + expected_response = { + "name": name, + "description": description, + "filter": filter_, + "value_extractor": value_extractor, + } + expected_response = logging_metrics_pb2.LogMetric(**expected_response) # Mock the API response channel = ChannelStub(responses=[expected_response]) @@ -163,19 +177,20 @@ def test_list_log_metrics(self): # Setup Request parent = client.project_path("[PROJECT]") + metric = {} - paged_list_response = client.list_log_metrics(parent) - resources = list(paged_list_response) - assert len(resources) == 1 - - assert expected_response.metrics[0] == resources[0] + response = client.create_log_metric(parent, metric) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.ListLogMetricsRequest(parent=parent) + expected_request = logging_metrics_pb2.CreateLogMetricRequest( + parent=parent, metric=metric + ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_list_log_metrics_exception(self): + def test_create_log_metric_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: @@ -184,12 +199,12 @@ def test_list_log_metrics_exception(self): # Setup request parent = client.project_path("[PROJECT]") + metric = {} - paged_list_response = client.list_log_metrics(parent) with pytest.raises(CustomException): - list(paged_list_response) + client.create_log_metric(parent, metric) - def test_get_log_metric(self): + def test_update_log_metric(self): # Setup Expected Response name = "name3373707" description = "description-1724546052" @@ -211,19 +226,20 @@ def test_get_log_metric(self): client = logging_v2.MetricsServiceV2Client() # Setup Request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric = {} - response = client.get_log_metric(metric_name) + response = client.update_log_metric(metric_name, metric) assert expected_response == response assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.GetLogMetricRequest( - metric_name=metric_name + expected_request = logging_metrics_pb2.UpdateLogMetricRequest( + metric_name=metric_name, metric=metric ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_log_metric_exception(self): + def test_update_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -232,47 +248,32 @@ def test_get_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - metric_name = client.log_metric_path("[PROJECT]", "[METRIC]") + metric_name = client.metric_path("[PROJECT]", "[METRIC]") + metric = {} with pytest.raises(CustomException): - client.get_log_metric(metric_name) - - def test_create_log_metric(self): - # Setup Expected Response - name = "name3373707" - description = "description-1724546052" - filter_ = "filter-1274492040" - value_extractor = "valueExtractor2047672534" - expected_response = { - "name": name, - "description": description, - "filter": filter_, - "value_extractor": value_extractor, - } - expected_response = logging_metrics_pb2.LogMetric(**expected_response) + client.update_log_metric(metric_name, metric) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_log_metric(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = logging_v2.MetricsServiceV2Client() # Setup Request - parent = client.project_path("[PROJECT]") - metric = {} + metric_name = client.metric_path("[PROJECT]", "[METRIC]") - response = client.create_log_metric(parent, metric) - assert expected_response == response + client.delete_log_metric(metric_name) assert len(channel.requests) == 1 - expected_request = logging_metrics_pb2.CreateLogMetricRequest( - parent=parent, metric=metric + expected_request = logging_metrics_pb2.DeleteLogMetricRequest( + metric_name=metric_name ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_create_log_metric_exception(self): + def test_delete_log_metric_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -281,8 +282,7 @@ def test_create_log_metric_exception(self): client = logging_v2.MetricsServiceV2Client() # Setup request - parent = client.project_path("[PROJECT]") - metric = {} + metric_name = client.metric_path("[PROJECT]", "[METRIC]") with pytest.raises(CustomException): - client.create_log_metric(parent, metric) + client.delete_log_metric(metric_name) From 93e24fd2129bc871b1c622fd3c79c40d418aa4ef Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:27:35 -0700 Subject: [PATCH 38/39] build(python): samples tests should pass if no samples exist Source-Author: Daniel Sanche Source-Date: Wed Oct 14 08:00:06 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 477764cc4ee6db346d3febef2bb1ea0abf27de52 Source-Link: https://github.com/googleapis/synthtool/commit/477764cc4ee6db346d3febef2bb1ea0abf27de52 --- .kokoro/test-samples.sh | 8 +++++++- synth.metadata | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index fee06244c..ba97b53d5 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -28,6 +28,12 @@ if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then git checkout $LATEST_RELEASE fi +# Exit early if samples directory doesn't exist +if [ ! -d "./samples" ]; then + echo "No tests run. `./samples` not found" + exit 0 +fi + # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -101,4 +107,4 @@ 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 +exit "$RTN" diff --git a/synth.metadata b/synth.metadata index 077f70d0e..b6ba82f6c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "438e61571a44e1cd58f99cf8a8eb6163d0f0ee39", - "internalRef": "336682434" + "sha": "71088f11302e80aae77751d5a915dd2e8b684ec8", + "internalRef": "336969301" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "befc24dcdeb8e57ec1259826fd33120b05137e8f" + "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" } } ], From 2804cbcde3117f9c5cd769bb411eefa1e8f8449e Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 20 Oct 2020 07:28:09 -0700 Subject: [PATCH 39/39] chore(python_library): change the docs bucket name Source-Author: Takashi Matsuo Source-Date: Fri Oct 16 09:58:05 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: da5c6050d13b4950c82666a81d8acd25157664ae Source-Link: https://github.com/googleapis/synthtool/commit/da5c6050d13b4950c82666a81d8acd25157664ae --- .kokoro/docs/common.cfg | 2 +- synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 4206e8ac4..7bb6536d7 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -30,7 +30,7 @@ env_vars: { env_vars: { key: "V2_STAGING_BUCKET" - value: "docs-staging-v2-staging" + value: "docs-staging-v2" } # It will upload the docker image after successful builds. diff --git a/synth.metadata b/synth.metadata index b6ba82f6c..ff0272d65 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "71088f11302e80aae77751d5a915dd2e8b684ec8", - "internalRef": "336969301" + "sha": "e5211c547d63632963f9125e2b333185d57ff8f6", + "internalRef": "337519886" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" + "sha": "da5c6050d13b4950c82666a81d8acd25157664ae" } } ],