lib/google/logging/v2/logging_metrics_pb.rb in google-cloud-logging-v2-0.9.0 vs lib/google/logging/v2/logging_metrics_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/logging_metrics.proto
require 'google/protobuf'
@@ -10,53 +11,37 @@
require 'google/api/metric_pb'
require 'google/api/resource_pb'
require 'google/protobuf/empty_pb'
require 'google/protobuf/timestamp_pb'
-Google::Protobuf::DescriptorPool.generated_pool.build do
- add_file("google/logging/v2/logging_metrics.proto", :syntax => :proto3) do
- add_message "google.logging.v2.LogMetric" do
- optional :name, :string, 1
- optional :description, :string, 2
- optional :filter, :string, 3
- optional :bucket_name, :string, 13
- optional :disabled, :bool, 12
- optional :metric_descriptor, :message, 5, "google.api.MetricDescriptor"
- optional :value_extractor, :string, 6
- map :label_extractors, :string, :string, 7
- optional :bucket_options, :message, 8, "google.api.Distribution.BucketOptions"
- optional :create_time, :message, 9, "google.protobuf.Timestamp"
- optional :update_time, :message, 10, "google.protobuf.Timestamp"
- optional :version, :enum, 4, "google.logging.v2.LogMetric.ApiVersion"
+
+descriptor_data = "\n\'google/logging/v2/logging_metrics.proto\x12\x11google.logging.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1dgoogle/api/distribution.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/api/metric.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x05\n\tLogMetric\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x62ucket_name\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12<\n\x11metric_descriptor\x18\x05 \x01(\x0b\x32\x1c.google.api.MetricDescriptorB\x03\xe0\x41\x01\x12\x1c\n\x0fvalue_extractor\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\x10label_extractors\x18\x07 \x03(\x0b\x32\x31.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xe0\x41\x01\x12\x43\n\x0e\x62ucket_options\x18\x08 \x01(\x0b\x32&.google.api.Distribution.BucketOptionsB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x07version\x18\x04 \x01(\x0e\x32\'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1a\x36\n\x14LabelExtractorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\nApiVersion\x12\x06\n\x02V2\x10\x00\x12\x06\n\x02V1\x10\x01:J\xea\x41G\n logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}\"\x8d\x01\n\x15ListLogMetricsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"`\n\x16ListLogMetricsResponse\x12-\n\x07metrics\x18\x01 \x03(\x0b\x32\x1c.google.logging.v2.LogMetric\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x13GetLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\"\x85\x01\n\x16\x43reateLogMetricRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"\x8a\x01\n\x16UpdateLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric\x12\x31\n\x06metric\x18\x02 \x01(\x0b\x32\x1c.google.logging.v2.LogMetricB\x03\xe0\x41\x02\"W\n\x16\x44\x65leteLogMetricRequest\x12=\n\x0bmetric_name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n logging.googleapis.com/LogMetric2\xae\x08\n\x10MetricsServiceV2\x12\x97\x01\n\x0eListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1a).google.logging.v2.ListLogMetricsResponse\"0\x82\xd3\xe4\x93\x02!\x12\x1f/v2/{parent=projects/*}/metrics\xda\x41\x06parent\x12\x92\x01\n\x0cGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"<\x82\xd3\xe4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x12\x9b\x01\n\x0f\x43reateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"?\x82\xd3\xe4\x93\x02)\"\x1f/v2/{parent=projects/*}/metrics:\x06metric\xda\x41\rparent,metric\x12\xa7\x01\n\x0fUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1a\x1c.google.logging.v2.LogMetric\"K\x82\xd3\xe4\x93\x02\x30\x1a&/v2/{metric_name=projects/*/metrics/*}:\x06metric\xda\x41\x12metric_name,metric\x12\x92\x01\n\x0f\x44\x65leteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\xda\x41\x0bmetric_name\x1a\x8d\x02\xca\x41\x16logging.googleapis.com\xd2\x41\xf0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xb9\x01\n\x15\x63om.google.logging.v2B\x13LoggingMetricsProtoP\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.MetricDescriptor", "google/api/metric.proto"],
+ ["google.api.Distribution.BucketOptions", "google/api/distribution.proto"],
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.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_enum "google.logging.v2.LogMetric.ApiVersion" do
- value :V2, 0
- value :V1, 1
- end
- add_message "google.logging.v2.ListLogMetricsRequest" do
- optional :parent, :string, 1
- optional :page_token, :string, 2
- optional :page_size, :int32, 3
- end
- add_message "google.logging.v2.ListLogMetricsResponse" do
- repeated :metrics, :message, 1, "google.logging.v2.LogMetric"
- optional :next_page_token, :string, 2
- end
- add_message "google.logging.v2.GetLogMetricRequest" do
- optional :metric_name, :string, 1
- end
- add_message "google.logging.v2.CreateLogMetricRequest" do
- optional :parent, :string, 1
- optional :metric, :message, 2, "google.logging.v2.LogMetric"
- end
- add_message "google.logging.v2.UpdateLogMetricRequest" do
- optional :metric_name, :string, 1
- optional :metric, :message, 2, "google.logging.v2.LogMetric"
- end
- add_message "google.logging.v2.DeleteLogMetricRequest" do
- optional :metric_name, :string, 1
- 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