lib/google/logging/v2/log_entry_pb.rb in google-cloud-logging-v2-0.9.0 vs lib/google/logging/v2/log_entry_pb.rb in google-cloud-logging-v2-0.10.0

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/logging/v2/log_entry.proto require 'google/protobuf' @@ -10,49 +11,39 @@ require 'google/logging/type/log_severity_pb' require 'google/protobuf/any_pb' require 'google/protobuf/struct_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/logging/v2/log_entry.proto", :syntax => :proto3) do - add_message "google.logging.v2.LogEntry" do - optional :log_name, :string, 12 - optional :resource, :message, 8, "google.api.MonitoredResource" - optional :timestamp, :message, 9, "google.protobuf.Timestamp" - optional :receive_timestamp, :message, 24, "google.protobuf.Timestamp" - optional :severity, :enum, 10, "google.logging.type.LogSeverity" - optional :insert_id, :string, 4 - optional :http_request, :message, 7, "google.logging.type.HttpRequest" - map :labels, :string, :string, 11 - optional :operation, :message, 15, "google.logging.v2.LogEntryOperation" - optional :trace, :string, 22 - optional :span_id, :string, 27 - optional :trace_sampled, :bool, 30 - optional :source_location, :message, 23, "google.logging.v2.LogEntrySourceLocation" - optional :split, :message, 35, "google.logging.v2.LogSplit" - oneof :payload do - optional :proto_payload, :message, 2, "google.protobuf.Any" - optional :text_payload, :string, 3 - optional :json_payload, :message, 6, "google.protobuf.Struct" - end + +descriptor_data = "\n!google/logging/v2/log_entry.proto\x12\x11google.logging.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a&google/logging/type/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x08\n\x08LogEntry\x12\x15\n\x08log_name\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x08resource\x18\x08 \x01(\x0b\x32\x1d.google.api.MonitoredResourceB\x03\xe0\x41\x02\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12/\n\x0cjson_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x32\n\ttimestamp\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12:\n\x11receive_timestamp\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x08severity\x18\n \x01(\x0e\x32 .google.logging.type.LogSeverityB\x03\xe0\x41\x01\x12\x16\n\tinsert_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x0chttp_request\x18\x07 \x01(\x0b\x32 .google.logging.type.HttpRequestB\x03\xe0\x41\x01\x12<\n\x06labels\x18\x0b \x03(\x0b\x32\'.google.logging.v2.LogEntry.LabelsEntryB\x03\xe0\x41\x01\x12<\n\toperation\x18\x0f \x01(\x0b\x32$.google.logging.v2.LogEntryOperationB\x03\xe0\x41\x01\x12\x12\n\x05trace\x18\x16 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07span_id\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rtrace_sampled\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01\x12G\n\x0fsource_location\x18\x17 \x01(\x0b\x32).google.logging.v2.LogEntrySourceLocationB\x03\xe0\x41\x01\x12/\n\x05split\x18# \x01(\x0b\x32\x1b.google.logging.v2.LogSplitB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbd\x01\xea\x41\xb9\x01\n\x1alogging.googleapis.com/Log\x12\x1dprojects/{project}/logs/{log}\x12\'organizations/{organization}/logs/{log}\x12\x1b\x66olders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1a\x08log_nameB\t\n\x07payload\"b\n\x11LogEntryOperation\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08producer\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66irst\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04last\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x16LogEntrySourceLocation\x12\x11\n\x04\x66ile\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x15\n\x08\x66unction\x18\x03 \x01(\tB\x03\xe0\x41\x01\"<\n\x08LogSplit\x12\x0b\n\x03uid\x18\x01 \x01(\t\x12\r\n\x05index\x18\x02 \x01(\x05\x12\x14\n\x0ctotal_splits\x18\x03 \x01(\x05\x42\xb3\x01\n\x15\x63om.google.logging.v2B\rLogEntryProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xf8\x01\x01\xaa\x02\x17Google.Cloud.Logging.V2\xca\x02\x17Google\\Cloud\\Logging\\V2\xea\x02\x1aGoogle::Cloud::Logging::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.api.MonitoredResource", "google/api/monitored_resource.proto"], + ["google.protobuf.Any", "google/protobuf/any.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.logging.type.HttpRequest", "google/logging/type/http_request.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end - add_message "google.logging.v2.LogEntryOperation" do - optional :id, :string, 1 - optional :producer, :string, 2 - optional :first, :bool, 3 - optional :last, :bool, 4 - end - add_message "google.logging.v2.LogEntrySourceLocation" do - optional :file, :string, 1 - optional :line, :int64, 2 - optional :function, :string, 3 - end - add_message "google.logging.v2.LogSplit" do - optional :uid, :string, 1 - optional :index, :int32, 2 - optional :total_splits, :int32, 3 - end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google module Cloud module Logging