4444import java .util .List ;
4545import java .util .Map ;
4646import java .util .Objects ;
47+ import org .checkerframework .checker .nullness .qual .NonNull ;
4748
4849/**
4950 * A Google cloud storage bucket.
@@ -93,7 +94,7 @@ public static BucketSourceOption metagenerationNotMatch() {
9394 * with 'requester_pays' flag.
9495 */
9596 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
96- public static BucketSourceOption userProject (String userProject ) {
97+ public static BucketSourceOption userProject (@ NonNull String userProject ) {
9798 return new BucketSourceOption (UnifiedOpts .userProject (userProject ));
9899 }
99100
@@ -142,7 +143,7 @@ private BlobTargetOption(ObjectTargetOpt opt) {
142143
143144 /** Returns an option for specifying blob's predefined ACL configuration. */
144145 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
145- public static BlobTargetOption predefinedAcl (Storage .PredefinedAcl acl ) {
146+ public static BlobTargetOption predefinedAcl (Storage .@ NonNull PredefinedAcl acl ) {
146147 return new BlobTargetOption (UnifiedOpts .predefinedAcl (acl ));
147148 }
148149
@@ -201,7 +202,7 @@ public static BlobTargetOption metagenerationNotMatch(long metageneration) {
201202 * blob.
202203 */
203204 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
204- public static BlobTargetOption encryptionKey (Key key ) {
205+ public static BlobTargetOption encryptionKey (@ NonNull Key key ) {
205206 return new BlobTargetOption (UnifiedOpts .encryptionKey (key ));
206207 }
207208
@@ -212,7 +213,7 @@ public static BlobTargetOption encryptionKey(Key key) {
212213 * @param key the AES256 encoded in base64
213214 */
214215 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
215- public static BlobTargetOption encryptionKey (String key ) {
216+ public static BlobTargetOption encryptionKey (@ NonNull String key ) {
216217 return new BlobTargetOption (UnifiedOpts .encryptionKey (key ));
217218 }
218219
@@ -222,7 +223,7 @@ public static BlobTargetOption encryptionKey(String key) {
222223 * @param kmsKeyName the KMS key resource id
223224 */
224225 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
225- public static BlobTargetOption kmsKeyName (String kmsKeyName ) {
226+ public static BlobTargetOption kmsKeyName (@ NonNull String kmsKeyName ) {
226227 return new BlobTargetOption (UnifiedOpts .kmsKeyName (kmsKeyName ));
227228 }
228229
@@ -231,7 +232,7 @@ public static BlobTargetOption kmsKeyName(String kmsKeyName) {
231232 * with 'requester_pays' flag.
232233 */
233234 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
234- public static BlobTargetOption userProject (String userProject ) {
235+ public static BlobTargetOption userProject (@ NonNull String userProject ) {
235236 return new BlobTargetOption (UnifiedOpts .userProject (userProject ));
236237 }
237238
@@ -263,7 +264,7 @@ private BlobWriteOption(ObjectTargetOpt opt) {
263264
264265 /** Returns an option for specifying blob's predefined ACL configuration. */
265266 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
266- public static BlobWriteOption predefinedAcl (Storage .PredefinedAcl acl ) {
267+ public static BlobWriteOption predefinedAcl (Storage .@ NonNull PredefinedAcl acl ) {
267268 return new BlobWriteOption (UnifiedOpts .predefinedAcl (acl ));
268269 }
269270
@@ -322,7 +323,7 @@ public static BlobWriteOption metagenerationNotMatch(long metageneration) {
322323 * fail if blobs' data MD5 hash does not match the provided value.
323324 */
324325 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
325- public static BlobWriteOption md5Match (String md5 ) {
326+ public static BlobWriteOption md5Match (@ NonNull String md5 ) {
326327 return new BlobWriteOption (UnifiedOpts .md5Match (md5 ));
327328 }
328329
@@ -331,7 +332,7 @@ public static BlobWriteOption md5Match(String md5) {
331332 * will fail if blobs' data CRC32C checksum does not match the provided value.
332333 */
333334 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
334- public static BlobWriteOption crc32cMatch (String crc32c ) {
335+ public static BlobWriteOption crc32cMatch (@ NonNull String crc32c ) {
335336 return new BlobWriteOption (UnifiedOpts .crc32cMatch (crc32c ));
336337 }
337338
@@ -340,7 +341,7 @@ public static BlobWriteOption crc32cMatch(String crc32c) {
340341 * blob.
341342 */
342343 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
343- public static BlobWriteOption encryptionKey (Key key ) {
344+ public static BlobWriteOption encryptionKey (@ NonNull Key key ) {
344345 return new BlobWriteOption (UnifiedOpts .encryptionKey (key ));
345346 }
346347
@@ -351,7 +352,7 @@ public static BlobWriteOption encryptionKey(Key key) {
351352 * @param key the AES256 encoded in base64
352353 */
353354 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
354- public static BlobWriteOption encryptionKey (String key ) {
355+ public static BlobWriteOption encryptionKey (@ NonNull String key ) {
355356 return new BlobWriteOption (UnifiedOpts .encryptionKey (key ));
356357 }
357358
@@ -360,7 +361,7 @@ public static BlobWriteOption encryptionKey(String key) {
360361 * with 'requester_pays' flag.
361362 */
362363 @ TransportCompatibility ({Transport .HTTP , Transport .GRPC })
363- public static BlobWriteOption userProject (String userProject ) {
364+ public static BlobWriteOption userProject (@ NonNull String userProject ) {
364365 return new BlobWriteOption (UnifiedOpts .userProject (userProject ));
365366 }
366367
0 commit comments