Synchronize new proto/yaml changes.
PiperOrigin-RevId: 245108285
This commit is contained in:
parent
c2a6b0e71d
commit
fc37c47e70
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "AuthProto";
|
||||
|
|
@ -61,8 +59,7 @@ message Authentication {
|
|||
message AuthenticationRule {
|
||||
// Selects the methods to which this rule applies.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// The requirements for OAuth credentials.
|
||||
|
|
@ -75,7 +72,7 @@ message AuthenticationRule {
|
|||
repeated AuthRequirement requirements = 7;
|
||||
}
|
||||
|
||||
// Configuration for an anthentication provider, including support for
|
||||
// Configuration for an authentication provider, including support for
|
||||
// [JSON Web Token
|
||||
// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
|
||||
message AuthProvider {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -92,8 +92,7 @@ message BackendRule {
|
|||
|
||||
// Selects the methods to which this rule applies.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// The address of the API backend.
|
||||
|
|
|
|||
|
|
@ -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,7 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/metric.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
|
|
@ -52,13 +51,11 @@ message Billing {
|
|||
// bill against consumer project).
|
||||
message BillingDestination {
|
||||
// The monitored resource type. The type must be defined in
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources]
|
||||
// section.
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources] section.
|
||||
string monitored_resource = 1;
|
||||
|
||||
// Names of the metrics to report to this billing destination.
|
||||
// Each name must be defined in
|
||||
// [Service.metrics][google.api.Service.metrics] section.
|
||||
// Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
|
||||
repeated string metrics = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -36,8 +36,7 @@ message ConfigChange {
|
|||
// 'key' is used. If the field has no unique identifier, the numeric index
|
||||
// is used.
|
||||
// Examples:
|
||||
// -
|
||||
// visibility.rules[selector=="google.LibraryService.CreateBook"].restriction
|
||||
// - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
|
||||
// - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
|
||||
// - logging.producer_destinations[0]
|
||||
string element = 1;
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -71,8 +71,7 @@ message Context {
|
|||
message ContextRule {
|
||||
// Selects the methods to which this rule applies.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// A list of full type names of requested contexts.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -150,7 +150,7 @@ message Distribution {
|
|||
|
||||
// Contextual information about the example value. Examples are:
|
||||
//
|
||||
// Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace
|
||||
// Trace: type.googleapis.com/google.monitoring.v3.SpanContext
|
||||
//
|
||||
// Literal string: type.googleapis.com/google.protobuf.StringValue
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -115,9 +115,9 @@ message DocumentationRule {
|
|||
// The selector is a comma-separated list of patterns. Each pattern is a
|
||||
// qualified name of the element which may end in "*", indicating a wildcard.
|
||||
// Wildcards are only allowed at the end and for a whole component of the
|
||||
// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
|
||||
// specify a default for all applicable elements, the whole pattern "*"
|
||||
// is used.
|
||||
// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A
|
||||
// wildcard will match one or more components. To specify a default for all
|
||||
// applicable elements, the whole pattern "*" is used.
|
||||
string selector = 1;
|
||||
|
||||
// Description of the selected API(s).
|
||||
|
|
|
|||
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "EndpointProto";
|
||||
|
|
@ -46,8 +44,8 @@ message Endpoint {
|
|||
string name = 1;
|
||||
|
||||
// DEPRECATED: This field is no longer supported. Instead of using aliases,
|
||||
// please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
|
||||
// of the intended aliases.
|
||||
// please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intended
|
||||
// aliases.
|
||||
//
|
||||
// Additional names that this endpoint will be hosted on.
|
||||
repeated string aliases = 2 [deprecated = true];
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -33,7 +33,7 @@ message Http {
|
|||
// **NOTE:** All service configuration rules follow "last one wins" order.
|
||||
repeated HttpRule rules = 1;
|
||||
|
||||
// When set to true, URL path parmeters will be fully URI-decoded except in
|
||||
// When set to true, URL path parameters will be fully URI-decoded except in
|
||||
// cases of single segment matches in reserved expansion, where "%2F" will be
|
||||
// left encoded.
|
||||
//
|
||||
|
|
@ -211,18 +211,15 @@ message Http {
|
|||
// 1. Leaf request fields (recursive expansion nested messages in the request
|
||||
// message) are classified into three categories:
|
||||
// - Fields referred by the path template. They are passed via the URL path.
|
||||
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
|
||||
// are passed via the HTTP
|
||||
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
|
||||
// request body.
|
||||
// - All other fields are passed via the URL query parameters, and the
|
||||
// parameter name is the field path in the request message. A repeated
|
||||
// field can be represented as multiple query parameters under the same
|
||||
// name.
|
||||
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
|
||||
// query parameter, all fields
|
||||
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
|
||||
// are passed via URL path and HTTP request body.
|
||||
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
|
||||
// request body, all
|
||||
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
|
||||
// fields are passed via URL path and URL query parameters.
|
||||
//
|
||||
// ### Path template syntax
|
||||
|
|
@ -317,8 +314,7 @@ message Http {
|
|||
message HttpRule {
|
||||
// Selects a method to which this rule applies.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// Determines the URL pattern is matched by this rules. This pattern can be
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "LoggingProto";
|
||||
|
|
@ -59,14 +57,13 @@ message Logging {
|
|||
// or the consumer project).
|
||||
message LoggingDestination {
|
||||
// The monitored resource type. The type must be defined in the
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources]
|
||||
// section.
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources] section.
|
||||
string monitored_resource = 3;
|
||||
|
||||
// Names of the logs to be sent to this destination. Each name must
|
||||
// be defined in the [Service.logs][google.api.Service.logs] section. If the
|
||||
// log name is not a domain scoped name, it will be automatically prefixed
|
||||
// with the service name followed by "/".
|
||||
// be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
|
||||
// not a domain scoped name, it will be automatically prefixed with
|
||||
// the service name followed by "/".
|
||||
repeated string logs = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -205,9 +205,8 @@ message MetricDescriptor {
|
|||
// A specific metric, identified by specifying values for all of the
|
||||
// labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
|
||||
message Metric {
|
||||
// An existing metric type, see
|
||||
// [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
|
||||
// `custom.googleapis.com/invoice/paid/amount`.
|
||||
// An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
||||
// For example, `custom.googleapis.com/invoice/paid/amount`.
|
||||
string type = 3;
|
||||
|
||||
// The set of label values that uniquely identify this metric. All
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -27,10 +27,9 @@ option java_outer_classname = "MonitoredResourceProto";
|
|||
option java_package = "com.google.api";
|
||||
option objc_class_prefix = "GAPI";
|
||||
|
||||
// An object that describes the schema of a
|
||||
// [MonitoredResource][google.api.MonitoredResource] object using a type name
|
||||
// and a set of labels. For example, the monitored resource descriptor for
|
||||
// Google Compute Engine VM instances has a type of
|
||||
// An object that describes the schema of a [MonitoredResource][google.api.MonitoredResource] object using a
|
||||
// type name and a set of labels. For example, the monitored resource
|
||||
// descriptor for Google Compute Engine VM instances has a type of
|
||||
// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
|
||||
// `"zone"` to identify particular VM instances.
|
||||
//
|
||||
|
|
@ -70,13 +69,11 @@ message MonitoredResourceDescriptor {
|
|||
// An object representing a resource that can be used for monitoring, logging,
|
||||
// billing, or other purposes. Examples include virtual machine instances,
|
||||
// databases, and storage devices such as disks. The `type` field identifies a
|
||||
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
|
||||
// that describes the resource's schema. Information in the `labels` field
|
||||
// identifies the actual resource and its attributes according to the schema.
|
||||
// For example, a particular Compute Engine VM instance could be represented by
|
||||
// the following object, because the
|
||||
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
|
||||
// `"gce_instance"` has labels
|
||||
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's
|
||||
// schema. Information in the `labels` field identifies the actual resource and
|
||||
// its attributes according to the schema. For example, a particular Compute
|
||||
// Engine VM instance could be represented by the following object, because the
|
||||
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels
|
||||
// `"instance_id"` and `"zone"`:
|
||||
//
|
||||
// { "type": "gce_instance",
|
||||
|
|
@ -84,10 +81,8 @@ message MonitoredResourceDescriptor {
|
|||
// "zone": "us-central1-a" }}
|
||||
message MonitoredResource {
|
||||
// Required. The monitored resource type. This field must match
|
||||
// the `type` field of a
|
||||
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
|
||||
// object. For example, the type of a Compute Engine VM instance is
|
||||
// `gce_instance`.
|
||||
// the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For
|
||||
// example, the type of a Compute Engine VM instance is `gce_instance`.
|
||||
string type = 1;
|
||||
|
||||
// Required. Values for all of the labels listed in the associated monitored
|
||||
|
|
@ -96,12 +91,12 @@ message MonitoredResource {
|
|||
map<string, string> labels = 2;
|
||||
}
|
||||
|
||||
// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
|
||||
// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
|
||||
// minimum set of information to uniquely identify a monitored resource
|
||||
// instance. There is some other useful auxiliary metadata. Monitoring and
|
||||
// Logging use an ingestion pipeline to extract metadata for cloud resources of
|
||||
// all types, and store the metadata in this message.
|
||||
// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] object.
|
||||
// [MonitoredResource][google.api.MonitoredResource] objects contain the minimum set of information to
|
||||
// uniquely identify a monitored resource instance. There is some other useful
|
||||
// auxiliary metadata. Monitoring and Logging use an ingestion
|
||||
// pipeline to extract metadata for cloud resources of all types, and store
|
||||
// the metadata in this message.
|
||||
message MonitoredResourceMetadata {
|
||||
// Output only. Values for predefined system metadata labels.
|
||||
// System labels are a kind of metadata extracted by Google, including
|
||||
|
|
|
|||
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "MonitoringProto";
|
||||
|
|
@ -67,13 +65,11 @@ message Monitoring {
|
|||
// or the consumer project).
|
||||
message MonitoringDestination {
|
||||
// The monitored resource type. The type must be defined in
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources]
|
||||
// section.
|
||||
// [Service.monitored_resources][google.api.Service.monitored_resources] section.
|
||||
string monitored_resource = 1;
|
||||
|
||||
// Types of the metrics to report to this monitoring destination.
|
||||
// Each type must be defined in
|
||||
// [Service.metrics][google.api.Service.metrics] section.
|
||||
// Each type must be defined in [Service.metrics][google.api.Service.metrics] section.
|
||||
repeated string metrics = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "QuotaProto";
|
||||
|
|
@ -28,7 +26,7 @@ option objc_class_prefix = "GAPI";
|
|||
// Quota configuration helps to achieve fairness and budgeting in service
|
||||
// usage.
|
||||
//
|
||||
// The quota configuration works this way:
|
||||
// The metric based quota configuration works this way:
|
||||
// - The service configuration defines a set of metrics.
|
||||
// - For API calls, the quota.metric_rules maps methods to metrics with
|
||||
// corresponding costs.
|
||||
|
|
@ -74,6 +72,8 @@ option objc_class_prefix = "GAPI";
|
|||
// display_name: Write requests
|
||||
// metric_kind: DELTA
|
||||
// value_type: INT64
|
||||
//
|
||||
//
|
||||
message Quota {
|
||||
// List of `QuotaLimit` definitions for the service.
|
||||
repeated QuotaLimit limits = 3;
|
||||
|
|
@ -88,8 +88,7 @@ message Quota {
|
|||
message MetricRule {
|
||||
// Selects the methods to which this rule applies.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// Metrics to update when the selected methods are called, and the associated
|
||||
|
|
|
|||
|
|
@ -19,46 +19,23 @@ package google.api;
|
|||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ResourceProto";
|
||||
option java_package = "com.google.api";
|
||||
option objc_class_prefix = "GAPI";
|
||||
|
||||
option (google.api.resource_definition) = {
|
||||
pattern: "projects/{project}"
|
||||
symbol: "Project"
|
||||
};
|
||||
|
||||
option (google.api.resource_definition) = {
|
||||
pattern: "organizations/{organization}"
|
||||
symbol: "Organization"
|
||||
};
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
// A representation of the resource.
|
||||
// This is generally intended to be attached to the "name" field of
|
||||
// the message representing the resource.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Topic {
|
||||
// string name = 1 [(google.api.resource) = {
|
||||
// pattern: "projects/{project}/topics/{topic}"
|
||||
// }];
|
||||
// }
|
||||
//
|
||||
// Only one of {`resource`, `resource_reference`} may be set.
|
||||
google.api.Resource resource = 1053;
|
||||
|
||||
// The fully qualified message name of the type that this field references.
|
||||
// Marks this as a field referring to a resource in another message.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Subscription {
|
||||
// string topic = 2
|
||||
// [(google.api.resource_reference) = "google.pubsub.v1.Topic"];
|
||||
// string topic = 2 [(google.api.resource_reference) = {
|
||||
// type: "pubsub.googleapis.com/Topic"
|
||||
// }];
|
||||
// }
|
||||
//
|
||||
// If the referenced message is in the same proto package, the package
|
||||
|
|
@ -66,52 +43,157 @@ extend google.protobuf.FieldOptions {
|
|||
//
|
||||
// message Subscription {
|
||||
// string topic = 2
|
||||
// [(google.api.resource_reference) = "Topic"];
|
||||
// [(google.api.resource_reference).type = "Topic"];
|
||||
// }
|
||||
//
|
||||
// Only one of {`resource`, `resource_reference`} may be set.
|
||||
string resource_reference = 1055;
|
||||
google.api.ResourceReference resource_reference = 1055;
|
||||
}
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
// A representation of a resource.
|
||||
// At a file level, this is generally used to define information for a
|
||||
// resource from another API, or for a resource that does not have an
|
||||
// associated proto message.
|
||||
extend google.protobuf.MessageOptions {
|
||||
// An annotation describing a resource.
|
||||
//
|
||||
// See the example of `google.api.Project` and `google.api.Organization`
|
||||
// at the bottom of this file.
|
||||
repeated google.api.Resource resource_definition = 1053;
|
||||
// Example:
|
||||
//
|
||||
// message Topic {
|
||||
// option (google.api.resource) = {
|
||||
// type: "pubsub.googleapis.com/Topic"
|
||||
// pattern: "projects/{project}/topics/{topic}"
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// Only one of {`resource`, `resource_reference`} may be set.
|
||||
google.api.ResourceDescriptor resource = 1053;
|
||||
}
|
||||
|
||||
// An annotation designating that this field designates a resource.
|
||||
// A simple descriptor of a resource type.
|
||||
//
|
||||
// ResourceDescriptor annotates a resource message (either by means of a
|
||||
// protobuf annotation or use in the service config), and associates the
|
||||
// resource's schema, the resource type, and the pattern of the resource name.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Topic {
|
||||
// string name = 1 [(google.api.resource) = {
|
||||
// name: "projects/{project}/topics/{topic}"
|
||||
// }];
|
||||
// }
|
||||
message Resource {
|
||||
// Required. The resource's name template.
|
||||
// message Topic {
|
||||
// // Indicates this message defines a resource schema.
|
||||
// // Declares the resource type in the format of {service}/{kind}.
|
||||
// // For Kubernetes resources, the format is {api group}/{kind}.
|
||||
// option (google.api.resource) = {
|
||||
// type: "pubsub.googleapis.com/Topic"
|
||||
// pattern: "projects/{project}/topics/{topic}"
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// Sometimes, resources have multiple patterns, typically because they can
|
||||
// live under multiple parents.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message LogEntry {
|
||||
// option (google.api.resource) = {
|
||||
// type: "logging.googleapis.com/LogEntry"
|
||||
// pattern: "projects/{project}/logs/{log}"
|
||||
// pattern: "organizations/{organization}/logs/{log}"
|
||||
// pattern: "folders/{folder}/logs/{log}"
|
||||
// pattern: "billingAccounts/{billing_account}/logs/{log}"
|
||||
// };
|
||||
// }
|
||||
message ResourceDescriptor {
|
||||
// A description of the historical or future-looking state of the
|
||||
// resource pattern.
|
||||
enum History {
|
||||
// The "unset" value.
|
||||
HISTORY_UNSPECIFIED = 0;
|
||||
|
||||
// The resource originally had one pattern and launched as such, and
|
||||
// additional patterns were added later.
|
||||
ORIGINALLY_SINGLE_PATTERN = 1;
|
||||
|
||||
// The resource has one pattern, but the API owner expects to add more
|
||||
// later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
||||
// that from being necessary once there are multiple patterns.)
|
||||
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.
|
||||
//
|
||||
// For 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.
|
||||
string type = 1;
|
||||
|
||||
// Required. The valid pattern or patterns for this resource's names.
|
||||
//
|
||||
// Examples:
|
||||
// - "projects/{project}/topics/{topic}"
|
||||
// - "projects/{project}/knowledgeBases/{knowledge_base}"
|
||||
string pattern = 1;
|
||||
|
||||
// The name that should be used in code to describe the resource,
|
||||
// in PascalCase.
|
||||
//
|
||||
// If omitted, this is inferred from the name of the message.
|
||||
// This is required if the resource is being defined without the context
|
||||
// of a message (see `resource_definition`, below).
|
||||
// The components in braces correspond to the IDs for each resource in the
|
||||
// hierarchy. It is expected that, if multiple patterns are provided,
|
||||
// the same component name (e.g. "project") refers to IDs of the same
|
||||
// type of resource.
|
||||
repeated string pattern = 2;
|
||||
|
||||
// Optional. The field on the resource that designates the resource name
|
||||
// field. If omitted, this is assumed to be "name".
|
||||
string name_field = 3;
|
||||
|
||||
// Optional. The historical or future-looking state of the resource pattern.
|
||||
//
|
||||
// Example:
|
||||
// option (google.api.resource_definition) = {
|
||||
// pattern: "projects/{project}"
|
||||
// symbol: "Project"
|
||||
// };
|
||||
string symbol = 2;
|
||||
// // The InspectTemplate message originally only supported resource
|
||||
// // names with organization, and project was added later.
|
||||
// message InspectTemplate {
|
||||
// option (google.api.resource) = {
|
||||
// type: "dlp.googleapis.com/InspectTemplate"
|
||||
// pattern: "organizations/{organization}/inspectTemplates/{inspect_template}"
|
||||
// pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
||||
// history: ORIGINALLY_SINGLE_PATTERN
|
||||
// };
|
||||
// }
|
||||
History history = 4;
|
||||
}
|
||||
|
||||
// An annotation designating that this field is a reference to a resource
|
||||
// defined by another message.
|
||||
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.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Subscription {
|
||||
// string topic = 2 [(google.api.resource_reference) = {
|
||||
// type = "pubsub.googleapis.com/Topic"
|
||||
// }];
|
||||
// }
|
||||
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.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message ListLogEntriesRequest {
|
||||
// string parent = 1 [(google.api.resource_reference) = {
|
||||
// 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -96,10 +96,10 @@ message Service {
|
|||
string producer_project_id = 22;
|
||||
|
||||
// A list of API interfaces exported by this service. Only the `name` field
|
||||
// of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by
|
||||
// the configuration author, as the remaining fields will be derived from the
|
||||
// IDL during the normalization process. It is an error to specify an API
|
||||
// interface here which cannot be resolved against the associated IDL files.
|
||||
// of the [google.protobuf.Api][google.protobuf.Api] needs to be provided by the configuration
|
||||
// author, as the remaining fields will be derived from the IDL during the
|
||||
// normalization process. It is an error to specify an API interface here
|
||||
// which cannot be resolved against the associated IDL files.
|
||||
repeated google.protobuf.Api apis = 3;
|
||||
|
||||
// A list of all proto message types included in this API service.
|
||||
|
|
@ -157,8 +157,7 @@ message Service {
|
|||
repeated MetricDescriptor metrics = 24;
|
||||
|
||||
// Defines the monitored resources used by this service. This is required
|
||||
// by the [Service.monitoring][google.api.Service.monitoring] and
|
||||
// [Service.logging][google.api.Service.logging] configurations.
|
||||
// by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
|
||||
repeated MonitoredResourceDescriptor monitored_resources = 25;
|
||||
|
||||
// Billing configuration.
|
||||
|
|
|
|||
|
|
@ -6,14 +6,19 @@ title: Service Config API
|
|||
types:
|
||||
- name: google.api.ConfigChange
|
||||
- name: google.api.Distribution
|
||||
- name: google.api.DocumentationRule
|
||||
- name: google.api.HttpBody
|
||||
- name: google.api.LabelDescriptor
|
||||
- name: google.api.Metric
|
||||
- name: google.api.MonitoredResource
|
||||
- name: google.api.MonitoredResourceDescriptor
|
||||
- name: google.api.MonitoredResourceMetadata
|
||||
- name: google.api.ResourceDescriptor
|
||||
- name: google.api.ResourceReference
|
||||
- name: google.api.Service
|
||||
- name: google.api.DocumentationRule
|
||||
|
||||
enums:
|
||||
- name: google.api.FieldBehavior
|
||||
|
||||
documentation:
|
||||
summary: Lets you define and config your API service.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -68,8 +68,7 @@ message SystemParameterRule {
|
|||
// Selects the methods to which this rule applies. Use '*' to indicate all
|
||||
// methods in all APIs.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// Define parameters. Multiple names may be defined for a parameter.
|
||||
|
|
|
|||
|
|
@ -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,8 +17,6 @@ syntax = "proto3";
|
|||
|
||||
package google.api;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "UsageProto";
|
||||
|
|
@ -77,8 +75,7 @@ message UsageRule {
|
|||
// Selects the methods to which this rule applies. Use '*' to indicate all
|
||||
// methods in all APIs.
|
||||
//
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
|
||||
// details.
|
||||
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
|
||||
string selector = 1;
|
||||
|
||||
// If true, the selected method allows unregistered calls, e.g. calls
|
||||
|
|
|
|||
|
|
@ -143,12 +143,16 @@ service LibraryService {
|
|||
|
||||
// A single book in the library.
|
||||
message Book {
|
||||
option (google.api.resource) = {
|
||||
type: "library-example.googleapis.com/Book",
|
||||
pattern: "shelves/{shelf_id}/books/{book_id}"
|
||||
};
|
||||
// The resource name of the book.
|
||||
// Book names have the form `shelves/{shelf_id}/books/{book_id}`.
|
||||
// The name is ignored when creating a book.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource) = { pattern: "shelves/{shelf_id}/books/{book_id}" }
|
||||
(google.api.resource_reference).type = "library-example.googleapis.com/Book"
|
||||
];
|
||||
|
||||
// The name of the book author.
|
||||
|
|
@ -163,12 +167,16 @@ message Book {
|
|||
|
||||
// A Shelf contains a collection of books with a theme.
|
||||
message Shelf {
|
||||
option (google.api.resource) = {
|
||||
type: "library-example.googleapis.com/Shelf",
|
||||
pattern: "shelves/{shelf_id}"
|
||||
};
|
||||
// The resource name of the shelf.
|
||||
// Shelf names have the form `shelves/{shelf_id}`.
|
||||
// The name is ignored when creating a shelf.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource) = { pattern: "shelves/{shelf_id}" }
|
||||
(google.api.resource_reference).type = "library-example.googleapis.com/Shelf"
|
||||
];
|
||||
|
||||
// The theme of the shelf
|
||||
|
|
@ -186,7 +194,7 @@ message GetShelfRequest {
|
|||
// The name of the shelf to retrieve.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -221,7 +229,7 @@ message DeleteShelfRequest {
|
|||
// The name of the shelf to delete.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -231,13 +239,13 @@ message MergeShelvesRequest {
|
|||
// The name of the shelf we're adding books to.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
|
||||
// The name of the shelf we're removing books from and deleting.
|
||||
string other_shelf_name = 2 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +254,7 @@ message CreateBookRequest {
|
|||
// The name of the shelf in which the book is created.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
|
||||
// The book to create.
|
||||
|
|
@ -258,7 +266,7 @@ message GetBookRequest {
|
|||
// The name of the book to retrieve.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Book"
|
||||
(google.api.resource_reference).type = "Book"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -267,7 +275,7 @@ message ListBooksRequest {
|
|||
// The name of the shelf whose books we'd like to list.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
|
||||
// Requested page size. Server may return fewer books than requested.
|
||||
|
|
@ -308,7 +316,7 @@ message DeleteBookRequest {
|
|||
// The name of the book to delete.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Book"
|
||||
(google.api.resource_reference).type = "Book"
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -318,12 +326,12 @@ message MoveBookRequest {
|
|||
// The name of the book to move.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Book"
|
||||
(google.api.resource_reference).type = "Book"
|
||||
];
|
||||
|
||||
// The name of the destination shelf.
|
||||
string other_shelf_name = 2 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = "Shelf"
|
||||
(google.api.resource_reference).type = "Shelf"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue