lib/google/monitoring/v3/uptime_pb.rb in google-cloud-monitoring-v3-0.11.0 vs lib/google/monitoring/v3/uptime_pb.rb in google-cloud-monitoring-v3-0.12.0

- old
+ new

@@ -1,155 +1,42 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/monitoring/v3/uptime.proto require 'google/protobuf' require 'google/api/field_behavior_pb' require 'google/api/monitored_resource_pb' require 'google/api/resource_pb' require 'google/protobuf/duration_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/monitoring/v3/uptime.proto", :syntax => :proto3) do - add_message "google.monitoring.v3.InternalChecker" do - optional :name, :string, 1 - optional :display_name, :string, 2 - optional :network, :string, 3 - optional :gcp_zone, :string, 4 - optional :peer_project_id, :string, 6 - optional :state, :enum, 7, "google.monitoring.v3.InternalChecker.State" + +descriptor_data = "\n!google/monitoring/v3/uptime.proto\x12\x14google.monitoring.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/api/monitored_resource.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\"\xe6\x01\n\x0fInternalChecker\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07network\x18\x03 \x01(\t\x12\x10\n\x08gcp_zone\x18\x04 \x01(\t\x12\x17\n\x0fpeer_project_id\x18\x06 \x01(\t\x12:\n\x05state\x18\x07 \x01(\x0e\x32+.google.monitoring.v3.InternalChecker.State\"3\n\x05State\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02:\x02\x18\x01\"\x82\x1b\n\x11UptimeCheckConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\x12monitored_resource\x18\x03 \x01(\x0b\x32\x1d.google.api.MonitoredResourceH\x00\x12O\n\x0eresource_group\x18\x04 \x01(\x0b\x32\x35.google.monitoring.v3.UptimeCheckConfig.ResourceGroupH\x00\x12G\n\nhttp_check\x18\x05 \x01(\x0b\x32\x31.google.monitoring.v3.UptimeCheckConfig.HttpCheckH\x01\x12\x45\n\ttcp_check\x18\x06 \x01(\x0b\x32\x30.google.monitoring.v3.UptimeCheckConfig.TcpCheckH\x01\x12)\n\x06period\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12P\n\x10\x63ontent_matchers\x18\t \x03(\x0b\x32\x36.google.monitoring.v3.UptimeCheckConfig.ContentMatcher\x12I\n\x0c\x63hecker_type\x18\x11 \x01(\x0e\x32\x33.google.monitoring.v3.UptimeCheckConfig.CheckerType\x12\x41\n\x10selected_regions\x18\n \x03(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x17\n\x0bis_internal\x18\x0f \x01(\x08\x42\x02\x18\x01\x12\x44\n\x11internal_checkers\x18\x0e \x03(\x0b\x32%.google.monitoring.v3.InternalCheckerB\x02\x18\x01\x12L\n\x0buser_labels\x18\x14 \x03(\x0b\x32\x37.google.monitoring.v3.UptimeCheckConfig.UserLabelsEntry\x1a\x61\n\rResourceGroup\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12>\n\rresource_type\x18\x02 \x01(\x0e\x32\'.google.monitoring.v3.GroupResourceType\x1a!\n\nPingConfig\x12\x13\n\x0bpings_count\x18\x01 \x01(\x05\x1a\xee\t\n\tHttpCheck\x12W\n\x0erequest_method\x18\x08 \x01(\x0e\x32?.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod\x12\x0f\n\x07use_ssl\x18\x01 \x01(\x08\x12\x0c\n\x04path\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12X\n\tauth_info\x18\x04 \x01(\x0b\x32\x45.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication\x12\x14\n\x0cmask_headers\x18\x05 \x01(\x08\x12O\n\x07headers\x18\x06 \x03(\x0b\x32>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.HeadersEntry\x12S\n\x0c\x63ontent_type\x18\t \x01(\x0e\x32=.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType\x12\x1b\n\x13\x63ustom_content_type\x18\r \x01(\t\x12\x14\n\x0cvalidate_ssl\x18\x07 \x01(\x08\x12\x0c\n\x04\x62ody\x18\n \x01(\x0c\x12l\n\x1e\x61\x63\x63\x65pted_response_status_codes\x18\x0b \x03(\x0b\x32\x44.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode\x12G\n\x0bping_config\x18\x0c \x01(\x0b\x32\x32.google.monitoring.v3.UptimeCheckConfig.PingConfig\x1a\x39\n\x13\x42\x61sicAuthentication\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x1a\xdc\x02\n\x12ResponseStatusCode\x12\x16\n\x0cstatus_value\x18\x01 \x01(\x05H\x00\x12h\n\x0cstatus_class\x18\x02 \x01(\x0e\x32P.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClassH\x00\"\xb4\x01\n\x0bStatusClass\x12\x1c\n\x18STATUS_CLASS_UNSPECIFIED\x10\x00\x12\x14\n\x10STATUS_CLASS_1XX\x10\x64\x12\x15\n\x10STATUS_CLASS_2XX\x10\xc8\x01\x12\x15\n\x10STATUS_CLASS_3XX\x10\xac\x02\x12\x15\n\x10STATUS_CLASS_4XX\x10\x90\x03\x12\x15\n\x10STATUS_CLASS_5XX\x10\xf4\x03\x12\x15\n\x10STATUS_CLASS_ANY\x10\xe8\x07\x42\r\n\x0bstatus_code\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\rRequestMethod\x12\x16\n\x12METHOD_UNSPECIFIED\x10\x00\x12\x07\n\x03GET\x10\x01\x12\x08\n\x04POST\x10\x02\"G\n\x0b\x43ontentType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bURL_ENCODED\x10\x01\x12\x11\n\rUSER_PROVIDED\x10\x02\x1a\x61\n\x08TcpCheck\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12G\n\x0bping_config\x18\x02 \x01(\x0b\x32\x32.google.monitoring.v3.UptimeCheckConfig.PingConfig\x1a\xca\x05\n\x0e\x43ontentMatcher\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\\\n\x07matcher\x18\x02 \x01(\x0e\x32K.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption\x12\x63\n\x11json_path_matcher\x18\x03 \x01(\x0b\x32\x46.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcherH\x00\x1a\xfd\x01\n\x0fJsonPathMatcher\x12\x11\n\tjson_path\x18\x01 \x01(\t\x12r\n\x0cjson_matcher\x18\x02 \x01(\x0e\x32\\.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption\"c\n\x15JsonPathMatcherOption\x12(\n$JSON_PATH_MATCHER_OPTION_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45XACT_MATCH\x10\x01\x12\x0f\n\x0bREGEX_MATCH\x10\x02\"\xc8\x01\n\x14\x43ontentMatcherOption\x12&\n\"CONTENT_MATCHER_OPTION_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONTAINS_STRING\x10\x01\x12\x17\n\x13NOT_CONTAINS_STRING\x10\x02\x12\x11\n\rMATCHES_REGEX\x10\x03\x12\x15\n\x11NOT_MATCHES_REGEX\x10\x04\x12\x15\n\x11MATCHES_JSON_PATH\x10\x05\x12\x19\n\x15NOT_MATCHES_JSON_PATH\x10\x06\x42\x19\n\x17\x61\x64\x64itional_matcher_info\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x0b\x43heckerType\x12\x1c\n\x18\x43HECKER_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12STATIC_IP_CHECKERS\x10\x01\x12\x10\n\x0cVPC_CHECKERS\x10\x03:\xf3\x01\xea\x41\xef\x01\n+monitoring.googleapis.com/UptimeCheckConfig\x12;projects/{project}/uptimeCheckConfigs/{uptime_check_config}\x12\x45organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}\x12\x39\x66olders/{folder}/uptimeCheckConfigs/{uptime_check_config}\x12\x01*B\n\n\x08resourceB\x14\n\x12\x63heck_request_type\"n\n\rUptimeCheckIp\x12\x37\n\x06region\x18\x01 \x01(\x0e\x32\'.google.monitoring.v3.UptimeCheckRegion\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x12\n\nip_address\x18\x03 \x01(\t*\x95\x01\n\x11UptimeCheckRegion\x12\x16\n\x12REGION_UNSPECIFIED\x10\x00\x12\x07\n\x03USA\x10\x01\x12\n\n\x06\x45UROPE\x10\x02\x12\x11\n\rSOUTH_AMERICA\x10\x03\x12\x10\n\x0c\x41SIA_PACIFIC\x10\x04\x12\x0e\n\nUSA_OREGON\x10\x05\x12\x0c\n\x08USA_IOWA\x10\x06\x12\x10\n\x0cUSA_VIRGINIA\x10\x07*[\n\x11GroupResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x19\n\x15\x41WS_ELB_LOAD_BALANCER\x10\x02\x42\xc6\x01\n\x18\x63om.google.monitoring.v3B\x0bUptimeProtoP\x01ZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpb\xaa\x02\x1aGoogle.Cloud.Monitoring.V3\xca\x02\x1aGoogle\\Cloud\\Monitoring\\V3\xea\x02\x1dGoogle::Cloud::Monitoring::V3b\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.Duration", "google/protobuf/duration.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.monitoring.v3.InternalChecker.State" do - value :UNSPECIFIED, 0 - value :CREATING, 1 - value :RUNNING, 2 - end - add_message "google.monitoring.v3.UptimeCheckConfig" do - optional :name, :string, 1 - optional :display_name, :string, 2 - optional :period, :message, 7, "google.protobuf.Duration" - optional :timeout, :message, 8, "google.protobuf.Duration" - repeated :content_matchers, :message, 9, "google.monitoring.v3.UptimeCheckConfig.ContentMatcher" - optional :checker_type, :enum, 17, "google.monitoring.v3.UptimeCheckConfig.CheckerType" - repeated :selected_regions, :enum, 10, "google.monitoring.v3.UptimeCheckRegion" - optional :is_internal, :bool, 15 - repeated :internal_checkers, :message, 14, "google.monitoring.v3.InternalChecker" - map :user_labels, :string, :string, 20 - oneof :resource do - optional :monitored_resource, :message, 3, "google.api.MonitoredResource" - optional :resource_group, :message, 4, "google.monitoring.v3.UptimeCheckConfig.ResourceGroup" - end - oneof :check_request_type do - optional :http_check, :message, 5, "google.monitoring.v3.UptimeCheckConfig.HttpCheck" - optional :tcp_check, :message, 6, "google.monitoring.v3.UptimeCheckConfig.TcpCheck" - end - end - add_message "google.monitoring.v3.UptimeCheckConfig.ResourceGroup" do - optional :group_id, :string, 1 - optional :resource_type, :enum, 2, "google.monitoring.v3.GroupResourceType" - end - add_message "google.monitoring.v3.UptimeCheckConfig.PingConfig" do - optional :pings_count, :int32, 1 - end - add_message "google.monitoring.v3.UptimeCheckConfig.HttpCheck" do - optional :request_method, :enum, 8, "google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod" - optional :use_ssl, :bool, 1 - optional :path, :string, 2 - optional :port, :int32, 3 - optional :auth_info, :message, 4, "google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication" - optional :mask_headers, :bool, 5 - map :headers, :string, :string, 6 - optional :content_type, :enum, 9, "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType" - optional :custom_content_type, :string, 13 - optional :validate_ssl, :bool, 7 - optional :body, :bytes, 10 - repeated :accepted_response_status_codes, :message, 11, "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode" - optional :ping_config, :message, 12, "google.monitoring.v3.UptimeCheckConfig.PingConfig" - end - add_message "google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication" do - optional :username, :string, 1 - optional :password, :string, 2 - end - add_message "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode" do - oneof :status_code do - optional :status_value, :int32, 1 - optional :status_class, :enum, 2, "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass" - end - end - add_enum "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass" do - value :STATUS_CLASS_UNSPECIFIED, 0 - value :STATUS_CLASS_1XX, 100 - value :STATUS_CLASS_2XX, 200 - value :STATUS_CLASS_3XX, 300 - value :STATUS_CLASS_4XX, 400 - value :STATUS_CLASS_5XX, 500 - value :STATUS_CLASS_ANY, 1000 - end - add_enum "google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod" do - value :METHOD_UNSPECIFIED, 0 - value :GET, 1 - value :POST, 2 - end - add_enum "google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType" do - value :TYPE_UNSPECIFIED, 0 - value :URL_ENCODED, 1 - value :USER_PROVIDED, 2 - end - add_message "google.monitoring.v3.UptimeCheckConfig.TcpCheck" do - optional :port, :int32, 1 - optional :ping_config, :message, 2, "google.monitoring.v3.UptimeCheckConfig.PingConfig" - end - add_message "google.monitoring.v3.UptimeCheckConfig.ContentMatcher" do - optional :content, :string, 1 - optional :matcher, :enum, 2, "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption" - oneof :additional_matcher_info do - optional :json_path_matcher, :message, 3, "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher" - end - end - add_message "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher" do - optional :json_path, :string, 1 - optional :json_matcher, :enum, 2, "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption" - end - add_enum "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption" do - value :JSON_PATH_MATCHER_OPTION_UNSPECIFIED, 0 - value :EXACT_MATCH, 1 - value :REGEX_MATCH, 2 - end - add_enum "google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption" do - value :CONTENT_MATCHER_OPTION_UNSPECIFIED, 0 - value :CONTAINS_STRING, 1 - value :NOT_CONTAINS_STRING, 2 - value :MATCHES_REGEX, 3 - value :NOT_MATCHES_REGEX, 4 - value :MATCHES_JSON_PATH, 5 - value :NOT_MATCHES_JSON_PATH, 6 - end - add_enum "google.monitoring.v3.UptimeCheckConfig.CheckerType" do - value :CHECKER_TYPE_UNSPECIFIED, 0 - value :STATIC_IP_CHECKERS, 1 - value :VPC_CHECKERS, 3 - end - add_message "google.monitoring.v3.UptimeCheckIp" do - optional :region, :enum, 1, "google.monitoring.v3.UptimeCheckRegion" - optional :location, :string, 2 - optional :ip_address, :string, 3 - end - add_enum "google.monitoring.v3.UptimeCheckRegion" do - value :REGION_UNSPECIFIED, 0 - value :USA, 1 - value :EUROPE, 2 - value :SOUTH_AMERICA, 3 - value :ASIA_PACIFIC, 4 - value :USA_OREGON, 5 - value :USA_IOWA, 6 - value :USA_VIRGINIA, 7 - end - add_enum "google.monitoring.v3.GroupResourceType" do - value :RESOURCE_TYPE_UNSPECIFIED, 0 - value :INSTANCE, 1 - value :AWS_ELB_LOAD_BALANCER, 2 - 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 Monitoring