@@ -123,6 +123,9 @@ public static final class Builder {
123123
124124 private Builder () {}
125125
126+ /**
127+ * Sets the blob identity.
128+ */
126129 public Builder blobId (BlobId blobId ) {
127130 this .blobId = checkNotNull (blobId );
128131 return this ;
@@ -133,21 +136,33 @@ Builder id(String id) {
133136 return this ;
134137 }
135138
139+ /**
140+ * Sets the blob's data content type.
141+ */
136142 public Builder contentType (String contentType ) {
137143 this .contentType = firstNonNull (contentType , Data .<String >nullOf (String .class ));
138144 return this ;
139145 }
140146
147+ /**
148+ * Sets the blob's data content disposition.
149+ */
141150 public Builder contentDisposition (String contentDisposition ) {
142151 this .contentDisposition = firstNonNull (contentDisposition , Data .<String >nullOf (String .class ));
143152 return this ;
144153 }
145154
155+ /**
156+ * Sets the blob's data content language.
157+ */
146158 public Builder contentLanguage (String contentLanguage ) {
147159 this .contentLanguage = firstNonNull (contentLanguage , Data .<String >nullOf (String .class ));
148160 return this ;
149161 }
150162
163+ /**
164+ * Sets the blob's data content encoding.
165+ */
151166 public Builder contentEncoding (String contentEncoding ) {
152167 this .contentEncoding = firstNonNull (contentEncoding , Data .<String >nullOf (String .class ));
153168 return this ;
@@ -158,11 +173,20 @@ Builder componentCount(Integer componentCount) {
158173 return this ;
159174 }
160175
176+ /**
177+ * Sets the blob's data cache control.
178+ */
161179 public Builder cacheControl (String cacheControl ) {
162180 this .cacheControl = firstNonNull (cacheControl , Data .<String >nullOf (String .class ));
163181 return this ;
164182 }
165183
184+ /**
185+ * Sets the blob's access control configuration.
186+ *
187+ * @see <a href="https://cloud.google.com/storage/docs/access-control#About-Access-Control-Lists">
188+ * About Access Control Lists</a>
189+ */
166190 public Builder acl (List <Acl > acl ) {
167191 this .acl = acl != null ? ImmutableList .copyOf (acl ) : null ;
168192 return this ;
@@ -188,11 +212,18 @@ Builder selfLink(String selfLink) {
188212 return this ;
189213 }
190214
215+ /**
216+ * Sets the MD5 hash of blob's data. MD5 value must be encoded in base64.
217+ */
191218 public Builder md5 (String md5 ) {
192219 this .md5 = firstNonNull (md5 , Data .<String >nullOf (String .class ));
193220 return this ;
194221 }
195222
223+ /**
224+ * Sets the CRC32C checksum of blob's data. CRC32C value must be encoded in base64 in big-endian
225+ * order.
226+ */
196227 public Builder crc32c (String crc32c ) {
197228 this .crc32c = firstNonNull (crc32c , Data .<String >nullOf (String .class ));
198229 return this ;
@@ -203,6 +234,9 @@ Builder mediaLink(String mediaLink) {
203234 return this ;
204235 }
205236
237+ /**
238+ * Sets the blob's metadata.
239+ */
206240 public Builder metadata (Map <String , String > metadata ) {
207241 this .metadata = metadata != null
208242 ? new HashMap (metadata ) : Data .<Map >nullOf (ImmutableEmptyMap .class );
@@ -229,6 +263,9 @@ Builder updateTime(Long updateTime) {
229263 return this ;
230264 }
231265
266+ /**
267+ * Creates a {@code BlobInfo} object.
268+ */
232269 public BlobInfo build () {
233270 checkNotNull (blobId );
234271 return new BlobInfo (this );
@@ -259,98 +296,177 @@ private BlobInfo(Builder builder) {
259296 updateTime = builder .updateTime ;
260297 }
261298
299+ /**
300+ * Returns the blob's identity.
301+ */
262302 public BlobId blobId () {
263303 return blobId ;
264304 }
265305
306+ /**
307+ * Returns the name of the containing bucket.
308+ */
266309 public String bucket () {
267310 return blobId ().bucket ();
268311 }
269312
313+ /**
314+ * Returns the blob's id.
315+ */
270316 public String id () {
271317 return id ;
272318 }
273319
320+ /**
321+ * Returns the blob's name.
322+ */
274323 public String name () {
275324 return blobId ().name ();
276325 }
277326
327+ /**
328+ * Returns the blob's data cache control.
329+ */
278330 public String cacheControl () {
279331 return Data .isNull (cacheControl ) ? null : cacheControl ;
280332 }
281333
334+ /**
335+ * Returns the blob's access control configuration.
336+ *
337+ * @see <a href="https://cloud.google.com/storage/docs/access-control#About-Access-Control-Lists">
338+ * About Access Control Lists</a>
339+ */
282340 public List <Acl > acl () {
283341 return acl ;
284342 }
285343
344+ /**
345+ * Returns the blob's owner.
346+ */
286347 public Acl .Entity owner () {
287348 return owner ;
288349 }
289350
351+ /**
352+ * Returns the blob's data size in bytes.
353+ */
290354 public Long size () {
291355 return size ;
292356 }
293357
358+ /**
359+ * Returns the blob's data content type.
360+ */
294361 public String contentType () {
295362 return Data .isNull (contentType ) ? null : contentType ;
296363 }
297364
365+ /**
366+ * Returns the blob's data content encoding.
367+ */
298368 public String contentEncoding () {
299369 return Data .isNull (contentEncoding ) ? null : contentEncoding ;
300370 }
301371
372+ /**
373+ * Returns the blob's data content disposition.
374+ */
302375 public String contentDisposition () {
303376 return Data .isNull (contentDisposition ) ? null : contentDisposition ;
304377 }
305378
379+ /**
380+ * Returns the blob's data content language.
381+ */
306382 public String contentLanguage () {
307383 return Data .isNull (contentLanguage ) ? null : contentLanguage ;
308384 }
309385
386+ /**
387+ * Returns the number of components that make up this object. Components are accumulated through
388+ * the {@link Storage#compose(Storage.ComposeRequest)} operation.
389+ *
390+ * @see <a href="https://cloud.google.com/storage/docs/composite-objects#_Count">Component Count
391+ * Property</a>
392+ */
310393 public Integer componentCount () {
311394 return componentCount ;
312395 }
313396
397+ /**
398+ * Returns blob resource's entity tag.
399+ */
314400 public String etag () {
315401 return etag ;
316402 }
317403
404+ /**
405+ * Returns the URI of this blob as a string.
406+ */
318407 public String selfLink () {
319408 return selfLink ;
320409 }
321410
411+ /**
412+ * Returns the MD5 hash of blob's data encoded in base64.
413+ */
322414 public String md5 () {
323415 return Data .isNull (md5 ) ? null : md5 ;
324416 }
325417
418+ /**
419+ * Returns the CRC32C checksum of blob's data encoded in base64 in big-endian order.
420+ */
326421 public String crc32c () {
327422 return Data .isNull (crc32c ) ? null : crc32c ;
328423 }
329424
425+ /**
426+ * Returns the blob's media download link.
427+ */
330428 public String mediaLink () {
331429 return mediaLink ;
332430 }
333431
432+ /**
433+ * Returns blob's metadata.
434+ */
334435 public Map <String , String > metadata () {
335436 return metadata == null || Data .isNull (metadata ) ? null : Collections .unmodifiableMap (metadata );
336437 }
337438
439+ /**
440+ * Returns blob's data generation.
441+ */
338442 public Long generation () {
339443 return generation ;
340444 }
341445
446+ /**
447+ * Returns blob's metageneration.
448+ */
342449 public Long metageneration () {
343450 return metageneration ;
344451 }
345452
453+ /**
454+ * Returns the deletion time of the blob.
455+ */
346456 public Long deleteTime () {
347457 return deleteTime ;
348458 }
349459
460+ /**
461+ * Returns the last modification time of the blob's metadata.
462+ */
350463 public Long updateTime () {
351464 return updateTime ;
352465 }
353466
467+ /**
468+ * Returns a builder for the current blob.
469+ */
354470 public Builder toBuilder () {
355471 return new Builder ()
356472 .blobId (blobId )
@@ -444,14 +560,23 @@ public ObjectAccessControl apply(Acl acl) {
444560 return storageObject ;
445561 }
446562
563+ /**
564+ * Returns a {@code BlobInfo} builder where blob identity is set using the provided values.
565+ */
447566 public static Builder builder (BucketInfo bucketInfo , String name ) {
448567 return builder (bucketInfo .name (), name );
449568 }
450569
570+ /**
571+ * Returns a {@code BlobInfo} builder where blob identity is set using the provided values.
572+ */
451573 public static Builder builder (String bucket , String name ) {
452574 return new Builder ().blobId (BlobId .of (bucket , name ));
453575 }
454576
577+ /**
578+ * Returns a {@code BlobInfo} builder where blob identity is set to the provided value.
579+ */
455580 public static Builder builder (BlobId blobId ) {
456581 return new Builder ().blobId (blobId );
457582 }
0 commit comments