com.google.cloud.bigquery.Acl.View

Here are the examples of the java api class com.google.cloud.bigquery.Acl.View taken from open source projects.

1. AclTest#testOf()

Project: gcloud-java
Source File: AclTest.java
View license
@Test
public void testOf() {
    Acl acl = Acl.of(Group.ofAllAuthenticatedUsers(), Role.READER);
    assertEquals(Group.ofAllAuthenticatedUsers(), acl.entity());
    assertEquals(Role.READER, acl.role());
    Dataset.Access pb = acl.toPb();
    assertEquals(acl, Acl.fromPb(pb));
    View view = new View(TableId.of("project", "dataset", "view"));
    acl = Acl.of(view);
    assertEquals(view, acl.entity());
    assertEquals(null, acl.role());
}

2. AclTest#testViewEntity()

Project: gcloud-java
Source File: AclTest.java
View license
@Test
public void testViewEntity() {
    TableId viewId = TableId.of("project", "dataset", "view");
    View entity = new View(viewId);
    assertEquals(viewId, entity.id());
    assertEquals(Type.VIEW, entity.type());
    Dataset.Access pb = entity.toPb();
    assertEquals(entity, Entity.fromPb(pb));
}