com.google.api.services.storage.model.BucketAccessControl

Here are the examples of the java api class com.google.api.services.storage.model.BucketAccessControl taken from open source projects.

1. Acl#toBucketPb()

Project: gcloud-java
File: Acl.java
BucketAccessControl toBucketPb() {
    BucketAccessControl bucketPb = new BucketAccessControl();
    bucketPb.setRole(role().toString());
    bucketPb.setEntity(entity().toString());
    return bucketPb;
}

2. AclTest#testOf()

Project: gcloud-java
File: AclTest.java
@Test
public void testOf() {
    Acl acl = Acl.of(User.ofAllUsers(), Role.READER);
    assertEquals(User.ofAllUsers(), acl.entity());
    assertEquals(Role.READER, acl.role());
    ObjectAccessControl objectPb = acl.toObjectPb();
    assertEquals(acl, Acl.fromPb(objectPb));
    BucketAccessControl bucketPb = acl.toBucketPb();
    assertEquals(acl, Acl.fromPb(bucketPb));
}