4747import com .google .cloud .examples .storage .buckets .RemoveBucketLabel ;
4848import com .google .cloud .examples .storage .buckets .SetBucketWebsiteInfo ;
4949import com .google .cloud .examples .storage .buckets .SetPublicAccessPreventionEnforced ;
50- import com .google .cloud .examples .storage .buckets .SetPublicAccessPreventionUnspecified ;
50+ import com .google .cloud .examples .storage .buckets .SetPublicAccessPreventionInherited ;
5151import com .google .cloud .examples .storage .objects .DownloadRequesterPaysObject ;
5252import com .google .cloud .storage .Acl ;
5353import com .google .cloud .storage .Acl .Role ;
@@ -310,7 +310,7 @@ public void testDisableLifecycleManagement() {
310310 @ Test
311311 public void testGetPublicAccessPrevention () {
312312 try {
313- // By default a bucket PAP state is UNSPECIFIED and we are changing the state to validate
313+ // By default a bucket PAP state is INHERITED and we are changing the state to validate
314314 // non-default state.
315315 storage
316316 .get (BUCKET )
@@ -333,18 +333,18 @@ public void testGetPublicAccessPrevention() {
333333 .toBuilder ()
334334 .setIamConfiguration (
335335 BucketInfo .IamConfiguration .newBuilder ()
336- .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .UNSPECIFIED )
336+ .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .INHERITED )
337337 .build ())
338338 .build ()
339339 .update ();
340340 } finally {
341- // No matter what happens make sure test set bucket back to UNSPECIFIED
341+ // No matter what happens make sure test set bucket back to INHERITED
342342 storage
343343 .get (BUCKET )
344344 .toBuilder ()
345345 .setIamConfiguration (
346346 BucketInfo .IamConfiguration .newBuilder ()
347- .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .UNSPECIFIED )
347+ .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .INHERITED )
348348 .build ())
349349 .build ()
350350 .update ();
@@ -363,26 +363,26 @@ public void testSetPublicAccessPreventionEnforced() {
363363 .toBuilder ()
364364 .setIamConfiguration (
365365 BucketInfo .IamConfiguration .newBuilder ()
366- .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .UNSPECIFIED )
366+ .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .INHERITED )
367367 .build ())
368368 .build ()
369369 .update ();
370370 } finally {
371- // No matter what happens make sure test set bucket back to UNSPECIFIED
371+ // No matter what happens make sure test set bucket back to INHERITED
372372 storage
373373 .get (BUCKET )
374374 .toBuilder ()
375375 .setIamConfiguration (
376376 BucketInfo .IamConfiguration .newBuilder ()
377- .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .UNSPECIFIED )
377+ .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .INHERITED )
378378 .build ())
379379 .build ()
380380 .update ();
381381 }
382382 }
383383
384384 @ Test
385- public void testSetPublicAccessPreventionUnspecified () {
385+ public void testSetPublicAccessPreventionInherited () {
386386 try {
387387 storage
388388 .get (BUCKET )
@@ -393,18 +393,18 @@ public void testSetPublicAccessPreventionUnspecified() {
393393 .build ())
394394 .build ()
395395 .update ();
396- SetPublicAccessPreventionUnspecified . setPublicAccessPreventionUnspecified (PROJECT_ID , BUCKET );
396+ SetPublicAccessPreventionInherited . setPublicAccessPreventionInherited (PROJECT_ID , BUCKET );
397397 assertEquals (
398398 storage .get (BUCKET ).getIamConfiguration ().getPublicAccessPrevention (),
399- BucketInfo .PublicAccessPrevention .UNSPECIFIED );
399+ BucketInfo .PublicAccessPrevention .INHERITED );
400400 } finally {
401- // No matter what happens make sure test set bucket back to UNSPECIFIED
401+ // No matter what happens make sure test set bucket back to INHERITED
402402 storage
403403 .get (BUCKET )
404404 .toBuilder ()
405405 .setIamConfiguration (
406406 BucketInfo .IamConfiguration .newBuilder ()
407- .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .UNSPECIFIED )
407+ .setPublicAccessPrevention (BucketInfo .PublicAccessPrevention .INHERITED )
408408 .build ())
409409 .build ()
410410 .update ();
0 commit comments