diff --git a/generation_config.yaml b/generation_config.yaml index 62e47dcbe5..df1bbc5104 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,4 +1,4 @@ -googleapis_commitish: beea48a164c2a8cc8485185c3a4f56c587090e1a +googleapis_commitish: 7d0624db6f5b5b7d8f5cf36571b33ded2067c5e1 # the libraries are ordered with respect to library name, which is # java-{library.library_name} or java-{library.api-shortname} when # library.library_name is not defined. diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java index b3f4e611b7..3f33631b0f 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java @@ -239,6 +239,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_api_MethodSettings_LongRunning_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_SelectiveGapicGeneration_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_SelectiveGapicGeneration_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -251,72 +255,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n\027google/api/client.proto\022\ngoogle.api\032\035g" + "oogle/api/launch_stage.proto\032 google/pro" + "tobuf/descriptor.proto\032\036google/protobuf/" - + "duration.proto\"t\n\026CommonLanguageSettings" - + "\022\036\n\022reference_docs_uri\030\001 \001(\tB\002\030\001\022:\n\014dest" - + "inations\030\002 \003(\0162$.google.api.ClientLibrar" - + "yDestination\"\373\003\n\025ClientLibrarySettings\022\017" - + "\n\007version\030\001 \001(\t\022-\n\014launch_stage\030\002 \001(\0162\027." - + "google.api.LaunchStage\022\032\n\022rest_numeric_e" - + "nums\030\003 \001(\010\022/\n\rjava_settings\030\025 \001(\0132\030.goog" - + "le.api.JavaSettings\022-\n\014cpp_settings\030\026 \001(" - + "\0132\027.google.api.CppSettings\022-\n\014php_settin" - + "gs\030\027 \001(\0132\027.google.api.PhpSettings\0223\n\017pyt" - + "hon_settings\030\030 \001(\0132\032.google.api.PythonSe" - + "ttings\022/\n\rnode_settings\030\031 \001(\0132\030.google.a" - + "pi.NodeSettings\0223\n\017dotnet_settings\030\032 \001(\013" - + "2\032.google.api.DotnetSettings\022/\n\rruby_set" - + "tings\030\033 \001(\0132\030.google.api.RubySettings\022+\n" - + "\013go_settings\030\034 \001(\0132\026.google.api.GoSettin" - + "gs\"\250\003\n\nPublishing\0223\n\017method_settings\030\002 \003" - + "(\0132\032.google.api.MethodSettings\022\025\n\rnew_is" - + "sue_uri\030e \001(\t\022\031\n\021documentation_uri\030f \001(\t" - + "\022\026\n\016api_short_name\030g \001(\t\022\024\n\014github_label" - + "\030h \001(\t\022\036\n\026codeowner_github_teams\030i \003(\t\022\026" - + "\n\016doc_tag_prefix\030j \001(\t\022;\n\014organization\030k" - + " \001(\0162%.google.api.ClientLibraryOrganizat" - + "ion\022;\n\020library_settings\030m \003(\0132!.google.a" - + "pi.ClientLibrarySettings\022)\n!proto_refere" - + "nce_documentation_uri\030n \001(\t\022(\n rest_refe" - + "rence_documentation_uri\030o \001(\t\"\343\001\n\014JavaSe" - + "ttings\022\027\n\017library_package\030\001 \001(\t\022L\n\023servi" - + "ce_class_names\030\002 \003(\0132/.google.api.JavaSe" - + "ttings.ServiceClassNamesEntry\0222\n\006common\030" - + "\003 \001(\0132\".google.api.CommonLanguageSetting" - + "s\0328\n\026ServiceClassNamesEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"A\n\013CppSettings\0222\n\006co" - + "mmon\030\001 \001(\0132\".google.api.CommonLanguageSe" - + "ttings\"A\n\013PhpSettings\0222\n\006common\030\001 \001(\0132\"." - + "google.api.CommonLanguageSettings\"\313\001\n\016Py" - + "thonSettings\0222\n\006common\030\001 \001(\0132\".google.ap" - + "i.CommonLanguageSettings\022N\n\025experimental" - + "_features\030\002 \001(\0132/.google.api.PythonSetti" - + "ngs.ExperimentalFeatures\0325\n\024Experimental" - + "Features\022\035\n\025rest_async_io_enabled\030\001 \001(\010\"" - + "B\n\014NodeSettings\0222\n\006common\030\001 \001(\0132\".google" - + ".api.CommonLanguageSettings\"\252\003\n\016DotnetSe" - + "ttings\0222\n\006common\030\001 \001(\0132\".google.api.Comm" - + "onLanguageSettings\022I\n\020renamed_services\030\002" - + " \003(\0132/.google.api.DotnetSettings.Renamed" - + "ServicesEntry\022K\n\021renamed_resources\030\003 \003(\013" - + "20.google.api.DotnetSettings.RenamedReso" - + "urcesEntry\022\031\n\021ignored_resources\030\004 \003(\t\022 \n" - + "\030forced_namespace_aliases\030\005 \003(\t\022\036\n\026handw" - + "ritten_signatures\030\006 \003(\t\0326\n\024RenamedServic" - + "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" - + "7\n\025RenamedResourcesEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"B\n\014RubySettings\0222\n\006comm" - + "on\030\001 \001(\0132\".google.api.CommonLanguageSett" - + "ings\"@\n\nGoSettings\0222\n\006common\030\001 \001(\0132\".goo" - + "gle.api.CommonLanguageSettings\"\317\002\n\016Metho" - + "dSettings\022\020\n\010selector\030\001 \001(\t\022<\n\014long_runn" - + "ing\030\002 \001(\0132&.google.api.MethodSettings.Lo" - + "ngRunning\022\035\n\025auto_populated_fields\030\003 \003(\t" - + "\032\315\001\n\013LongRunning\0225\n\022initial_poll_delay\030\001" - + " \001(\0132\031.google.protobuf.Duration\022\035\n\025poll_" - + "delay_multiplier\030\002 \001(\002\0221\n\016max_poll_delay" - + "\030\003 \001(\0132\031.google.protobuf.Duration\0225\n\022tot" - + "al_poll_timeout\030\004 \001(\0132\031.google.protobuf." - + "Duration*\243\001\n\031ClientLibraryOrganization\022+" + + "duration.proto\"\276\001\n\026CommonLanguageSetting" + + "s\022\036\n\022reference_docs_uri\030\001 \001(\tB\002\030\001\022:\n\014des" + + "tinations\030\002 \003(\0162$.google.api.ClientLibra" + + "ryDestination\022H\n\032selective_gapic_generat" + + "ion\030\003 \001(\0132$.google.api.SelectiveGapicGen" + + "eration\"\373\003\n\025ClientLibrarySettings\022\017\n\007ver" + + "sion\030\001 \001(\t\022-\n\014launch_stage\030\002 \001(\0162\027.googl" + + "e.api.LaunchStage\022\032\n\022rest_numeric_enums\030" + + "\003 \001(\010\022/\n\rjava_settings\030\025 \001(\0132\030.google.ap" + + "i.JavaSettings\022-\n\014cpp_settings\030\026 \001(\0132\027.g" + + "oogle.api.CppSettings\022-\n\014php_settings\030\027 " + + "\001(\0132\027.google.api.PhpSettings\0223\n\017python_s" + + "ettings\030\030 \001(\0132\032.google.api.PythonSetting" + + "s\022/\n\rnode_settings\030\031 \001(\0132\030.google.api.No" + + "deSettings\0223\n\017dotnet_settings\030\032 \001(\0132\032.go" + + "ogle.api.DotnetSettings\022/\n\rruby_settings" + + "\030\033 \001(\0132\030.google.api.RubySettings\022+\n\013go_s" + + "ettings\030\034 \001(\0132\026.google.api.GoSettings\"\250\003" + + "\n\nPublishing\0223\n\017method_settings\030\002 \003(\0132\032." + + "google.api.MethodSettings\022\025\n\rnew_issue_u" + + "ri\030e \001(\t\022\031\n\021documentation_uri\030f \001(\t\022\026\n\016a" + + "pi_short_name\030g \001(\t\022\024\n\014github_label\030h \001(" + + "\t\022\036\n\026codeowner_github_teams\030i \003(\t\022\026\n\016doc" + + "_tag_prefix\030j \001(\t\022;\n\014organization\030k \001(\0162" + + "%.google.api.ClientLibraryOrganization\022;" + + "\n\020library_settings\030m \003(\0132!.google.api.Cl" + + "ientLibrarySettings\022)\n!proto_reference_d" + + "ocumentation_uri\030n \001(\t\022(\n rest_reference" + + "_documentation_uri\030o \001(\t\"\343\001\n\014JavaSetting" + + "s\022\027\n\017library_package\030\001 \001(\t\022L\n\023service_cl" + + "ass_names\030\002 \003(\0132/.google.api.JavaSetting" + + "s.ServiceClassNamesEntry\0222\n\006common\030\003 \001(\013" + + "2\".google.api.CommonLanguageSettings\0328\n\026" + + "ServiceClassNamesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"A\n\013CppSettings\0222\n\006common\030" + + "\001 \001(\0132\".google.api.CommonLanguageSetting" + + "s\"A\n\013PhpSettings\0222\n\006common\030\001 \001(\0132\".googl" + + "e.api.CommonLanguageSettings\"\313\001\n\016PythonS" + + "ettings\0222\n\006common\030\001 \001(\0132\".google.api.Com" + + "monLanguageSettings\022N\n\025experimental_feat" + + "ures\030\002 \001(\0132/.google.api.PythonSettings.E" + + "xperimentalFeatures\0325\n\024ExperimentalFeatu" + + "res\022\035\n\025rest_async_io_enabled\030\001 \001(\010\"B\n\014No" + + "deSettings\0222\n\006common\030\001 \001(\0132\".google.api." + + "CommonLanguageSettings\"\252\003\n\016DotnetSetting" + + "s\0222\n\006common\030\001 \001(\0132\".google.api.CommonLan" + + "guageSettings\022I\n\020renamed_services\030\002 \003(\0132" + + "/.google.api.DotnetSettings.RenamedServi" + + "cesEntry\022K\n\021renamed_resources\030\003 \003(\01320.go" + + "ogle.api.DotnetSettings.RenamedResources" + + "Entry\022\031\n\021ignored_resources\030\004 \003(\t\022 \n\030forc" + + "ed_namespace_aliases\030\005 \003(\t\022\036\n\026handwritte" + + "n_signatures\030\006 \003(\t\0326\n\024RenamedServicesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0327\n\025Re" + + "namedResourcesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"B\n\014RubySettings\0222\n\006common\030\001 " + + "\001(\0132\".google.api.CommonLanguageSettings\"" + + "@\n\nGoSettings\0222\n\006common\030\001 \001(\0132\".google.a" + + "pi.CommonLanguageSettings\"\317\002\n\016MethodSett" + + "ings\022\020\n\010selector\030\001 \001(\t\022<\n\014long_running\030\002" + + " \001(\0132&.google.api.MethodSettings.LongRun" + + "ning\022\035\n\025auto_populated_fields\030\003 \003(\t\032\315\001\n\013" + + "LongRunning\0225\n\022initial_poll_delay\030\001 \001(\0132" + + "\031.google.protobuf.Duration\022\035\n\025poll_delay" + + "_multiplier\030\002 \001(\002\0221\n\016max_poll_delay\030\003 \001(" + + "\0132\031.google.protobuf.Duration\0225\n\022total_po" + + "ll_timeout\030\004 \001(\0132\031.google.protobuf.Durat" + + "ion\"+\n\030SelectiveGapicGeneration\022\017\n\007metho" + + "ds\030\001 \003(\t*\243\001\n\031ClientLibraryOrganization\022+" + "\n\'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIE" + "D\020\000\022\t\n\005CLOUD\020\001\022\007\n\003ADS\020\002\022\n\n\006PHOTOS\020\003\022\017\n\013S" + "TREET_VIEW\020\004\022\014\n\010SHOPPING\020\005\022\007\n\003GEO\020\006\022\021\n\rG" @@ -347,7 +354,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_CommonLanguageSettings_descriptor, new java.lang.String[] { - "ReferenceDocsUri", "Destinations", + "ReferenceDocsUri", "Destinations", "SelectiveGapicGeneration", }); internal_static_google_api_ClientLibrarySettings_descriptor = getDescriptor().getMessageTypes().get(1); @@ -493,6 +500,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "InitialPollDelay", "PollDelayMultiplier", "MaxPollDelay", "TotalPollTimeout", }); + internal_static_google_api_SelectiveGapicGeneration_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_api_SelectiveGapicGeneration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_SelectiveGapicGeneration_descriptor, + new java.lang.String[] { + "Methods", + }); methodSignature.internalInit(descriptor.getExtensions().get(0)); defaultHost.internalInit(descriptor.getExtensions().get(1)); oauthScopes.internalInit(descriptor.getExtensions().get(2)); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettings.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettings.java index d3e657e2bc..a940bf2b74 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettings.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettings.java @@ -63,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.api.CommonLanguageSettings.Builder.class); } + private int bitField0_; public static final int REFERENCE_DOCS_URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -220,6 +221,56 @@ public int getDestinationsValue(int index) { private int destinationsMemoizedSerializedSize; + public static final int SELECTIVE_GAPIC_GENERATION_FIELD_NUMBER = 3; + private com.google.api.SelectiveGapicGeneration selectiveGapicGeneration_; + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return Whether the selectiveGapicGeneration field is set. + */ + @java.lang.Override + public boolean hasSelectiveGapicGeneration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return The selectiveGapicGeneration. + */ + @java.lang.Override + public com.google.api.SelectiveGapicGeneration getSelectiveGapicGeneration() { + return selectiveGapicGeneration_ == null + ? com.google.api.SelectiveGapicGeneration.getDefaultInstance() + : selectiveGapicGeneration_; + } + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + @java.lang.Override + public com.google.api.SelectiveGapicGenerationOrBuilder getSelectiveGapicGenerationOrBuilder() { + return selectiveGapicGeneration_ == null + ? com.google.api.SelectiveGapicGeneration.getDefaultInstance() + : selectiveGapicGeneration_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -245,6 +296,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < destinations_.size(); i++) { output.writeEnumNoTag(destinations_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSelectiveGapicGeneration()); + } getUnknownFields().writeTo(output); } @@ -270,6 +324,11 @@ public int getSerializedSize() { } destinationsMemoizedSerializedSize = dataSize; } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getSelectiveGapicGeneration()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -287,6 +346,10 @@ public boolean equals(final java.lang.Object obj) { if (!getReferenceDocsUri().equals(other.getReferenceDocsUri())) return false; if (!destinations_.equals(other.destinations_)) return false; + if (hasSelectiveGapicGeneration() != other.hasSelectiveGapicGeneration()) return false; + if (hasSelectiveGapicGeneration()) { + if (!getSelectiveGapicGeneration().equals(other.getSelectiveGapicGeneration())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,6 +367,10 @@ public int hashCode() { hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER; hash = (53 * hash) + destinations_.hashCode(); } + if (hasSelectiveGapicGeneration()) { + hash = (37 * hash) + SELECTIVE_GAPIC_GENERATION_FIELD_NUMBER; + hash = (53 * hash) + getSelectiveGapicGeneration().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -432,10 +499,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.api.CommonLanguageSettings.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSelectiveGapicGenerationFieldBuilder(); + } } @java.lang.Override @@ -445,6 +521,11 @@ public Builder clear() { referenceDocsUri_ = ""; destinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); + selectiveGapicGeneration_ = null; + if (selectiveGapicGenerationBuilder_ != null) { + selectiveGapicGenerationBuilder_.dispose(); + selectiveGapicGenerationBuilder_ = null; + } return this; } @@ -493,6 +574,15 @@ private void buildPartial0(com.google.api.CommonLanguageSettings result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.referenceDocsUri_ = referenceDocsUri_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.selectiveGapicGeneration_ = + selectiveGapicGenerationBuilder_ == null + ? selectiveGapicGeneration_ + : selectiveGapicGenerationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -555,6 +645,9 @@ public Builder mergeFrom(com.google.api.CommonLanguageSettings other) { } onChanged(); } + if (other.hasSelectiveGapicGeneration()) { + mergeSelectiveGapicGeneration(other.getSelectiveGapicGeneration()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -606,6 +699,13 @@ public Builder mergeFrom( input.popLimit(oldLimit); break; } // case 18 + case 26: + { + input.readMessage( + getSelectiveGapicGenerationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -972,6 +1072,193 @@ public Builder addAllDestinationsValue(java.lang.Iterable val return this; } + private com.google.api.SelectiveGapicGeneration selectiveGapicGeneration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.SelectiveGapicGeneration, + com.google.api.SelectiveGapicGeneration.Builder, + com.google.api.SelectiveGapicGenerationOrBuilder> + selectiveGapicGenerationBuilder_; + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return Whether the selectiveGapicGeneration field is set. + */ + public boolean hasSelectiveGapicGeneration() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return The selectiveGapicGeneration. + */ + public com.google.api.SelectiveGapicGeneration getSelectiveGapicGeneration() { + if (selectiveGapicGenerationBuilder_ == null) { + return selectiveGapicGeneration_ == null + ? com.google.api.SelectiveGapicGeneration.getDefaultInstance() + : selectiveGapicGeneration_; + } else { + return selectiveGapicGenerationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public Builder setSelectiveGapicGeneration(com.google.api.SelectiveGapicGeneration value) { + if (selectiveGapicGenerationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + selectiveGapicGeneration_ = value; + } else { + selectiveGapicGenerationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public Builder setSelectiveGapicGeneration( + com.google.api.SelectiveGapicGeneration.Builder builderForValue) { + if (selectiveGapicGenerationBuilder_ == null) { + selectiveGapicGeneration_ = builderForValue.build(); + } else { + selectiveGapicGenerationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public Builder mergeSelectiveGapicGeneration(com.google.api.SelectiveGapicGeneration value) { + if (selectiveGapicGenerationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && selectiveGapicGeneration_ != null + && selectiveGapicGeneration_ + != com.google.api.SelectiveGapicGeneration.getDefaultInstance()) { + getSelectiveGapicGenerationBuilder().mergeFrom(value); + } else { + selectiveGapicGeneration_ = value; + } + } else { + selectiveGapicGenerationBuilder_.mergeFrom(value); + } + if (selectiveGapicGeneration_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public Builder clearSelectiveGapicGeneration() { + bitField0_ = (bitField0_ & ~0x00000004); + selectiveGapicGeneration_ = null; + if (selectiveGapicGenerationBuilder_ != null) { + selectiveGapicGenerationBuilder_.dispose(); + selectiveGapicGenerationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public com.google.api.SelectiveGapicGeneration.Builder getSelectiveGapicGenerationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSelectiveGapicGenerationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + public com.google.api.SelectiveGapicGenerationOrBuilder getSelectiveGapicGenerationOrBuilder() { + if (selectiveGapicGenerationBuilder_ != null) { + return selectiveGapicGenerationBuilder_.getMessageOrBuilder(); + } else { + return selectiveGapicGeneration_ == null + ? com.google.api.SelectiveGapicGeneration.getDefaultInstance() + : selectiveGapicGeneration_; + } + } + /** + * + * + *
+     * Configuration for which RPCs should be generated in the GAPIC client.
+     * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.SelectiveGapicGeneration, + com.google.api.SelectiveGapicGeneration.Builder, + com.google.api.SelectiveGapicGenerationOrBuilder> + getSelectiveGapicGenerationFieldBuilder() { + if (selectiveGapicGenerationBuilder_ == null) { + selectiveGapicGenerationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.SelectiveGapicGeneration, + com.google.api.SelectiveGapicGeneration.Builder, + com.google.api.SelectiveGapicGenerationOrBuilder>( + getSelectiveGapicGeneration(), getParentForChildren(), isClean()); + selectiveGapicGeneration_ = null; + } + return selectiveGapicGenerationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java index ec25b90895..f24246d889 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java @@ -119,4 +119,39 @@ public interface CommonLanguageSettingsOrBuilder * @return The enum numeric value on the wire of destinations at the given index. */ int getDestinationsValue(int index); + + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return Whether the selectiveGapicGeneration field is set. + */ + boolean hasSelectiveGapicGeneration(); + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + * + * @return The selectiveGapicGeneration. + */ + com.google.api.SelectiveGapicGeneration getSelectiveGapicGeneration(); + /** + * + * + *
+   * Configuration for which RPCs should be generated in the GAPIC client.
+   * 
+ * + * .google.api.SelectiveGapicGeneration selective_gapic_generation = 3; + */ + com.google.api.SelectiveGapicGenerationOrBuilder getSelectiveGapicGenerationOrBuilder(); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReason.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReason.java index 876074b445..7fc4794d38 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReason.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReason.java @@ -809,6 +809,53 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum { * LOCATION_POLICY_VIOLATED = 31; */ LOCATION_POLICY_VIOLATED(31), + /** + * + * + *
+   * The request is denied because origin request header is missing.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with an empty "Origin" request
+   * header.
+   *
+   * {
+   *   reason: "MISSING_ORIGIN"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * MISSING_ORIGIN = 33; + */ + MISSING_ORIGIN(33), + /** + * + * + *
+   * The request is denied because the request contains more than one credential
+   * type that are individually acceptable, but not together. The customer
+   * should retry their request with only one set of credentials.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with overloaded credentials.
+   *
+   * {
+   *   reason: "OVERLOADED_CREDENTIALS"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * OVERLOADED_CREDENTIALS = 34; + */ + OVERLOADED_CREDENTIALS(34), UNRECOGNIZED(-1), ; @@ -1583,6 +1630,53 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum { * LOCATION_POLICY_VIOLATED = 31; */ public static final int LOCATION_POLICY_VIOLATED_VALUE = 31; + /** + * + * + *
+   * The request is denied because origin request header is missing.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with an empty "Origin" request
+   * header.
+   *
+   * {
+   *   reason: "MISSING_ORIGIN"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * MISSING_ORIGIN = 33; + */ + public static final int MISSING_ORIGIN_VALUE = 33; + /** + * + * + *
+   * The request is denied because the request contains more than one credential
+   * type that are individually acceptable, but not together. The customer
+   * should retry their request with only one set of credentials.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with overloaded credentials.
+   *
+   * {
+   *   reason: "OVERLOADED_CREDENTIALS"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * OVERLOADED_CREDENTIALS = 34; + */ + public static final int OVERLOADED_CREDENTIALS_VALUE = 34; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -1670,6 +1764,10 @@ public static ErrorReason forNumber(int value) { return GCP_SUSPENDED; case 31: return LOCATION_POLICY_VIOLATED; + case 33: + return MISSING_ORIGIN; + case 34: + return OVERLOADED_CREDENTIALS; default: return null; } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReasonProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReasonProto.java index 13a72b01f6..b0a3b096dc 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReasonProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ErrorReasonProto.java @@ -37,7 +37,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\035google/api/error_reason.proto\022\ngoogle." - + "api*\212\007\n\013ErrorReason\022\034\n\030ERROR_REASON_UNSP" + + "api*\272\007\n\013ErrorReason\022\034\n\030ERROR_REASON_UNSP" + "ECIFIED\020\000\022\024\n\020SERVICE_DISABLED\020\001\022\024\n\020BILLI" + "NG_DISABLED\020\002\022\023\n\017API_KEY_INVALID\020\003\022\033\n\027AP" + "I_KEY_SERVICE_BLOCKED\020\004\022!\n\035API_KEY_HTTP_" @@ -59,10 +59,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "SUPPORTED\020\032\022\035\n\031ORG_RESTRICTION_VIOLATION" + "\020\033\022\"\n\036ORG_RESTRICTION_HEADER_INVALID\020\034\022\027" + "\n\023SERVICE_NOT_VISIBLE\020\035\022\021\n\rGCP_SUSPENDED" - + "\020\036\022\034\n\030LOCATION_POLICY_VIOLATED\020\037Bp\n\016com." - + "google.apiB\020ErrorReasonProtoP\001ZCgoogle.g" - + "olang.org/genproto/googleapis/api/error_" - + "reason;error_reason\242\002\004GAPIb\006proto3" + + "\020\036\022\034\n\030LOCATION_POLICY_VIOLATED\020\037\022\022\n\016MISS" + + "ING_ORIGIN\020!\022\032\n\026OVERLOADED_CREDENTIALS\020\"" + + "Bp\n\016com.google.apiB\020ErrorReasonProtoP\001ZC" + + "google.golang.org/genproto/googleapis/ap" + + "i/error_reason;error_reason\242\002\004GAPIb\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricDescriptor.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricDescriptor.java index 5d34314fbb..cf291f447c 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricDescriptor.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricDescriptor.java @@ -526,7 +526,7 @@ public interface MetricDescriptorMetadataOrBuilder * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. - * See google/api/metric.proto;l=85 + * See google/api/metric.proto;l=100 * @return The enum numeric value on the wire for launchStage. */ @java.lang.Deprecated @@ -543,7 +543,7 @@ public interface MetricDescriptorMetadataOrBuilder * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. - * See google/api/metric.proto;l=85 + * See google/api/metric.proto;l=100 * @return The launchStage. */ @java.lang.Deprecated @@ -633,6 +633,85 @@ public interface MetricDescriptorMetadataOrBuilder * .google.protobuf.Duration ingest_delay = 3; */ com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder(); + + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the timeSeriesResourceHierarchyLevel. + */ + java.util.List< + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel> + getTimeSeriesResourceHierarchyLevelList(); + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return The count of timeSeriesResourceHierarchyLevel. + */ + int getTimeSeriesResourceHierarchyLevelCount(); + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the element to return. + * @return The timeSeriesResourceHierarchyLevel at the given index. + */ + com.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + getTimeSeriesResourceHierarchyLevel(int index); + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the enum numeric values on the wire for + * timeSeriesResourceHierarchyLevel. + */ + java.util.List getTimeSeriesResourceHierarchyLevelValueList(); + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of timeSeriesResourceHierarchyLevel at the given + * index. + */ + int getTimeSeriesResourceHierarchyLevelValue(int index); } /** * @@ -655,6 +734,7 @@ private MetricDescriptorMetadata(com.google.protobuf.GeneratedMessageV3.Builder< private MetricDescriptorMetadata() { launchStage_ = 0; + timeSeriesResourceHierarchyLevel_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -678,6 +758,193 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder.class); } + /** + * + * + *
+     * The resource hierarchy level of the timeseries data of a metric.
+     * 
+ * + * Protobuf enum {@code + * google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel} + */ + public enum TimeSeriesResourceHierarchyLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Do not use this default value.
+       * 
+ * + * TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0; + */ + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+       * Scopes a metric to a project.
+       * 
+ * + * PROJECT = 1; + */ + PROJECT(1), + /** + * + * + *
+       * Scopes a metric to an organization.
+       * 
+ * + * ORGANIZATION = 2; + */ + ORGANIZATION(2), + /** + * + * + *
+       * Scopes a metric to a folder.
+       * 
+ * + * FOLDER = 3; + */ + FOLDER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Do not use this default value.
+       * 
+ * + * TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0; + */ + public static final int TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Scopes a metric to a project.
+       * 
+ * + * PROJECT = 1; + */ + public static final int PROJECT_VALUE = 1; + /** + * + * + *
+       * Scopes a metric to an organization.
+       * 
+ * + * ORGANIZATION = 2; + */ + public static final int ORGANIZATION_VALUE = 2; + /** + * + * + *
+       * Scopes a metric to a folder.
+       * 
+ * + * FOLDER = 3; + */ + public static final int FOLDER_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TimeSeriesResourceHierarchyLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TimeSeriesResourceHierarchyLevel forNumber(int value) { + switch (value) { + case 0: + return TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED; + case 1: + return PROJECT; + case 2: + return ORGANIZATION; + case 3: + return FOLDER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap< + TimeSeriesResourceHierarchyLevel> + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TimeSeriesResourceHierarchyLevel findValueByNumber(int number) { + return TimeSeriesResourceHierarchyLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TimeSeriesResourceHierarchyLevel[] VALUES = values(); + + public static TimeSeriesResourceHierarchyLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TimeSeriesResourceHierarchyLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel) + } + private int bitField0_; public static final int LAUNCH_STAGE_FIELD_NUMBER = 1; private int launchStage_ = 0; @@ -693,7 +960,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. - * See google/api/metric.proto;l=85 + * See google/api/metric.proto;l=100 * @return The enum numeric value on the wire for launchStage. */ @java.lang.Override @@ -713,7 +980,7 @@ public int getLaunchStageValue() { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. - * See google/api/metric.proto;l=85 + * See google/api/metric.proto;l=100 * @return The launchStage. */ @java.lang.Override @@ -838,6 +1105,135 @@ public com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder() { : ingestDelay_; } + public static final int TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List timeSeriesResourceHierarchyLevel_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel> + timeSeriesResourceHierarchyLevel_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel>() { + public com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel + convert(java.lang.Integer from) { + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel + result = + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel.forNumber(from); + return result == null + ? com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the timeSeriesResourceHierarchyLevel. + */ + @java.lang.Override + public java.util.List< + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel> + getTimeSeriesResourceHierarchyLevelList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel>( + timeSeriesResourceHierarchyLevel_, timeSeriesResourceHierarchyLevel_converter_); + } + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return The count of timeSeriesResourceHierarchyLevel. + */ + @java.lang.Override + public int getTimeSeriesResourceHierarchyLevelCount() { + return timeSeriesResourceHierarchyLevel_.size(); + } + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the element to return. + * @return The timeSeriesResourceHierarchyLevel at the given index. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + getTimeSeriesResourceHierarchyLevel(int index) { + return timeSeriesResourceHierarchyLevel_converter_.convert( + timeSeriesResourceHierarchyLevel_.get(index)); + } + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the enum numeric values on the wire for + * timeSeriesResourceHierarchyLevel. + */ + @java.lang.Override + public java.util.List getTimeSeriesResourceHierarchyLevelValueList() { + return timeSeriesResourceHierarchyLevel_; + } + /** + * + * + *
+     * The scope of the timeseries data of the metric.
+     * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of timeSeriesResourceHierarchyLevel at the given + * index. + */ + @java.lang.Override + public int getTimeSeriesResourceHierarchyLevelValue(int index) { + return timeSeriesResourceHierarchyLevel_.get(index); + } + + private int timeSeriesResourceHierarchyLevelMemoizedSerializedSize; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -852,6 +1248,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { output.writeEnum(1, launchStage_); } @@ -861,6 +1258,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getIngestDelay()); } + if (getTimeSeriesResourceHierarchyLevelList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(timeSeriesResourceHierarchyLevelMemoizedSerializedSize); + } + for (int i = 0; i < timeSeriesResourceHierarchyLevel_.size(); i++) { + output.writeEnumNoTag(timeSeriesResourceHierarchyLevel_.get(i)); + } getUnknownFields().writeTo(output); } @@ -879,6 +1283,20 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIngestDelay()); } + { + int dataSize = 0; + for (int i = 0; i < timeSeriesResourceHierarchyLevel_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + timeSeriesResourceHierarchyLevel_.get(i)); + } + size += dataSize; + if (!getTimeSeriesResourceHierarchyLevelList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + timeSeriesResourceHierarchyLevelMemoizedSerializedSize = dataSize; + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -904,6 +1322,8 @@ public boolean equals(final java.lang.Object obj) { if (hasIngestDelay()) { if (!getIngestDelay().equals(other.getIngestDelay())) return false; } + if (!timeSeriesResourceHierarchyLevel_.equals(other.timeSeriesResourceHierarchyLevel_)) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -925,6 +1345,10 @@ public int hashCode() { hash = (37 * hash) + INGEST_DELAY_FIELD_NUMBER; hash = (53 * hash) + getIngestDelay().hashCode(); } + if (getTimeSeriesResourceHierarchyLevelCount() > 0) { + hash = (37 * hash) + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + timeSeriesResourceHierarchyLevel_.hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1088,6 +1512,8 @@ public Builder clear() { ingestDelayBuilder_.dispose(); ingestDelayBuilder_ = null; } + timeSeriesResourceHierarchyLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1115,6 +1541,7 @@ public com.google.api.MetricDescriptor.MetricDescriptorMetadata build() { public com.google.api.MetricDescriptor.MetricDescriptorMetadata buildPartial() { com.google.api.MetricDescriptor.MetricDescriptorMetadata result = new com.google.api.MetricDescriptor.MetricDescriptorMetadata(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1122,6 +1549,16 @@ public com.google.api.MetricDescriptor.MetricDescriptorMetadata buildPartial() { return result; } + private void buildPartialRepeatedFields( + com.google.api.MetricDescriptor.MetricDescriptorMetadata result) { + if (((bitField0_ & 0x00000008) != 0)) { + timeSeriesResourceHierarchyLevel_ = + java.util.Collections.unmodifiableList(timeSeriesResourceHierarchyLevel_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.timeSeriesResourceHierarchyLevel_ = timeSeriesResourceHierarchyLevel_; + } + private void buildPartial0(com.google.api.MetricDescriptor.MetricDescriptorMetadata result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -1198,6 +1635,16 @@ public Builder mergeFrom(com.google.api.MetricDescriptor.MetricDescriptorMetadat if (other.hasIngestDelay()) { mergeIngestDelay(other.getIngestDelay()); } + if (!other.timeSeriesResourceHierarchyLevel_.isEmpty()) { + if (timeSeriesResourceHierarchyLevel_.isEmpty()) { + timeSeriesResourceHierarchyLevel_ = other.timeSeriesResourceHierarchyLevel_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.addAll(other.timeSeriesResourceHierarchyLevel_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1242,6 +1689,25 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.add(tmpRaw); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1274,7 +1740,7 @@ public Builder mergeFrom( * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is - * deprecated. See google/api/metric.proto;l=85 + * deprecated. See google/api/metric.proto;l=100 * @return The enum numeric value on the wire for launchStage. */ @java.lang.Override @@ -1294,7 +1760,7 @@ public int getLaunchStageValue() { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is - * deprecated. See google/api/metric.proto;l=85 + * deprecated. See google/api/metric.proto;l=100 * @param value The enum numeric value on the wire for launchStage to set. * @return This builder for chaining. */ @@ -1317,7 +1783,7 @@ public Builder setLaunchStageValue(int value) { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is - * deprecated. See google/api/metric.proto;l=85 + * deprecated. See google/api/metric.proto;l=100 * @return The launchStage. */ @java.lang.Override @@ -1338,7 +1804,7 @@ public com.google.api.LaunchStage getLaunchStage() { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is - * deprecated. See google/api/metric.proto;l=85 + * deprecated. See google/api/metric.proto;l=100 * @param value The launchStage to set. * @return This builder for chaining. */ @@ -1364,7 +1830,7 @@ public Builder setLaunchStage(com.google.api.LaunchStage value) { * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; * * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is - * deprecated. See google/api/metric.proto;l=85 + * deprecated. See google/api/metric.proto;l=100 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1790,6 +2256,278 @@ public com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder() { return ingestDelayBuilder_; } + private java.util.List timeSeriesResourceHierarchyLevel_ = + java.util.Collections.emptyList(); + + private void ensureTimeSeriesResourceHierarchyLevelIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + timeSeriesResourceHierarchyLevel_ = + new java.util.ArrayList(timeSeriesResourceHierarchyLevel_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the timeSeriesResourceHierarchyLevel. + */ + public java.util.List< + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel> + getTimeSeriesResourceHierarchyLevelList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel>( + timeSeriesResourceHierarchyLevel_, timeSeriesResourceHierarchyLevel_converter_); + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return The count of timeSeriesResourceHierarchyLevel. + */ + public int getTimeSeriesResourceHierarchyLevelCount() { + return timeSeriesResourceHierarchyLevel_.size(); + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the element to return. + * @return The timeSeriesResourceHierarchyLevel at the given index. + */ + public com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel + getTimeSeriesResourceHierarchyLevel(int index) { + return timeSeriesResourceHierarchyLevel_converter_.convert( + timeSeriesResourceHierarchyLevel_.get(index)); + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index to set the value at. + * @param value The timeSeriesResourceHierarchyLevel to set. + * @return This builder for chaining. + */ + public Builder setTimeSeriesResourceHierarchyLevel( + int index, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param value The timeSeriesResourceHierarchyLevel to add. + * @return This builder for chaining. + */ + public Builder addTimeSeriesResourceHierarchyLevel( + com.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param values The timeSeriesResourceHierarchyLevel to add. + * @return This builder for chaining. + */ + public Builder addAllTimeSeriesResourceHierarchyLevel( + java.lang.Iterable< + ? extends + com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel> + values) { + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + for (com.google.api.MetricDescriptor.MetricDescriptorMetadata + .TimeSeriesResourceHierarchyLevel + value : values) { + timeSeriesResourceHierarchyLevel_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearTimeSeriesResourceHierarchyLevel() { + timeSeriesResourceHierarchyLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @return A list containing the enum numeric values on the wire for + * timeSeriesResourceHierarchyLevel. + */ + public java.util.List getTimeSeriesResourceHierarchyLevelValueList() { + return java.util.Collections.unmodifiableList(timeSeriesResourceHierarchyLevel_); + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of timeSeriesResourceHierarchyLevel at the given + * index. + */ + public int getTimeSeriesResourceHierarchyLevelValue(int index) { + return timeSeriesResourceHierarchyLevel_.get(index); + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for timeSeriesResourceHierarchyLevel to + * set. + * @return This builder for chaining. + */ + public Builder setTimeSeriesResourceHierarchyLevelValue(int index, int value) { + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param value The enum numeric value on the wire for timeSeriesResourceHierarchyLevel to + * add. + * @return This builder for chaining. + */ + public Builder addTimeSeriesResourceHierarchyLevelValue(int value) { + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + timeSeriesResourceHierarchyLevel_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The scope of the timeseries data of the metric.
+       * 
+ * + * + * repeated .google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel time_series_resource_hierarchy_level = 4; + * + * + * @param values The enum numeric values on the wire for timeSeriesResourceHierarchyLevel to + * add. + * @return This builder for chaining. + */ + public Builder addAllTimeSeriesResourceHierarchyLevelValue( + java.lang.Iterable values) { + ensureTimeSeriesResourceHierarchyLevelIsMutable(); + for (int value : values) { + timeSeriesResourceHierarchyLevel_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricProto.java index 7d5c033fd1..6e2edfdbea 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/MetricProto.java @@ -56,7 +56,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n\027google/api/metric.proto\022\ngoogle.api\032\026g" + "oogle/api/label.proto\032\035google/api/launch" + "_stage.proto\032\036google/protobuf/duration.p" - + "roto\"\237\006\n\020MetricDescriptor\022\014\n\004name\030\001 \001(\t\022" + + "roto\"\254\010\n\020MetricDescriptor\022\014\n\004name\030\001 \001(\t\022" + "\014\n\004type\030\010 \001(\t\022+\n\006labels\030\002 \003(\0132\033.google.a" + "pi.LabelDescriptor\022<\n\013metric_kind\030\003 \001(\0162" + "\'.google.api.MetricDescriptor.MetricKind" @@ -66,22 +66,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010metadata\030\n \001(\01325.google.api.MetricDescr" + "iptor.MetricDescriptorMetadata\022-\n\014launch" + "_stage\030\014 \001(\0162\027.google.api.LaunchStage\022 \n" - + "\030monitored_resource_types\030\r \003(\t\032\260\001\n\030Metr" + + "\030monitored_resource_types\030\r \003(\t\032\275\003\n\030Metr" + "icDescriptorMetadata\0221\n\014launch_stage\030\001 \001" + "(\0162\027.google.api.LaunchStageB\002\030\001\0220\n\rsampl" + "e_period\030\002 \001(\0132\031.google.protobuf.Duratio" + "n\022/\n\014ingest_delay\030\003 \001(\0132\031.google.protobu" - + "f.Duration\"O\n\nMetricKind\022\033\n\027METRIC_KIND_" - + "UNSPECIFIED\020\000\022\t\n\005GAUGE\020\001\022\t\n\005DELTA\020\002\022\016\n\nC" - + "UMULATIVE\020\003\"q\n\tValueType\022\032\n\026VALUE_TYPE_U" - + "NSPECIFIED\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\n\n\006DOU" - + "BLE\020\003\022\n\n\006STRING\020\004\022\020\n\014DISTRIBUTION\020\005\022\t\n\005M" - + "ONEY\020\006\"u\n\006Metric\022\014\n\004type\030\003 \001(\t\022.\n\006labels" - + "\030\002 \003(\0132\036.google.api.Metric.LabelsEntry\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001B_\n\016com.google.apiB\013MetricProtoP\001Z7" - + "google.golang.org/genproto/googleapis/ap" - + "i/metric;metric\242\002\004GAPIb\006proto3" + + "f.Duration\022\204\001\n$time_series_resource_hier" + + "archy_level\030\004 \003(\0162V.google.api.MetricDes" + + "criptor.MetricDescriptorMetadata.TimeSer" + + "iesResourceHierarchyLevel\"\203\001\n TimeSeries" + + "ResourceHierarchyLevel\0224\n0TIME_SERIES_RE" + + "SOURCE_HIERARCHY_LEVEL_UNSPECIFIED\020\000\022\013\n\007" + + "PROJECT\020\001\022\020\n\014ORGANIZATION\020\002\022\n\n\006FOLDER\020\003\"" + + "O\n\nMetricKind\022\033\n\027METRIC_KIND_UNSPECIFIED" + + "\020\000\022\t\n\005GAUGE\020\001\022\t\n\005DELTA\020\002\022\016\n\nCUMULATIVE\020\003" + + "\"q\n\tValueType\022\032\n\026VALUE_TYPE_UNSPECIFIED\020" + + "\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\n\n\006DOUBLE\020\003\022\n\n\006ST" + + "RING\020\004\022\020\n\014DISTRIBUTION\020\005\022\t\n\005MONEY\020\006\"u\n\006M" + + "etric\022\014\n\004type\030\003 \001(\t\022.\n\006labels\030\002 \003(\0132\036.go" + + "ogle.api.Metric.LabelsEntry\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B_\n\016co" + + "m.google.apiB\013MetricProtoP\001Z7google.gola" + + "ng.org/genproto/googleapis/api/metric;me" + + "tric\242\002\004GAPIb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -115,7 +122,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor, new java.lang.String[] { - "LaunchStage", "SamplePeriod", "IngestDelay", + "LaunchStage", "SamplePeriod", "IngestDelay", "TimeSeriesResourceHierarchyLevel", }); internal_static_google_api_Metric_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_api_Metric_fieldAccessorTable = diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGeneration.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGeneration.java new file mode 100644 index 0000000000..f231a2494d --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGeneration.java @@ -0,0 +1,733 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +// Protobuf Java Version: 3.25.5 +package com.google.api; + +/** + * + * + *
+ * This message is used to configure the generation of a subset of the RPCs in
+ * a service for client libraries.
+ * 
+ * + * Protobuf type {@code google.api.SelectiveGapicGeneration} + */ +public final class SelectiveGapicGeneration extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.SelectiveGapicGeneration) + SelectiveGapicGenerationOrBuilder { + private static final long serialVersionUID = 0L; + // Use SelectiveGapicGeneration.newBuilder() to construct. + private SelectiveGapicGeneration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SelectiveGapicGeneration() { + methods_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SelectiveGapicGeneration(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto + .internal_static_google_api_SelectiveGapicGeneration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_SelectiveGapicGeneration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.SelectiveGapicGeneration.class, + com.google.api.SelectiveGapicGeneration.Builder.class); + } + + public static final int METHODS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList methods_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @return A list containing the methods. + */ + public com.google.protobuf.ProtocolStringList getMethodsList() { + return methods_; + } + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @return The count of methods. + */ + public int getMethodsCount() { + return methods_.size(); + } + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @param index The index of the element to return. + * @return The methods at the given index. + */ + public java.lang.String getMethods(int index) { + return methods_.get(index); + } + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @param index The index of the value to return. + * @return The bytes of the methods at the given index. + */ + public com.google.protobuf.ByteString getMethodsBytes(int index) { + return methods_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < methods_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, methods_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < methods_.size(); i++) { + dataSize += computeStringSizeNoTag(methods_.getRaw(i)); + } + size += dataSize; + size += 1 * getMethodsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.SelectiveGapicGeneration)) { + return super.equals(obj); + } + com.google.api.SelectiveGapicGeneration other = (com.google.api.SelectiveGapicGeneration) obj; + + if (!getMethodsList().equals(other.getMethodsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMethodsCount() > 0) { + hash = (37 * hash) + METHODS_FIELD_NUMBER; + hash = (53 * hash) + getMethodsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.SelectiveGapicGeneration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.SelectiveGapicGeneration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.SelectiveGapicGeneration parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.SelectiveGapicGeneration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.SelectiveGapicGeneration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * This message is used to configure the generation of a subset of the RPCs in
+   * a service for client libraries.
+   * 
+ * + * Protobuf type {@code google.api.SelectiveGapicGeneration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.SelectiveGapicGeneration) + com.google.api.SelectiveGapicGenerationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto + .internal_static_google_api_SelectiveGapicGeneration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_SelectiveGapicGeneration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.SelectiveGapicGeneration.class, + com.google.api.SelectiveGapicGeneration.Builder.class); + } + + // Construct using com.google.api.SelectiveGapicGeneration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + methods_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto + .internal_static_google_api_SelectiveGapicGeneration_descriptor; + } + + @java.lang.Override + public com.google.api.SelectiveGapicGeneration getDefaultInstanceForType() { + return com.google.api.SelectiveGapicGeneration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.SelectiveGapicGeneration build() { + com.google.api.SelectiveGapicGeneration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.SelectiveGapicGeneration buildPartial() { + com.google.api.SelectiveGapicGeneration result = + new com.google.api.SelectiveGapicGeneration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.SelectiveGapicGeneration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + methods_.makeImmutable(); + result.methods_ = methods_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.SelectiveGapicGeneration) { + return mergeFrom((com.google.api.SelectiveGapicGeneration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.SelectiveGapicGeneration other) { + if (other == com.google.api.SelectiveGapicGeneration.getDefaultInstance()) return this; + if (!other.methods_.isEmpty()) { + if (methods_.isEmpty()) { + methods_ = other.methods_; + bitField0_ |= 0x00000001; + } else { + ensureMethodsIsMutable(); + methods_.addAll(other.methods_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMethodsIsMutable(); + methods_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList methods_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMethodsIsMutable() { + if (!methods_.isModifiable()) { + methods_ = new com.google.protobuf.LazyStringArrayList(methods_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @return A list containing the methods. + */ + public com.google.protobuf.ProtocolStringList getMethodsList() { + methods_.makeImmutable(); + return methods_; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @return The count of methods. + */ + public int getMethodsCount() { + return methods_.size(); + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param index The index of the element to return. + * @return The methods at the given index. + */ + public java.lang.String getMethods(int index) { + return methods_.get(index); + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param index The index of the value to return. + * @return The bytes of the methods at the given index. + */ + public com.google.protobuf.ByteString getMethodsBytes(int index) { + return methods_.getByteString(index); + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param index The index to set the value at. + * @param value The methods to set. + * @return This builder for chaining. + */ + public Builder setMethods(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param value The methods to add. + * @return This builder for chaining. + */ + public Builder addMethods(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodsIsMutable(); + methods_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param values The methods to add. + * @return This builder for chaining. + */ + public Builder addAllMethods(java.lang.Iterable values) { + ensureMethodsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, methods_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @return This builder for chaining. + */ + public Builder clearMethods() { + methods_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * An allowlist of the fully qualified names of RPCs that should be included
+     * on public client surfaces.
+     * 
+ * + * repeated string methods = 1; + * + * @param value The bytes of the methods to add. + * @return This builder for chaining. + */ + public Builder addMethodsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMethodsIsMutable(); + methods_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.SelectiveGapicGeneration) + } + + // @@protoc_insertion_point(class_scope:google.api.SelectiveGapicGeneration) + private static final com.google.api.SelectiveGapicGeneration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.SelectiveGapicGeneration(); + } + + public static com.google.api.SelectiveGapicGeneration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelectiveGapicGeneration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.SelectiveGapicGeneration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGenerationOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGenerationOrBuilder.java new file mode 100644 index 0000000000..c157207ff4 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/SelectiveGapicGenerationOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +// Protobuf Java Version: 3.25.5 +package com.google.api; + +public interface SelectiveGapicGenerationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.SelectiveGapicGeneration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @return A list containing the methods. + */ + java.util.List getMethodsList(); + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @return The count of methods. + */ + int getMethodsCount(); + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @param index The index of the element to return. + * @return The methods at the given index. + */ + java.lang.String getMethods(int index); + /** + * + * + *
+   * An allowlist of the fully qualified names of RPCs that should be included
+   * on public client surfaces.
+   * 
+ * + * repeated string methods = 1; + * + * @param index The index of the value to return. + * @return The bytes of the methods at the given index. + */ + com.google.protobuf.ByteString getMethodsBytes(int index); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto index 211575880c..7ba1db3da0 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto @@ -124,6 +124,9 @@ message CommonLanguageSettings { // The destination where API teams want this client library to be published. repeated ClientLibraryDestination destinations = 2; + + // Configuration for which RPCs should be generated in the GAPIC client. + SelectiveGapicGeneration selective_gapic_generation = 3; } // Details about how and where to publish client libraries. @@ -443,3 +446,11 @@ enum ClientLibraryDestination { // Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20; } + +// This message is used to configure the generation of a subset of the RPCs in +// a service for client libraries. +message SelectiveGapicGeneration { + // An allowlist of the fully qualified names of RPCs that should be included + // on public client surfaces. + repeated string methods = 1; +} diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/error_reason.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/error_reason.proto index a5a8ca57c8..e442c7b305 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/error_reason.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/error_reason.proto @@ -586,4 +586,37 @@ enum ErrorReason { // "locations/asia-northeast3" violates at least one location policy. // The troubleshooting guidance is provided in the Help links. LOCATION_POLICY_VIOLATED = 31; + + // The request is denied because origin request header is missing. + // + // Example of an ErrorInfo when + // accessing "pubsub.googleapis.com" service with an empty "Origin" request + // header. + // + // { + // reason: "MISSING_ORIGIN" + // domain: "googleapis.com" + // metadata { + // "consumer":"projects/123456" + // "service": "pubsub.googleapis.com" + // } + // } + MISSING_ORIGIN = 33; + + // The request is denied because the request contains more than one credential + // type that are individually acceptable, but not together. The customer + // should retry their request with only one set of credentials. + // + // Example of an ErrorInfo when + // accessing "pubsub.googleapis.com" service with overloaded credentials. + // + // { + // reason: "OVERLOADED_CREDENTIALS" + // domain: "googleapis.com" + // metadata { + // "consumer":"projects/123456" + // "service": "pubsub.googleapis.com" + // } + // } + OVERLOADED_CREDENTIALS = 34; } diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/metric.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/metric.proto index 126f526cd0..c393a421c5 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/metric.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/metric.proto @@ -80,6 +80,21 @@ message MetricDescriptor { // Additional annotations that can be used to guide the usage of a metric. message MetricDescriptorMetadata { + // The resource hierarchy level of the timeseries data of a metric. + enum TimeSeriesResourceHierarchyLevel { + // Do not use this default value. + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0; + + // Scopes a metric to a project. + PROJECT = 1; + + // Scopes a metric to an organization. + ORGANIZATION = 2; + + // Scopes a metric to a folder. + FOLDER = 3; + } + // Deprecated. Must use the // [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage] // instead. @@ -95,6 +110,10 @@ message MetricDescriptor { // age are guaranteed to be ingested and available to be read, excluding // data loss due to errors. google.protobuf.Duration ingest_delay = 3; + + // The scope of the timeseries data of the metric. + repeated TimeSeriesResourceHierarchyLevel + time_series_resource_hierarchy_level = 4; } // The resource name of the metric descriptor. diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/policy.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/policy.proto index 25b75f3a47..f55e0cae3f 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/policy.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/policy.proto @@ -25,16 +25,14 @@ option java_outer_classname = "PolicyProto"; option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; -// Provides `google.api.field_policy` annotation at proto fields. extend google.protobuf.FieldOptions { // See [FieldPolicy][]. - FieldPolicy field_policy = 158361448; + google.api.FieldPolicy field_policy = 158361448; } -// Provides `google.api.method_policy` annotation at proto methods. extend google.protobuf.MethodOptions { // See [MethodPolicy][]. - MethodPolicy method_policy = 161893301; + google.api.MethodPolicy method_policy = 161893301; } // Google API Policy Annotation