Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [11, 17, 21, 24]
java: [11, 17, 21, 25]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- uses: googleapis/sdk-platform-java/.github/scripts@v2.62.2
- uses: googleapis/sdk-platform-java/.github/scripts@v2.62.3
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_generation_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# the branch into which the pull request is merged
base_branch: main
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-a.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.2" # {x-version-update:google-cloud-shared-dependencies:current}
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-b.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.2" # {x-version-update:google-cloud-shared-dependencies:current}
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-c.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.2" # {x-version-update:google-cloud-shared-dependencies:current}
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.52.3" # {x-version-update:google-cloud-shared-dependencies:current}
}

env_vars: {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.141.4</version>
<version>1.141.5</version>
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.68.0')
implementation platform('com.google.cloud:libraries-bom:26.69.0')
implementation 'com.google.cloud:google-cloud-pubsub'
```
Expand Down
6 changes: 3 additions & 3 deletions generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gapic_generator_version: 2.62.2
googleapis_commitish: 31b413bc4feb03f6849c718048c2b9998561b5fa
libraries_bom_version: 26.68.0
gapic_generator_version: 2.62.3
googleapis_commitish: 9070e63a1f574261c153ef6e94afc55677200337
libraries_bom_version: 26.69.0
libraries:
- api_shortname: pubsub
name_pretty: Cloud Pub/Sub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2406,6 +2406,7 @@ public final UnaryCallable<PullRequest, PullResponse> pullCallable() {
* .setClientId("clientId908408390")
* .setMaxOutstandingMessages(-1315266996)
* .setMaxOutstandingBytes(-2103098517)
* .setProtocolVersion(-1161610703)
* .build();
* bidiStream.send(request);
* for (StreamingPullResponse response : bidiStream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ public void streamingPullTest() throws Exception {
.setClientId("clientId908408390")
.setMaxOutstandingMessages(-1315266996)
.setMaxOutstandingBytes(-2103098517)
.setProtocolVersion(-1161610703)
.build();

MockStreamObserver<StreamingPullResponse> responseObserver = new MockStreamObserver<>();
Expand Down Expand Up @@ -1105,6 +1106,7 @@ public void streamingPullExceptionTest() throws Exception {
.setClientId("clientId908408390")
.setMaxOutstandingMessages(-1315266996)
.setMaxOutstandingBytes(-2103098517)
.setProtocolVersion(-1161610703)
.build();

MockStreamObserver<StreamingPullResponse> responseObserver = new MockStreamObserver<>();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,27 @@ public long getMaxOutstandingBytes() {
return maxOutstandingBytes_;
}

public static final int PROTOCOL_VERSION_FIELD_NUMBER = 10;
private long protocolVersion_ = 0L;

/**
*
*
* <pre>
* Optional. The protocol version used by the client. This property can only
* be set on the initial StreamingPullRequest. If it is set on a subsequent
* request, the stream will be aborted with status `INVALID_ARGUMENT`.
* </pre>
*
* <code>int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The protocolVersion.
*/
@java.lang.Override
public long getProtocolVersion() {
return protocolVersion_;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -575,6 +596,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (maxOutstandingBytes_ != 0L) {
output.writeInt64(8, maxOutstandingBytes_);
}
if (protocolVersion_ != 0L) {
output.writeInt64(10, protocolVersion_);
}
getUnknownFields().writeTo(output);
}

Expand Down Expand Up @@ -629,6 +653,9 @@ public int getSerializedSize() {
if (maxOutstandingBytes_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, maxOutstandingBytes_);
}
if (protocolVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, protocolVersion_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -653,6 +680,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getClientId().equals(other.getClientId())) return false;
if (getMaxOutstandingMessages() != other.getMaxOutstandingMessages()) return false;
if (getMaxOutstandingBytes() != other.getMaxOutstandingBytes()) return false;
if (getProtocolVersion() != other.getProtocolVersion()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
Expand Down Expand Up @@ -686,6 +714,8 @@ public int hashCode() {
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxOutstandingMessages());
hash = (37 * hash) + MAX_OUTSTANDING_BYTES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxOutstandingBytes());
hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProtocolVersion());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -836,6 +866,7 @@ public Builder clear() {
clientId_ = "";
maxOutstandingMessages_ = 0L;
maxOutstandingBytes_ = 0L;
protocolVersion_ = 0L;
return this;
}

Expand Down Expand Up @@ -899,6 +930,9 @@ private void buildPartial0(com.google.pubsub.v1.StreamingPullRequest result) {
if (((from_bitField0_ & 0x00000080) != 0)) {
result.maxOutstandingBytes_ = maxOutstandingBytes_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.protocolVersion_ = protocolVersion_;
}
}

@java.lang.Override
Expand Down Expand Up @@ -996,6 +1030,9 @@ public Builder mergeFrom(com.google.pubsub.v1.StreamingPullRequest other) {
if (other.getMaxOutstandingBytes() != 0L) {
setMaxOutstandingBytes(other.getMaxOutstandingBytes());
}
if (other.getProtocolVersion() != 0L) {
setProtocolVersion(other.getProtocolVersion());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
Expand Down Expand Up @@ -1084,6 +1121,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000080;
break;
} // case 64
case 80:
{
protocolVersion_ = input.readInt64();
bitField0_ |= 0x00000100;
break;
} // case 80
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -2262,6 +2305,68 @@ public Builder clearMaxOutstandingBytes() {
return this;
}

private long protocolVersion_;

/**
*
*
* <pre>
* Optional. The protocol version used by the client. This property can only
* be set on the initial StreamingPullRequest. If it is set on a subsequent
* request, the stream will be aborted with status `INVALID_ARGUMENT`.
* </pre>
*
* <code>int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The protocolVersion.
*/
@java.lang.Override
public long getProtocolVersion() {
return protocolVersion_;
}

/**
*
*
* <pre>
* Optional. The protocol version used by the client. This property can only
* be set on the initial StreamingPullRequest. If it is set on a subsequent
* request, the stream will be aborted with status `INVALID_ARGUMENT`.
* </pre>
*
* <code>int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @param value The protocolVersion to set.
* @return This builder for chaining.
*/
public Builder setProtocolVersion(long value) {

protocolVersion_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}

/**
*
*
* <pre>
* Optional. The protocol version used by the client. This property can only
* be set on the initial StreamingPullRequest. If it is set on a subsequent
* request, the stream will be aborted with status `INVALID_ARGUMENT`.
* </pre>
*
* <code>int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return This builder for chaining.
*/
public Builder clearProtocolVersion() {
bitField0_ = (bitField0_ & ~0x00000100);
protocolVersion_ = 0L;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,19 @@ public interface StreamingPullRequestOrBuilder
* @return The maxOutstandingBytes.
*/
long getMaxOutstandingBytes();

/**
*
*
* <pre>
* Optional. The protocol version used by the client. This property can only
* be set on the initial StreamingPullRequest. If it is set on a subsequent
* request, the stream will be aborted with status `INVALID_ARGUMENT`.
* </pre>
*
* <code>int64 protocol_version = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The protocolVersion.
*/
long getProtocolVersion();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,11 @@ message StreamingPullRequest {
// set on a subsequent request, the stream will be aborted with status
// `INVALID_ARGUMENT`.
int64 max_outstanding_bytes = 8 [(google.api.field_behavior) = OPTIONAL];

// Optional. The protocol version used by the client. This property can only
// be set on the initial StreamingPullRequest. If it is set on a subsequent
// request, the stream will be aborted with status `INVALID_ARGUMENT`.
int64 protocol_version = 10 [(google.api.field_behavior) = OPTIONAL];
}

// Response for the `StreamingPull` method. This response is used to stream
Expand Down