Skip to content

Commit 4ea18d9

Browse files
committed
Merge branch 'main' into feat/transfer-manager
2 parents d503e34 + 95b2356 commit 4ea18d9

File tree

121 files changed

+2514
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2514
-1328
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16-
digest: sha256:ad9cabee4c022f1aab04a71332369e0c23841062124818a4490f73337f790337
16+
digest: sha256:af2eda87a54601ae7b7b2be5055c17b43ac98a7805b586772db314de8a7d4a1d
17+
# created: 2023-06-16T02:10:09.149325782Z

.github/dependabot.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ updates:
55
schedule:
66
interval: "daily"
77
# Disable version updates for Maven dependencies
8-
open-pull-requests-limit: 0
8+
# we use renovate-bot as well as shared-dependencies BOM to update maven dependencies.
9+
ignore: "*"
910
- package-ecosystem: "pip"
1011
directory: "/"
1112
schedule:
1213
interval: "daily"
1314
# Disable version updates for pip dependencies
14-
open-pull-requests-limit: 0
15+
# If a security vulnerability comes in, we will be notified about
16+
# it via template in the synthtool repository.
17+
ignore: "*"

.github/sync-repo-settings.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,22 @@ branchProtectionRules:
113113
- cla/google
114114
- 'Kokoro - Test: Java GraalVM Native Image'
115115
- 'Kokoro - Test: Java 17 GraalVM Native Image'
116+
- pattern: feat/transfer-manager
117+
isAdminEnforced: true
118+
requiredApprovingReviewCount: 1
119+
requiresCodeOwnerReviews: true
120+
requiresStrictStatusChecks: false
121+
requiredStatusCheckContexts:
122+
- dependencies (8)
123+
- dependencies (11)
124+
- lint
125+
- clirr
126+
- units (8)
127+
- units (11)
128+
- 'Kokoro - Test: Integration'
129+
- cla/google
130+
- 'Kokoro - Test: Java GraalVM Native Image'
131+
- 'Kokoro - Test: Java 17 GraalVM Native Image'
116132
permissionRules:
117133
- team: yoshi-admins
118134
permission: admin

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [2.22.4](https://github.com/googleapis/java-storage/compare/v2.22.3...v2.22.4) (2023-06-07)
4+
5+
6+
### Bug Fixes
7+
8+
* Include invocation-id for resumable PUTs ([#2047](https://github.com/googleapis/java-storage/issues/2047)) ([a590ae3](https://github.com/googleapis/java-storage/commit/a590ae3856fe8cccde17def5ca6bef8cfeed5073))
9+
10+
11+
### Documentation
12+
13+
* Add documentation about quantum write alignment, use of ObjectChecksums, Bucket.name format, and Object.delete_time ([#2032](https://github.com/googleapis/java-storage/issues/2032)) ([c39ec13](https://github.com/googleapis/java-storage/commit/c39ec13469342ed947b12dd7ab3d301ca1d4d01b))
14+
15+
16+
### Dependencies
17+
18+
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.11.0 ([#2050](https://github.com/googleapis/java-storage/issues/2050)) ([88fffbd](https://github.com/googleapis/java-storage/commit/88fffbd56746ff212441fafd1e213177feac0cac))
19+
320
## [2.22.3](https://github.com/googleapis/java-storage/compare/v2.22.2...v2.22.3) (2023-05-30)
421

522

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.15.0</version>
22+
<version>26.17.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -42,28 +42,28 @@ If you are using Maven without the BOM, add this to your dependencies:
4242
<dependency>
4343
<groupId>com.google.cloud</groupId>
4444
<artifactId>google-cloud-storage</artifactId>
45-
<version>2.22.3</version>
45+
<version>2.22.4</version>
4646
</dependency>
4747

4848
```
4949

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

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.15.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.17.0')
5454
5555
implementation 'com.google.cloud:google-cloud-storage'
5656
```
5757
If you are using Gradle without BOM, add this to your dependencies:
5858

5959
```Groovy
60-
implementation 'com.google.cloud:google-cloud-storage:2.22.3'
60+
implementation 'com.google.cloud:google-cloud-storage:2.22.4'
6161
```
6262

6363
If you are using SBT, add this to your dependencies:
6464

6565
```Scala
66-
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.22.3"
66+
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.22.4"
6767
```
6868
<!-- {x-version-update-end} -->
6969

@@ -426,7 +426,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
426426
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage/java11.html
427427
[stability-image]: https://img.shields.io/badge/stability-stable-green
428428
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-storage.svg
429-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.22.3
429+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.22.4
430430
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
431431
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
432432
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

gapic-google-cloud-storage-v2/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.google.api.grpc</groupId>
66
<artifactId>gapic-google-cloud-storage-v2</artifactId>
7-
<version>2.22.4-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
7+
<version>2.22.5-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
88
<name>gapic-google-cloud-storage-v2</name>
99
<description>GRPC library for gapic-google-cloud-storage-v2</description>
1010
<parent>
1111
<groupId>com.google.cloud</groupId>
1212
<artifactId>google-cloud-storage-parent</artifactId>
13-
<version>2.22.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
13+
<version>2.22.5-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
1414
</parent>
1515
<dependencies>
1616
<dependency>

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -426,10 +426,10 @@ public final UnaryCallable<GetBucketRequest, Bucket> getBucketCallable() {
426426
*
427427
* @param parent Required. The project to which this bucket will belong.
428428
* @param bucket Properties of the new bucket being inserted. The name of the bucket is specified
429-
* in the `bucket_id` field. Populating `bucket.name` field will result in an error. The
430-
* project of the bucket must be specified in the `bucket.project` field. This field must be
431-
* in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or
432-
* project number. The `parent` field must be either empty or `projects/_`.
429+
* in the `bucket_id` field. Populating `bucket.name` field will be ignored. The project of
430+
* the bucket must be specified in the `bucket.project` field. This field must be in
431+
* `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or project
432+
* number. The `parent` field must be either empty or `projects/_`.
433433
* @param bucketId Required. The ID to use for this bucket, which will become the final component
434434
* of the bucket's resource name. For example, the value `foo` might result in a bucket with
435435
* the name `projects/123456/buckets/foo`.
@@ -467,10 +467,10 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke
467467
*
468468
* @param parent Required. The project to which this bucket will belong.
469469
* @param bucket Properties of the new bucket being inserted. The name of the bucket is specified
470-
* in the `bucket_id` field. Populating `bucket.name` field will result in an error. The
471-
* project of the bucket must be specified in the `bucket.project` field. This field must be
472-
* in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or
473-
* project number. The `parent` field must be either empty or `projects/_`.
470+
* in the `bucket_id` field. Populating `bucket.name` field will be ignored. The project of
471+
* the bucket must be specified in the `bucket.project` field. This field must be in
472+
* `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or project
473+
* number. The `parent` field must be either empty or `projects/_`.
474474
* @param bucketId Required. The ID to use for this bucket, which will become the final component
475475
* of the bucket's resource name. For example, the value `foo` might result in a bucket with
476476
* the name `projects/123456/buckets/foo`.
@@ -2674,7 +2674,9 @@ public final UnaryCallable<UpdateObjectRequest, Object> updateObjectCallable() {
26742674
* were already persisted (without checking that it matches the previously written data), and
26752675
* write only the data starting from the persisted offset. Even though the data isn't written, it
26762676
* may still incur a performance cost over resuming at the correct write offset. This behavior can
2677-
* make client-side handling simpler in some cases.
2677+
* make client-side handling simpler in some cases. - Clients must only send data that is a
2678+
* multiple of 256 KiB per message, unless the object is being finished with `finish_write` set to
2679+
* `true`.
26782680
*
26792681
* <p>The service will not view the object as complete until the client has sent a
26802682
* `WriteObjectRequest` with `finish_write` set to `true`. Sending any requests on a stream after

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageCallableFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

google-cloud-storage-bom/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<modelVersion>4.0.0</modelVersion>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>google-cloud-storage-bom</artifactId>
22-
<version>2.22.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
22+
<version>2.22.5-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
2323
<packaging>pom</packaging>
2424
<parent>
2525
<groupId>com.google.cloud</groupId>
2626
<artifactId>google-cloud-shared-config</artifactId>
27-
<version>1.5.5</version>
27+
<version>1.5.6</version>
2828
<relativePath/>
2929
</parent>
3030

@@ -69,22 +69,22 @@
6969
<dependency>
7070
<groupId>com.google.cloud</groupId>
7171
<artifactId>google-cloud-storage</artifactId>
72-
<version>2.22.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
72+
<version>2.22.5-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
7373
</dependency>
7474
<dependency>
7575
<groupId>com.google.api.grpc</groupId>
7676
<artifactId>gapic-google-cloud-storage-v2</artifactId>
77-
<version>2.22.4-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
77+
<version>2.22.5-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
7878
</dependency>
7979
<dependency>
8080
<groupId>com.google.api.grpc</groupId>
8181
<artifactId>grpc-google-cloud-storage-v2</artifactId>
82-
<version>2.22.4-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
82+
<version>2.22.5-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
8383
</dependency>
8484
<dependency>
8585
<groupId>com.google.api.grpc</groupId>
8686
<artifactId>proto-google-cloud-storage-v2</artifactId>
87-
<version>2.22.4-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
87+
<version>2.22.5-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
8888
</dependency>
8989
</dependencies>
9090
</dependencyManagement>

google-cloud-storage/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-storage</artifactId>
5-
<version>2.22.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
5+
<version>2.22.5-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud Storage</name>
88
<url>https://github.com/googleapis/java-storage</url>
@@ -12,11 +12,11 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-storage-parent</artifactId>
15-
<version>2.22.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
15+
<version>2.22.5-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-storage</site.installationModule>
19-
<pubsub-proto.version>1.105.12</pubsub-proto.version>
19+
<pubsub-proto.version>1.105.14</pubsub-proto.version>
2020
<junit-platform.version>5.9.3</junit-platform.version>
2121
</properties>
2222
<dependencies>
@@ -173,13 +173,13 @@
173173
<dependency>
174174
<groupId>com.google.api.grpc</groupId>
175175
<artifactId>proto-google-cloud-kms-v1</artifactId>
176-
<version>0.112.0</version>
176+
<version>0.113.0</version>
177177
<scope>test</scope>
178178
</dependency>
179179
<dependency>
180180
<groupId>com.google.cloud</groupId>
181181
<artifactId>google-cloud-kms</artifactId>
182-
<version>2.21.0</version>
182+
<version>2.22.0</version>
183183
<scope>test</scope>
184184
</dependency>
185185
<dependency>

google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import java.security.Key;
4141
import java.time.OffsetDateTime;
4242
import java.util.Arrays;
43+
import java.util.Collection;
4344
import java.util.List;
4445
import java.util.Map;
4546
import java.util.Objects;
@@ -163,6 +164,40 @@ public static BlobSourceOption shouldReturnRawInputStream(boolean shouldReturnRa
163164
return new BlobSourceOption(UnifiedOpts.returnRawInputStream(shouldReturnRawInputStream));
164165
}
165166

167+
/**
168+
* Deduplicate any options which are the same parameter. The value which comes last in {@code
169+
* os} will be the value included in the return.
170+
*/
171+
@BetaApi
172+
public static BlobSourceOption[] dedupe(BlobSourceOption... os) {
173+
return Option.dedupe(BlobSourceOption[]::new, os);
174+
}
175+
176+
/**
177+
* Deduplicate any options which are the same parameter.
178+
*
179+
* <p>The value which comes last in {@code collection} and {@code os} will be the value included
180+
* in the return. All options from {@code os} will override their counterparts in {@code
181+
* collection}.
182+
*/
183+
@BetaApi
184+
public static BlobSourceOption[] dedupe(
185+
Collection<BlobSourceOption> collection, BlobSourceOption... os) {
186+
return Option.dedupe(BlobSourceOption[]::new, collection, os);
187+
}
188+
189+
/**
190+
* Deduplicate any options which are the same parameter.
191+
*
192+
* <p>The value which comes last in {@code collection} and {@code os} will be the value included
193+
* in the return. All options from {@code os} will override their counterparts in {@code
194+
* collection}.
195+
*/
196+
@BetaApi
197+
public static BlobSourceOption[] dedupe(BlobSourceOption[] array, BlobSourceOption... os) {
198+
return Option.dedupe(BlobSourceOption[]::new, array, os);
199+
}
200+
166201
static Storage.BlobSourceOption[] toSourceOptions(
167202
BlobInfo blobInfo, BlobSourceOption... options) {
168203
Storage.BlobSourceOption[] convertedOptions = new Storage.BlobSourceOption[options.length];

0 commit comments

Comments
 (0)