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 37dafa34a..4f7415994 100644 --- a/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -74,58 +74,73 @@ 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, + "projects/{project}/cmekSettings", project=project, ) @classmethod - def exclusion_path(cls, project, exclusion): - """Return a fully-qualified exclusion string.""" + def folder_path(cls, folder): + """Return a fully-qualified folder string.""" + return google.api_core.path_template.expand("folders/{folder}", folder=folder,) + + @classmethod + def folder_location_path(cls, folder, location): + """Return a fully-qualified folder_location string.""" return google.api_core.path_template.expand( - "projects/{project}/exclusions/{exclusion}", + "folders/{folder}/locations/{location}", 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, - exclusion=exclusion, + location=location, ) @classmethod - def folder_path(cls, folder): - """Return a fully-qualified folder string.""" - return google.api_core.path_template.expand("folders/{folder}", folder=folder,) + 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 folder_exclusion_path(cls, folder, exclusion): - """Return a fully-qualified folder_exclusion string.""" + def log_exclusion_path(cls, project, exclusion): + """Return a fully-qualified log_exclusion string.""" return google.api_core.path_template.expand( - "folders/{folder}/exclusions/{exclusion}", - folder=folder, + "projects/{project}/exclusions/{exclusion}", + project=project, exclusion=exclusion, ) @classmethod - def folder_sink_path(cls, folder, sink): - """Return a fully-qualified folder_sink string.""" + def log_sink_path(cls, project, sink): + """Return a fully-qualified log_sink string.""" return google.api_core.path_template.expand( - "folders/{folder}/sinks/{sink}", folder=folder, sink=sink, + "projects/{project}/sinks/{sink}", project=project, sink=sink, ) @classmethod @@ -136,21 +151,12 @@ def organization_path(cls, organization): ) @classmethod - def organization_exclusion_path(cls, organization, exclusion): - """Return a fully-qualified organization_exclusion string.""" + def organization_location_path(cls, organization, location): + """Return a fully-qualified organization_location string.""" return google.api_core.path_template.expand( - "organizations/{organization}/exclusions/{exclusion}", + "organizations/{organization}/locations/{location}", organization=organization, - 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, + location=location, ) @classmethod @@ -160,13 +166,6 @@ def project_path(cls, project): "projects/{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, @@ -280,6 +279,318 @@ 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, @@ -317,10 +628,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 @@ -405,7 +716,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) @@ -414,10 +726,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 @@ -478,8 +790,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. @@ -500,15 +812,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` @@ -596,7 +908,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 = {} @@ -604,15 +917,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 @@ -631,9 +944,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 @@ -708,28 +1021,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 @@ -814,10 +1128,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 @@ -902,7 +1216,8 @@ def get_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_exclusion(name) @@ -911,10 +1226,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 @@ -995,15 +1310,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` @@ -1074,7 +1389,8 @@ def update_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> # TODO: Initialize `exclusion`: >>> exclusion = {} @@ -1089,10 +1405,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 @@ -1176,7 +1492,8 @@ def delete_exclusion( >>> >>> client = logging_v2.ConfigServiceV2Client() >>> - >>> name = client.exclusion_path('[PROJECT]', '[EXCLUSION]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_exclusion(name) @@ -1185,10 +1502,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 @@ -1238,7 +1555,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, @@ -1259,17 +1576,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"``. @@ -1326,8 +1646,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, @@ -1343,9 +1663,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 `__ @@ -1356,17 +1674,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 c43506d1b..07b1352cb 100644 --- a/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -78,33 +78,17 @@ 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.""" return google.api_core.path_template.expand("folders/{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.""" @@ -119,15 +103,6 @@ def organization_path(cls, organization): "organizations/{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.""" @@ -248,87 +223,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, @@ -361,8 +255,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. @@ -392,46 +286,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. @@ -477,10 +370,91 @@ 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, @@ -517,20 +491,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 `__. @@ -586,7 +557,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, @@ -734,10 +704,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 0c80a5d43..c2db47c57 100644 --- a/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -80,31 +80,12 @@ 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.""" @@ -262,7 +243,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 @@ -347,7 +328,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) @@ -356,7 +337,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. @@ -434,7 +415,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 @@ -508,7 +489,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 = {} @@ -520,7 +501,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 @@ -594,7 +575,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) @@ -603,7 +584,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 f4805192b..11a0be436 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,16 +399,14 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], 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" - ), + 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=[], @@ -444,8 +419,8 @@ fields=[], ), ], - serialized_start=358, - serialized_end=1332, + serialized_start=391, + serialized_end=1369, ) @@ -465,13 +440,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( @@ -483,13 +458,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( @@ -507,7 +482,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -525,7 +500,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -537,8 +512,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1334, - serialized_end=1412, + serialized_start=1371, + serialized_end=1469, ) @@ -558,13 +533,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( @@ -582,7 +557,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -594,13 +569,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, ), ], @@ -612,8 +587,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1414, - serialized_end=1484, + serialized_start=1471, + serialized_end=1556, ) _LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY @@ -639,9 +614,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( @@ -670,31 +642,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 @@ -713,15 +685,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). @@ -730,18 +701,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: @@ -764,18 +737,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. @@ -789,7 +750,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 @@ -804,7 +765,7 @@ log entry, if any. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) - ), + }, ) _sym_db.RegisterMessage(LogEntry) _sym_db.RegisterMessage(LogEntry.LabelsEntry) @@ -812,11 +773,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: @@ -837,17 +798,17 @@ 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 + { + "DESCRIPTOR": _LOGENTRYSOURCELOCATION, + "__module__": "google.cloud.logging_v2.proto.log_entry_pb2", + "__doc__": """Additional information about the source code location that produced the log entry. @@ -869,13 +830,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,86 +437,198 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, ), + ], + 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, + 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, + fields=[ _descriptor.FieldDescriptor( - name="start_time", - full_name="google.logging.v2.LogSink.start_time", - index=11, - number=10, - type=11, - cpp_type=10, + 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=None, + default_value=False, 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="end_time", - full_name="google.logging.v2.LogSink.end_time", - index=12, - number=11, - type=11, - cpp_type=10, + 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=None, + default_value=False, 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, ), ], 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", + 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, + 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, - fields=[], + 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, ), ], - serialized_start=317, - serialized_end=1098, + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1681, + serialized_end=1808, ) -_BIGQUERYOPTIONS = _descriptor.Descriptor( - name="BigQueryOptions", - full_name="google.logging.v2.BigQueryOptions", +_LISTBUCKETSRESPONSE = _descriptor.Descriptor( + name="ListBucketsResponse", + full_name="google.logging.v2.ListBucketsResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="use_partitioned_tables", - full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", + name="buckets", + full_name="google.logging.v2.ListBucketsResponse.buckets", index=0, number=1, - type=8, - cpp_type=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=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=False, + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -366,22 +637,118 @@ 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="uses_timestamp_column_partitioning", - full_name="google.logging.v2.BigQueryOptions.uses_timestamp_column_partitioning", + 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=3, - type=8, - cpp_type=7, + number=2, + type=11, + cpp_type=10, label=1, has_default_value=False, - 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\003"), + serialized_options=b'\340A\002\372A"\n logging.googleapis.com/LogBucket', file=DESCRIPTOR, ), ], @@ -393,8 +760,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1100, - serialized_end=1198, + serialized_start=2090, + serialized_end=2164, ) @@ -414,15 +781,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( @@ -434,13 +799,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( @@ -458,7 +823,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -470,8 +835,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1200, - serialized_end=1310, + serialized_start=2166, + serialized_end=2289, ) @@ -509,7 +874,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, @@ -527,8 +892,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1312, - serialized_end=1399, + serialized_start=2291, + serialized_end=2378, ) @@ -548,15 +913,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, ), ], @@ -568,8 +931,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1401, - serialized_end=1473, + serialized_start=2380, + serialized_end=2455, ) @@ -589,15 +952,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( @@ -615,7 +976,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -633,7 +994,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -645,8 +1006,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1476, - serialized_end=1627, + serialized_start=2458, + serialized_end=2617, ) @@ -666,15 +1027,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( @@ -692,7 +1051,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -710,7 +1069,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -728,7 +1087,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -740,8 +1099,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1630, - serialized_end=1833, + serialized_start=2620, + serialized_end=2836, ) @@ -761,15 +1120,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, ), ], @@ -781,8 +1138,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1835, - serialized_end=1910, + serialized_start=2838, + serialized_end=2916, ) @@ -802,13 +1159,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( @@ -820,13 +1177,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( @@ -838,13 +1195,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( @@ -862,7 +1219,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -880,7 +1237,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -898,22 +1255,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, ) @@ -933,15 +1288,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( @@ -953,13 +1306,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( @@ -977,7 +1330,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -989,8 +1342,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2332, - serialized_end=2452, + serialized_start=3372, + serialized_end=3505, ) @@ -1028,7 +1381,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, @@ -1046,8 +1399,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2454, - serialized_end=2556, + serialized_start=3507, + serialized_end=3609, ) @@ -1067,13 +1420,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, ), ], @@ -1085,8 +1438,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2558, - serialized_end=2635, + serialized_start=3611, + serialized_end=3691, ) @@ -1106,15 +1459,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( @@ -1132,7 +1483,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -1144,8 +1495,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2638, - serialized_end=2772, + serialized_start=3694, + serialized_end=3836, ) @@ -1165,13 +1516,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( @@ -1189,7 +1540,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1207,7 +1558,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -1219,8 +1570,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2775, - serialized_end=2966, + serialized_start=3839, + serialized_end=4033, ) @@ -1240,13 +1591,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, ), ], @@ -1258,8 +1609,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2968, - serialized_end=3048, + serialized_start=4035, + serialized_end=4118, ) @@ -1279,13 +1630,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, ), ], @@ -1297,8 +1648,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3050, - serialized_end=3088, + serialized_start=4120, + serialized_end=4203, ) @@ -1318,13 +1669,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( @@ -1342,7 +1693,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1360,7 +1711,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -1372,8 +1723,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3091, - serialized_end=3237, + serialized_start=4206, + serialized_end=4367, ) @@ -1393,13 +1744,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( @@ -1411,7 +1762,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, @@ -1429,41 +1780,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( @@ -1472,6 +1824,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 @@ -1494,8 +1851,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 @@ -1514,15 +1876,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, @@ -1539,20 +1940,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. @@ -1560,12 +1963,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 @@ -1574,27 +1977,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. @@ -1604,63 +2007,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]" @@ -1677,17 +2198,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: @@ -1700,17 +2221,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: @@ -1723,23 +2244,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"``. @@ -1749,10 +2270,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 @@ -1761,17 +2282,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: @@ -1794,7 +2315,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 @@ -1814,17 +2335,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: @@ -1838,22 +2359,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: @@ -1866,14 +2387,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: @@ -2086,28 +2608,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: @@ -2117,8 +2639,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 @@ -2128,17 +2651,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. @@ -2147,17 +2670,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 @@ -2171,193 +2694,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 c2e910e19..fcc132d8d 100644 --- a/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py @@ -17,6 +17,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, @@ -83,6 +98,37 @@ 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. """ @@ -171,7 +217,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!") @@ -191,7 +237,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!") @@ -200,6 +246,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 01e308fb7..f1bd8ffa0 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,22 +306,20 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, ), ], extensions=[], nested_types=[_LOGMETRIC_LABELEXTRACTORSENTRY,], 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, ) @@ -348,15 +339,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( @@ -368,13 +357,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( @@ -392,7 +381,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), ], @@ -404,8 +393,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=981, - serialized_end=1112, + serialized_start=1029, + serialized_end=1170, ) @@ -443,7 +432,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, @@ -461,8 +450,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1114, - serialized_end=1210, + serialized_start=1172, + serialized_end=1268, ) @@ -482,15 +471,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, ), ], @@ -502,8 +489,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1212, - serialized_end=1293, + serialized_start=1270, + serialized_end=1354, ) @@ -523,15 +510,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( @@ -549,7 +534,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -561,8 +546,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1296, - serialized_end=1426, + serialized_start=1357, + serialized_end=1490, ) @@ -582,15 +567,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( @@ -608,7 +591,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, ), ], @@ -620,8 +603,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1429, - serialized_end=1564, + serialized_start=1493, + serialized_end=1631, ) @@ -641,15 +624,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, ), ], @@ -661,8 +642,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1566, - serialized_end=1650, + serialized_start=1633, + serialized_end=1720, ) _LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC @@ -698,19 +679,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. @@ -740,16 +721,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 @@ -814,7 +795,7 @@ changed. """, # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) - ), + }, ) _sym_db.RegisterMessage(LogMetric) _sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) @@ -822,10 +803,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: @@ -845,17 +826,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: @@ -868,17 +849,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: @@ -887,64 +868,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: @@ -953,16 +934,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 @@ -975,11 +967,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", @@ -988,9 +978,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", @@ -999,9 +987,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", @@ -1010,9 +996,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", @@ -1021,9 +1005,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", @@ -1032,9 +1014,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 35c9b9c52..34e95523a 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, ), ], @@ -282,7 +273,7 @@ extension_ranges=[], oneofs=[], serialized_start=511, - serialized_end=846, + serialized_end=869, ) @@ -301,8 +292,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=848, - serialized_end=873, + serialized_start=871, + serialized_end=896, ) @@ -353,13 +344,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( @@ -396,8 +387,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=876, - serialized_end=1076, + serialized_start=899, + serialized_end=1099, ) @@ -408,28 +399,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, @@ -441,51 +414,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, @@ -497,25 +468,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, ), ], @@ -527,8 +498,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1079, - serialized_end=1260, + serialized_start=1102, + serialized_end=1278, ) @@ -566,7 +537,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, @@ -584,8 +555,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1262, - serialized_end=1357, + serialized_start=1280, + serialized_end=1375, ) @@ -611,7 +582,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -623,13 +594,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, ), ], @@ -641,8 +612,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1359, - serialized_end=1439, + serialized_start=1377, + serialized_end=1467, ) @@ -680,7 +651,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,8 +669,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1442, - serialized_end=1580, + serialized_start=1470, + serialized_end=1608, ) @@ -719,13 +690,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( @@ -743,7 +714,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -755,13 +726,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, ), ], @@ -773,8 +744,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1582, - serialized_end=1687, + serialized_start=1610, + serialized_end=1728, ) @@ -812,7 +783,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, @@ -830,8 +801,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1689, - serialized_end=1751, + serialized_start=1730, + serialized_end=1792, ) _WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST @@ -886,10 +857,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: @@ -905,60 +876,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 @@ -969,31 +940,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) @@ -1001,45 +974,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) @@ -1047,27 +1020,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 @@ -1096,17 +1066,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: @@ -1129,17 +1099,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: @@ -1156,17 +1126,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: @@ -1179,23 +1149,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: @@ -1211,17 +1181,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: @@ -1236,7 +1206,7 @@ ``nextPageToken`` as ``pageToken``. """, # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) - ), + }, ) _sym_db.RegisterMessage(ListLogsResponse) @@ -1245,22 +1215,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", @@ -1269,9 +1248,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", @@ -1280,9 +1257,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", @@ -1291,9 +1266,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", @@ -1302,9 +1275,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", @@ -1313,9 +1284,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 e1759bbc1..9ff9fe01f 100644 --- a/google/cloud/logging_v2/proto/logging_pb2_grpc.py +++ b/google/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -74,7 +74,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..72f81e0e6 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": "251ac9355b192121572552c1c9cfd4df94a42802" } }, { "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,8 +30,7 @@ "apiName": "logging", "apiVersion": "v2", "language": "python", - "generator": "gapic", - "config": "google/logging/artman_logging.yaml" + "generator": "bazel" } } ] 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)