DraftProjectResourceCollection class
inherits members from ClientObjectCollection
Represents a collection of DraftProjectResource objects.
Syntax
CSOM
class DraftProjectResourceCollection
JSOM
PS.DraftProjectResourceCollection
REST Interface
Supported.
PS.DraftProjectResourceCollection
http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/ProjectResources
Members
✓ - Read Support ✓ʷ - Write Support
Properties
Name | .NET | JSOM | REST | Type | Description |
---|---|---|---|---|---|
[Integer] | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection at the specified index. | ||
Item | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection at the specified index. |
Methods
Name | .NET | JSOM | REST | Return Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
'{DraftProjectResourceId}' | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection with the specified DraftProjectResourceId. | |||||||||
Add(ProjectResourceCreationInformation parameters) | ✓ | ✓ | ✓ | DraftProjectResource | Adds the DraftProjectResource that is specified by the ProjectResourceCreationInformation object to the collection. | |||||||
AddEnterpriseResource(EnterpriseResource resource) | ✓ | ✓ | DraftProjectResource | Adds an existing enterprise resource to the draft project resource collection. | ||||||||
AddEnterpriseResourceById(Guid resourceId) | ✓ | QueueJob | Adds an existing enterprise resource with the specified Id value to the draft project resource collection. | GetByGuid(Guid uid) | ✓ | ✓ | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection with the Id value. | |||
GetByGuid(Guid uid) | ✓ | ✓ | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection with the Guid value. | |||||||
GetById(String objectId) | ✓ | ✓ | ✓ | DraftProjectResource | Gets a DraftProjectResource from the collection with the Id value. | |||||||
Remove(DraftProjectResource resource) | ✓ | ✓ | Boolean | Removes the specified DraftProjectResource from the collection. |
#### Method Details
'{DraftProjectResourceId}'
Gets a DraftProjectResource from the collection with the specified DraftProjectResourceId.
Syntax
DraftProjectResource http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/ProjectResources('{DraftProjectResourceId}')
Parameters
Name | Type | Description |
---|---|---|
DraftProjectResourceId | String | the id of the DraftProjectResource |
Return Value
Add(ProjectResourceCreationInformation parameters)
Adds the DraftProjectResource that is specified by the ProjectResourceCreationInformation object to the collection.
Syntax
DraftProjectResource Add(ProjectResourceCreationInformation parameters)
Parameters
Name | Type | Description |
---|---|---|
parameters | ProjectResourceCreationInformation | The properties that can be set when creating a draft project resource. |
Return Value
AddEnterpriseResource(EnterpriseResource resource)
Adds an existing enterprise resource to the draft project resource collection.
Syntax
DraftProjectResource AddEnterpriseResource(EnterpriseResource resource)
Parameters
Name | Type | Description |
---|---|---|
resource | EnterpriseResource | The enterprise resource to add. |
Return Value
AddEnterpriseResourceById(Guid resourceId)
Adds an existing enterprise resource specified by the Guid to the draft project resource collection.
Syntax
QueueJob AddEnterpriseResourceById(Guid resourceId)
Parameters
Name | Type | Description |
---|---|---|
resourceId | Guid | The guid of the enterprise resource to add to the collection. |
Return Value
QueueJob
The QueueJob includes the JobState property that identifies the result of the AddEnterpriseResource request.
GetByGuid(Guid uid)
Gets a DraftProjectResource from the collection with the Guid value.
Syntax
DraftProjectResource GetByGuid(Guid uid)
Parameters
Name | Type | Description |
---|---|---|
uid | Guid | The Guid of the DraftProjectResource |
Return Value
GetById(String objectId)
Gets a DraftProjectResource from the collection with the Id value.
Syntax
DraftProjectResource GetById(String objectId)
Parameters
Name | Type | Description |
---|---|---|
objectId | String | The id of the DraftProjectResource. |
Return Value
Remove(DraftProjectResource resource)
Removes the specified DraftProjectResource from the collection.
Syntax
Boolean Remove(DraftProjectResource resource)
Parameters
Name | Type | Description |
---|---|---|
resource | DraftProjectResource | The DraftProjectResource to remove. |
Return Value
Boolean
See Also
DraftProject
DraftProjectResource
ProjectResourceCreationInformation