Skip to content

Commit dba3883

Browse files
Google APIscopybara-github
authored andcommitted
feat: add api_version extension to ServiceOptions, for collaborative versioning
feat: add `Publishing.rest_reference_documentation_uri` to aid client library publication feat: add `ErrorReason.LOCATION_POLICY_VIOLATED` enum value docs: minor tweaks to various comments PiperOrigin-RevId: 613949885
1 parent 9868a57 commit dba3883

5 files changed

Lines changed: 44 additions & 5 deletions

File tree

google/api/client.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,22 @@ extend google.protobuf.ServiceOptions {
9898
// ...
9999
// }
100100
string oauth_scopes = 1050;
101+
102+
// The API version of this service, which should be sent by version-aware
103+
// clients to the service. This allows services to abide by the schema and
104+
// behavior of the service at the time this API version was deployed.
105+
// The format of the API version must be treated as opaque by clients.
106+
// Services may use a format with an apparent structure, but clients must
107+
// not rely on this to determine components within an API version, or attempt
108+
// to construct other valid API versions. Note that this is for upcoming
109+
// functionality and may not be implemented for all services.
110+
//
111+
// Example:
112+
//
113+
// service Foo {
114+
// option (google.api.api_version) = "v1_20230821_preview";
115+
// }
116+
string api_version = 525000001;
101117
}
102118

103119
// Required information for every language.
@@ -192,6 +208,10 @@ message Publishing {
192208
// Optional link to proto reference documentation. Example:
193209
// https://cloud.google.com/pubsub/lite/docs/reference/rpc
194210
string proto_reference_documentation_uri = 110;
211+
212+
// Optional link to REST reference documentation. Example:
213+
// https://cloud.google.com/pubsub/lite/docs/reference/rest
214+
string rest_reference_documentation_uri = 111;
195215
}
196216

197217
// Settings for Java client libraries.

google/api/documentation.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ option objc_class_prefix = "GAPI";
3434
// content: (== include google/foo/overview.md ==)
3535
// - name: Tutorial
3636
// content: (== include google/foo/tutorial.md ==)
37-
// subpages;
37+
// subpages:
3838
// - name: Java
3939
// content: (== include google/foo/tutorial_java.md ==)
4040
// rules:

google/api/error_reason.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,4 +567,23 @@ enum ErrorReason {
567567
//
568568
// This response indicates the associated GCP account has been suspended.
569569
GCP_SUSPENDED = 30;
570+
571+
// The request violates the location policies when creating resources in
572+
// the restricted region.
573+
//
574+
// Example of an ErrorInfo when creating the Cloud Storage Bucket by
575+
// "projects/123" for service storage.googleapis.com:
576+
//
577+
// { "reason": "LOCATION_POLICY_VIOLATED",
578+
// "domain": "googleapis.com",
579+
// "metadata": {
580+
// "consumer": "projects/123",
581+
// "service": "storage.googleapis.com",
582+
// }
583+
// }
584+
//
585+
// This response indicates creating the Cloud Storage Bucket in
586+
// "locations/asia-northeast3" violates at least one location policy.
587+
// The troubleshooting guidance is provided in the Help links.
588+
LOCATION_POLICY_VIOLATED = 31;
570589
}

google/api/field_info.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ message FieldInfo {
6161

6262
// Internet Protocol v6 value as defined by [RFC
6363
// 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
64-
// normalized to entirely lowercase letters, and zero-padded partial and
65-
// empty octets. For example, the value `2001:DB8::` would be normalized to
66-
// `2001:0db8:0:0`.
64+
// normalized to entirely lowercase letters with zeros compressed, following
65+
// [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
66+
// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
6767
IPV6 = 3;
6868

6969
// An IP address in either v4 or v6 format as described by the individual

google/api/monitored_resource.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message MonitoredResourceDescriptor {
4949

5050
// Required. The monitored resource type. For example, the type
5151
// `"cloudsql_database"` represents databases in Google Cloud SQL.
52-
// For a list of types, see [Monitoring resource
52+
// For a list of types, see [Monitored resource
5353
// types](https://cloud.google.com/monitoring/api/resources)
5454
// and [Logging resource
5555
// types](https://cloud.google.com/logging/docs/api/v2/resource-list).

0 commit comments

Comments
 (0)