def AddAclBatchSample():
 client = CreateClient()
 doc = gdata.docs.data.Resource(type='document', title='My Sample Doc')
 doc = client.CreateResource(doc)
 acl1 = gdata.docs.data.AclEntry(scope=gdata.acl.data.AclScope(value='user1@example.com', type='user'), role=gdata.acl.data.AclRole(value='reader'), batch_operation=gdata.data.BatchOperation(type='insert'))
 acl2 = gdata.docs.data.AclEntry(scope=gdata.acl.data.AclScope(value='user2@example.com', type='user'), role=gdata.acl.data.AclRole(value='reader'), batch_operation=gdata.data.BatchOperation(type='insert'))
 acl_operations = [acl1, acl2]
 client.BatchProcessAclEntries(doc, acl_operations)

def AddAclBatchSample ( ) : client = CreateClient ( ) doc = gdata . docs . data . Resource ( type = 'document' , title = 'My Sample Doc' ) doc = client . CreateResource ( doc ) acl1 = gdata . docs . data . AclEntry ( scope = gdata . acl . data . AclScope ( value = 'user1@example.com' , type = 'user' ) , role = gdata . acl . data . AclRole ( value = 'reader' ) , batch_operation = gdata . data . BatchOperation ( type = 'insert' ) ) acl2 = gdata . docs . data . AclEntry ( scope = gdata . acl . data . AclScope ( value = 'user2@example.com' , type = 'user' ) , role = gdata . acl . data . AclRole ( value = 'reader' ) , batch_operation = gdata . data . BatchOperation ( type = 'insert' ) ) acl_operations = [ acl1 , acl2 ] client . BatchProcessAclEntries ( doc , acl_operations )
add a list of acls as a batch .