Skip to content

Commit

Permalink
feat: Add ServiceOption extension for api_version
Browse files Browse the repository at this point in the history
feat: Add LOCATION_POLICY_VIOLATED ErrorReason enum value
feat: Add rest_reference_documentation_uri for Publishing
docs: Minor tweaks to existing comments
  • Loading branch information
jskeet committed Mar 12, 2024
1 parent 6f6fd6b commit 0c83f27
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
20 changes: 20 additions & 0 deletions Google.Api.CommonProtos/protos/google/api/client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ extend google.protobuf.ServiceOptions {
// ...
// }
string oauth_scopes = 1050;

// The API version of this service, which should be sent by version-aware
// clients to the service. This allows services to abide by the schema and
// behavior of the service at the time this API version was deployed.
// The format of the API version must be treated as opaque by clients.
// Services may use a format with an apparent structure, but clients must
// not rely on this to determine components within an API version, or attempt
// to construct other valid API versions. Note that this is for upcoming
// functionality and may not be implemented for all services.
//
// Example:
//
// service Foo {
// option (google.api.api_version) = "v1_20230821_preview";
// }
string api_version = 525000001;
}

// Required information for every language.
Expand Down Expand Up @@ -192,6 +208,10 @@ message Publishing {
// Optional link to proto reference documentation. Example:
// https://cloud.google.com/pubsub/lite/docs/reference/rpc
string proto_reference_documentation_uri = 110;

// Optional link to REST reference documentation. Example:
// https://cloud.google.com/pubsub/lite/docs/reference/rest
string rest_reference_documentation_uri = 111;
}

// Settings for Java client libraries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ option objc_class_prefix = "GAPI";
// content: (== include google/foo/overview.md ==)
// - name: Tutorial
// content: (== include google/foo/tutorial.md ==)
// subpages;
// subpages:
// - name: Java
// content: (== include google/foo/tutorial_java.md ==)
// rules:
Expand Down
19 changes: 19 additions & 0 deletions Google.Api.CommonProtos/protos/google/api/error_reason.proto
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,23 @@ enum ErrorReason {
//
// This response indicates the associated GCP account has been suspended.
GCP_SUSPENDED = 30;

// The request violates the location policies when creating resources in
// the restricted region.
//
// Example of an ErrorInfo when creating the Cloud Storage Bucket by
// "projects/123" for service storage.googleapis.com:
//
// { "reason": "LOCATION_POLICY_VIOLATED",
// "domain": "googleapis.com",
// "metadata": {
// "consumer": "projects/123",
// "service": "storage.googleapis.com",
// }
// }
//
// This response indicates creating the Cloud Storage Bucket in
// "locations/asia-northeast3" violates at least one location policy.
// The troubleshooting guidance is provided in the Help links.
LOCATION_POLICY_VIOLATED = 31;
}
6 changes: 3 additions & 3 deletions Google.Api.CommonProtos/protos/google/api/field_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ message FieldInfo {

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

// An IP address in either v4 or v6 format as described by the individual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message MonitoredResourceDescriptor {

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

0 comments on commit 0c83f27

Please sign in to comment.