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
Source File: Acl.java
View license
BucketAccessControl toBucketPb() {
    BucketAccessControl bucketPb = new BucketAccessControl();
    bucketPb.setRole(role().toString());
    bucketPb.setEntity(entity().toString());
    return bucketPb;
}

2. AclTest#testOf()

Project: gcloud-java
Source File: AclTest.java
View license
@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));
}