Skip to content

Commit d343be9

Browse files
feat: [common-protos] add api_version extension to ServiceOptions, for collaborative versioning (#2551)
- [ ] Regenerate this pull request now. 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 Source-Link: https://togithub.com/googleapis/googleapis/commit/dba3883bfb9207b943e07a7efef1327939628926 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/71e160a4138c85961a25c6ac9d013b0c7f2d7266 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI3MWUxNjBhNDEzOGM4NTk2MWEyNWM2YWM5ZDAxM2IwYzdmMmQ3MjY2In0= BEGIN_NESTED_COMMIT feat: [common-protos] 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 Source-Link: https://togithub.com/googleapis/googleapis/commit/dba3883bfb9207b943e07a7efef1327939628926 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/71e160a4138c85961a25c6ac9d013b0c7f2d7266 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI3MWUxNjBhNDEzOGM4NTk2MWEyNWM2YWM5ZDAxM2IwYzdmMmQ3MjY2In0= END_NESTED_COMMIT
1 parent 7c1aaab commit d343be9

17 files changed

+438
-90
lines changed

java-common-protos/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.api.grpc</groupId>
2121
<artifactId>proto-google-common-protos</artifactId>
22-
<version>2.33.0</version>
22+
<version>2.36.0</version>
2323
</dependency>
2424
```
2525

2626
If you are using Gradle without BOM, add this to your dependencies:
2727

2828
```Groovy
29-
implementation 'com.google.api.grpc:proto-google-common-protos:2.33.0'
29+
implementation 'com.google.api.grpc:proto-google-common-protos:2.36.0'
3030
```
3131

3232
If you are using SBT, add this to your dependencies:
3333

3434
```Scala
35-
libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.33.0"
35+
libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.36.0"
3636
```
3737

3838
## Authentication

java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java

+86-51
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLi
2626
registry.add(com.google.api.ClientProto.methodSignature);
2727
registry.add(com.google.api.ClientProto.defaultHost);
2828
registry.add(com.google.api.ClientProto.oauthScopes);
29+
registry.add(com.google.api.ClientProto.apiVersion);
2930
}
3031

3132
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
@@ -141,6 +142,35 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
141142
com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
142143
java.lang.String.class, null);
143144

145+
public static final int API_VERSION_FIELD_NUMBER = 525000001;
146+
/**
147+
*
148+
*
149+
* <pre>
150+
* The API version of this service, which should be sent by version-aware
151+
* clients to the service. This allows services to abide by the schema and
152+
* behavior of the service at the time this API version was deployed.
153+
* The format of the API version must be treated as opaque by clients.
154+
* Services may use a format with an apparent structure, but clients must
155+
* not rely on this to determine components within an API version, or attempt
156+
* to construct other valid API versions. Note that this is for upcoming
157+
* functionality and may not be implemented for all services.
158+
*
159+
* Example:
160+
*
161+
* service Foo {
162+
* option (google.api.api_version) = "v1_20230821_preview";
163+
* }
164+
* </pre>
165+
*
166+
* <code>extend .google.protobuf.ServiceOptions { ... }</code>
167+
*/
168+
public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
169+
com.google.protobuf.DescriptorProtos.ServiceOptions, java.lang.String>
170+
apiVersion =
171+
com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
172+
java.lang.String.class, null);
173+
144174
static final com.google.protobuf.Descriptors.Descriptor
145175
internal_static_google_api_CommonLanguageSettings_descriptor;
146176
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -233,7 +263,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
233263
+ "2\032.google.api.DotnetSettings\022/\n\rruby_set"
234264
+ "tings\030\033 \001(\0132\030.google.api.RubySettings\022+\n"
235265
+ "\013go_settings\030\034 \001(\0132\026.google.api.GoSettin"
236-
+ "gs\"\376\002\n\nPublishing\0223\n\017method_settings\030\002 \003"
266+
+ "gs\"\250\003\n\nPublishing\0223\n\017method_settings\030\002 \003"
237267
+ "(\0132\032.google.api.MethodSettings\022\025\n\rnew_is"
238268
+ "sue_uri\030e \001(\t\022\031\n\021documentation_uri\030f \001(\t"
239269
+ "\022\026\n\016api_short_name\030g \001(\t\022\024\n\014github_label"
@@ -242,56 +272,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
242272
+ " \001(\0162%.google.api.ClientLibraryOrganizat"
243273
+ "ion\022;\n\020library_settings\030m \003(\0132!.google.a"
244274
+ "pi.ClientLibrarySettings\022)\n!proto_refere"
245-
+ "nce_documentation_uri\030n \001(\t\"\343\001\n\014JavaSett"
246-
+ "ings\022\027\n\017library_package\030\001 \001(\t\022L\n\023service"
247-
+ "_class_names\030\002 \003(\0132/.google.api.JavaSett"
248-
+ "ings.ServiceClassNamesEntry\0222\n\006common\030\003 "
249-
+ "\001(\0132\".google.api.CommonLanguageSettings\032"
250-
+ "8\n\026ServiceClassNamesEntry\022\013\n\003key\030\001 \001(\t\022\r"
251-
+ "\n\005value\030\002 \001(\t:\0028\001\"A\n\013CppSettings\0222\n\006comm"
252-
+ "on\030\001 \001(\0132\".google.api.CommonLanguageSett"
253-
+ "ings\"A\n\013PhpSettings\0222\n\006common\030\001 \001(\0132\".go"
254-
+ "ogle.api.CommonLanguageSettings\"D\n\016Pytho"
255-
+ "nSettings\0222\n\006common\030\001 \001(\0132\".google.api.C"
256-
+ "ommonLanguageSettings\"B\n\014NodeSettings\0222\n"
257-
+ "\006common\030\001 \001(\0132\".google.api.CommonLanguag"
258-
+ "eSettings\"\252\003\n\016DotnetSettings\0222\n\006common\030\001"
259-
+ " \001(\0132\".google.api.CommonLanguageSettings"
260-
+ "\022I\n\020renamed_services\030\002 \003(\0132/.google.api."
261-
+ "DotnetSettings.RenamedServicesEntry\022K\n\021r"
262-
+ "enamed_resources\030\003 \003(\01320.google.api.Dotn"
263-
+ "etSettings.RenamedResourcesEntry\022\031\n\021igno"
264-
+ "red_resources\030\004 \003(\t\022 \n\030forced_namespace_"
265-
+ "aliases\030\005 \003(\t\022\036\n\026handwritten_signatures\030"
266-
+ "\006 \003(\t\0326\n\024RenamedServicesEntry\022\013\n\003key\030\001 \001"
267-
+ "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0327\n\025RenamedResource"
268-
+ "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"B"
269-
+ "\n\014RubySettings\0222\n\006common\030\001 \001(\0132\".google."
270-
+ "api.CommonLanguageSettings\"@\n\nGoSettings"
271-
+ "\0222\n\006common\030\001 \001(\0132\".google.api.CommonLang"
272-
+ "uageSettings\"\317\002\n\016MethodSettings\022\020\n\010selec"
273-
+ "tor\030\001 \001(\t\022<\n\014long_running\030\002 \001(\0132&.google"
274-
+ ".api.MethodSettings.LongRunning\022\035\n\025auto_"
275-
+ "populated_fields\030\003 \003(\t\032\315\001\n\013LongRunning\0225"
276-
+ "\n\022initial_poll_delay\030\001 \001(\0132\031.google.prot"
277-
+ "obuf.Duration\022\035\n\025poll_delay_multiplier\030\002"
278-
+ " \001(\002\0221\n\016max_poll_delay\030\003 \001(\0132\031.google.pr"
279-
+ "otobuf.Duration\0225\n\022total_poll_timeout\030\004 "
280-
+ "\001(\0132\031.google.protobuf.Duration*\243\001\n\031Clien"
281-
+ "tLibraryOrganization\022+\n\'CLIENT_LIBRARY_O"
282-
+ "RGANIZATION_UNSPECIFIED\020\000\022\t\n\005CLOUD\020\001\022\007\n\003"
283-
+ "ADS\020\002\022\n\n\006PHOTOS\020\003\022\017\n\013STREET_VIEW\020\004\022\014\n\010SH"
284-
+ "OPPING\020\005\022\007\n\003GEO\020\006\022\021\n\rGENERATIVE_AI\020\007*g\n\030"
285-
+ "ClientLibraryDestination\022*\n&CLIENT_LIBRA"
286-
+ "RY_DESTINATION_UNSPECIFIED\020\000\022\n\n\006GITHUB\020\n"
287-
+ "\022\023\n\017PACKAGE_MANAGER\020\024:9\n\020method_signatur"
288-
+ "e\022\036.google.protobuf.MethodOptions\030\233\010 \003(\t"
289-
+ ":6\n\014default_host\022\037.google.protobuf.Servi"
290-
+ "ceOptions\030\231\010 \001(\t:6\n\014oauth_scopes\022\037.googl"
291-
+ "e.protobuf.ServiceOptions\030\232\010 \001(\tBi\n\016com."
292-
+ "google.apiB\013ClientProtoP\001ZAgoogle.golang"
293-
+ ".org/genproto/googleapis/api/annotations"
294-
+ ";annotations\242\002\004GAPIb\006proto3"
275+
+ "nce_documentation_uri\030n \001(\t\022(\n rest_refe"
276+
+ "rence_documentation_uri\030o \001(\t\"\343\001\n\014JavaSe"
277+
+ "ttings\022\027\n\017library_package\030\001 \001(\t\022L\n\023servi"
278+
+ "ce_class_names\030\002 \003(\0132/.google.api.JavaSe"
279+
+ "ttings.ServiceClassNamesEntry\0222\n\006common\030"
280+
+ "\003 \001(\0132\".google.api.CommonLanguageSetting"
281+
+ "s\0328\n\026ServiceClassNamesEntry\022\013\n\003key\030\001 \001(\t"
282+
+ "\022\r\n\005value\030\002 \001(\t:\0028\001\"A\n\013CppSettings\0222\n\006co"
283+
+ "mmon\030\001 \001(\0132\".google.api.CommonLanguageSe"
284+
+ "ttings\"A\n\013PhpSettings\0222\n\006common\030\001 \001(\0132\"."
285+
+ "google.api.CommonLanguageSettings\"D\n\016Pyt"
286+
+ "honSettings\0222\n\006common\030\001 \001(\0132\".google.api"
287+
+ ".CommonLanguageSettings\"B\n\014NodeSettings\022"
288+
+ "2\n\006common\030\001 \001(\0132\".google.api.CommonLangu"
289+
+ "ageSettings\"\252\003\n\016DotnetSettings\0222\n\006common"
290+
+ "\030\001 \001(\0132\".google.api.CommonLanguageSettin"
291+
+ "gs\022I\n\020renamed_services\030\002 \003(\0132/.google.ap"
292+
+ "i.DotnetSettings.RenamedServicesEntry\022K\n"
293+
+ "\021renamed_resources\030\003 \003(\01320.google.api.Do"
294+
+ "tnetSettings.RenamedResourcesEntry\022\031\n\021ig"
295+
+ "nored_resources\030\004 \003(\t\022 \n\030forced_namespac"
296+
+ "e_aliases\030\005 \003(\t\022\036\n\026handwritten_signature"
297+
+ "s\030\006 \003(\t\0326\n\024RenamedServicesEntry\022\013\n\003key\030\001"
298+
+ " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0327\n\025RenamedResour"
299+
+ "cesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001"
300+
+ "\"B\n\014RubySettings\0222\n\006common\030\001 \001(\0132\".googl"
301+
+ "e.api.CommonLanguageSettings\"@\n\nGoSettin"
302+
+ "gs\0222\n\006common\030\001 \001(\0132\".google.api.CommonLa"
303+
+ "nguageSettings\"\317\002\n\016MethodSettings\022\020\n\010sel"
304+
+ "ector\030\001 \001(\t\022<\n\014long_running\030\002 \001(\0132&.goog"
305+
+ "le.api.MethodSettings.LongRunning\022\035\n\025aut"
306+
+ "o_populated_fields\030\003 \003(\t\032\315\001\n\013LongRunning"
307+
+ "\0225\n\022initial_poll_delay\030\001 \001(\0132\031.google.pr"
308+
+ "otobuf.Duration\022\035\n\025poll_delay_multiplier"
309+
+ "\030\002 \001(\002\0221\n\016max_poll_delay\030\003 \001(\0132\031.google."
310+
+ "protobuf.Duration\0225\n\022total_poll_timeout\030"
311+
+ "\004 \001(\0132\031.google.protobuf.Duration*\243\001\n\031Cli"
312+
+ "entLibraryOrganization\022+\n\'CLIENT_LIBRARY"
313+
+ "_ORGANIZATION_UNSPECIFIED\020\000\022\t\n\005CLOUD\020\001\022\007"
314+
+ "\n\003ADS\020\002\022\n\n\006PHOTOS\020\003\022\017\n\013STREET_VIEW\020\004\022\014\n\010"
315+
+ "SHOPPING\020\005\022\007\n\003GEO\020\006\022\021\n\rGENERATIVE_AI\020\007*g"
316+
+ "\n\030ClientLibraryDestination\022*\n&CLIENT_LIB"
317+
+ "RARY_DESTINATION_UNSPECIFIED\020\000\022\n\n\006GITHUB"
318+
+ "\020\n\022\023\n\017PACKAGE_MANAGER\020\024:9\n\020method_signat"
319+
+ "ure\022\036.google.protobuf.MethodOptions\030\233\010 \003"
320+
+ "(\t:6\n\014default_host\022\037.google.protobuf.Ser"
321+
+ "viceOptions\030\231\010 \001(\t:6\n\014oauth_scopes\022\037.goo"
322+
+ "gle.protobuf.ServiceOptions\030\232\010 \001(\t:8\n\013ap"
323+
+ "i_version\022\037.google.protobuf.ServiceOptio"
324+
+ "ns\030\301\272\253\372\001 \001(\tBi\n\016com.google.apiB\013ClientPr"
325+
+ "otoP\001ZAgoogle.golang.org/genproto/google"
326+
+ "apis/api/annotations;annotations\242\002\004GAPIb"
327+
+ "\006proto3"
295328
};
296329
descriptor =
297330
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -342,6 +375,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
342375
"Organization",
343376
"LibrarySettings",
344377
"ProtoReferenceDocumentationUri",
378+
"RestReferenceDocumentationUri",
345379
});
346380
internal_static_google_api_JavaSettings_descriptor = getDescriptor().getMessageTypes().get(3);
347381
internal_static_google_api_JavaSettings_fieldAccessorTable =
@@ -447,6 +481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
447481
methodSignature.internalInit(descriptor.getExtensions().get(0));
448482
defaultHost.internalInit(descriptor.getExtensions().get(1));
449483
oauthScopes.internalInit(descriptor.getExtensions().get(2));
484+
apiVersion.internalInit(descriptor.getExtensions().get(3));
450485
com.google.api.LaunchStageProto.getDescriptor();
451486
com.google.protobuf.DescriptorProtos.getDescriptor();
452487
com.google.protobuf.DurationProto.getDescriptor();

java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettings.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
7878
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
7979
*
8080
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
81-
* google/api/client.proto;l=106
81+
* google/api/client.proto;l=122
8282
* @return The referenceDocsUri.
8383
*/
8484
@java.lang.Override
@@ -105,7 +105,7 @@ public java.lang.String getReferenceDocsUri() {
105105
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
106106
*
107107
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
108-
* google/api/client.proto;l=106
108+
* google/api/client.proto;l=122
109109
* @return The bytes for referenceDocsUri.
110110
*/
111111
@java.lang.Override
@@ -637,7 +637,7 @@ public Builder mergeFrom(
637637
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
638638
*
639639
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
640-
* google/api/client.proto;l=106
640+
* google/api/client.proto;l=122
641641
* @return The referenceDocsUri.
642642
*/
643643
@java.lang.Deprecated
@@ -663,7 +663,7 @@ public java.lang.String getReferenceDocsUri() {
663663
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
664664
*
665665
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
666-
* google/api/client.proto;l=106
666+
* google/api/client.proto;l=122
667667
* @return The bytes for referenceDocsUri.
668668
*/
669669
@java.lang.Deprecated
@@ -689,7 +689,7 @@ public com.google.protobuf.ByteString getReferenceDocsUriBytes() {
689689
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
690690
*
691691
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
692-
* google/api/client.proto;l=106
692+
* google/api/client.proto;l=122
693693
* @param value The referenceDocsUri to set.
694694
* @return This builder for chaining.
695695
*/
@@ -714,7 +714,7 @@ public Builder setReferenceDocsUri(java.lang.String value) {
714714
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
715715
*
716716
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
717-
* google/api/client.proto;l=106
717+
* google/api/client.proto;l=122
718718
* @return This builder for chaining.
719719
*/
720720
@java.lang.Deprecated
@@ -735,7 +735,7 @@ public Builder clearReferenceDocsUri() {
735735
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
736736
*
737737
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
738-
* google/api/client.proto;l=106
738+
* google/api/client.proto;l=122
739739
* @param value The bytes for referenceDocsUri to set.
740740
* @return This builder for chaining.
741741
*/

java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface CommonLanguageSettingsOrBuilder
3535
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
3636
*
3737
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
38-
* google/api/client.proto;l=106
38+
* google/api/client.proto;l=122
3939
* @return The referenceDocsUri.
4040
*/
4141
@java.lang.Deprecated
@@ -51,7 +51,7 @@ public interface CommonLanguageSettingsOrBuilder
5151
* <code>string reference_docs_uri = 1 [deprecated = true];</code>
5252
*
5353
* @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See
54-
* google/api/client.proto;l=106
54+
* google/api/client.proto;l=122
5555
* @return The bytes for referenceDocsUri.
5656
*/
5757
@java.lang.Deprecated

java-common-protos/proto-google-common-protos/src/main/java/com/google/api/Documentation.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* content: &amp;#40;== include google/foo/overview.md ==&amp;#41;
3636
* - name: Tutorial
3737
* content: &amp;#40;== include google/foo/tutorial.md ==&amp;#41;
38-
* subpages;
38+
* subpages:
3939
* - name: Java
4040
* content: &amp;#40;== include google/foo/tutorial_java.md ==&amp;#41;
4141
* rules:
@@ -733,7 +733,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
733733
* content: &amp;#40;== include google/foo/overview.md ==&amp;#41;
734734
* - name: Tutorial
735735
* content: &amp;#40;== include google/foo/tutorial.md ==&amp;#41;
736-
* subpages;
736+
* subpages:
737737
* - name: Java
738738
* content: &amp;#40;== include google/foo/tutorial_java.md ==&amp;#41;
739739
* rules:

java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReason.java

+54
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,32 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum {
783783
* <code>GCP_SUSPENDED = 30;</code>
784784
*/
785785
GCP_SUSPENDED(30),
786+
/**
787+
*
788+
*
789+
* <pre>
790+
* The request violates the location policies when creating resources in
791+
* the restricted region.
792+
*
793+
* Example of an ErrorInfo when creating the Cloud Storage Bucket by
794+
* "projects/123" for service storage.googleapis.com:
795+
*
796+
* { "reason": "LOCATION_POLICY_VIOLATED",
797+
* "domain": "googleapis.com",
798+
* "metadata": {
799+
* "consumer": "projects/123",
800+
* "service": "storage.googleapis.com",
801+
* }
802+
* }
803+
*
804+
* This response indicates creating the Cloud Storage Bucket in
805+
* "locations/asia-northeast3" violates at least one location policy.
806+
* The troubleshooting guidance is provided in the Help links.
807+
* </pre>
808+
*
809+
* <code>LOCATION_POLICY_VIOLATED = 31;</code>
810+
*/
811+
LOCATION_POLICY_VIOLATED(31),
786812
UNRECOGNIZED(-1),
787813
;
788814

@@ -1531,6 +1557,32 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum {
15311557
* <code>GCP_SUSPENDED = 30;</code>
15321558
*/
15331559
public static final int GCP_SUSPENDED_VALUE = 30;
1560+
/**
1561+
*
1562+
*
1563+
* <pre>
1564+
* The request violates the location policies when creating resources in
1565+
* the restricted region.
1566+
*
1567+
* Example of an ErrorInfo when creating the Cloud Storage Bucket by
1568+
* "projects/123" for service storage.googleapis.com:
1569+
*
1570+
* { "reason": "LOCATION_POLICY_VIOLATED",
1571+
* "domain": "googleapis.com",
1572+
* "metadata": {
1573+
* "consumer": "projects/123",
1574+
* "service": "storage.googleapis.com",
1575+
* }
1576+
* }
1577+
*
1578+
* This response indicates creating the Cloud Storage Bucket in
1579+
* "locations/asia-northeast3" violates at least one location policy.
1580+
* The troubleshooting guidance is provided in the Help links.
1581+
* </pre>
1582+
*
1583+
* <code>LOCATION_POLICY_VIOLATED = 31;</code>
1584+
*/
1585+
public static final int LOCATION_POLICY_VIOLATED_VALUE = 31;
15341586

15351587
public final int getNumber() {
15361588
if (this == UNRECOGNIZED) {
@@ -1616,6 +1668,8 @@ public static ErrorReason forNumber(int value) {
16161668
return SERVICE_NOT_VISIBLE;
16171669
case 30:
16181670
return GCP_SUSPENDED;
1671+
case 31:
1672+
return LOCATION_POLICY_VIOLATED;
16191673
default:
16201674
return null;
16211675
}

0 commit comments

Comments
 (0)