def items(self): """All items contained in the drive.""" return self.properties.get('items', DriveItemCollection(self.context, ResourcePath("items", self.resource_path)))
def parent_web(self): """Gets a value that specifies the web where list resides.""" from office365.sharepoint.webs.web import Web return self.properties.get( 'ParentWeb', Web(self.context, ResourcePath("parentWeb", self.resource_path)))
def manager(self): """ The user or contact that is this user's manager. Read-only. (HTTP Methods: GET, PUT, DELETE.) """ return self.properties.get('manager', DirectoryObject(self.context, ResourcePath("manager", self.resource_path)))
def navigation(self): """Gets a web site navigation.""" return self.properties.get( 'Navigation', Navigation(self.context, ResourcePath("Navigation", self.resource_path)))
def default_view(self): """Gets or sets a value that specifies whether the list view is the default list view.""" return self.properties.get( 'DefaultView', View(self.context, ResourcePath("DefaultView", self.resource_path), self))
def root(self): """If present, indicates that this is a root site collection in SharePoint.""" if self.is_property_available('root'): return self.properties['root'] else: return Site(self.context, ResourcePath("root", self.resource_path))
def versions(self): """Gets a value that returns a collection of file version objects that represent the versions of the file.""" return self.properties.get('Versions', FileVersionCollection(self.context, ResourcePath("versions", self.resource_path)))
def get_by_id(self, contact_id): """Retrieve Contact resource by id""" return Contact(self.context, ResourcePath(contact_id, self.resource_path))
def channels(self): """The collection of channels & messages associated with the team.""" if self.is_property_available("channels"): return self.properties['channels'] else: return ChannelCollection(self.context, ResourcePath("channels", self.resource_path))
def child_folders(self): """The collection of child folders in the folder. Navigation property. Read-only. Nullable.""" return self.properties.get('childFolders', EntityCollection(self.context, ContactFolder, ResourcePath("childFolders", self.resource_path)))
def contacts(self): """The contacts in the folder. Navigation property. Read-only. Nullable.""" from office365.outlook.contacts.contact import Contact return self.properties.get('contacts', EntityCollection(self.context, Contact, ResourcePath("contacts", self.resource_path)))
def __init__(self, context): super(Utility, self).__init__(context, ResourcePath("SP.Utilities.Utility"))
def alerts(self): return self.properties.get( 'Alerts', AlertCollection(self.context, ResourcePath("Alerts", self.resource_path)))
def attachments(self): """The fileAttachment and itemAttachment attachments for the message.""" return self.properties.get( 'attachments', AttachmentCollection( self.context, ResourcePath("attachments", self.resource_path)))
def events(self): """Get an event collection or an event.""" return self.properties.get('events', EventCollection(self.context, ResourcePath("events", self.resource_path)))
def primaryChannel(self): """The general channel for the team.""" if self.is_property_available("primaryChannel"): return self.properties['primaryChannel'] else: return Channel(self.context, ResourcePath("primaryChannel", self.resource_path))
def set_property(self, name, value, serializable=True): super(BaseItem, self).set_property(name, value, serializable) if name == "id" and self._resource_path is None: self._resource_path = ResourcePath( value, self._parent_collection.resourcePath)
def viewFields(self): """Gets a value that specifies the collection of fields in the list view.""" if self.is_property_available('ViewFields'): return self.properties['ViewFields'] else: return ViewFieldCollection(self.context, ResourcePath("ViewFields", self.resource_path))
def listItemAllFields(self): """Gets a value that specifies the list item fields values for the list item corresponding to the file.""" return self.properties.get('ListItemAllFields', ListItem(self.context, ResourcePath("listItemAllFields", self.resource_path)))
def owners(self): """The owners of the group.""" return self.properties.get( 'owners', DirectoryObjectCollection( self.context, ResourcePath("owners", self.resource_path)))
def recycleBin(self): """Get recycle bin""" return self.properties.get( 'RecycleBin', RecycleBinItemCollection( self.context, ResourcePath("RecycleBin", self.resource_path)))
def drives(self): """The group's drives. Read-only.""" return self.properties.get( 'drives', DriveCollection(self.context, ResourcePath("drives", self.resource_path)))
def root_folder(self): """Get a root folder""" return self.properties.get( "RootFolder", Folder(self.context, ResourcePath("RootFolder", self.resource_path)))
def members(self): """Users and groups that are members of this group.""" return self.properties.get('members', DirectoryObjectCollection(self.context, ResourcePath("members", self.resource_path)))
def forms(self): """Gets a value that specifies the collection of all list forms in the list.""" return self.properties.get( 'Forms', FormCollection(self.context, ResourcePath("forms", self.resource_path)))
def drives(self): """The group's drives. Read-only.""" if self.is_property_available('drives'): return self.properties['drives'] else: return DriveCollection(self.context, ResourcePath("drives", self.resource_path))
def photo(self): """ The user's profile photo. Read-only. """ return self.properties.get('photo', ProfilePhoto(self.context, ResourcePath("photo", self.resource_path)))
def sites(self): """The list of SharePoint sites in this group. Access the default site with /sites/root.""" return self.properties.get('sites', SiteCollection(self.context, ResourcePath("sites", self.resource_path)))
def calendar(self): """The user's primary calendar. Read-only.""" return self.properties.get('calendar', Calendar(self.context, ResourcePath("calendar", self.resource_path)))
def list(self): """For drives in SharePoint, the underlying document library list.""" return self.properties.get('list', List(self.context, ResourcePath("list", self.resource_path)))