diff options
author | Google APIs <noreply@google.com> | 2019-05-10 14:31:29 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2019-05-10 14:32:14 -0700 |
commit | d84bde8698967faa93ab56cc7132965f6be534ad (patch) | |
tree | d15910798819e4faa0fd6717593a84e79aa50a6b | |
parent | e94ba030415d14c53fb6fc60b9cf601937e76c7d (diff) | |
download | googleapis-d84bde8698967faa93ab56cc7132965f6be534ad.tar.gz |
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 247676830
-rw-r--r-- | google/api/BUILD.bazel | 22 | ||||
-rw-r--r-- | google/api/metric.proto | 6 | ||||
-rw-r--r-- | google/api/monitored_resource.proto | 4 | ||||
-rw-r--r-- | google/api/resource.proto | 58 | ||||
-rw-r--r-- | google/api/service.proto | 6 |
5 files changed, 46 insertions, 50 deletions
diff --git a/google/api/BUILD.bazel b/google/api/BUILD.bazel index 4592b21ae..ff8a2cf03 100644 --- a/google/api/BUILD.bazel +++ b/google/api/BUILD.bazel @@ -22,6 +22,7 @@ proto_library( proto_library( name = "backend_proto", srcs = ["backend.proto"], + visibility = ["//visibility:public"], ) proto_library( @@ -41,24 +42,33 @@ proto_library( ], ) +cc_proto_library( + name = "client_cc_proto", + deps = [":client_proto"], +) + proto_library( name = "config_change_proto", srcs = ["config_change.proto"], + visibility = ["//visibility:public"], ) proto_library( name = "consumer_proto", srcs = ["consumer.proto"], + visibility = ["//visibility:public"], ) proto_library( name = "context_proto", srcs = ["context.proto"], + visibility = ["//visibility:public"], ) proto_library( name = "control_proto", srcs = ["control.proto"], + visibility = ["//visibility:public"], ) proto_library( @@ -74,6 +84,7 @@ proto_library( proto_library( name = "documentation_proto", srcs = ["documentation.proto"], + visibility = ["//visibility:public"], ) proto_library( @@ -93,6 +104,7 @@ proto_library( proto_library( name = "http_proto", srcs = ["http.proto"], + visibility = ["//visibility:public"], ) proto_library( @@ -104,6 +116,7 @@ proto_library( proto_library( name = "label_proto", srcs = ["label.proto"], + visibility = ["//visibility:public"], ) proto_library( @@ -120,7 +133,10 @@ proto_library( proto_library( name = "logging_proto", srcs = ["logging.proto"], - deps = [":annotations_proto"], + deps = [ + ":annotations_proto", + ":label_proto", + ], ) proto_library( @@ -138,6 +154,7 @@ proto_library( srcs = ["monitored_resource.proto"], deps = [ ":label_proto", + ":launch_stage_proto", "@com_google_protobuf//:struct_proto", ], ) @@ -185,8 +202,6 @@ proto_library( ":source_info_proto", ":system_parameter_proto", ":usage_proto", - "//google/api/experimental:authorization_config_proto", - "//google/api/experimental:experimental_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:api_proto", "@com_google_protobuf//:type_proto", @@ -203,6 +218,7 @@ proto_library( proto_library( name = "system_parameter_proto", srcs = ["system_parameter.proto"], + visibility = ["//visibility:public"], ) proto_library( diff --git a/google/api/metric.proto b/google/api/metric.proto index 4d3c488f2..cd2762a94 100644 --- a/google/api/metric.proto +++ b/google/api/metric.proto @@ -33,8 +33,9 @@ option objc_class_prefix = "GAPI"; message MetricDescriptor { // Additional annotations that can be used to guide the usage of a metric. message MetricDescriptorMetadata { + // Deprecated. Please use the MetricDescriptor.launch_stage instead. // The launch stage of the metric definition. - LaunchStage launch_stage = 1; + LaunchStage launch_stage = 1 [deprecated = true]; // The sampling period of metric data points. For metrics which are written // periodically, consecutive data points are stored at this time interval, @@ -200,6 +201,9 @@ message MetricDescriptor { // Optional. Metadata which can be used to guide usage of the metric. MetricDescriptorMetadata metadata = 10; + + // Optional. The launch stage of the metric definition. + LaunchStage launch_stage = 12; } // A specific metric, identified by specifying values for all of the diff --git a/google/api/monitored_resource.proto b/google/api/monitored_resource.proto index a2c4525bb..2c94902a2 100644 --- a/google/api/monitored_resource.proto +++ b/google/api/monitored_resource.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.api; import "google/api/label.proto"; +import "google/api/launch_stage.proto"; import "google/protobuf/struct.proto"; option cc_enable_arenas = true; @@ -64,6 +65,9 @@ message MonitoredResourceDescriptor { // resource type. For example, an individual Google Cloud SQL database is // identified by values for the labels `"database_id"` and `"zone"`. repeated LabelDescriptor labels = 4; + + // Optional. The launch stage of the monitored resource definition. + LaunchStage launch_stage = 7; } // An object representing a resource that can be used for monitoring, logging, diff --git a/google/api/resource.proto b/google/api/resource.proto index 54f8aeb78..ad6230f1e 100644 --- a/google/api/resource.proto +++ b/google/api/resource.proto @@ -27,8 +27,7 @@ option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; extend google.protobuf.FieldOptions { - // The fully qualified message name of the type that this field references. - // Marks this as a field referring to a resource in another message. + // An annotation that describes a resource reference. // // Example: // @@ -37,21 +36,11 @@ extend google.protobuf.FieldOptions { // type: "pubsub.googleapis.com/Topic" // }]; // } - // - // If the referenced message is in the same proto package, the package - // may be omitted: - // - // message Subscription { - // string topic = 2 - // [(google.api.resource_reference).type = "Topic"]; - // } - // - // Only one of {`resource`, `resource_reference`} may be set. google.api.ResourceReference resource_reference = 1055; } extend google.protobuf.MessageOptions { - // An annotation describing a resource. + // An annotation that describes a resource definition. // // Example: // @@ -61,8 +50,6 @@ extend google.protobuf.MessageOptions { // pattern: "projects/{project}/topics/{topic}" // }; // } - // - // Only one of {`resource`, `resource_reference`} may be set. google.api.ResourceDescriptor resource = 1053; } @@ -115,19 +102,19 @@ message ResourceDescriptor { FUTURE_MULTI_PATTERN = 2; } - // The full name of the resource type. It must be in the format of - // {service_name}/{resource_type_kind}. The resource type names are - // singular and do not contain version numbers. + // The resource type. It must be in the format of + // {service_name}/{resource_type_kind}. The `resource_type_kind` must be + // singular and must not include version numbers. // - // For example: `storage.googleapis.com/Bucket` + // Example: `storage.googleapis.com/Bucket` // // The value of the resource_type_kind must follow the regular expression - // /[A-Z][a-zA-Z0-9]+/. It must start with upper case character and - // recommended to use PascalCase (UpperCamelCase). The maximum number of - // characters allowed for the resource_type_kind is 100. + // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + // should use PascalCase (UpperCamelCase). The maximum number of + // characters allowed for the `resource_type_kind` is 100. string type = 1; - // Required. The valid pattern or patterns for this resource's names. + // Optional. The valid resource name pattern(s) for this resource type. // // Examples: // - "projects/{project}/topics/{topic}" @@ -151,7 +138,8 @@ message ResourceDescriptor { // message InspectTemplate { // option (google.api.resource) = { // type: "dlp.googleapis.com/InspectTemplate" - // pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" + // pattern: + // "organizations/{organization}/inspectTemplates/{inspect_template}" // pattern: "projects/{project}/inspectTemplates/{inspect_template}" // history: ORIGINALLY_SINGLE_PATTERN // }; @@ -159,11 +147,9 @@ message ResourceDescriptor { History history = 4; } -// An annotation designating that this field is a reference to a resource -// defined by another message. +// Defines a proto annotation that describes a field that refers to a resource. message ResourceReference { - // The unified resource type name of the type that this field references. - // Marks this as a field referring to a resource in another message. + // The resource type that the annotated field references. // // Example: // @@ -174,11 +160,9 @@ message ResourceReference { // } string type = 1; - // The fully-qualified message name of a child of the type that this field - // references. - // - // This is useful for `parent` fields where a resource has more than one - // possible type of parent. + // The resource type of a child collection that the annotated field + // references. This is useful for `parent` fields where a resource has more + // than one possible type of parent. // // Example: // @@ -187,13 +171,5 @@ message ResourceReference { // child_type: "logging.googleapis.com/LogEntry" // }; // } - // - // If the referenced message is in the same proto package, the service name - // may be omitted: - // - // message ListLogEntriesRequest { - // string parent = 1 - // [(google.api.resource_reference).child_type = "LogEntry"]; - // } string child_type = 2; } diff --git a/google/api/service.proto b/google/api/service.proto index 33b69682f..c29eb5c89 100644 --- a/google/api/service.proto +++ b/google/api/service.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.api; -import "google/api/annotations.proto"; import "google/api/auth.proto"; import "google/api/backend.proto"; import "google/api/billing.proto"; @@ -25,7 +24,6 @@ import "google/api/context.proto"; import "google/api/control.proto"; import "google/api/documentation.proto"; import "google/api/endpoint.proto"; -import "google/api/experimental/experimental.proto"; import "google/api/http.proto"; import "google/api/label.proto"; import "google/api/log.proto"; @@ -34,6 +32,7 @@ import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/api/monitoring.proto"; import "google/api/quota.proto"; +import "google/api/resource.proto"; import "google/api/source_info.proto"; import "google/api/system_parameter.proto"; import "google/api/usage.proto"; @@ -174,7 +173,4 @@ message Service { // Output only. The source information for this configuration if available. SourceInfo source_info = 37; - - // Experimental configuration. - Experimental experimental = 101; } |