diff --git a/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py b/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py index df942566a397..2942e2207000 100644 --- a/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -31,15 +31,11 @@ import google.api_core.path_template import grpc -from google.api import monitored_resource_pb2 from google.cloud.logging_v2.gapic import config_service_v2_client_config from google.cloud.logging_v2.gapic import enums from google.cloud.logging_v2.gapic.transports import config_service_v2_grpc_transport -from google.cloud.logging_v2.proto import log_entry_pb2 from google.cloud.logging_v2.proto import logging_config_pb2 from google.cloud.logging_v2.proto import logging_config_pb2_grpc -from google.cloud.logging_v2.proto import logging_pb2 -from google.cloud.logging_v2.proto import logging_pb2_grpc from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 @@ -48,10 +44,7 @@ class ConfigServiceV2Client(object): - """ - Service for configuring sinks used to export log entries out of - Logging. - """ + """Service for configuring sinks used to route log entries.""" SERVICE_ADDRESS = "logging.googleapis.com:443" """The default address of the service.""" @@ -593,8 +586,10 @@ def update_sink( """ Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: ``destination``, and - ``filter``. The updated sink might also have a new ``writer_identity``; - see the ``unique_writer_identity`` field. + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Example: >>> from google.cloud import logging_v2 @@ -625,11 +620,10 @@ def update_sink( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogSink` - unique_writer_identity (bool): Optional. See - `sinks.create `__ - for a description of this field. When updating a sink, the effect of - this field on the value of ``writer_identity`` in the updated sink - depends on both the old and new values of this field: + unique_writer_identity (bool): Optional. See ``sinks.create`` for a description of this field. When + updating a sink, the effect of this field on the value of + ``writer_identity`` in the updated sink depends on both the old and new + values of this field: - If the old and new values of this field are both false or both true, then there is no change to the sink's ``writer_identity``. @@ -1106,10 +1100,11 @@ def update_exclusion( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.logging_v2.types.LogExclusion` - update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. A nonempty list of fields to change in the existing exclusion. - New values for the fields are taken from the corresponding fields in the - ``LogExclusion`` included in this request. Fields not mentioned in - ``update_mask`` are not changed and are ignored in the request. + update_mask (Union[dict, ~google.cloud.logging_v2.types.FieldMask]): Required. A non-empty list of fields to change in the existing + exclusion. New values for the fields are taken from the corresponding + fields in the ``LogExclusion`` included in this request. Fields not + mentioned in ``update_mask`` are not changed and are ignored in the + request. For example, to change the filter and description of an exclusion, specify an ``update_mask`` of ``"filter,description"``. diff --git a/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 22aa07c592ae..09509318a0a6 100644 --- a/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -36,9 +36,12 @@ from google.cloud.logging_v2.gapic import logging_service_v2_client_config from google.cloud.logging_v2.gapic.transports import logging_service_v2_grpc_transport from google.cloud.logging_v2.proto import log_entry_pb2 +from google.cloud.logging_v2.proto import logging_config_pb2 +from google.cloud.logging_v2.proto import logging_config_pb2_grpc from google.cloud.logging_v2.proto import logging_pb2 from google.cloud.logging_v2.proto import logging_pb2_grpc from google.protobuf import empty_pb2 +from google.protobuf import field_mask_pb2 _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-logging").version @@ -374,8 +377,8 @@ def write_log_entries( Log entries with timestamps that are more than the `logs retention period `__ in the past or more than 24 hours in the future will not be available when calling - ``entries.list``. However, those log entries can still be exported with - `LogSinks `__. + ``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 @@ -486,8 +489,9 @@ def list_log_entries( metadata=None, ): """ - Lists log entries. Use this method to retrieve log entries from Logging. - For ways to export log entries, see `Exporting + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting Logs `__. Example: @@ -526,9 +530,7 @@ def list_log_entries( 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"``. If present, these project identifiers are - converted to resource name format and added to the list of resources in - ``resource_names``. + Example: ``"my-project-1A"``. filter_ (str): Optional. A filter that chooses which log entries to return. See `Advanced Logs Filters `__. diff --git a/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py b/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py index 8157764ec872..533895087231 100644 --- a/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py +++ b/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py @@ -163,8 +163,10 @@ def update_sink(self): Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: ``destination``, and - ``filter``. The updated sink might also have a new ``writer_identity``; - see the ``unique_writer_identity`` field. + ``filter``. + + The updated sink might also have a new ``writer_identity``; see the + ``unique_writer_identity`` field. Returns: Callable: A callable which accepts the appropriate diff --git a/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py b/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py index caa20c480225..4477ad701b5e 100644 --- a/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py +++ b/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py @@ -152,8 +152,9 @@ def write_log_entries(self): def list_log_entries(self): """Return the gRPC stub for :meth:`LoggingServiceV2Client.list_log_entries`. - Lists log entries. Use this method to retrieve log entries from Logging. - For ways to export log entries, see `Exporting + Lists log entries. Use this method to retrieve log entries that + originated from a project/folder/organization/billing account. For ways + to export log entries, see `Exporting Logs `__. Returns: diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/__init__.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2.py new file mode 100644 index 000000000000..1f2b1ca3b64d --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2.py @@ -0,0 +1,873 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/logging_v2/proto/log_entry.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import ( + monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, +) +from google.logging.type import ( + http_request_pb2 as google_dot_logging_dot_type_dot_http__request__pb2, +) +from google.logging.type import ( + log_severity_pb2 as google_dot_logging_dot_type_dot_log__severity__pb2, +) +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +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/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&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"\x8e\x06\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\x42\t\n\x07payload"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\x99\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), + dependencies=[ + google_dot_api_dot_monitored__resource__pb2.DESCRIPTOR, + google_dot_logging_dot_type_dot_http__request__pb2.DESCRIPTOR, + google_dot_logging_dot_type_dot_log__severity__pb2.DESCRIPTOR, + google_dot_protobuf_dot_any__pb2.DESCRIPTOR, + google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) + + +_LOGENTRY_LABELSENTRY = _descriptor.Descriptor( + name="LabelsEntry", + full_name="google.logging.v2.LogEntry.LabelsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.LogEntry.LabelsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.LogEntry.LabelsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1057, + serialized_end=1102, +) + +_LOGENTRY = _descriptor.Descriptor( + name="LogEntry", + full_name="google.logging.v2.LogEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.LogEntry.log_name", + index=0, + number=12, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="google.logging.v2.LogEntry.resource", + index=1, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="proto_payload", + full_name="google.logging.v2.LogEntry.proto_payload", + index=2, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="text_payload", + full_name="google.logging.v2.LogEntry.text_payload", + index=3, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="json_payload", + full_name="google.logging.v2.LogEntry.json_payload", + index=4, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timestamp", + full_name="google.logging.v2.LogEntry.timestamp", + index=5, + number=9, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="receive_timestamp", + full_name="google.logging.v2.LogEntry.receive_timestamp", + index=6, + number=24, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="severity", + full_name="google.logging.v2.LogEntry.severity", + index=7, + number=10, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="insert_id", + full_name="google.logging.v2.LogEntry.insert_id", + index=8, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="http_request", + full_name="google.logging.v2.LogEntry.http_request", + index=9, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="labels", + full_name="google.logging.v2.LogEntry.labels", + index=10, + number=11, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metadata", + full_name="google.logging.v2.LogEntry.metadata", + index=11, + number=25, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="operation", + full_name="google.logging.v2.LogEntry.operation", + index=12, + number=15, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trace", + full_name="google.logging.v2.LogEntry.trace", + index=13, + number=22, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="span_id", + full_name="google.logging.v2.LogEntry.span_id", + index=14, + number=27, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trace_sampled", + full_name="google.logging.v2.LogEntry.trace_sampled", + index=15, + number=30, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="source_location", + full_name="google.logging.v2.LogEntry.source_location", + index=16, + number=23, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_LOGENTRY_LABELSENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="payload", + full_name="google.logging.v2.LogEntry.payload", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=331, + serialized_end=1113, +) + + +_LOGENTRYOPERATION = _descriptor.Descriptor( + name="LogEntryOperation", + full_name="google.logging.v2.LogEntryOperation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="id", + full_name="google.logging.v2.LogEntryOperation.id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="producer", + full_name="google.logging.v2.LogEntryOperation.producer", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="first", + full_name="google.logging.v2.LogEntryOperation.first", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="last", + full_name="google.logging.v2.LogEntryOperation.last", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1115, + serialized_end=1193, +) + + +_LOGENTRYSOURCELOCATION = _descriptor.Descriptor( + name="LogEntrySourceLocation", + full_name="google.logging.v2.LogEntrySourceLocation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="file", + full_name="google.logging.v2.LogEntrySourceLocation.file", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="line", + full_name="google.logging.v2.LogEntrySourceLocation.line", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="function", + full_name="google.logging.v2.LogEntrySourceLocation.function", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1195, + serialized_end=1265, +) + +_LOGENTRY_LABELSENTRY.containing_type = _LOGENTRY +_LOGENTRY.fields_by_name[ + "resource" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_LOGENTRY.fields_by_name[ + "proto_payload" +].message_type = google_dot_protobuf_dot_any__pb2._ANY +_LOGENTRY.fields_by_name[ + "json_payload" +].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_LOGENTRY.fields_by_name[ + "timestamp" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name[ + "receive_timestamp" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGENTRY.fields_by_name[ + "severity" +].enum_type = google_dot_logging_dot_type_dot_log__severity__pb2._LOGSEVERITY +_LOGENTRY.fields_by_name[ + "http_request" +].message_type = google_dot_logging_dot_type_dot_http__request__pb2._HTTPREQUEST +_LOGENTRY.fields_by_name["labels"].message_type = _LOGENTRY_LABELSENTRY +_LOGENTRY.fields_by_name[ + "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( + _LOGENTRY.fields_by_name["proto_payload"] +) +_LOGENTRY.fields_by_name["proto_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +_LOGENTRY.oneofs_by_name["payload"].fields.append( + _LOGENTRY.fields_by_name["text_payload"] +) +_LOGENTRY.fields_by_name["text_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +_LOGENTRY.oneofs_by_name["payload"].fields.append( + _LOGENTRY.fields_by_name["json_payload"] +) +_LOGENTRY.fields_by_name["json_payload"].containing_oneof = _LOGENTRY.oneofs_by_name[ + "payload" +] +DESCRIPTOR.message_types_by_name["LogEntry"] = _LOGENTRY +DESCRIPTOR.message_types_by_name["LogEntryOperation"] = _LOGENTRYOPERATION +DESCRIPTOR.message_types_by_name["LogEntrySourceLocation"] = _LOGENTRYSOURCELOCATION +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +LogEntry = _reflection.GeneratedProtocolMessageType( + "LogEntry", + (_message.Message,), + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_LOGENTRY_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry.LabelsEntry) + ), + ), + DESCRIPTOR=_LOGENTRY, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""An individual entry in a log. + + + Attributes: + log_name: + Required. The resource name of the log to which this log entry + 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 + exports. ``[LOG_ID]`` must be URL-encoded within + ``log_name``. Example: ``"organizations/1234567890/logs/cloudr + esourcemanager.googleapis.com%2Factivity"``. ``[LOG_ID]`` must + be less than 512 characters long and can only include the + following characters: upper and lower case alphanumeric + characters, forward-slash, underscore, hyphen, and period. + For backward compatibility, if ``log_name`` begins with a + forward-slash, such as ``/projects/...``, then the log entry + is ingested as usual but the 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. + resource: + 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. + payload: + Optional. The log entry payload, which can be one of multiple + types. + proto_payload: + The log entry payload, represented as a protocol buffer. Some + Google Cloud Platform services use this field for their log + entry payloads. The following protocol buffer types are + supported; user-defined types are not supported: + "type.googleapis.com/google.cloud.audit.AuditLog" + "type.googleapis.com/google.appengine.logging.v1.RequestLog" + text_payload: + The log entry payload, represented as a Unicode string + (UTF-8). + json_payload: + The log entry payload, represented as a structure that is + 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 + 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 + `__. + receive_timestamp: + Output only. The time the log entry was received by Logging. + severity: + Optional. The severity of the log entry. The default value is + ``LogSeverity.DEFAULT``. + insert_id: + 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 can be removed. If + omitted in new log entries, then Logging assigns its own + unique identifier. The ``insert_id`` is also used to order log + entries that have the same ``timestamp`` value. + http_request: + Optional. Information about the HTTP request associated with + this log entry, if applicable. + 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. + trace: + 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`` + span_id: + 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". + trace_sampled: + Optional. The sampling decision of the trace associated with + the log entry. True means that the trace resource name in the + ``trace`` field was sampled for storage in a trace backend. + False means that the trace was not sampled 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. + source_location: + Optional. Source code location information associated with the + log entry, if any. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntry) + ), +) +_sym_db.RegisterMessage(LogEntry) +_sym_db.RegisterMessage(LogEntry.LabelsEntry) + +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. + + + Attributes: + id: + Optional. An arbitrary operation identifier. Log entries with + the same identifier are assumed to be part of the same + operation. + producer: + 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"``. + first: + Optional. Set this to True if this is the first log entry in + the operation. + last: + Optional. Set this to True if this is the last log entry in + the operation. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogEntryOperation) + ), +) +_sym_db.RegisterMessage(LogEntryOperation) + +LogEntrySourceLocation = _reflection.GeneratedProtocolMessageType( + "LogEntrySourceLocation", + (_message.Message,), + dict( + DESCRIPTOR=_LOGENTRYSOURCELOCATION, + __module__="google.cloud.logging_v2.proto.log_entry_pb2", + __doc__="""Additional information about the source code location that produced the + log entry. + + + Attributes: + file: + Optional. Source file name. Depending on the runtime + environment, this might be a simple name or a fully-qualified + name. + line: + Optional. Line within the source file. 1-based; 0 indicates no + line number available. + function: + 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 used in contexts such as the + logs viewer, where a file and line number are less meaningful. + The format can vary by language. For example: + ``qual.if.ied.Class.method`` (Java), ``dir/package.func`` + (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 +# @@protoc_insertion_point(module_scope) diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2_grpc.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2_grpc.py new file mode 100644 index 000000000000..07cb78fe03a9 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/log_entry_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_config_pb2.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_config_pb2.py new file mode 100644 index 000000000000..144591e49189 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_config_pb2.py @@ -0,0 +1,1857 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/logging_v2/proto/logging_config.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 +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/cloud/logging_v2/proto/logging_config.proto", + package="google.logging.v2", + syntax="proto3", + serialized_options=_b( + "\n\025com.google.logging.v2B\022LoggingConfigProtoP\001Z8google.golang.org/genproto/googleapis/logging/v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Google\\Cloud\\Logging\\V2" + ), + serialized_pb=_b( + '\n2google/cloud/logging_v2/proto/logging_config.proto\x12\x11google.logging.v2\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\x1a\x17google/api/client.proto"\xaa\x03\n\x07LogSink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\x12K\n\x15output_version_format\x18\x06 \x01(\x0e\x32(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x17\n\x0fwriter_identity\x18\x08 \x01(\t\x12\x18\n\x10include_children\x18\t \x01(\x08\x12>\n\x10\x62igquery_options\x18\x0c \x01(\x0b\x32".google.logging.v2.BigQueryOptionsH\x00\x12/\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp"?\n\rVersionFormat\x12\x1e\n\x1aVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\n\x02V2\x10\x01\x12\x06\n\x02V1\x10\x02\x42\t\n\x07options"1\n\x0f\x42igQueryOptions\x12\x1e\n\x16use_partitioned_tables\x18\x01 \x01(\x08"I\n\x10ListSinksRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\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"#\n\x0eGetSinkRequest\x12\x11\n\tsink_name\x18\x01 \x01(\t"m\n\x11\x43reateSinkRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12(\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08"\xa1\x01\n\x11UpdateSinkRequest\x12\x11\n\tsink_name\x18\x01 \x01(\t\x12(\n\x04sink\x18\x02 \x01(\x0b\x32\x1a.google.logging.v2.LogSink\x12\x1e\n\x16unique_writer_identity\x18\x03 \x01(\x08\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"&\n\x11\x44\x65leteSinkRequest\x12\x11\n\tsink_name\x18\x01 \x01(\t"\xb5\x01\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"N\n\x15ListExclusionsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\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"#\n\x13GetExclusionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\\\n\x16\x43reateExclusionRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion"\x8b\x01\n\x16UpdateExclusionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\texclusion\x18\x02 \x01(\x0b\x32\x1f.google.logging.v2.LogExclusion\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"&\n\x16\x44\x65leteExclusionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\xf6\x1a\n\x0f\x43onfigServiceV2\x12\x87\x02\n\tListSinks\x12#.google.logging.v2.ListSinksRequest\x1a$.google.logging.v2.ListSinksResponse"\xae\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\x12\x92\x02\n\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xc7\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/*}\x12\x9d\x02\n\nCreateSink\x12$.google.logging.v2.CreateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xcc\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\x12\xf1\x03\n\nUpdateSink\x12$.google.logging.v2.UpdateSinkRequest\x1a\x1a.google.logging.v2.LogSink"\xa0\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\x12\x94\x02\n\nDeleteSink\x12$.google.logging.v2.DeleteSinkRequest\x1a\x16.google.protobuf.Empty"\xc7\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/*}\x12\xaf\x02\n\x0eListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1a).google.logging.v2.ListExclusionsResponse"\xc7\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\x12\xa1\x02\n\x0cGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xc7\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/*}\x12\xde\x02\n\x0f\x43reateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xfe\x01\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\x12\xde\x02\n\x0fUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1a\x1f.google.logging.v2.LogExclusion"\xfe\x01\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\x12\x9e\x02\n\x0f\x44\x65leteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1a\x16.google.protobuf.Empty"\xc7\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/*}\x1a\xdf\x01\xca\x41\x16logging.googleapis.com\xd2\x41\xc2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\x9e\x01\n\x15\x63om.google.logging.v2B\x12LoggingConfigProtoP\x01Z8google.golang.org/genproto/googleapis/logging/v2;logging\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2b\x06proto3' + ), + dependencies=[ + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + ], +) + + +_LOGSINK_VERSIONFORMAT = _descriptor.EnumDescriptor( + name="VersionFormat", + full_name="google.logging.v2.LogSink.VersionFormat", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="VERSION_FORMAT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="V2", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="V1", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=609, + serialized_end=672, +) +_sym_db.RegisterEnumDescriptor(_LOGSINK_VERSIONFORMAT) + + +_LOGSINK = _descriptor.Descriptor( + name="LogSink", + full_name="google.logging.v2.LogSink", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogSink.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="destination", + full_name="google.logging.v2.LogSink.destination", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogSink.filter", + index=2, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="output_version_format", + full_name="google.logging.v2.LogSink.output_version_format", + index=3, + number=6, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="writer_identity", + full_name="google.logging.v2.LogSink.writer_identity", + index=4, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="include_children", + full_name="google.logging.v2.LogSink.include_children", + index=5, + number=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="bigquery_options", + full_name="google.logging.v2.LogSink.bigquery_options", + index=6, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogSink.create_time", + index=7, + number=13, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogSink.update_time", + index=8, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_LOGSINK_VERSIONFORMAT], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="options", + full_name="google.logging.v2.LogSink.options", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=257, + serialized_end=683, +) + + +_BIGQUERYOPTIONS = _descriptor.Descriptor( + name="BigQueryOptions", + full_name="google.logging.v2.BigQueryOptions", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="use_partitioned_tables", + full_name="google.logging.v2.BigQueryOptions.use_partitioned_tables", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=685, + serialized_end=734, +) + + +_LISTSINKSREQUEST = _descriptor.Descriptor( + name="ListSinksRequest", + full_name="google.logging.v2.ListSinksRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListSinksRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListSinksRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListSinksRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=736, + serialized_end=809, +) + + +_LISTSINKSRESPONSE = _descriptor.Descriptor( + name="ListSinksResponse", + full_name="google.logging.v2.ListSinksResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="sinks", + full_name="google.logging.v2.ListSinksResponse.sinks", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListSinksResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=811, + serialized_end=898, +) + + +_GETSINKREQUEST = _descriptor.Descriptor( + name="GetSinkRequest", + full_name="google.logging.v2.GetSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.GetSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=900, + serialized_end=935, +) + + +_CREATESINKREQUEST = _descriptor.Descriptor( + name="CreateSinkRequest", + full_name="google.logging.v2.CreateSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateSinkRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="sink", + full_name="google.logging.v2.CreateSinkRequest.sink", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="unique_writer_identity", + full_name="google.logging.v2.CreateSinkRequest.unique_writer_identity", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=937, + serialized_end=1046, +) + + +_UPDATESINKREQUEST = _descriptor.Descriptor( + name="UpdateSinkRequest", + full_name="google.logging.v2.UpdateSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.UpdateSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="sink", + full_name="google.logging.v2.UpdateSinkRequest.sink", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="unique_writer_identity", + full_name="google.logging.v2.UpdateSinkRequest.unique_writer_identity", + index=2, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateSinkRequest.update_mask", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1049, + serialized_end=1210, +) + + +_DELETESINKREQUEST = _descriptor.Descriptor( + name="DeleteSinkRequest", + full_name="google.logging.v2.DeleteSinkRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="sink_name", + full_name="google.logging.v2.DeleteSinkRequest.sink_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1212, + serialized_end=1250, +) + + +_LOGEXCLUSION = _descriptor.Descriptor( + name="LogExclusion", + full_name="google.logging.v2.LogExclusion", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogExclusion.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogExclusion.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogExclusion.filter", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="disabled", + full_name="google.logging.v2.LogExclusion.disabled", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogExclusion.create_time", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogExclusion.update_time", + index=5, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1253, + serialized_end=1434, +) + + +_LISTEXCLUSIONSREQUEST = _descriptor.Descriptor( + name="ListExclusionsRequest", + full_name="google.logging.v2.ListExclusionsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListExclusionsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListExclusionsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListExclusionsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1436, + serialized_end=1514, +) + + +_LISTEXCLUSIONSRESPONSE = _descriptor.Descriptor( + name="ListExclusionsResponse", + full_name="google.logging.v2.ListExclusionsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="exclusions", + full_name="google.logging.v2.ListExclusionsResponse.exclusions", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListExclusionsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1516, + serialized_end=1618, +) + + +_GETEXCLUSIONREQUEST = _descriptor.Descriptor( + name="GetExclusionRequest", + full_name="google.logging.v2.GetExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.GetExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1620, + serialized_end=1655, +) + + +_CREATEEXCLUSIONREQUEST = _descriptor.Descriptor( + name="CreateExclusionRequest", + full_name="google.logging.v2.CreateExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateExclusionRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="exclusion", + full_name="google.logging.v2.CreateExclusionRequest.exclusion", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1657, + serialized_end=1749, +) + + +_UPDATEEXCLUSIONREQUEST = _descriptor.Descriptor( + name="UpdateExclusionRequest", + full_name="google.logging.v2.UpdateExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.UpdateExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="exclusion", + full_name="google.logging.v2.UpdateExclusionRequest.exclusion", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.logging.v2.UpdateExclusionRequest.update_mask", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1752, + serialized_end=1891, +) + + +_DELETEEXCLUSIONREQUEST = _descriptor.Descriptor( + name="DeleteExclusionRequest", + full_name="google.logging.v2.DeleteExclusionRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.DeleteExclusionRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1893, + serialized_end=1931, +) + +_LOGSINK.fields_by_name["output_version_format"].enum_type = _LOGSINK_VERSIONFORMAT +_LOGSINK.fields_by_name["bigquery_options"].message_type = _BIGQUERYOPTIONS +_LOGSINK.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGSINK_VERSIONFORMAT.containing_type = _LOGSINK +_LOGSINK.oneofs_by_name["options"].fields.append( + _LOGSINK.fields_by_name["bigquery_options"] +) +_LOGSINK.fields_by_name["bigquery_options"].containing_oneof = _LOGSINK.oneofs_by_name[ + "options" +] +_LISTSINKSRESPONSE.fields_by_name["sinks"].message_type = _LOGSINK +_CREATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name["sink"].message_type = _LOGSINK +_UPDATESINKREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +_LOGEXCLUSION.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGEXCLUSION.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LISTEXCLUSIONSRESPONSE.fields_by_name["exclusions"].message_type = _LOGEXCLUSION +_CREATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name["exclusion"].message_type = _LOGEXCLUSION +_UPDATEEXCLUSIONREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK +DESCRIPTOR.message_types_by_name["LogSink"] = _LOGSINK +DESCRIPTOR.message_types_by_name["BigQueryOptions"] = _BIGQUERYOPTIONS +DESCRIPTOR.message_types_by_name["ListSinksRequest"] = _LISTSINKSREQUEST +DESCRIPTOR.message_types_by_name["ListSinksResponse"] = _LISTSINKSRESPONSE +DESCRIPTOR.message_types_by_name["GetSinkRequest"] = _GETSINKREQUEST +DESCRIPTOR.message_types_by_name["CreateSinkRequest"] = _CREATESINKREQUEST +DESCRIPTOR.message_types_by_name["UpdateSinkRequest"] = _UPDATESINKREQUEST +DESCRIPTOR.message_types_by_name["DeleteSinkRequest"] = _DELETESINKREQUEST +DESCRIPTOR.message_types_by_name["LogExclusion"] = _LOGEXCLUSION +DESCRIPTOR.message_types_by_name["ListExclusionsRequest"] = _LISTEXCLUSIONSREQUEST +DESCRIPTOR.message_types_by_name["ListExclusionsResponse"] = _LISTEXCLUSIONSRESPONSE +DESCRIPTOR.message_types_by_name["GetExclusionRequest"] = _GETEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["CreateExclusionRequest"] = _CREATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["UpdateExclusionRequest"] = _UPDATEEXCLUSIONREQUEST +DESCRIPTOR.message_types_by_name["DeleteExclusionRequest"] = _DELETEEXCLUSIONREQUEST +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +LogSink = _reflection.GeneratedProtocolMessageType( + "LogSink", + (_message.Message,), + dict( + DESCRIPTOR=_LOGSINK, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Describes a sink used to export log entries to one of the following + destinations in any project: a Cloud Storage bucket, a BigQuery dataset, + or a Cloud Pub/Sub topic. A logs filter controls which log entries are + exported. The sink must be created within a project, organization, + billing account, or folder. + + + Attributes: + name: + 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. + 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 `__. + 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 + output_version_format: + Deprecated. The log entry format to use for this sink's + exported log entries. The v2 format is used by default and + cannot be changed. + writer_identity: + 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 + `__. 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 + 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 + a particular log entry from the children is exported depends + 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 + 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 + options: + Optional. Destination dependent options. + bigquery_options: + Optional. Options that affect sinks exporting data to + BigQuery. + create_time: + Output only. The creation timestamp of the sink. This field + may not be present for older sinks. + update_time: + Output only. The last update timestamp of the sink. This + field may not be present for older sinks. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogSink) + ), +) +_sym_db.RegisterMessage(LogSink) + +BigQueryOptions = _reflection.GeneratedProtocolMessageType( + "BigQueryOptions", + (_message.Message,), + dict( + DESCRIPTOR=_BIGQUERYOPTIONS, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Options that change functionality of a sink exporting data to BigQuery. + + + 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. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.BigQueryOptions) + ), +) +_sym_db.RegisterMessage(BigQueryOptions) + +ListSinksRequest = _reflection.GeneratedProtocolMessageType( + "ListSinksRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTSINKSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""The parameters to ``ListSinks``. + + + Attributes: + parent: + Required. The parent resource whose sinks are to be listed: + :: "projects/[PROJECT_ID]" + "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + 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.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``. + + + Attributes: + sinks: + A list of sinks. + 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.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``. + + + Attributes: + sink_name: + Required. The resource name of the sink: :: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: + ``"projects/my-project-id/sinks/my-sink-id"``. + """, + # @@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``. + + + Attributes: + parent: + Required. The resource in which to create the sink: :: + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" Examples: ``"projects/my-logging- + project"``, ``"organizations/123456789"``. + sink: + Required. The new sink, whose ``name`` parameter is a sink + identifier that is not already in use. + 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 + the value returned as ``writer_identity`` is the same group or + service account used by Logging before the addition of writer + identities to this API. The sink's destination must be in the + same project as the sink itself. If this field is set to + true, or if the sink is owned by a non-project resource such + as an organization, then the value of ``writer_identity`` will + be a unique service account used only for exports from the new + sink. For more information, see ``writer_identity`` in + [LogSink][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``. + + + Attributes: + sink_name: + Required. The full resource name of the sink to update, + including the parent resource and the sink identifier: :: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: + ``"projects/my-project-id/sinks/my-sink-id"``. + sink: + Required. The updated sink, whose name is the same identifier + that appears as part of ``sink_name``. + unique_writer_identity: + Optional. See + [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + for a description of this field. When updating a sink, the + effect of this field on the value of ``writer_identity`` in + the updated sink depends on both the old and new values of + this field: - If the old and new values of this field are + both false or both true, then there is no change to the + sink's ``writer_identity``. - If the old value is false and + the new value is true, then ``writer_identity`` is changed + to a unique service account. - It is an error if the old + value is true and the new value is set to false or + defaulted to false. + update_mask: + Optional. Field mask that specifies the fields in ``sink`` + that need an update. A sink field will be overwritten if, and + only if, it is in the update mask. ``name`` and output only + fields cannot be updated. An empty updateMask is temporarily + treated as using the following mask for backwards + compatibility purposes: destination,filter,includeChildren At + some point in the future, behavior will be removed and + specifying an empty updateMask will be an error. For a + detailed ``FieldMask`` definition, see + https://developers.google.com/protocol-buffers/docs/reference/ + google.protobuf#google.protobuf.FieldMask Example: + ``updateMask=filter``. + """, + # @@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``. + + + Attributes: + sink_name: + Required. The full resource name of the sink to delete, + including the parent resource and the sink identifier: :: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: + ``"projects/my-project-id/sinks/my-sink-id"``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteSinkRequest) + ), +) +_sym_db.RegisterMessage(DeleteSinkRequest) + +LogExclusion = _reflection.GeneratedProtocolMessageType( + "LogExclusion", + (_message.Message,), + dict( + DESCRIPTOR=_LOGEXCLUSION, + __module__="google.cloud.logging_v2.proto.logging_config_pb2", + __doc__="""Specifies a set of log entries that are not to be stored in Logging. If + your GCP resource receives a large volume of logs, you can use + exclusions to reduce your chargeable logs. Exclusions are processed + after log sinks, so you can export log entries before they are excluded. + Note that organization-level and folder-level exclusions don't apply to + child resources, and that you can't exclude audit log entries. + + + Attributes: + name: + 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. + description: + 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\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"N\n\x15ListLogMetricsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\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"*\n\x13GetLogMetricRequest\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t"V\n\x16\x43reateLogMetricRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetric"[\n\x16UpdateLogMetricRequest\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t\x12,\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetric"-\n\x16\x44\x65leteLogMetricRequest\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t2\xe4\x07\n\x10MetricsServiceV2\x12\x8e\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse"\'\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\x12\x84\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/*}\x12\x8b\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\x12\x92\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric"6\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\x12\x84\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/*}\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_distribution__pb2.DESCRIPTOR, + google_dot_api_dot_metric__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + ], +) + + +_LOGMETRIC_APIVERSION = _descriptor.EnumDescriptor( + name="ApiVersion", + full_name="google.logging.v2.LogMetric.ApiVersion", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="V2", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="V1", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=785, + serialized_end=813, +) +_sym_db.RegisterEnumDescriptor(_LOGMETRIC_APIVERSION) + + +_LOGMETRIC_LABELEXTRACTORSENTRY = _descriptor.Descriptor( + name="LabelExtractorsEntry", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.LogMetric.LabelExtractorsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=729, + serialized_end=783, +) + +_LOGMETRIC = _descriptor.Descriptor( + name="LogMetric", + full_name="google.logging.v2.LogMetric", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.logging.v2.LogMetric.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.logging.v2.LogMetric.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.LogMetric.filter", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metric_descriptor", + full_name="google.logging.v2.LogMetric.metric_descriptor", + index=3, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value_extractor", + full_name="google.logging.v2.LogMetric.value_extractor", + index=4, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="label_extractors", + full_name="google.logging.v2.LogMetric.label_extractors", + index=5, + number=7, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="bucket_options", + full_name="google.logging.v2.LogMetric.bucket_options", + index=6, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.logging.v2.LogMetric.create_time", + index=7, + number=9, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.logging.v2.LogMetric.update_time", + index=8, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="version", + full_name="google.logging.v2.LogMetric.version", + index=9, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_LOGMETRIC_LABELEXTRACTORSENTRY], + enum_types=[_LOGMETRIC_APIVERSION], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=282, + serialized_end=813, +) + + +_LISTLOGMETRICSREQUEST = _descriptor.Descriptor( + name="ListLogMetricsRequest", + full_name="google.logging.v2.ListLogMetricsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListLogMetricsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogMetricsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogMetricsRequest.page_size", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=815, + serialized_end=893, +) + + +_LISTLOGMETRICSRESPONSE = _descriptor.Descriptor( + name="ListLogMetricsResponse", + full_name="google.logging.v2.ListLogMetricsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="metrics", + full_name="google.logging.v2.ListLogMetricsResponse.metrics", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogMetricsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=895, + serialized_end=991, +) + + +_GETLOGMETRICREQUEST = _descriptor.Descriptor( + name="GetLogMetricRequest", + full_name="google.logging.v2.GetLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.GetLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=993, + serialized_end=1035, +) + + +_CREATELOGMETRICREQUEST = _descriptor.Descriptor( + name="CreateLogMetricRequest", + full_name="google.logging.v2.CreateLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.CreateLogMetricRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metric", + full_name="google.logging.v2.CreateLogMetricRequest.metric", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1037, + serialized_end=1123, +) + + +_UPDATELOGMETRICREQUEST = _descriptor.Descriptor( + name="UpdateLogMetricRequest", + full_name="google.logging.v2.UpdateLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.UpdateLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metric", + full_name="google.logging.v2.UpdateLogMetricRequest.metric", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1125, + serialized_end=1216, +) + + +_DELETELOGMETRICREQUEST = _descriptor.Descriptor( + name="DeleteLogMetricRequest", + full_name="google.logging.v2.DeleteLogMetricRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="metric_name", + full_name="google.logging.v2.DeleteLogMetricRequest.metric_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1218, + serialized_end=1263, +) + +_LOGMETRIC_LABELEXTRACTORSENTRY.containing_type = _LOGMETRIC +_LOGMETRIC.fields_by_name[ + "metric_descriptor" +].message_type = google_dot_api_dot_metric__pb2._METRICDESCRIPTOR +_LOGMETRIC.fields_by_name[ + "label_extractors" +].message_type = _LOGMETRIC_LABELEXTRACTORSENTRY +_LOGMETRIC.fields_by_name[ + "bucket_options" +].message_type = google_dot_api_dot_distribution__pb2._DISTRIBUTION_BUCKETOPTIONS +_LOGMETRIC.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_LOGMETRIC.fields_by_name["version"].enum_type = _LOGMETRIC_APIVERSION +_LOGMETRIC_APIVERSION.containing_type = _LOGMETRIC +_LISTLOGMETRICSRESPONSE.fields_by_name["metrics"].message_type = _LOGMETRIC +_CREATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC +_UPDATELOGMETRICREQUEST.fields_by_name["metric"].message_type = _LOGMETRIC +DESCRIPTOR.message_types_by_name["LogMetric"] = _LOGMETRIC +DESCRIPTOR.message_types_by_name["ListLogMetricsRequest"] = _LISTLOGMETRICSREQUEST +DESCRIPTOR.message_types_by_name["ListLogMetricsResponse"] = _LISTLOGMETRICSRESPONSE +DESCRIPTOR.message_types_by_name["GetLogMetricRequest"] = _GETLOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["CreateLogMetricRequest"] = _CREATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["UpdateLogMetricRequest"] = _UPDATELOGMETRICREQUEST +DESCRIPTOR.message_types_by_name["DeleteLogMetricRequest"] = _DELETELOGMETRICREQUEST +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +LogMetric = _reflection.GeneratedProtocolMessageType( + "LogMetric", + (_message.Message,), + dict( + LabelExtractorsEntry=_reflection.GeneratedProtocolMessageType( + "LabelExtractorsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_LOGMETRIC_LABELEXTRACTORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric.LabelExtractorsEntry) + ), + ), + DESCRIPTOR=_LOGMETRIC, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""Describes a logs-based metric. The value of the metric is the number of + log entries that match a logs filter in a given time interval. + + Logs-based metric can also be used to extract values from logs and + create a a distribution of the values. The distribution records the + statistics of the extracted values along with an optional histogram of + the values as specified by the bucket options. + + + Attributes: + name: + Required. The client-assigned metric identifier. Examples: + ``"error_count"``, ``"nginx/requests"``. Metric identifiers + are limited to 100 characters and can include only the + following characters: ``A-Z``, ``a-z``, ``0-9``, and the + special characters ``_-.,+!*',()%/``. The forward-slash + character (``/``) denotes a hierarchy of name pieces, and it + cannot be the first character of the name. The metric + identifier in this field must not be `URL-encoded + `__. 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"``. + description: + Optional. A description of this metric, which is used in + 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. + 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 + matching the ``filter`` expression. The ``name``, ``type``, + and ``description`` fields in the ``metric_descriptor`` are + output only, and is constructed using the ``name`` and + ``description`` field in the LogMetric. To create a logs- + based metric that records a distribution of log values, a + DELTA metric kind with a DISTRIBUTION value type must be used + along with a ``value_extractor`` expression in the LogMetric. + Each label in the metric descriptor must have a matching label + name as the key and an extractor expression as the value in + the ``label_extractors`` map. The ``metric_kind`` and + ``value_type`` fields in the ``metric_descriptor`` cannot be + updated once initially configured. New labels can be added in + the ``metric_descriptor``, but existing labels cannot be + modified except for their description. + value_extractor: + Optional. A ``value_extractor`` is required when using a + distribution logs-based metric to extract the values to record + from a log entry. Two functions are supported for value + extraction: ``EXTRACT(field)`` or ``REGEXP_EXTRACT(field, + regex)``. The argument are: 1. field: The name of the log + entry field from which the value is to be extracted. 2. regex: + A regular expression using the Google RE2 syntax + (https://github.com/google/re2/wiki/Syntax) with a single + capture group to extract data from the specified log entry + field. The value of the field is converted to a string before + applying the regex. It is an error to specify a regex that + does not include exactly one capture group. The result of the + extraction must be convertible to a double type, as the + distribution always records double values. If either the + extraction or the conversion to double fails, then those + values are not recorded in the distribution. Example: + ``REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")`` + label_extractors: + 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. Each label key specified + in the LabelDescriptor must have an associated extractor + expression in this map. The syntax of the extractor expression + is the same as for the ``value_extractor`` field. The + extracted value is converted to the type defined in the label + descriptor. If the either the extraction or the type + conversion fails, the label will have a default value. The + default value for a string label is an empty string, for an + integer label its 0, and for a boolean label its ``false``. + 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. + bucket_options: + 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. + create_time: + Output only. The creation timestamp of the metric. This field + may not be present for older metrics. + update_time: + Output only. The last update timestamp of the metric. This + field may not be present for older metrics. + version: + Deprecated. The API version that created or updated this + metric. The v2 format is used by default and cannot be + changed. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.LogMetric) + ), +) +_sym_db.RegisterMessage(LogMetric) +_sym_db.RegisterMessage(LogMetric.LabelExtractorsEntry) + +ListLogMetricsRequest = _reflection.GeneratedProtocolMessageType( + "ListLogMetricsRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTLOGMETRICSREQUEST, + __module__="google.cloud.logging_v2.proto.logging_metrics_pb2", + __doc__="""The parameters to ListLogMetrics. + + + Attributes: + parent: + Required. The name of the project containing the metrics: :: + "projects/[PROJECT_ID]" + 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.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. + + + Attributes: + metrics: + A list of logs-based metrics. + 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 this method again using the value of + ``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. + + + Attributes: + metric_name: + The resource name of the desired metric: :: + "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. + + + Attributes: + parent: + The resource name of the project in which to create the + metric: :: "projects/[PROJECT_ID]" The new metric must + be provided in the request. + metric: + 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. + + + Attributes: + metric_name: + 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 + must be the same as ``[METRIC_ID]`` If the metric does not + exist in ``[PROJECT_ID]``, then a new metric is created. + metric: + 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. + + + Attributes: + metric_name: + The resource name of the metric to delete: :: + "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["version"]._options = None + +_METRICSSERVICEV2 = _descriptor.ServiceDescriptor( + name="MetricsServiceV2", + full_name="google.logging.v2.MetricsServiceV2", + file=DESCRIPTOR, + index=0, + serialized_options=_b( + "\312A\026logging.googleapis.com\322A\360\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.write" + ), + serialized_start=1266, + serialized_end=2262, + methods=[ + _descriptor.MethodDescriptor( + name="ListLogMetrics", + full_name="google.logging.v2.MetricsServiceV2.ListLogMetrics", + index=0, + containing_service=None, + input_type=_LISTLOGMETRICSREQUEST, + output_type=_LISTLOGMETRICSRESPONSE, + serialized_options=_b( + "\202\323\344\223\002!\022\037/v2/{parent=projects/*}/metrics" + ), + ), + _descriptor.MethodDescriptor( + name="GetLogMetric", + full_name="google.logging.v2.MetricsServiceV2.GetLogMetric", + index=1, + containing_service=None, + input_type=_GETLOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=_b( + "\202\323\344\223\002(\022&/v2/{metric_name=projects/*/metrics/*}" + ), + ), + _descriptor.MethodDescriptor( + name="CreateLogMetric", + full_name="google.logging.v2.MetricsServiceV2.CreateLogMetric", + index=2, + containing_service=None, + input_type=_CREATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=_b( + '\202\323\344\223\002)"\037/v2/{parent=projects/*}/metrics:\006metric' + ), + ), + _descriptor.MethodDescriptor( + name="UpdateLogMetric", + full_name="google.logging.v2.MetricsServiceV2.UpdateLogMetric", + index=3, + containing_service=None, + input_type=_UPDATELOGMETRICREQUEST, + output_type=_LOGMETRIC, + serialized_options=_b( + "\202\323\344\223\0020\032&/v2/{metric_name=projects/*/metrics/*}:\006metric" + ), + ), + _descriptor.MethodDescriptor( + name="DeleteLogMetric", + full_name="google.logging.v2.MetricsServiceV2.DeleteLogMetric", + index=4, + containing_service=None, + input_type=_DELETELOGMETRICREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=_b( + "\202\323\344\223\002(*&/v2/{metric_name=projects/*/metrics/*}" + ), + ), + ], +) +_sym_db.RegisterServiceDescriptor(_METRICSSERVICEV2) + +DESCRIPTOR.services_by_name["MetricsServiceV2"] = _METRICSSERVICEV2 + +# @@protoc_insertion_point(module_scope) diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py new file mode 100644 index 000000000000..09f84e038a1b --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py @@ -0,0 +1,118 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +from google.cloud.logging_v2.proto import ( + logging_metrics_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2, +) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +class MetricsServiceV2Stub(object): + """Service for configuring logs-based metrics. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListLogMetrics = channel.unary_unary( + "/google.logging.v2.MetricsServiceV2/ListLogMetrics", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString, + ) + self.GetLogMetric = channel.unary_unary( + "/google.logging.v2.MetricsServiceV2/GetLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) + self.CreateLogMetric = channel.unary_unary( + "/google.logging.v2.MetricsServiceV2/CreateLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) + self.UpdateLogMetric = channel.unary_unary( + "/google.logging.v2.MetricsServiceV2/UpdateLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString, + ) + self.DeleteLogMetric = channel.unary_unary( + "/google.logging.v2.MetricsServiceV2/DeleteLogMetric", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + + +class MetricsServiceV2Servicer(object): + """Service for configuring logs-based metrics. + """ + + def ListLogMetrics(self, request, context): + """Lists logs-based metrics. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetLogMetric(self, request, context): + """Gets a logs-based metric. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateLogMetric(self, request, context): + """Creates a logs-based metric. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateLogMetric(self, request, context): + """Creates or updates a logs-based metric. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteLogMetric(self, request, context): + """Deletes a logs-based metric. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_MetricsServiceV2Servicer_to_server(servicer, server): + rpc_method_handlers = { + "ListLogMetrics": grpc.unary_unary_rpc_method_handler( + servicer.ListLogMetrics, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString, + ), + "GetLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.GetLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "CreateLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.CreateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "UpdateLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.UpdateLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString, + ), + "DeleteLogMetric": grpc.unary_unary_rpc_method_handler( + servicer.DeleteLogMetric, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "google.logging.v2.MetricsServiceV2", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2.py new file mode 100644 index 000000000000..04bd84375901 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2.py @@ -0,0 +1,1312 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/logging_v2/proto/logging.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import ( + monitored_resource_pb2 as google_dot_api_dot_monitored__resource__pb2, +) +from google.cloud.logging_v2.proto import ( + log_entry_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2, +) +from google.cloud.logging_v2.proto import ( + logging_config_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2, +) +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import 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 +from google.api import client_pb2 as google_dot_api_dot_client__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#google/api/monitored_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\x1a\x17google/api/client.proto"$\n\x10\x44\x65leteLogRequest\x12\x10\n\x08log_name\x18\x01 \x01(\t"\xa9\x02\n\x16WriteLogEntriesRequest\x12\x10\n\x08log_name\x18\x01 \x01(\t\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,\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.google.logging.v2.LogEntry\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"\x91\x01\n\x15ListLogEntriesRequest\x12\x17\n\x0bproject_ids\x18\x01 \x03(\tB\x02\x18\x01\x12\x16\n\x0eresource_names\x18\x08 \x03(\t\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"H\n\x0fListLogsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\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\x85\n\n\x10LoggingServiceV2\x12\x88\x02\n\tDeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1a\x16.google.protobuf.Empty"\xbd\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/*}\x12\x86\x01\n\x0fWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1a*.google.logging.v2.WriteLogEntriesResponse"\x1c\x82\xd3\xe4\x93\x02\x16"\x11/v2/entries:write:\x01*\x12\x82\x01\n\x0eListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1a).google.logging.v2.ListLogEntriesResponse"\x1b\x82\xd3\xe4\x93\x02\x15"\x10/v2/entries:list:\x01*\x12\xc5\x01\n ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1a;.google.logging.v2.ListMonitoredResourceDescriptorsResponse"(\x82\xd3\xe4\x93\x02"\x12 /v2/monitoredResourceDescriptors\x12\xff\x01\n\x08ListLogs\x12".google.logging.v2.ListLogsRequest\x1a#.google.logging.v2.ListLogsResponse"\xa9\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\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_monitored__resource__pb2.DESCRIPTOR, + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2.DESCRIPTOR, + google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__config__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_rpc_dot_status__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + ], +) + + +_DELETELOGREQUEST = _descriptor.Descriptor( + name="DeleteLogRequest", + full_name="google.logging.v2.DeleteLogRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.DeleteLogRequest.log_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=376, + serialized_end=412, +) + + +_WRITELOGENTRIESREQUEST_LABELSENTRY = _descriptor.Descriptor( + name="LabelsEntry", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.WriteLogEntriesRequest.LabelsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=667, + serialized_end=712, +) + +_WRITELOGENTRIESREQUEST = _descriptor.Descriptor( + name="WriteLogEntriesRequest", + full_name="google.logging.v2.WriteLogEntriesRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="log_name", + full_name="google.logging.v2.WriteLogEntriesRequest.log_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="google.logging.v2.WriteLogEntriesRequest.resource", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="labels", + full_name="google.logging.v2.WriteLogEntriesRequest.labels", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="entries", + full_name="google.logging.v2.WriteLogEntriesRequest.entries", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="partial_success", + full_name="google.logging.v2.WriteLogEntriesRequest.partial_success", + index=4, + number=5, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="dry_run", + full_name="google.logging.v2.WriteLogEntriesRequest.dry_run", + index=5, + number=6, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_WRITELOGENTRIESREQUEST_LABELSENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=415, + serialized_end=712, +) + + +_WRITELOGENTRIESRESPONSE = _descriptor.Descriptor( + name="WriteLogEntriesResponse", + full_name="google.logging.v2.WriteLogEntriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=714, + serialized_end=739, +) + + +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY = _descriptor.Descriptor( + name="LogEntryErrorsEntry", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.key", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=869, + serialized_end=942, +) + +_WRITELOGENTRIESPARTIALERRORS = _descriptor.Descriptor( + name="WriteLogEntriesPartialErrors", + full_name="google.logging.v2.WriteLogEntriesPartialErrors", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="log_entry_errors", + full_name="google.logging.v2.WriteLogEntriesPartialErrors.log_entry_errors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=742, + serialized_end=942, +) + + +_LISTLOGENTRIESREQUEST = _descriptor.Descriptor( + name="ListLogEntriesRequest", + full_name="google.logging.v2.ListLogEntriesRequest", + filename=None, + 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, + number=8, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.logging.v2.ListLogEntriesRequest.filter", + index=2, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="order_by", + full_name="google.logging.v2.ListLogEntriesRequest.order_by", + index=3, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogEntriesRequest.page_size", + index=4, + number=4, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogEntriesRequest.page_token", + index=5, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=945, + serialized_end=1090, +) + + +_LISTLOGENTRIESRESPONSE = _descriptor.Descriptor( + name="ListLogEntriesResponse", + full_name="google.logging.v2.ListLogEntriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="entries", + full_name="google.logging.v2.ListLogEntriesResponse.entries", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogEntriesResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1092, + serialized_end=1187, +) + + +_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST = _descriptor.Descriptor( + name="ListMonitoredResourceDescriptorsRequest", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_size", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsRequest.page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1189, + serialized_end=1269, +) + + +_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE = _descriptor.Descriptor( + name="ListMonitoredResourceDescriptorsResponse", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="resource_descriptors", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.resource_descriptors", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListMonitoredResourceDescriptorsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1272, + serialized_end=1410, +) + + +_LISTLOGSREQUEST = _descriptor.Descriptor( + name="ListLogsRequest", + full_name="google.logging.v2.ListLogsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.logging.v2.ListLogsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.logging.v2.ListLogsRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.logging.v2.ListLogsRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1412, + serialized_end=1484, +) + + +_LISTLOGSRESPONSE = _descriptor.Descriptor( + name="ListLogsResponse", + full_name="google.logging.v2.ListLogsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="log_names", + full_name="google.logging.v2.ListLogsResponse.log_names", + index=0, + number=3, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.logging.v2.ListLogsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1486, + serialized_end=1548, +) + +_WRITELOGENTRIESREQUEST_LABELSENTRY.containing_type = _WRITELOGENTRIESREQUEST +_WRITELOGENTRIESREQUEST.fields_by_name[ + "resource" +].message_type = google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCE +_WRITELOGENTRIESREQUEST.fields_by_name[ + "labels" +].message_type = _WRITELOGENTRIESREQUEST_LABELSENTRY +_WRITELOGENTRIESREQUEST.fields_by_name[ + "entries" +].message_type = ( + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +) +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.fields_by_name[ + "value" +].message_type = google_dot_rpc_dot_status__pb2._STATUS +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY.containing_type = ( + _WRITELOGENTRIESPARTIALERRORS +) +_WRITELOGENTRIESPARTIALERRORS.fields_by_name[ + "log_entry_errors" +].message_type = _WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY +_LISTLOGENTRIESRESPONSE.fields_by_name[ + "entries" +].message_type = ( + google_dot_cloud_dot_logging__v2_dot_proto_dot_log__entry__pb2._LOGENTRY +) +_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE.fields_by_name[ + "resource_descriptors" +].message_type = ( + google_dot_api_dot_monitored__resource__pb2._MONITOREDRESOURCEDESCRIPTOR +) +DESCRIPTOR.message_types_by_name["DeleteLogRequest"] = _DELETELOGREQUEST +DESCRIPTOR.message_types_by_name["WriteLogEntriesRequest"] = _WRITELOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name["WriteLogEntriesResponse"] = _WRITELOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name[ + "WriteLogEntriesPartialErrors" +] = _WRITELOGENTRIESPARTIALERRORS +DESCRIPTOR.message_types_by_name["ListLogEntriesRequest"] = _LISTLOGENTRIESREQUEST +DESCRIPTOR.message_types_by_name["ListLogEntriesResponse"] = _LISTLOGENTRIESRESPONSE +DESCRIPTOR.message_types_by_name[ + "ListMonitoredResourceDescriptorsRequest" +] = _LISTMONITOREDRESOURCEDESCRIPTORSREQUEST +DESCRIPTOR.message_types_by_name[ + "ListMonitoredResourceDescriptorsResponse" +] = _LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE +DESCRIPTOR.message_types_by_name["ListLogsRequest"] = _LISTLOGSREQUEST +DESCRIPTOR.message_types_by_name["ListLogsResponse"] = _LISTLOGSRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +DeleteLogRequest = _reflection.GeneratedProtocolMessageType( + "DeleteLogRequest", + (_message.Message,), + dict( + DESCRIPTOR=_DELETELOGREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to DeleteLog. + + + Attributes: + log_name: + Required. The resource name of the log to delete: :: + "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/cloudresou + rcemanager.googleapis.com%2Factivity"``. For more information + about log names, see [LogEntry][google.logging.v2.LogEntry]. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.DeleteLogRequest) + ), +) +_sym_db.RegisterMessage(DeleteLogRequest) + +WriteLogEntriesRequest = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesRequest", + (_message.Message,), + dict( + LabelsEntry=_reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_WRITELOGENTRIESREQUEST_LABELSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest.LabelsEntry) + ), + ), + DESCRIPTOR=_WRITELOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to WriteLogEntries. + + + 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]" + "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, + organization, billing account, or folder that is receiving new + log entries, whether the resource is specified in logName or + in an individual log entry. + resource: + Optional. A default monitored resource object that is assigned + to all log entries in ``entries`` that do not specify a value + for ``resource``. Example: :: { "type": "gce_instance", + "labels": { "zone": "us-central1-a", "instance_id": + "00000000000000000000" }} See + [LogEntry][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 + [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 + 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 + ``timestamp`` or ``insert_id`` fields are missing in log + entries, then this method supplies the current time or a + unique identifier, respectively. The supplied values are + chosen so that, among the log entries that did not supply + their own values, the entries earlier in the list will sort + before the entries later in the list. See the ``entries.list`` + method. Log entries with timestamps that are more than the + `logs retention period `__ in the past + or more than 24 hours in the future will not be available when + calling ``entries.list``. However, those log entries can still + be `exported with LogSinks `__. To improve throughput and to avoid exceeding the + `quota limit `__ for calls to + ``entries.write``, you should try to include several log + entries in this list, rather than calling this method for each + individual log entry. + 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 + 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: + 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. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesRequest) + ), +) +_sym_db.RegisterMessage(WriteLogEntriesRequest) +_sym_db.RegisterMessage(WriteLogEntriesRequest.LabelsEntry) + +WriteLogEntriesResponse = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesResponse", + (_message.Message,), + dict( + DESCRIPTOR=_WRITELOGENTRIESRESPONSE, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Result returned from WriteLogEntries. empty + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesResponse) + ), +) +_sym_db.RegisterMessage(WriteLogEntriesResponse) + +WriteLogEntriesPartialErrors = _reflection.GeneratedProtocolMessageType( + "WriteLogEntriesPartialErrors", + (_message.Message,), + dict( + LogEntryErrorsEntry=_reflection.GeneratedProtocolMessageType( + "LogEntryErrorsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY, + __module__="google.cloud.logging_v2.proto.logging_pb2" + # @@protoc_insertion_point(class_scope:google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry) + ), + ), + DESCRIPTOR=_WRITELOGENTRIESPARTIALERRORS, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""Error details for WriteLogEntries with partial success. + + + 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 + ``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) + +ListLogEntriesRequest = _reflection.GeneratedProtocolMessageType( + "ListLogEntriesRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTLOGENTRIESREQUEST, + __module__="google.cloud.logging_v2.proto.logging_pb2", + __doc__="""The parameters to ``ListLogEntries``. + + + Attributes: + project_ids: + Deprecated. Use ``resource_names`` instead. One or more + project identifiers or project numbers from which to retrieve + log entries. Example: ``"my-project-1A"``. + resource_names: + Required. Names of one or more parent resources from which to + retrieve log entries: :: "projects/[PROJECT_ID]" + "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 Filters + `__. Only log entries + that match the filter are returned. An empty filter matches + all log entries in the resources listed in ``resource_names``. + Referencing a parent resource that is not listed in + ``resource_names`` will cause the filter to return no results. + The maximum length of the filter is 20000 characters. + order_by: + Optional. How the results should be sorted. Presently, the + only permitted values are ``"timestamp asc"`` (default) and + ``"timestamp desc"``. The first option returns entries in + order of increasing values of ``LogEntry.timestamp`` (oldest + first), and the second option returns entries in order of + decreasing timestamps (newest first). Entries with equal + timestamps are returned in order of their ``insert_id`` + values. + page_size: + 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. + page_token: + 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. + """, + # @@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``. + + + Attributes: + entries: + A list of log entries. If ``entries`` is empty, + ``nextPageToken`` may still be returned, indicating that more + entries may exist. See ``nextPageToken`` for more information. + next_page_token: + If there might be more results than those appearing in this + response, then ``nextPageToken`` is included. To get the next + set of results, call this method again using the value of + ``nextPageToken`` as ``pageToken``. If a value for + ``next_page_token`` appears and the ``entries`` field is + empty, it means that the search found no log entries so far + but it did not have time to search all the possible log + entries. Retry the method with this value for ``page_token`` + to continue the search. Alternatively, consider speeding up + the search by changing your filter to specify a single log + name or resource type, or to narrow the time range of the + 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 + + + Attributes: + 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. + 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. + """, + # @@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. + + + Attributes: + resource_descriptors: + A list of resource descriptors. + next_page_token: + If there might be more results than those appearing in this + response, then ``nextPageToken`` is included. To get the next + set of results, call this method again using the value of + ``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. + + + Attributes: + parent: + Required. The resource name that owns the logs: :: + "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" + 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. + 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. + """, + # @@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. + + + Attributes: + log_names: + A list of log names. For example, ``"projects/my- + project/logs/syslog"`` or ``"organizations/123/logs/cloudresou + rcemanager.googleapis.com%2Factivity"``. + next_page_token: + If there might be more results than those appearing in this + response, then ``nextPageToken`` is included. To get the next + set of results, call this method again using the value of + ``nextPageToken`` as ``pageToken``. + """, + # @@protoc_insertion_point(class_scope:google.logging.v2.ListLogsResponse) + ), +) +_sym_db.RegisterMessage(ListLogsResponse) + + +DESCRIPTOR._options = None +_WRITELOGENTRIESREQUEST_LABELSENTRY._options = None +_WRITELOGENTRIESPARTIALERRORS_LOGENTRYERRORSENTRY._options = None +_LISTLOGENTRIESREQUEST.fields_by_name["project_ids"]._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=1551, + serialized_end=2836, + methods=[ + _descriptor.MethodDescriptor( + name="DeleteLog", + full_name="google.logging.v2.LoggingServiceV2.DeleteLog", + index=0, + containing_service=None, + input_type=_DELETELOGREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=_b( + "\202\323\344\223\002\266\001* /v2/{log_name=projects/*/logs/*}Z\033*\031/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\037/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}" + ), + ), + _descriptor.MethodDescriptor( + name="WriteLogEntries", + full_name="google.logging.v2.LoggingServiceV2.WriteLogEntries", + index=1, + containing_service=None, + input_type=_WRITELOGENTRIESREQUEST, + output_type=_WRITELOGENTRIESRESPONSE, + serialized_options=_b( + '\202\323\344\223\002\026"\021/v2/entries:write:\001*' + ), + ), + _descriptor.MethodDescriptor( + name="ListLogEntries", + full_name="google.logging.v2.LoggingServiceV2.ListLogEntries", + index=2, + containing_service=None, + input_type=_LISTLOGENTRIESREQUEST, + output_type=_LISTLOGENTRIESRESPONSE, + serialized_options=_b( + '\202\323\344\223\002\025"\020/v2/entries:list:\001*' + ), + ), + _descriptor.MethodDescriptor( + name="ListMonitoredResourceDescriptors", + full_name="google.logging.v2.LoggingServiceV2.ListMonitoredResourceDescriptors", + index=3, + containing_service=None, + input_type=_LISTMONITOREDRESOURCEDESCRIPTORSREQUEST, + output_type=_LISTMONITOREDRESOURCEDESCRIPTORSRESPONSE, + serialized_options=_b( + '\202\323\344\223\002"\022 /v2/monitoredResourceDescriptors' + ), + ), + _descriptor.MethodDescriptor( + name="ListLogs", + full_name="google.logging.v2.LoggingServiceV2.ListLogs", + index=4, + containing_service=None, + input_type=_LISTLOGSREQUEST, + output_type=_LISTLOGSRESPONSE, + serialized_options=_b( + "\202\323\344\223\002\242\001\022\025/v2/{parent=*/*}/logsZ\036\022\034/v2/{parent=projects/*}/logsZ#\022!/v2/{parent=organizations/*}/logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/v2/{parent=billingAccounts/*}/logs" + ), + ), + ], +) +_sym_db.RegisterServiceDescriptor(_LOGGINGSERVICEV2) + +DESCRIPTOR.services_by_name["LoggingServiceV2"] = _LOGGINGSERVICEV2 + +# @@protoc_insertion_point(module_scope) diff --git a/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2_grpc.py b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2_grpc.py new file mode 100644 index 000000000000..2a2b3656925c --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/cloud/logging_v2/proto/logging_pb2_grpc.py @@ -0,0 +1,130 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +from google.cloud.logging_v2.proto import ( + logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2, +) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +class LoggingServiceV2Stub(object): + """Service for ingesting and querying logs. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.DeleteLog = channel.unary_unary( + "/google.logging.v2.LoggingServiceV2/DeleteLog", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.WriteLogEntries = channel.unary_unary( + "/google.logging.v2.LoggingServiceV2/WriteLogEntries", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.FromString, + ) + self.ListLogEntries = channel.unary_unary( + "/google.logging.v2.LoggingServiceV2/ListLogEntries", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.FromString, + ) + self.ListMonitoredResourceDescriptors = channel.unary_unary( + "/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.FromString, + ) + self.ListLogs = channel.unary_unary( + "/google.logging.v2.LoggingServiceV2/ListLogs", + request_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.FromString, + ) + + +class LoggingServiceV2Servicer(object): + """Service for ingesting and querying logs. + """ + + def DeleteLog(self, request, context): + """Deletes all the log entries in a log. + The log reappears if it receives new entries. + Log entries written shortly before the delete operation might not be + deleted. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def WriteLogEntries(self, request, context): + """Writes log entries to Logging. This API method is the + only way to send log entries to Logging. This method + is used, directly or indirectly, by the Logging agent + (fluentd) and all logging libraries configured to use Logging. + A single request may contain log entries for a maximum of 1000 + different resources (projects, organizations, billing accounts or + folders) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListLogEntries(self, request, context): + """Lists log entries. Use this method to retrieve log entries that originated + from a project/folder/organization/billing account. For ways to export log + entries, see [Exporting Logs](/logging/docs/export). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListMonitoredResourceDescriptors(self, request, context): + """Lists the descriptors for monitored resource types used by Logging. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListLogs(self, request, context): + """Lists the logs in projects, organizations, folders, or billing accounts. + Only logs that have entries are listed. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_LoggingServiceV2Servicer_to_server(servicer, server): + rpc_method_handlers = { + "DeleteLog": grpc.unary_unary_rpc_method_handler( + servicer.DeleteLog, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.DeleteLogRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "WriteLogEntries": grpc.unary_unary_rpc_method_handler( + servicer.WriteLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.WriteLogEntriesResponse.SerializeToString, + ), + "ListLogEntries": grpc.unary_unary_rpc_method_handler( + servicer.ListLogEntries, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogEntriesResponse.SerializeToString, + ), + "ListMonitoredResourceDescriptors": grpc.unary_unary_rpc_method_handler( + servicer.ListMonitoredResourceDescriptors, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListMonitoredResourceDescriptorsResponse.SerializeToString, + ), + "ListLogs": grpc.unary_unary_rpc_method_handler( + servicer.ListLogs, + request_deserializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsRequest.FromString, + response_serializer=google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2.ListLogsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "google.logging.v2.LoggingServiceV2", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/logging/google/cloud/logging_v2/proto/log_entry.proto b/logging/google/cloud/logging_v2/proto/log_entry.proto index de9786daf733..f0b037545199 100644 --- a/logging/google/cloud/logging_v2/proto/log_entry.proto +++ b/logging/google/cloud/logging_v2/proto/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,14 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/monitored_resource.proto"; import "google/logging/type/http_request.proto"; import "google/logging/type/log_severity.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.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"; @@ -34,6 +35,7 @@ option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; // An individual entry in a log. +// message LogEntry { // Required. The resource name of the log to which this log entry belongs: // @@ -42,9 +44,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 optionally be used in place of PROJECT_ID. The project + // number is translated to its corresponding PROJECT_ID internally and the + // `log_name` field will contain PROJECT_ID in queries and exports. // // `[LOG_ID]` must be URL-encoded within `log_name`. Example: // `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. @@ -59,17 +61,23 @@ message LogEntry { // any results. string log_name = 12; - // Required. The primary monitored resource associated with 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. + // 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; // Optional. The log entry payload, which can be one of multiple types. oneof payload { - // The log entry payload, represented as a protocol buffer. Some - // Google Cloud Platform services use this field for their log - // entry payloads. + // 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" google.protobuf.Any proto_payload = 2; // The log entry payload, represented as a Unicode string (UTF-8). @@ -80,19 +88,18 @@ message LogEntry { google.protobuf.Struct json_payload = 6; } - // Optional. The time the event described by the log entry occurred. - // This time is used to compute the log entry's age and to enforce - // the logs retention period. If this field is omitted in a new log - // entry, then Logging assigns it the current time. - // Timestamps have nanosecond accuracy, but trailing zeros in the fractional - // seconds might be omitted when the timestamp is displayed. + // Optional. The time the event described by the log entry occurred. This + // time is used to compute the log entry's age and to enforce the logs + // retention period. If this field is omitted in a new log entry, then Logging + // assigns it the current time. Timestamps have nanosecond accuracy, but + // trailing zeros in the fractional seconds might be omitted when the + // timestamp is displayed. // - // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quotas) in the past, - // and no more than 24 hours in the future. Log entries outside those time - // boundaries will not be available when calling `entries.list`, but - // those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). + // Incoming log entries should have timestamps that are no more than the [logs + // retention period](/logging/quotas) in the past, and no more than 24 hours + // in the future. Log entries outside those time boundaries will not be + // available when calling `entries.list`, but those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; // Output only. The time the log entry was received by Logging. @@ -103,25 +110,31 @@ message LogEntry { google.logging.type.LogSeverity severity = 10; // Optional. A unique identifier for the log entry. If you provide a value, - // then Logging considers other log entries in the same project, - // with the same `timestamp`, and with the same `insert_id` to be duplicates - // which can be removed. If omitted in new log entries, then - // Logging assigns its own unique identifier. The `insert_id` is also used - // to order log entries that have the same `timestamp` 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 can be + // removed. If omitted in new log entries, then Logging assigns its own unique + // identifier. The `insert_id` is also used to order log entries that have the + // same `timestamp` value. string insert_id = 4; - // Optional. Information about the HTTP request associated with this - // log entry, if applicable. + // Optional. Information about the HTTP request associated with this log + // entry, if applicable. google.logging.type.HttpRequest http_request = 7; // Optional. A set of user-defined (key, value) data that provides additional // information about the log entry. map labels = 11; - // Output only. Additional metadata about the monitored resource. + // Deprecated. Output only. Additional metadata about the monitored resource. + // // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have - // this field populated. - google.api.MonitoredResourceMetadata metadata = 25; + // this field populated for GKE versions older than 1.12.6. For GKE versions + // 1.12.6 and above, the `metadata` field has been deprecated. The Kubernetes + // pod labels that used to be in `metadata.userLabels` will now be present in + // the `labels` field with a key prefix of `k8s-pod/`. The Stackdriver system + // labels that were present in the `metadata.systemLabels` field will no + // longer be available in the LogEntry. + google.api.MonitoredResourceMetadata metadata = 25 [deprecated = true]; // Optional. Information about an operation associated with the log entry, if // applicable. @@ -134,12 +147,14 @@ message LogEntry { string trace = 22; // Optional. The span ID within the trace associated with the log entry. - // For Trace spans, this is the same format that the Trace - // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such - // as "000000000000004a". + // + // 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; // Optional. The sampling decision of the trace associated with the log entry. + // // True means that the trace resource name in the `trace` field was sampled // for storage in a trace backend. False means that the trace was not sampled // for storage when this log entry was written, or the sampling decision was @@ -155,12 +170,12 @@ message LogEntry { // Additional information about a potentially long-running operation with which // a log entry is associated. message LogEntryOperation { - // Optional. An arbitrary operation identifier. Log entries with the - // same identifier are assumed to be part of the same operation. + // Optional. An arbitrary operation identifier. Log entries with the same + // identifier are assumed to be part of the same operation. string id = 1; - // Optional. An arbitrary producer identifier. The combination of - // `id` and `producer` must be globally unique. Examples for `producer`: + // 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; diff --git a/logging/google/cloud/logging_v2/proto/log_entry_pb2.py b/logging/google/cloud/logging_v2/proto/log_entry_pb2.py index 6dc9ec5817f1..1d3af3c42416 100644 --- a/logging/google/cloud/logging_v2/proto/log_entry_pb2.py +++ b/logging/google/cloud/logging_v2/proto/log_entry_pb2.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/logging_v2/proto/log_entry.proto diff --git a/logging/google/cloud/logging_v2/proto/logging.proto b/logging/google/cloud/logging_v2/proto/logging.proto index d04cd5c03dd0..fc4217593770 100644 --- a/logging/google/cloud/logging_v2/proto/logging.proto +++ b/logging/google/cloud/logging_v2/proto/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,15 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; import "google/api/monitored_resource.proto"; import "google/logging/v2/log_entry.proto"; +import "google/logging/v2/logging_config.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -35,6 +37,14 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; // Service for ingesting and querying logs. service LoggingServiceV2 { + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read," + "https://www.googleapis.com/auth/logging.write"; + // 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 @@ -42,9 +52,18 @@ service LoggingServiceV2 { rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{log_name=projects/*/logs/*}" - additional_bindings { delete: "/v2/{log_name=organizations/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=folders/*/logs/*}" } - additional_bindings { delete: "/v2/{log_name=billingAccounts/*/logs/*}" } + additional_bindings { + delete: "/v2/{log_name=*/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=organizations/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=folders/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=billingAccounts/*/logs/*}" + } }; } @@ -55,17 +74,16 @@ service LoggingServiceV2 { // A single request may contain log entries for a maximum of 1000 // different resources (projects, organizations, billing accounts or // folders) - rpc WriteLogEntries(WriteLogEntriesRequest) - returns (WriteLogEntriesResponse) { + rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:write" body: "*" }; } - // Lists log entries. Use this method to retrieve log entries from - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). + // 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). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { option (google.api.http) = { post: "/v2/entries:list" @@ -74,8 +92,7 @@ service LoggingServiceV2 { } // Lists the descriptors for monitored resource types used by Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) - returns (ListMonitoredResourceDescriptorsResponse) { + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; @@ -86,10 +103,18 @@ service LoggingServiceV2 { rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/logs" - additional_bindings { get: "/v2/{parent=projects/*}/logs" } - additional_bindings { get: "/v2/{parent=organizations/*}/logs" } - additional_bindings { get: "/v2/{parent=folders/*}/logs" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/logs" } + additional_bindings { + get: "/v2/{parent=projects/*}/logs" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/logs" + } + additional_bindings { + get: "/v2/{parent=folders/*}/logs" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/logs" + } }; } } @@ -164,8 +189,8 @@ message WriteLogEntriesRequest { // Log entries with timestamps that are more than the // [logs retention period](/logging/quota-policy) in the past or more than // 24 hours in the future will not be available when calling `entries.list`. - // However, those log entries can still be exported with - // [LogSinks](/logging/docs/api/tasks/exporting-logs). + // However, those log entries can still be + // [exported with LogSinks](/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the // [quota limit](/logging/quota-policy) for calls to `entries.write`, @@ -188,7 +213,9 @@ message WriteLogEntriesRequest { // Result returned from WriteLogEntries. // empty -message WriteLogEntriesResponse {} +message WriteLogEntriesResponse { + +} // Error details for WriteLogEntries with partial success. message WriteLogEntriesPartialErrors { @@ -205,9 +232,7 @@ message WriteLogEntriesPartialErrors { 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"`. If present, these project identifiers are converted to - // resource name format and added to the list of resources in - // `resource_names`. + // `"my-project-1A"`. repeated string project_ids = 1 [deprecated = true]; // Required. Names of one or more parent resources from which to @@ -218,6 +243,7 @@ message ListLogEntriesRequest { // "billingAccounts/[BILLING_ACCOUNT_ID]" // "folders/[FOLDER_ID]" // + // // Projects listed in the `project_ids` field are added to this list. repeated string resource_names = 8; @@ -320,8 +346,8 @@ message ListLogsRequest { // Result returned from ListLogs. message ListLogsResponse { // A list of log names. For example, - // `"projects/my-project/syslog"` or - // `"organizations/123/cloudresourcemanager.googleapis.com%2Factivity"`. + // `"projects/my-project/logs/syslog"` or + // `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. repeated string log_names = 3; // If there might be more results than those appearing in this response, then diff --git a/logging/google/cloud/logging_v2/proto/logging/type/__init__.py b/logging/google/cloud/logging_v2/proto/logging/type/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2.py b/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2.py new file mode 100644 index 000000000000..cd065d8a9311 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2.py @@ -0,0 +1,405 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/logging/type/http_request.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 +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/logging/type/http_request.proto", + package="google.logging.type", + syntax="proto3", + serialized_options=_b( + "\n\027com.google.logging.typeB\020HttpRequestProtoP\001Z8google.golang.org/genproto/googleapis/logging/type;ltype\252\002\031Google.Cloud.Logging.Type\312\002\031Google\\Cloud\\Logging\\Type" + ), + serialized_pb=_b( + '\n&google/logging/type/http_request.proto\x12\x13google.logging.type\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto"\xef\x02\n\x0bHttpRequest\x12\x16\n\x0erequest_method\x18\x01 \x01(\t\x12\x13\n\x0brequest_url\x18\x02 \x01(\t\x12\x14\n\x0crequest_size\x18\x03 \x01(\x03\x12\x0e\n\x06status\x18\x04 \x01(\x05\x12\x15\n\rresponse_size\x18\x05 \x01(\x03\x12\x12\n\nuser_agent\x18\x06 \x01(\t\x12\x11\n\tremote_ip\x18\x07 \x01(\t\x12\x11\n\tserver_ip\x18\r \x01(\t\x12\x0f\n\x07referer\x18\x08 \x01(\t\x12*\n\x07latency\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x63\x61\x63he_lookup\x18\x0b \x01(\x08\x12\x11\n\tcache_hit\x18\t \x01(\x08\x12*\n"cache_validated_with_origin_server\x18\n \x01(\x08\x12\x18\n\x10\x63\x61\x63he_fill_bytes\x18\x0c \x01(\x03\x12\x10\n\x08protocol\x18\x0f \x01(\tB\x9f\x01\n\x17\x63om.google.logging.typeB\x10HttpRequestProtoP\x01Z8google.golang.org/genproto/googleapis/logging/type;ltype\xaa\x02\x19Google.Cloud.Logging.Type\xca\x02\x19Google\\Cloud\\Logging\\Typeb\x06proto3' + ), + dependencies=[ + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) + + +_HTTPREQUEST = _descriptor.Descriptor( + name="HttpRequest", + full_name="google.logging.type.HttpRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="request_method", + full_name="google.logging.type.HttpRequest.request_method", + 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="request_url", + full_name="google.logging.type.HttpRequest.request_url", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="request_size", + full_name="google.logging.type.HttpRequest.request_size", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="google.logging.type.HttpRequest.status", + index=3, + number=4, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="response_size", + full_name="google.logging.type.HttpRequest.response_size", + index=4, + number=5, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="user_agent", + full_name="google.logging.type.HttpRequest.user_agent", + index=5, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="remote_ip", + full_name="google.logging.type.HttpRequest.remote_ip", + index=6, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=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="server_ip", + full_name="google.logging.type.HttpRequest.server_ip", + index=7, + number=13, + type=9, + cpp_type=9, + label=1, + has_default_value=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="referer", + full_name="google.logging.type.HttpRequest.referer", + index=8, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="latency", + full_name="google.logging.type.HttpRequest.latency", + index=9, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="cache_lookup", + full_name="google.logging.type.HttpRequest.cache_lookup", + index=10, + number=11, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="cache_hit", + full_name="google.logging.type.HttpRequest.cache_hit", + index=11, + number=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="cache_validated_with_origin_server", + full_name="google.logging.type.HttpRequest.cache_validated_with_origin_server", + index=12, + number=10, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="cache_fill_bytes", + full_name="google.logging.type.HttpRequest.cache_fill_bytes", + index=13, + number=12, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="protocol", + full_name="google.logging.type.HttpRequest.protocol", + index=14, + number=15, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=126, + serialized_end=493, +) + +_HTTPREQUEST.fields_by_name[ + "latency" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +DESCRIPTOR.message_types_by_name["HttpRequest"] = _HTTPREQUEST +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +HttpRequest = _reflection.GeneratedProtocolMessageType( + "HttpRequest", + (_message.Message,), + dict( + DESCRIPTOR=_HTTPREQUEST, + __module__="google.logging.type.http_request_pb2", + __doc__="""A common proto for logging HTTP requests. Only contains semantics + defined by the HTTP specification. Product-specific logging information + MUST be defined in a separate message. + + + Attributes: + request_method: + The request method. Examples: ``"GET"``, ``"HEAD"``, + ``"PUT"``, ``"POST"``. + request_url: + The scheme (http, https), the host name, the path and the + query portion of the URL that was requested. Example: + ``"http://example.com/some/info?color=red"``. + request_size: + The size of the HTTP request message in bytes, including the + request headers and the request body. + status: + The response code indicating the status of response. Examples: + 200, 404. + response_size: + The size of the HTTP response message sent back to the client, + in bytes, including the response headers and the response + body. + user_agent: + The user agent sent by the client. Example: ``"Mozilla/4.0 + (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR + 1.0.3705)"``. + remote_ip: + The IP address (IPv4 or IPv6) of the client that issued the + HTTP request. Examples: ``"192.168.1.1"``, + ``"FE80::0202:B3FF:FE1E:8329"``. + server_ip: + The IP address (IPv4 or IPv6) of the origin server that the + request was sent to. + referer: + The referer URL of the request, as defined in `HTTP/1.1 Header + Field Definitions + `__. + latency: + The request processing latency on the server, from the time + the request was received until the response was sent. + cache_lookup: + Whether or not a cache lookup was attempted. + cache_hit: + Whether or not an entity was served from cache (with or + without validation). + cache_validated_with_origin_server: + Whether or not the response was validated with the origin + server before being served from cache. This field is only + meaningful if ``cache_hit`` is True. + cache_fill_bytes: + The number of HTTP response bytes inserted into cache. Set + only when a cache fill was attempted. + protocol: + Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", + "websocket" + """, + # @@protoc_insertion_point(class_scope:google.logging.type.HttpRequest) + ), +) +_sym_db.RegisterMessage(HttpRequest) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2_grpc.py b/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2_grpc.py new file mode 100644 index 000000000000..07cb78fe03a9 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/logging/type/http_request_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2.py b/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2.py new file mode 100644 index 000000000000..bc429a3fca0b --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/logging/type/log_severity.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/logging/type/log_severity.proto", + package="google.logging.type", + syntax="proto3", + serialized_options=_b( + "\n\027com.google.logging.typeB\020LogSeverityProtoP\001Z8google.golang.org/genproto/googleapis/logging/type;ltype\252\002\031Google.Cloud.Logging.Type\312\002\031Google\\Cloud\\Logging\\Type" + ), + serialized_pb=_b( + "\n&google/logging/type/log_severity.proto\x12\x13google.logging.type\x1a\x1cgoogle/api/annotations.proto*\x82\x01\n\x0bLogSeverity\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x64\x12\t\n\x04INFO\x10\xc8\x01\x12\x0b\n\x06NOTICE\x10\xac\x02\x12\x0c\n\x07WARNING\x10\x90\x03\x12\n\n\x05\x45RROR\x10\xf4\x03\x12\r\n\x08\x43RITICAL\x10\xd8\x04\x12\n\n\x05\x41LERT\x10\xbc\x05\x12\x0e\n\tEMERGENCY\x10\xa0\x06\x42\x9f\x01\n\x17\x63om.google.logging.typeB\x10LogSeverityProtoP\x01Z8google.golang.org/genproto/googleapis/logging/type;ltype\xaa\x02\x19Google.Cloud.Logging.Type\xca\x02\x19Google\\Cloud\\Logging\\Typeb\x06proto3" + ), + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], +) + +_LOGSEVERITY = _descriptor.EnumDescriptor( + name="LogSeverity", + full_name="google.logging.type.LogSeverity", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="DEFAULT", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DEBUG", index=1, number=100, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="INFO", index=2, number=200, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="NOTICE", index=3, number=300, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="WARNING", index=4, number=400, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="ERROR", index=5, number=500, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="CRITICAL", index=6, number=600, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="ALERT", index=7, number=700, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="EMERGENCY", index=8, number=800, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=94, + serialized_end=224, +) +_sym_db.RegisterEnumDescriptor(_LOGSEVERITY) + +LogSeverity = enum_type_wrapper.EnumTypeWrapper(_LOGSEVERITY) +DEFAULT = 0 +DEBUG = 100 +INFO = 200 +NOTICE = 300 +WARNING = 400 +ERROR = 500 +CRITICAL = 600 +ALERT = 700 +EMERGENCY = 800 + + +DESCRIPTOR.enum_types_by_name["LogSeverity"] = _LOGSEVERITY +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2_grpc.py b/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2_grpc.py new file mode 100644 index 000000000000..07cb78fe03a9 --- /dev/null +++ b/logging/google/cloud/logging_v2/proto/logging/type/log_severity_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/logging/google/cloud/logging_v2/proto/logging_config.proto b/logging/google/cloud/logging_v2/proto/logging_config.proto index 2afea1062df5..1e3c84d3f419 100644 --- a/logging/google/cloud/logging_v2/proto/logging_config.proto +++ b/logging/google/cloud/logging_v2/proto/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,10 +17,12 @@ syntax = "proto3"; package google.logging.v2; -import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Logging.V2"; @@ -30,17 +32,31 @@ option java_outer_classname = "LoggingConfigProto"; option java_package = "com.google.logging.v2"; option php_namespace = "Google\\Cloud\\Logging\\V2"; -// Service for configuring sinks used to export log entries out of -// Logging. +// Service for configuring sinks used to route log entries. service ConfigServiceV2 { + option (google.api.default_host) = "logging.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/logging.admin," + "https://www.googleapis.com/auth/logging.read"; + // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" - additional_bindings { get: "/v2/{parent=projects/*}/sinks" } - additional_bindings { get: "/v2/{parent=organizations/*}/sinks" } - additional_bindings { get: "/v2/{parent=folders/*}/sinks" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/sinks" } + additional_bindings { + get: "/v2/{parent=projects/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=folders/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/sinks" + } }; } @@ -48,27 +64,41 @@ service ConfigServiceV2 { rpc GetSink(GetSinkRequest) returns (LogSink) { option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { get: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=folders/*/sinks/*}" } - additional_bindings { get: "/v2/{sink_name=billingAccounts/*/sinks/*}" } + additional_bindings { + get: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } }; } - // Creates a sink that exports specified log entries to a destination. 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 + // `writer_identity` is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. rpc CreateSink(CreateSinkRequest) returns (LogSink) { option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" - additional_bindings { post: "/v2/{parent=projects/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=projects/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=organizations/*}/sinks" body: "sink" } - additional_bindings { post: "/v2/{parent=folders/*}/sinks" body: "sink" } + additional_bindings { + post: "/v2/{parent=folders/*}/sinks" + body: "sink" + } additional_bindings { post: "/v2/{parent=billingAccounts/*}/sinks" body: "sink" @@ -76,8 +106,9 @@ service ConfigServiceV2 { }; } - // Updates a sink. This method replaces the following fields in the existing + // Updates a sink. This method replaces the following fields in the existing // sink with values from the new sink: `destination`, and `filter`. + // // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { @@ -124,9 +155,15 @@ service ConfigServiceV2 { rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" - additional_bindings { delete: "/v2/{sink_name=projects/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=organizations/*/sinks/*}" } - additional_bindings { delete: "/v2/{sink_name=folders/*/sinks/*}" } + additional_bindings { + delete: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=folders/*/sinks/*}" + } additional_bindings { delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" } @@ -137,10 +174,18 @@ service ConfigServiceV2 { rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" - additional_bindings { get: "/v2/{parent=projects/*}/exclusions" } - additional_bindings { get: "/v2/{parent=organizations/*}/exclusions" } - additional_bindings { get: "/v2/{parent=folders/*}/exclusions" } - additional_bindings { get: "/v2/{parent=billingAccounts/*}/exclusions" } + additional_bindings { + get: "/v2/{parent=projects/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=folders/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/exclusions" + } }; } @@ -148,10 +193,18 @@ service ConfigServiceV2 { rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" - additional_bindings { get: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=folders/*/exclusions/*}" } - additional_bindings { get: "/v2/{name=billingAccounts/*/exclusions/*}" } + additional_bindings { + get: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/exclusions/*}" + } }; } @@ -209,9 +262,15 @@ service ConfigServiceV2 { rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" - additional_bindings { delete: "/v2/{name=projects/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=organizations/*/exclusions/*}" } - additional_bindings { delete: "/v2/{name=folders/*/exclusions/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/exclusions/*}" + } additional_bindings { delete: "/v2/{name=billingAccounts/*/exclusions/*}" } @@ -221,9 +280,9 @@ service ConfigServiceV2 { // Describes a sink used to export log entries to one of the following // destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a -// Cloud Pub/Sub topic. A logs filter controls which log entries are -// exported. The sink must be created within a project, organization, billing -// account, or folder. +// Cloud Pub/Sub topic. A logs filter controls which log entries are exported. +// The sink must be created within a project, organization, billing account, or +// folder. message LogSink { // Available log entry formats. Log entries can be written to // Logging in either format and can be exported in either format. @@ -240,7 +299,7 @@ message LogSink { } // Required. The client-assigned sink identifier, unique within the - // project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are + // 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. @@ -254,34 +313,33 @@ 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). + // entries are not exported. For more information, see + // [Exporting Logs with Sinks](/logging/docs/api/tasks/exporting-logs). string destination = 3; - // Optional. - // An [advanced logs filter](/logging/docs/view/advanced_filters). The only + // Optional. An [advanced logs filter](/logging/docs/view/advanced-queries). The only // exported log entries are those that are in the resource owning the sink and - // that match the filter. For example: + // that match the filter. For example: // // logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR string filter = 5; // 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. + // 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](/logging/docs/api/reference/rest/v2/projects.sinks/create) + // 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](/logging/docs/api/reference/rest/v2/projects.sinks/update), - // based on the setting of `unique_writer_identity` in those methods. + // [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). + // see [Granting Access for a + // Resource](/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). // Consult the destination service's documentation to determine the // appropriate IAM roles to assign to the identity. string writer_identity = 8; @@ -301,11 +359,33 @@ message LogSink { // resource.type=gce_instance bool include_children = 9; - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp start_time = 10 [deprecated = true]; + // Optional. Destination dependent options. + oneof options { + // Optional. Options that affect sinks exporting data to BigQuery. + BigQueryOptions bigquery_options = 12; + } + + // Output only. The creation timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp create_time = 13; + + // Output only. The last update timestamp of the sink. + // + // This field may not be present for older sinks. + google.protobuf.Timestamp update_time = 14; +} - // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp end_time = 11 [deprecated = true]; +// Options that change functionality of a sink exporting data to BigQuery. +message BigQueryOptions { + // Optional. Whether to use [BigQuery's partition + // tables](/bigquery/docs/partitioned-tables). By default, Logging + // creates dated tables based on the log entries' timestamps, e.g. + // syslog_20170523. With partitioned tables the date suffix is no longer + // present and [special query + // syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead. + // In both cases, tables are sharded based on UTC timezone. + bool use_partitioned_tables = 1; } // The parameters to `ListSinks`. @@ -319,13 +399,13 @@ message ListSinksRequest { string parent = 1; // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `pageToken` must be the value of - // `nextPageToken` from the previous response. The values of other method + // 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; // Optional. The maximum number of results to return from this request. - // Non-positive values are ignored. The presence of `nextPageToken` in the + // Non-positive values are ignored. The presence of `nextPageToken` in the // response indicates that more results might be available. int32 page_size = 3; } @@ -336,7 +416,7 @@ message ListSinksResponse { repeated LogSink sinks = 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 + // `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; } @@ -371,17 +451,16 @@ message CreateSinkRequest { LogSink sink = 2; // 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 + // in the new sink. If this value is omitted or set to false, and if the // sink's parent is a project, then the value returned as `writer_identity` is - // the same group or service account used by Logging before the - // addition of writer identities to this API. The sink's destination must be - // in the same project as the sink itself. + // the same group or service account used by Logging before the addition of + // writer identities to this API. The sink's destination must be in the same + // project as the sink itself. // // If this field is set to true, or if the sink is owned by a non-project // resource such as an organization, then the value of `writer_identity` will - // be a unique service account used only for exports from the new sink. For - // more information, see `writer_identity` in - // [LogSink][google.logging.v2.LogSink]. + // 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; } @@ -402,9 +481,8 @@ message UpdateSinkRequest { // as part of `sink_name`. LogSink sink = 2; - // Optional. See - // [sinks.create](/logging/docs/api/reference/rest/v2/projects.sinks/create) - // for a description of this field. When updating a sink, the effect of this + // Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + // for a description of this field. When updating a sink, the effect of this // field on the value of `writer_identity` in the updated sink depends on both // the old and new values of this field: // @@ -418,7 +496,7 @@ message UpdateSinkRequest { // 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. + // 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: @@ -448,11 +526,11 @@ message DeleteSinkRequest { } // Specifies a set of log entries that are not to be stored in -// Logging. If your project receives a large volume of logs, you might be able -// to use exclusions to reduce your chargeable logs. Exclusions are processed -// after log sinks, so you can export log entries before they are excluded. -// Audit log entries and log entries from Amazon Web Services are never -// excluded. +// 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. message LogExclusion { // Required. A client-assigned identifier, such as // `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and @@ -462,22 +540,31 @@ message LogExclusion { // Optional. A description of this exclusion. string description = 2; - // Required. - // An [advanced logs filter](/logging/docs/view/advanced_filters) + // Required. An [advanced logs filter](/logging/docs/view/advanced-queries) // that matches the log entries to be excluded. By using the - // [sample function](/logging/docs/view/advanced_filters#sample), + // [sample function](/logging/docs/view/advanced-queries#sample), // you can exclude less than 100% of the matching log entries. - // For example, the following filter matches 99% of low-severity log - // entries from load balancers: + // For example, the following query matches 99% of low-severity log + // entries from Google Cloud Storage buckets: // - // `"resource.type=http_load_balancer severity") - # ---------------------------------------------------------------------------- # Add templated files # ----------------------------------------------------------------------------