From 6c1768eb932b44400feae11bfbbf5403b24b5862 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Tue, 5 May 2026 14:19:40 -0400 Subject: [PATCH 1/3] chore(java-bigquerydatapolicy): update api_description for bigquerydatapolicy --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 1f990ecb3540..fcb9e0d3e356 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -391,7 +391,7 @@ libraries: - api_shortname: bigquerydatapolicy name_pretty: BigQuery DataPolicy API product_documentation: https://cloud.google.com/bigquery/docs/reference/datapolicy/ - api_description: '' + api_description: Allows users to manage BigQuery data policies. GAPICs: - proto_path: google/cloud/bigquery/datapolicies/v1 - proto_path: google/cloud/bigquery/datapolicies/v1beta1 From 6c18159959e8d26799b156f112cda218717459d6 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 5 May 2026 18:31:53 +0000 Subject: [PATCH 2/3] chore: generate libraries at Tue May 5 18:29:47 UTC 2026 --- java-bigquerydatapolicy/.repo-metadata.json | 2 +- java-bigquerydatapolicy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java-bigquerydatapolicy/.repo-metadata.json b/java-bigquerydatapolicy/.repo-metadata.json index 54a9a50993c6..7a98b66e657d 100644 --- a/java-bigquerydatapolicy/.repo-metadata.json +++ b/java-bigquerydatapolicy/.repo-metadata.json @@ -2,7 +2,7 @@ "api_shortname": "bigquerydatapolicy", "name_pretty": "BigQuery DataPolicy API", "product_documentation": "https://cloud.google.com/bigquery/docs/reference/datapolicy/", - "api_description": "", + "api_description": "Allows users to manage BigQuery data policies.", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-bigquerydatapolicy/latest/overview", "release_level": "preview", "transport": "both", diff --git a/java-bigquerydatapolicy/README.md b/java-bigquerydatapolicy/README.md index 9ef74c570b47..7f8835b2db05 100644 --- a/java-bigquerydatapolicy/README.md +++ b/java-bigquerydatapolicy/README.md @@ -87,7 +87,7 @@ to add `google-cloud-bigquerydatapolicy` as a dependency in your code. ## About BigQuery DataPolicy API -[BigQuery DataPolicy API][product-docs] +[BigQuery DataPolicy API][product-docs] Allows users to manage BigQuery data policies. See the [BigQuery DataPolicy API client library docs][javadocs] to learn how to use this BigQuery DataPolicy API Client Library. From f91d2fca213cbb541ef3c782bdec93f58730dc1d Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 5 May 2026 18:38:30 +0000 Subject: [PATCH 3/3] chore: generate libraries at Tue May 5 18:35:51 UTC 2026 --- .../main/java/com/google/rpc/HttpHeader.java | 774 +++++++++ .../com/google/rpc/HttpHeaderOrBuilder.java | 80 + .../main/java/com/google/rpc/HttpProto.java | 112 ++ .../main/java/com/google/rpc/HttpRequest.java | 1403 +++++++++++++++++ .../com/google/rpc/HttpRequestOrBuilder.java | 153 ++ .../java/com/google/rpc/HttpResponse.java | 1311 +++++++++++++++ .../com/google/rpc/HttpResponseOrBuilder.java | 140 ++ .../src/main/proto/google/rpc/http.proto | 64 + 8 files changed, 4037 insertions(+) create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeader.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeaderOrBuilder.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpProto.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequest.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequestOrBuilder.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponse.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponseOrBuilder.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/proto/google/rpc/http.proto diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeader.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeader.java new file mode 100644 index 000000000000..02ac888729c4 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeader.java @@ -0,0 +1,774 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +/** + * + * + *
+ * Represents an HTTP header.
+ * 
+ * + * Protobuf type {@code google.rpc.HttpHeader} + */ +@com.google.protobuf.Generated +public final class HttpHeader extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.rpc.HttpHeader) + HttpHeaderOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HttpHeader"); + } + + // Use HttpHeader.newBuilder() to construct. + private HttpHeader(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HttpHeader() { + key_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpHeader.class, com.google.rpc.HttpHeader.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+   * The HTTP header key. It is case insensitive.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + + /** + * + * + *
+   * The HTTP header key. It is case insensitive.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+   * The HTTP header value.
+   * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + + /** + * + * + *
+   * The HTTP header value.
+   * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + 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.rpc.HttpHeader)) { + return super.equals(obj); + } + com.google.rpc.HttpHeader other = (com.google.rpc.HttpHeader) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) 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(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.rpc.HttpHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpHeader parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpHeader 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.rpc.HttpHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpHeader parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.rpc.HttpHeader 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents an HTTP header.
+   * 
+ * + * Protobuf type {@code google.rpc.HttpHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.rpc.HttpHeader) + com.google.rpc.HttpHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpHeader.class, com.google.rpc.HttpHeader.Builder.class); + } + + // Construct using com.google.rpc.HttpHeader.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpHeader_descriptor; + } + + @java.lang.Override + public com.google.rpc.HttpHeader getDefaultInstanceForType() { + return com.google.rpc.HttpHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.rpc.HttpHeader build() { + com.google.rpc.HttpHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.rpc.HttpHeader buildPartial() { + com.google.rpc.HttpHeader result = new com.google.rpc.HttpHeader(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.rpc.HttpHeader result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.HttpHeader) { + return mergeFrom((com.google.rpc.HttpHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.HttpHeader other) { + if (other == com.google.rpc.HttpHeader.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 java.lang.Object key_ = ""; + + /** + * + * + *
+     * The HTTP header key. It is case insensitive.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The HTTP header key. It is case insensitive.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The HTTP header key. It is case insensitive.
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP header key. It is case insensitive.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP header key. It is case insensitive.
+     * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+     * The HTTP header value.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The HTTP header value.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The HTTP header value.
+     * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP header value.
+     * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP header value.
+     * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.rpc.HttpHeader) + } + + // @@protoc_insertion_point(class_scope:google.rpc.HttpHeader) + private static final com.google.rpc.HttpHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.rpc.HttpHeader(); + } + + public static com.google.rpc.HttpHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpHeader 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.rpc.HttpHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeaderOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeaderOrBuilder.java new file mode 100644 index 000000000000..c7a220803955 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpHeaderOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +@com.google.protobuf.Generated +public interface HttpHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.rpc.HttpHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The HTTP header key. It is case insensitive.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+   * The HTTP header key. It is case insensitive.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * The HTTP header value.
+   * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+   * The HTTP header value.
+   * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpProto.java new file mode 100644 index 000000000000..03a4c4a55d16 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpProto.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +@com.google.protobuf.Generated +public final class HttpProto extends com.google.protobuf.GeneratedFile { + private HttpProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HttpProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_HttpRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_HttpRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_HttpResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_HttpResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_rpc_HttpHeader_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_rpc_HttpHeader_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "\025google/rpc/http.proto\022\n" + + "google.rpc\"a\n" + + "\013HttpRequest\022\016\n" + + "\006method\030\001 \001(\t\022\013\n" + + "\003uri\030\002 \001(\t\022\'\n" + + "\007headers\030\003 \003(\0132\026.google.rpc.HttpHeader\022\014\n" + + "\004body\030\004 \001(\014\"e\n" + + "\014HttpResponse\022\016\n" + + "\006status\030\001 \001(\005\022\016\n" + + "\006reason\030\002 \001(\t\022\'\n" + + "\007headers\030\003 \003(\0132\026.google.rpc.HttpHeader\022\014\n" + + "\004body\030\004 \001(\014\"(\n" + + "\n" + + "HttpHeader\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\tBX\n" + + "\016com.google.rpcB\tHttpProtoP\001Z3google.golang.org/genproto/googleapis/rpc/http;h" + + "ttp\242\002\003RPCb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_rpc_HttpRequest_descriptor = getDescriptor().getMessageType(0); + internal_static_google_rpc_HttpRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_HttpRequest_descriptor, + new java.lang.String[] { + "Method", "Uri", "Headers", "Body", + }); + internal_static_google_rpc_HttpResponse_descriptor = getDescriptor().getMessageType(1); + internal_static_google_rpc_HttpResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_HttpResponse_descriptor, + new java.lang.String[] { + "Status", "Reason", "Headers", "Body", + }); + internal_static_google_rpc_HttpHeader_descriptor = getDescriptor().getMessageType(2); + internal_static_google_rpc_HttpHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_rpc_HttpHeader_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequest.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequest.java new file mode 100644 index 000000000000..4932f84a31a2 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +/** + * + * + *
+ * Represents an HTTP request.
+ * 
+ * + * Protobuf type {@code google.rpc.HttpRequest} + */ +@com.google.protobuf.Generated +public final class HttpRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.rpc.HttpRequest) + HttpRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HttpRequest"); + } + + // Use HttpRequest.newBuilder() to construct. + private HttpRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HttpRequest() { + method_ = ""; + uri_ = ""; + headers_ = java.util.Collections.emptyList(); + body_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpRequest.class, com.google.rpc.HttpRequest.Builder.class); + } + + public static final int METHOD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + + /** + * + * + *
+   * The HTTP request method.
+   * 
+ * + * string method = 1; + * + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + + /** + * + * + *
+   * The HTTP request method.
+   * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The HTTP request URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The HTTP request URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List headers_; + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public java.util.List getHeadersList() { + return headers_; + } + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public java.util.List getHeadersOrBuilderList() { + return headers_; + } + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public com.google.rpc.HttpHeader getHeaders(int index) { + return headers_.get(index); + } + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index) { + return headers_.get(index); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The HTTP request body. If the body is not expected, it should be empty.
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + + 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, method_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(3, headers_.get(i)); + } + if (!body_.isEmpty()) { + output.writeBytes(4, body_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, method_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, headers_.get(i)); + } + if (!body_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, body_); + } + 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.rpc.HttpRequest)) { + return super.equals(obj); + } + com.google.rpc.HttpRequest other = (com.google.rpc.HttpRequest) obj; + + if (!getMethod().equals(other.getMethod())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getHeadersList().equals(other.getHeadersList())) return false; + if (!getBody().equals(other.getBody())) 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(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.rpc.HttpRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpRequest 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.rpc.HttpRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpRequest parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.rpc.HttpRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents an HTTP request.
+   * 
+ * + * Protobuf type {@code google.rpc.HttpRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.rpc.HttpRequest) + com.google.rpc.HttpRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpRequest.class, com.google.rpc.HttpRequest.Builder.class); + } + + // Construct using com.google.rpc.HttpRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + uri_ = ""; + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + } else { + headers_ = null; + headersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + body_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpRequest_descriptor; + } + + @java.lang.Override + public com.google.rpc.HttpRequest getDefaultInstanceForType() { + return com.google.rpc.HttpRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.rpc.HttpRequest build() { + com.google.rpc.HttpRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.rpc.HttpRequest buildPartial() { + com.google.rpc.HttpRequest result = new com.google.rpc.HttpRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.rpc.HttpRequest result) { + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + } + + private void buildPartial0(com.google.rpc.HttpRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.body_ = body_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.HttpRequest) { + return mergeFrom((com.google.rpc.HttpRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.HttpRequest other) { + if (other == com.google.rpc.HttpRequest.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000004); + headersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHeadersFieldBuilder() + : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + if (!other.getBody().isEmpty()) { + setBody(other.getBody()); + } + 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: + { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.rpc.HttpHeader m = + input.readMessage(com.google.rpc.HttpHeader.parser(), extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + body_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 java.lang.Object method_ = ""; + + /** + * + * + *
+     * The HTTP request method.
+     * 
+ * + * string method = 1; + * + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The HTTP request method.
+     * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + public com.google.protobuf.ByteString getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The HTTP request method.
+     * 
+ * + * string method = 1; + * + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP request method.
+     * 
+ * + * string method = 1; + * + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP request method.
+     * 
+ * + * string method = 1; + * + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * The HTTP request URI.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The HTTP request URI.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The HTTP request URI.
+     * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP request URI.
+     * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP request URI.
+     * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List headers_ = java.util.Collections.emptyList(); + + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + headers_ = new java.util.ArrayList(headers_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder> + headersBuilder_; + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder setHeaders(int index, com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder setHeaders(int index, com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(int index, com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(int index, com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addAllHeaders(java.lang.Iterable values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder getHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder addHeadersBuilder() { + return internalGetHeadersFieldBuilder() + .addBuilder(com.google.rpc.HttpHeader.getDefaultInstance()); + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder addHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder() + .addBuilder(index, com.google.rpc.HttpHeader.getDefaultInstance()); + } + + /** + * + * + *
+     * The HTTP request headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the request.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersBuilderList() { + return internalGetHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder> + internalGetHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder>( + headers_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + headers_ = null; + } + return headersBuilder_; + } + + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The HTTP request body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + + /** + * + * + *
+     * The HTTP request body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @param value The body to set. + * @return This builder for chaining. + */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP request body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @return This builder for chaining. + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000008); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.rpc.HttpRequest) + } + + // @@protoc_insertion_point(class_scope:google.rpc.HttpRequest) + private static final com.google.rpc.HttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.rpc.HttpRequest(); + } + + public static com.google.rpc.HttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpRequest 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.rpc.HttpRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequestOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequestOrBuilder.java new file mode 100644 index 000000000000..33ab318e832b --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +@com.google.protobuf.Generated +public interface HttpRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.rpc.HttpRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The HTTP request method.
+   * 
+ * + * string method = 1; + * + * @return The method. + */ + java.lang.String getMethod(); + + /** + * + * + *
+   * The HTTP request method.
+   * 
+ * + * string method = 1; + * + * @return The bytes for method. + */ + com.google.protobuf.ByteString getMethodBytes(); + + /** + * + * + *
+   * The HTTP request URI.
+   * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The HTTP request URI.
+   * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + java.util.List getHeadersList(); + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + com.google.rpc.HttpHeader getHeaders(int index); + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + int getHeadersCount(); + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + java.util.List getHeadersOrBuilderList(); + + /** + * + * + *
+   * The HTTP request headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the request.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index); + + /** + * + * + *
+   * The HTTP request body. If the body is not expected, it should be empty.
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + com.google.protobuf.ByteString getBody(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponse.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponse.java new file mode 100644 index 000000000000..8a3be7120421 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponse.java @@ -0,0 +1,1311 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +/** + * + * + *
+ * Represents an HTTP response.
+ * 
+ * + * Protobuf type {@code google.rpc.HttpResponse} + */ +@com.google.protobuf.Generated +public final class HttpResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.rpc.HttpResponse) + HttpResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HttpResponse"); + } + + // Use HttpResponse.newBuilder() to construct. + private HttpResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HttpResponse() { + reason_ = ""; + headers_ = java.util.Collections.emptyList(); + body_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpResponse.class, com.google.rpc.HttpResponse.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private int status_ = 0; + + /** + * + * + *
+   * The HTTP status code, such as 200 or 404.
+   * 
+ * + * int32 status = 1; + * + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + public static final int REASON_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + + /** + * + * + *
+   * The HTTP reason phrase, such as "OK" or "Not Found".
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } + } + + /** + * + * + *
+   * The HTTP reason phrase, such as "OK" or "Not Found".
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List headers_; + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public java.util.List getHeadersList() { + return headers_; + } + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public java.util.List getHeadersOrBuilderList() { + return headers_; + } + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public com.google.rpc.HttpHeader getHeaders(int index) { + return headers_.get(index); + } + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + @java.lang.Override + public com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index) { + return headers_.get(index); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The HTTP response body. If the body is not expected, it should be empty.
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + + 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 { + if (status_ != 0) { + output.writeInt32(1, status_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(reason_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, reason_); + } + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(3, headers_.get(i)); + } + if (!body_.isEmpty()) { + output.writeBytes(4, body_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, status_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(reason_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, reason_); + } + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, headers_.get(i)); + } + if (!body_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, body_); + } + 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.rpc.HttpResponse)) { + return super.equals(obj); + } + com.google.rpc.HttpResponse other = (com.google.rpc.HttpResponse) obj; + + if (getStatus() != other.getStatus()) return false; + if (!getReason().equals(other.getReason())) return false; + if (!getHeadersList().equals(other.getHeadersList())) return false; + if (!getBody().equals(other.getBody())) 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(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (37 * hash) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.rpc.HttpResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpResponse 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.rpc.HttpResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.rpc.HttpResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.rpc.HttpResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.rpc.HttpResponse parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.rpc.HttpResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.rpc.HttpResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents an HTTP response.
+   * 
+ * + * Protobuf type {@code google.rpc.HttpResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.rpc.HttpResponse) + com.google.rpc.HttpResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.rpc.HttpResponse.class, com.google.rpc.HttpResponse.Builder.class); + } + + // Construct using com.google.rpc.HttpResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = 0; + reason_ = ""; + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + } else { + headers_ = null; + headersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + body_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.rpc.HttpProto.internal_static_google_rpc_HttpResponse_descriptor; + } + + @java.lang.Override + public com.google.rpc.HttpResponse getDefaultInstanceForType() { + return com.google.rpc.HttpResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.rpc.HttpResponse build() { + com.google.rpc.HttpResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.rpc.HttpResponse buildPartial() { + com.google.rpc.HttpResponse result = new com.google.rpc.HttpResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.rpc.HttpResponse result) { + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + } + + private void buildPartial0(com.google.rpc.HttpResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reason_ = reason_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.body_ = body_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.rpc.HttpResponse) { + return mergeFrom((com.google.rpc.HttpResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.rpc.HttpResponse other) { + if (other == com.google.rpc.HttpResponse.getDefaultInstance()) return this; + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000004); + headersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHeadersFieldBuilder() + : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + if (!other.getBody().isEmpty()) { + setBody(other.getBody()); + } + 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 8: + { + status_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.rpc.HttpHeader m = + input.readMessage(com.google.rpc.HttpHeader.parser(), extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + body_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 int status_; + + /** + * + * + *
+     * The HTTP status code, such as 200 or 404.
+     * 
+ * + * int32 status = 1; + * + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + /** + * + * + *
+     * The HTTP status code, such as 200 or 404.
+     * 
+ * + * int32 status = 1; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP status code, such as 200 or 404.
+     * 
+ * + * int32 status = 1; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object reason_ = ""; + + /** + * + * + *
+     * The HTTP reason phrase, such as "OK" or "Not Found".
+     * 
+ * + * string reason = 2; + * + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The HTTP reason phrase, such as "OK" or "Not Found".
+     * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The HTTP reason phrase, such as "OK" or "Not Found".
+     * 
+ * + * string reason = 2; + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP reason phrase, such as "OK" or "Not Found".
+     * 
+ * + * string reason = 2; + * + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP reason phrase, such as "OK" or "Not Found".
+     * 
+ * + * string reason = 2; + * + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List headers_ = java.util.Collections.emptyList(); + + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + headers_ = new java.util.ArrayList(headers_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder> + headersBuilder_; + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder setHeaders(int index, com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder setHeaders(int index, com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(int index, com.google.rpc.HttpHeader value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addHeaders(int index, com.google.rpc.HttpHeader.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder addAllHeaders(java.lang.Iterable values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder getHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder addHeadersBuilder() { + return internalGetHeadersFieldBuilder() + .addBuilder(com.google.rpc.HttpHeader.getDefaultInstance()); + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public com.google.rpc.HttpHeader.Builder addHeadersBuilder(int index) { + return internalGetHeadersFieldBuilder() + .addBuilder(index, com.google.rpc.HttpHeader.getDefaultInstance()); + } + + /** + * + * + *
+     * The HTTP response headers. The ordering of the headers is significant.
+     * Multiple headers with the same key may present for the response.
+     * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + public java.util.List getHeadersBuilderList() { + return internalGetHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder> + internalGetHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.HttpHeader, + com.google.rpc.HttpHeader.Builder, + com.google.rpc.HttpHeaderOrBuilder>( + headers_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + headers_ = null; + } + return headersBuilder_; + } + + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The HTTP response body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + + /** + * + * + *
+     * The HTTP response body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @param value The body to set. + * @return This builder for chaining. + */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The HTTP response body. If the body is not expected, it should be empty.
+     * 
+ * + * bytes body = 4; + * + * @return This builder for chaining. + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000008); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.rpc.HttpResponse) + } + + // @@protoc_insertion_point(class_scope:google.rpc.HttpResponse) + private static final com.google.rpc.HttpResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.rpc.HttpResponse(); + } + + public static com.google.rpc.HttpResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpResponse 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.rpc.HttpResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponseOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponseOrBuilder.java new file mode 100644 index 000000000000..54a4eec03bc7 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/HttpResponseOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/rpc/http.proto +// Protobuf Java Version: 4.33.2 + +package com.google.rpc; + +@com.google.protobuf.Generated +public interface HttpResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.rpc.HttpResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The HTTP status code, such as 200 or 404.
+   * 
+ * + * int32 status = 1; + * + * @return The status. + */ + int getStatus(); + + /** + * + * + *
+   * The HTTP reason phrase, such as "OK" or "Not Found".
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + java.lang.String getReason(); + + /** + * + * + *
+   * The HTTP reason phrase, such as "OK" or "Not Found".
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + com.google.protobuf.ByteString getReasonBytes(); + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + java.util.List getHeadersList(); + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + com.google.rpc.HttpHeader getHeaders(int index); + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + int getHeadersCount(); + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + java.util.List getHeadersOrBuilderList(); + + /** + * + * + *
+   * The HTTP response headers. The ordering of the headers is significant.
+   * Multiple headers with the same key may present for the response.
+   * 
+ * + * repeated .google.rpc.HttpHeader headers = 3; + */ + com.google.rpc.HttpHeaderOrBuilder getHeadersOrBuilder(int index); + + /** + * + * + *
+   * The HTTP response body. If the body is not expected, it should be empty.
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + com.google.protobuf.ByteString getBody(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/rpc/http.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/rpc/http.proto new file mode 100644 index 000000000000..9d97b601d9fb --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/rpc/http.proto @@ -0,0 +1,64 @@ +// Copyright 2026 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 +// +// http://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. + +syntax = "proto3"; + +package google.rpc; + +option go_package = "google.golang.org/genproto/googleapis/rpc/http;http"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.rpc"; +option objc_class_prefix = "RPC"; + +// Represents an HTTP request. +message HttpRequest { + // The HTTP request method. + string method = 1; + + // The HTTP request URI. + string uri = 2; + + // The HTTP request headers. The ordering of the headers is significant. + // Multiple headers with the same key may present for the request. + repeated HttpHeader headers = 3; + + // The HTTP request body. If the body is not expected, it should be empty. + bytes body = 4; +} + +// Represents an HTTP response. +message HttpResponse { + // The HTTP status code, such as 200 or 404. + int32 status = 1; + + // The HTTP reason phrase, such as "OK" or "Not Found". + string reason = 2; + + // The HTTP response headers. The ordering of the headers is significant. + // Multiple headers with the same key may present for the response. + repeated HttpHeader headers = 3; + + // The HTTP response body. If the body is not expected, it should be empty. + bytes body = 4; +} + +// Represents an HTTP header. +message HttpHeader { + // The HTTP header key. It is case insensitive. + string key = 1; + + // The HTTP header value. + string value = 2; +}