@@ -488,6 +488,14 @@ public static BlobSourceOption generationMatch() {
488488 return new BlobSourceOption (StorageRpc .Option .IF_GENERATION_MATCH , null );
489489 }
490490
491+ /**
492+ * Returns an option for blob's data generation match. If this option is used the request will
493+ * fail if blob's generation does not match the provided value.
494+ */
495+ public static BlobSourceOption generationMatch (long generation ) {
496+ return new BlobSourceOption (StorageRpc .Option .IF_GENERATION_MATCH , generation );
497+ }
498+
491499 /**
492500 * Returns an option for blob's data generation mismatch. If this option is used the request
493501 * will fail if blob's generation matches. The generation value to compare with the actual
@@ -499,10 +507,6 @@ public static BlobSourceOption generationNotMatch() {
499507 return new BlobSourceOption (StorageRpc .Option .IF_GENERATION_NOT_MATCH , null );
500508 }
501509
502- public static BlobSourceOption generationMatch (long generation ) {
503- return new BlobSourceOption (StorageRpc .Option .IF_GENERATION_MATCH , generation );
504- }
505-
506510 /**
507511 * Returns an option for blob's data generation mismatch. If this option is used the request
508512 * will fail if blob's generation matches the provided value.
@@ -554,6 +558,14 @@ public static BlobGetOption generationMatch() {
554558 return new BlobGetOption (StorageRpc .Option .IF_GENERATION_MATCH , (Long ) null );
555559 }
556560
561+ /**
562+ * Returns an option for blob's data generation match. If this option is used the request will
563+ * fail if blob's generation does not match the provided value.
564+ */
565+ public static BlobGetOption generationMatch (long generation ) {
566+ return new BlobGetOption (StorageRpc .Option .IF_GENERATION_MATCH , generation );
567+ }
568+
557569 /**
558570 * Returns an option for blob's data generation mismatch. If this option is used the request
559571 * will fail if blob's generation matches. The generation value to compare with the actual
@@ -565,10 +577,6 @@ public static BlobGetOption generationNotMatch() {
565577 return new BlobGetOption (StorageRpc .Option .IF_GENERATION_NOT_MATCH , (Long ) null );
566578 }
567579
568- public static BlobGetOption generationMatch (long generation ) {
569- return new BlobGetOption (StorageRpc .Option .IF_GENERATION_MATCH , generation );
570- }
571-
572580 /**
573581 * Returns an option for blob's data generation mismatch. If this option is used the request
574582 * will fail if blob's generation matches the provided value.
@@ -1287,8 +1295,8 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
12871295 * Update blob information. Original metadata are merged with metadata in the provided
12881296 * {@code blobInfo}. To replace metadata instead you first have to unset them. Unsetting metadata
12891297 * can be done by setting the provided {@code blobInfo}'s metadata to {@code null}.
1290- * <p>
1291- * Example usage of replacing blob's metadata:
1298+ *
1299+ * <p> Example usage of replacing blob's metadata:
12921300 * <pre> {@code service.update(BlobInfo.builder("bucket", "name").metadata(null).build());}
12931301 * {@code service.update(BlobInfo.builder("bucket", "name").metadata(newMetadata).build());}
12941302 * </pre>
@@ -1302,8 +1310,8 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
13021310 * Update blob information. Original metadata are merged with metadata in the provided
13031311 * {@code blobInfo}. To replace metadata instead you first have to unset them. Unsetting metadata
13041312 * can be done by setting the provided {@code blobInfo}'s metadata to {@code null}.
1305- * <p>
1306- * Example usage of replacing blob's metadata:
1313+ *
1314+ * <p> Example usage of replacing blob's metadata:
13071315 * <pre> {@code service.update(BlobInfo.builder("bucket", "name").metadata(null).build());}
13081316 * {@code service.update(BlobInfo.builder("bucket", "name").metadata(newMetadata).build());}
13091317 * </pre>
@@ -1360,8 +1368,8 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
13601368 * returns, regardless of the {@link CopyRequest#megabytesCopiedPerChunk} parameter.
13611369 * If source and destination have different location or storage class {@link CopyWriter#result()}
13621370 * might issue multiple RPC calls depending on blob's size.
1363- * <p>
1364- * Example usage of copy:
1371+ *
1372+ * <p> Example usage of copy:
13651373 * <pre> {@code BlobInfo blob = service.copy(copyRequest).result();}
13661374 * </pre>
13671375 * To explicitly issue chunk copy requests use {@link CopyWriter#copyChunk()} instead:
@@ -1449,8 +1457,8 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
14491457 * is only valid within a certain time period.
14501458 * This is particularly useful if you don't want publicly
14511459 * accessible blobs, but don't want to require users to explicitly log in.
1452- * <p>
1453- * Example usage of creating a signed URL that is valid for 2 weeks:
1460+ *
1461+ * <p> Example usage of creating a signed URL that is valid for 2 weeks:
14541462 * <pre> {@code
14551463 * service.signUrl(BlobInfo.builder("bucket", "name").build(), 14, TimeUnit.DAYS);
14561464 * }</pre>
0 commit comments