Skip to content

Commit 2e608b8

Browse files
authored
User project comments (#2573)
Addresses issue #2494. Add comments to methods that accept userProject parameter.
1 parent 5af5e6c commit 2e608b8

1 file changed

Lines changed: 31 additions & 4 deletions

File tree

  • google-cloud-storage/src/main/java/com/google/cloud/storage

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

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public static BucketTargetOption metagenerationNotMatch() {
199199
}
200200

201201
/**
202-
* Returns an option for bucket's billing user project. This option is only used by the buckets with
203-
* 'requester_pays' flag.
202+
* Returns an option to define the billing user project. This option is required by buckets with
203+
* `requester_pays` flag enabled to assign operation costs.
204204
*/
205205
@GcpLaunchStage.Alpha
206206
public static BucketTargetOption userProject(String userProject) {
@@ -834,8 +834,8 @@ public static BlobListOption currentDirectory() {
834834
}
835835

836836
/**
837-
* Returns an option for bucket's billing user project. This option is only used by the buckets with
838-
* 'requester_pays' flag.
837+
* Returns an option to define the billing user project. This option is required by buckets with
838+
* `requester_pays` flag enabled to assign operation costs.
839839
*
840840
* @param userProject projectId of the billing user project.
841841
*/
@@ -1389,6 +1389,9 @@ public static Builder newBuilder() {
13891389
/**
13901390
* Creates a new bucket.
13911391
*
1392+
* Accepts an optional userProject {@link BucketTargetOption} option which defines the project id
1393+
* to assign operational costs.
1394+
*
13921395
* <p>Example of creating a bucket.
13931396
* <pre> {@code
13941397
* String bucketName = "my_unique_bucket";
@@ -1432,6 +1435,8 @@ public static Builder newBuilder() {
14321435
* Creates a new blob. Direct upload is used to upload {@code content}. For large content,
14331436
* {@link #writer} is recommended as it uses resumable upload. MD5 and CRC32C hashes of
14341437
* {@code content} are computed and used for validating transferred data.
1438+
* Accepts an optional userProject {@link BlobGetOption} option which defines the project id
1439+
* to assign operational costs.
14351440
*
14361441
* <p>Example of creating a blob from a byte array.
14371442
* <pre> {@code
@@ -1491,6 +1496,9 @@ public static Builder newBuilder() {
14911496
/**
14921497
* Returns the requested bucket or {@code null} if not found.
14931498
*
1499+
* Accepts an optional userProject {@link BucketGetOption} option which defines the project id
1500+
* to assign operational costs.
1501+
*
14941502
* <p>Example of getting information on a bucket, only if its metageneration matches a value,
14951503
* otherwise a {@link StorageException} is thrown.
14961504
* <pre> {@code
@@ -1507,6 +1515,9 @@ public static Builder newBuilder() {
15071515
/**
15081516
* Returns the requested blob or {@code null} if not found.
15091517
*
1518+
* Accepts an optional userProject {@link BlobGetOption} option which defines the project id
1519+
* to assign operational costs.
1520+
*
15101521
* <p>Example of getting information on a blob, only if its metageneration matches a value,
15111522
* otherwise a {@link StorageException} is thrown.
15121523
* <pre> {@code
@@ -1524,6 +1535,9 @@ public static Builder newBuilder() {
15241535
/**
15251536
* Returns the requested blob or {@code null} if not found.
15261537
*
1538+
* Accepts an optional userProject {@link BlobGetOption} option which defines the project id
1539+
* to assign operational costs.
1540+
*
15271541
* <p>Example of getting information on a blob, only if its metageneration matches a value,
15281542
* otherwise a {@link StorageException} is thrown.
15291543
* <pre> {@code
@@ -1596,6 +1610,8 @@ public static Builder newBuilder() {
15961610
/**
15971611
* Updates bucket information.
15981612
*
1613+
* Accepts an optional userProject {@link BucketTargetOption} option which defines the project id
1614+
* to assign operational costs.
15991615
* <p>Example of updating bucket information.
16001616
* <pre> {@code
16011617
* String bucketName = "my_unique_bucket";
@@ -1612,6 +1628,8 @@ public static Builder newBuilder() {
16121628
* Updates blob information. Original metadata are merged with metadata in the provided
16131629
* {@code blobInfo}. To replace metadata instead you first have to unset them. Unsetting metadata
16141630
* can be done by setting the provided {@code blobInfo}'s metadata to {@code null}.
1631+
* Accepts an optional userProject {@link BlobTargetOption} option which defines the project id
1632+
* to assign operational costs.
16151633
*
16161634
* <p>Example of udating a blob, only if the blob's metageneration matches a value, otherwise a
16171635
* {@link StorageException} is thrown.
@@ -1653,6 +1671,9 @@ public static Builder newBuilder() {
16531671
/**
16541672
* Deletes the requested bucket.
16551673
*
1674+
* Accepts an optional userProject {@link BucketSourceOption} option which defines the project id
1675+
* to assign operational costs.
1676+
*
16561677
* <p>Example of deleting a bucket, only if its metageneration matches a value, otherwise a
16571678
* {@link StorageException} is thrown.
16581679
* <pre> {@code
@@ -1698,6 +1719,9 @@ public static Builder newBuilder() {
16981719
/**
16991720
* Deletes the requested blob.
17001721
*
1722+
* Accepts an optional userProject {@link BlobSourceOption} option which defines the project id
1723+
* to assign operational costs.
1724+
*
17011725
* <p>Example of deleting a blob, only if its generation matches a value, otherwise a
17021726
* {@link StorageException} is thrown.
17031727
* <pre> {@code
@@ -1742,6 +1766,9 @@ public static Builder newBuilder() {
17421766
/**
17431767
* Sends a compose request.
17441768
*
1769+
* Accepts an optional userProject {@link BlobTargetOption} option which defines the project id
1770+
* to assign operational costs.
1771+
*
17451772
* <p>Example of composing two blobs.
17461773
* <pre> {@code
17471774
* String bucketName = "my_unique_bucket";

0 commit comments

Comments
 (0)