Repository: OneDrive/onedrive-sdk-csharp
Branch: master
Commit: 3594584535a4
Files: 226
Total size: 564.4 KB
Directory structure:
gitextract_f6t6dqdk/
├── .gitignore
├── Common/
│ └── Microsoft.OneDriveSDK.nuspec
├── LICENSE.txt
├── OneDriveSdk.sln
├── README.md
├── docs/
│ ├── auth.md
│ ├── chunked-uploads.md
│ ├── collections.md
│ ├── errors.md
│ ├── items.md
│ └── overview.md
├── src/
│ └── OneDriveSdk/
│ ├── Constants.cs
│ ├── Enums/
│ │ └── OneDriveErrorCode.cs
│ ├── Helpers/
│ │ └── ChunkedUploadProvider.cs
│ ├── Microsoft.OneDrive.Sdk.csproj
│ ├── Models/
│ │ └── Generated/
│ │ ├── Audio.cs
│ │ ├── ChunkedUploadSessionDescriptor.cs
│ │ ├── Deleted.cs
│ │ ├── Drive.cs
│ │ ├── File.cs
│ │ ├── FileSystemInfo.cs
│ │ ├── Folder.cs
│ │ ├── Hashes.cs
│ │ ├── Identity.cs
│ │ ├── IdentitySet.cs
│ │ ├── Image.cs
│ │ ├── Item.cs
│ │ ├── ItemCopyRequestBody.cs
│ │ ├── ItemCreateLinkRequestBody.cs
│ │ ├── ItemCreateSessionRequestBody.cs
│ │ ├── ItemInviteRequestBody.cs
│ │ ├── ItemReference.cs
│ │ ├── Location.cs
│ │ ├── OpenWithApp.cs
│ │ ├── OpenWithSet.cs
│ │ ├── Permission.cs
│ │ ├── Photo.cs
│ │ ├── Quota.cs
│ │ ├── Recipient.cs
│ │ ├── SearchResult.cs
│ │ ├── Share.cs
│ │ ├── Shared.cs
│ │ ├── SharingInvitation.cs
│ │ ├── SharingLink.cs
│ │ ├── SpecialFolder.cs
│ │ ├── Thumbnail.cs
│ │ ├── ThumbnailSet.cs
│ │ ├── UploadSession.cs
│ │ └── Video.cs
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ ├── Requests/
│ │ ├── Extensions/
│ │ │ ├── DriveRequestBuilderExtensions.cs
│ │ │ ├── DriveSpecialCollectionRequestBuilderExtensions.cs
│ │ │ ├── IDriveRequestBuilderExtensions.cs
│ │ │ ├── IDriveSpecialCollectionRequestBuilderExtensions.cs
│ │ │ ├── IItemRequestBuilderExtensions.cs
│ │ │ ├── IOneDriveClientExtensions.cs
│ │ │ ├── IShareRequestBuilderExtensions.cs
│ │ │ ├── IThumbnailSetRequestBuilderExtensions.cs
│ │ │ ├── ItemRequestBuilderExtensions.cs
│ │ │ ├── OneDriveClientExtensions.cs
│ │ │ ├── ShareRequestBuilderExtensions.cs
│ │ │ ├── ThumbnailSetExtensions.cs
│ │ │ └── ThumbnailSetRequestBuilderExtensions.cs
│ │ ├── Generated/
│ │ │ ├── DriveItemsCollectionPage.cs
│ │ │ ├── DriveItemsCollectionRequest.cs
│ │ │ ├── DriveItemsCollectionRequestBuilder.cs
│ │ │ ├── DriveItemsCollectionResponse.cs
│ │ │ ├── DriveRecentCollectionPage.cs
│ │ │ ├── DriveRecentCollectionResponse.cs
│ │ │ ├── DriveRecentRequest.cs
│ │ │ ├── DriveRecentRequestBuilder.cs
│ │ │ ├── DriveRequest.cs
│ │ │ ├── DriveRequestBuilder.cs
│ │ │ ├── DriveSharedCollectionPage.cs
│ │ │ ├── DriveSharedCollectionRequest.cs
│ │ │ ├── DriveSharedCollectionRequestBuilder.cs
│ │ │ ├── DriveSharedCollectionResponse.cs
│ │ │ ├── DriveSpecialCollectionPage.cs
│ │ │ ├── DriveSpecialCollectionRequest.cs
│ │ │ ├── DriveSpecialCollectionRequestBuilder.cs
│ │ │ ├── DriveSpecialCollectionResponse.cs
│ │ │ ├── IDriveItemsCollectionPage.cs
│ │ │ ├── IDriveItemsCollectionRequest.cs
│ │ │ ├── IDriveItemsCollectionRequestBuilder.cs
│ │ │ ├── IDriveRecentCollectionPage.cs
│ │ │ ├── IDriveRecentRequest.cs
│ │ │ ├── IDriveRecentRequestBuilder.cs
│ │ │ ├── IDriveRequest.cs
│ │ │ ├── IDriveRequestBuilder.cs
│ │ │ ├── IDriveSharedCollectionPage.cs
│ │ │ ├── IDriveSharedCollectionRequest.cs
│ │ │ ├── IDriveSharedCollectionRequestBuilder.cs
│ │ │ ├── IDriveSpecialCollectionPage.cs
│ │ │ ├── IDriveSpecialCollectionRequest.cs
│ │ │ ├── IDriveSpecialCollectionRequestBuilder.cs
│ │ │ ├── IItemChildrenCollectionPage.cs
│ │ │ ├── IItemChildrenCollectionRequest.cs
│ │ │ ├── IItemChildrenCollectionRequestBuilder.cs
│ │ │ ├── IItemContentRequest.cs
│ │ │ ├── IItemContentRequestBuilder.cs
│ │ │ ├── IItemCopyRequest.cs
│ │ │ ├── IItemCopyRequestBuilder.cs
│ │ │ ├── IItemCreateLinkRequest.cs
│ │ │ ├── IItemCreateLinkRequestBuilder.cs
│ │ │ ├── IItemCreateSessionRequest.cs
│ │ │ ├── IItemCreateSessionRequestBuilder.cs
│ │ │ ├── IItemDeltaCollectionPage.cs
│ │ │ ├── IItemDeltaRequest.cs
│ │ │ ├── IItemDeltaRequestBuilder.cs
│ │ │ ├── IItemInviteRequest.cs
│ │ │ ├── IItemInviteRequestBuilder.cs
│ │ │ ├── IItemPermissionsCollectionPage.cs
│ │ │ ├── IItemPermissionsCollectionRequest.cs
│ │ │ ├── IItemPermissionsCollectionRequestBuilder.cs
│ │ │ ├── IItemRequest.cs
│ │ │ ├── IItemRequestBuilder.cs
│ │ │ ├── IItemSearchCollectionPage.cs
│ │ │ ├── IItemSearchRequest.cs
│ │ │ ├── IItemSearchRequestBuilder.cs
│ │ │ ├── IItemThumbnailsCollectionPage.cs
│ │ │ ├── IItemThumbnailsCollectionRequest.cs
│ │ │ ├── IItemThumbnailsCollectionRequestBuilder.cs
│ │ │ ├── IItemVersionsCollectionPage.cs
│ │ │ ├── IItemVersionsCollectionRequest.cs
│ │ │ ├── IItemVersionsCollectionRequestBuilder.cs
│ │ │ ├── IOneDriveClient.cs
│ │ │ ├── IOneDriveDrivesCollectionPage.cs
│ │ │ ├── IOneDriveDrivesCollectionRequest.cs
│ │ │ ├── IOneDriveDrivesCollectionRequestBuilder.cs
│ │ │ ├── IOneDriveSharesCollectionPage.cs
│ │ │ ├── IOneDriveSharesCollectionRequest.cs
│ │ │ ├── IOneDriveSharesCollectionRequestBuilder.cs
│ │ │ ├── IPermissionRequest.cs
│ │ │ ├── IPermissionRequestBuilder.cs
│ │ │ ├── IShareItemsCollectionPage.cs
│ │ │ ├── IShareItemsCollectionRequest.cs
│ │ │ ├── IShareItemsCollectionRequestBuilder.cs
│ │ │ ├── IShareRequest.cs
│ │ │ ├── IShareRequestBuilder.cs
│ │ │ ├── IThumbnailContentRequest.cs
│ │ │ ├── IThumbnailContentRequestBuilder.cs
│ │ │ ├── IThumbnailSetRequest.cs
│ │ │ ├── IThumbnailSetRequestBuilder.cs
│ │ │ ├── ItemChildrenCollectionPage.cs
│ │ │ ├── ItemChildrenCollectionRequest.cs
│ │ │ ├── ItemChildrenCollectionRequestBuilder.cs
│ │ │ ├── ItemChildrenCollectionResponse.cs
│ │ │ ├── ItemContentRequest.cs
│ │ │ ├── ItemContentRequestBuilder.cs
│ │ │ ├── ItemCopyRequest.cs
│ │ │ ├── ItemCopyRequestBuilder.cs
│ │ │ ├── ItemCreateLinkRequest.cs
│ │ │ ├── ItemCreateLinkRequestBuilder.cs
│ │ │ ├── ItemCreateSessionRequest.cs
│ │ │ ├── ItemCreateSessionRequestBuilder.cs
│ │ │ ├── ItemDeltaCollectionPage.cs
│ │ │ ├── ItemDeltaCollectionResponse.cs
│ │ │ ├── ItemDeltaRequest.cs
│ │ │ ├── ItemDeltaRequestBuilder.cs
│ │ │ ├── ItemInviteRequest.cs
│ │ │ ├── ItemInviteRequestBuilder.cs
│ │ │ ├── ItemPermissionsCollectionPage.cs
│ │ │ ├── ItemPermissionsCollectionRequest.cs
│ │ │ ├── ItemPermissionsCollectionRequestBuilder.cs
│ │ │ ├── ItemPermissionsCollectionResponse.cs
│ │ │ ├── ItemRequest.cs
│ │ │ ├── ItemRequestBuilder.cs
│ │ │ ├── ItemSearchCollectionPage.cs
│ │ │ ├── ItemSearchCollectionResponse.cs
│ │ │ ├── ItemSearchRequest.cs
│ │ │ ├── ItemSearchRequestBuilder.cs
│ │ │ ├── ItemThumbnailsCollectionPage.cs
│ │ │ ├── ItemThumbnailsCollectionRequest.cs
│ │ │ ├── ItemThumbnailsCollectionRequestBuilder.cs
│ │ │ ├── ItemThumbnailsCollectionResponse.cs
│ │ │ ├── ItemVersionsCollectionPage.cs
│ │ │ ├── ItemVersionsCollectionRequest.cs
│ │ │ ├── ItemVersionsCollectionRequestBuilder.cs
│ │ │ ├── ItemVersionsCollectionResponse.cs
│ │ │ ├── OneDriveClient.cs
│ │ │ ├── OneDriveDrivesCollectionPage.cs
│ │ │ ├── OneDriveDrivesCollectionRequest.cs
│ │ │ ├── OneDriveDrivesCollectionRequestBuilder.cs
│ │ │ ├── OneDriveDrivesCollectionResponse.cs
│ │ │ ├── OneDriveSharesCollectionPage.cs
│ │ │ ├── OneDriveSharesCollectionRequest.cs
│ │ │ ├── OneDriveSharesCollectionRequestBuilder.cs
│ │ │ ├── OneDriveSharesCollectionResponse.cs
│ │ │ ├── PermissionRequest.cs
│ │ │ ├── PermissionRequestBuilder.cs
│ │ │ ├── ShareItemsCollectionPage.cs
│ │ │ ├── ShareItemsCollectionRequest.cs
│ │ │ ├── ShareItemsCollectionRequestBuilder.cs
│ │ │ ├── ShareItemsCollectionResponse.cs
│ │ │ ├── ShareRequest.cs
│ │ │ ├── ShareRequestBuilder.cs
│ │ │ ├── ThumbnailContentRequest.cs
│ │ │ ├── ThumbnailContentRequestBuilder.cs
│ │ │ ├── ThumbnailSetRequest.cs
│ │ │ └── ThumbnailSetRequestBuilder.cs
│ │ ├── IThumbnailRequest.cs
│ │ ├── IThumbnailRequestBuilder.cs
│ │ ├── IUploadChunkRequest.cs
│ │ ├── ThumbnailRequest.cs
│ │ ├── ThumbnailRequestBuilder.cs
│ │ ├── UploadChunkRequest.cs
│ │ └── UploadSessionRequest.cs
│ ├── app.config
│ └── packages.config
└── tests/
└── Test.OneDriveSdk/
├── 35MSSharedLib1024.snk
├── ChunkedUploadProviderTests.cs
├── Mocks/
│ ├── ExceptionHttpMessageHandler.cs
│ ├── MockAuthenticationProvider.cs
│ ├── MockHttpProvider.cs
│ ├── MockSerializer.cs
│ ├── TestChunkedUploadProvider.cs
│ └── TestHttpMessageHandler.cs
├── Properties/
│ └── AssemblyInfo.cs
├── Requests/
│ ├── ItemRequestTests.cs
│ ├── MethodRequestTests.cs
│ ├── RequestTestBase.cs
│ ├── ThumbnailRequestTests.cs
│ └── UploadChunkRequestTest.cs
├── Test.OneDrive.Sdk.csproj
├── app.config
└── packages.config
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.sln.docstates
*.suo
*.user
*.userosscache
*.sln.ide
TestResults/*
.vs/*
# UWP project files
project.lock.json
*StoreKey.pfx
Package.StoreAssociation.xml
# Build results
**/[Dd]ebug/
**/[Dd]ebugPublic/
**/[Rr]elease/
**/[Rr]eleases/
**/x64/
**/x86/
**/build/
**/bld/
**/[Bb]in/
**/[Oo]bj/
/lib
# NuGet
*.nupkg
**/packages/*
!**/packages/build/
# VS project upgrade files
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
================================================
FILE: Common/Microsoft.OneDriveSDK.nuspec
================================================
Microsoft.OneDriveSDK
2.0.7
OneDrive .NET SDK
Microsoft
Microsoft
false
Integrate the OneDrive API into your .NET App!
Copyright 2016 Microsoft Corporation
https://github.com/OneDrive/onedrive-sdk-csharp
http://msdn.microsoft.com/en-US/cc300389
https://dev.onedrive.com/images/OneDriveCloud.png
onedrive sharepoint files livesdk liveconnect cloud storage microsoftaccount windowsliveid microsoftid windowsphone windowsstore metro xaml html
================================================
FILE: LICENSE.txt
================================================
OneDrive SDK for CSharp
Copyright 2015 Microsoft Corporation
All right reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: OneDriveSdk.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2EFD6E75-C1E0-4600-88D6-BFEDAD24A50A}"
ProjectSection(SolutionItems) = preProject
Common\Microsoft.OneDriveSDK.nuspec = Common\Microsoft.OneDriveSDK.nuspec
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OneDrive.Sdk", "src\OneDriveSdk\Microsoft.OneDrive.Sdk.csproj", "{1368527B-D7B2-46AD-893D-6DC8C073D819}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{369050EF-15AF-4B0E-98DF-085B91E1B68D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.OneDrive.Sdk", "tests\Test.OneDriveSdk\Test.OneDrive.Sdk.csproj", "{E3A990AA-5628-42AA-A8D4-1C599602DD96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|ARM.Build.0 = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|x64.ActiveCfg = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|x64.Build.0 = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|x86.ActiveCfg = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Debug|x86.Build.0 = Debug|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|Any CPU.Build.0 = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|ARM.ActiveCfg = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|ARM.Build.0 = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|x64.ActiveCfg = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|x64.Build.0 = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|x86.ActiveCfg = Release|Any CPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}.Release|x86.Build.0 = Release|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|ARM.Build.0 = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|x64.ActiveCfg = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|x64.Build.0 = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|x86.ActiveCfg = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Debug|x86.Build.0 = Debug|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Release|ARM.ActiveCfg = Release|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Release|x64.ActiveCfg = Release|Any CPU
{E3A990AA-5628-42AA-A8D4-1C599602DD96}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1368527B-D7B2-46AD-893D-6DC8C073D819} = {2EFD6E75-C1E0-4600-88D6-BFEDAD24A50A}
{E3A990AA-5628-42AA-A8D4-1C599602DD96} = {369050EF-15AF-4B0E-98DF-085B91E1B68D}
EndGlobalSection
EndGlobal
================================================
FILE: README.md
================================================
# OneDrive SDK for CSharp
[](https://ci.appveyor.com/project/OneDrive/onedrive-sdk-csharp/branch/master)
Integrate the [OneDrive API](https://dev.onedrive.com/README.htm) into your C#
project!
The OneDrive SDK is built as a Portable Class Library and targets the following
frameworks:
* .NET 4.5.1
* .NET for Windows Store apps
* Windows Phone 8.1 and higher
Azure Active Directory authentication is available for:
* Windows Forms apps
* UWP apps
* Windows 8.1 apps
## Installation via Nuget
To install the OneDrive SDK via NuGet
* Search for `Microsoft.OneDriveSDK` in the NuGet Library, or
* Type `Install-Package Microsoft.OneDriveSDK` into the Package Manager Console.
## Getting started
### 1. Register your application
Register your application for OneDrive by following [these](https://dev.onedrive.com/app-registration.htm) steps.
### 2. Setting your application Id and scopes
Your app must requests permissions in order to access a user's OneDrive. To do this, specify your app ID and scopes, or permission level.
For more information, see [Authentication scopes](https://dev.onedrive.com/auth/msa_oauth.htm#authentication-scopes).
### 3. Getting an authenticated OneDriveClient object
You must get a **OneDriveClient** object in order for your app to make requests to the service, but first you must have an instance of an object that implements `IAuthenticationProvider` in Microsoft.Graph.Core.
An example of such an imlementation can be found [MSA Auth Adapter repository](https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter). You should create the `IAuthenticationProvider`, authenticate
using `AuthenticateUserAsync()`, and then create a `OneDriveClient` using the auth provider as a constructor argument. You must also provide the ClientId of your app, the return URL you have specified for your app,
and the base URL for the API. Below is a sample of that pattern for authentication on the OneDrive service.
```csharp
var msaAuthProvider = new myAuthProvider(
myClientId,
"https://login.live.com/oauth20_desktop.srf",
{ "onedrive.readonly", "wl.signin" });
await msaAuthProvider.AuthenticateUserAsync();
var oneDriveClient = new OneDriveClient("https://api.onedrive.com/v1.0", msaAuthProvider);
```
After that, you will be able to use the `oneDriveClient` object to make calls to the service. For more information, see [Authenticate your C# app for OneDrive](docs/auth.md).
### 4. Making requests to the service
Once you have a OneDriveClient that is authenticated you can begin to make calls against the service. The requests against the service look like OneDrive's [REST API](https://dev.onedrive.com/README.htm).
To retrieve a user's drive:
```csharp
var drive = await oneDriveClient
.Drive
.Request()
.GetAsync();
```
`GetAsync` will return a `Drive` object on success and throw a `Microsoft.Graph.ServiceException` on error.
To get the current user's root folder of their drive:
```csharp
var rootItem = await oneDriveClient
.Drive
.Root
.Request()
.GetAsync();
```
`GetAsync` will return an `Item` object on success and throw a `Microsoft.Graph.ServiceException` on error.
For a general overview of how the SDK is designed, see [overview](docs/overview.md).
The following sample applications are also available:
* [OneDrive API Browser](https://github.com/OneDrive/onedrive-sample-apibrowser-dotnet) - Windows Forms app
* [OneDrive Photo Browser](https://github.com/OneDrive/onedrive-sample-photobrowser-uwp) - Windows Universal app
* [OneDrive Webhooks](https://github.com/OneDrive/onedrive-webhooks-aspnet) - ASP.NET MVC app
To run the OneDrivePhotoBrowser sample app your machine will need to be configured for [UWP app development](https://msdn.microsoft.com/en-us/library/windows/apps/dn609832.aspx) and the project must be associated with the Windows Store.
## Documentation and resources
* [Overview](docs/overview.md)
* [Auth](docs/auth.md)
* [Items](docs/items.md)
* [Chunked uploads](docs/chunked-uploads.md)
* [Collections](docs/collections.md)
* [Errors](docs/errors.md)
* [OneDrive API](http://dev.onedrive.com)
## Issues
To view or log issues, see [issues](https://github.com/OneDrive/onedrive-sdk-csharp/issues).
## Other resources
* NuGet Package: [https://www.nuget.org/packages/Microsoft.OneDriveSDK](https://www.nuget.org/packages/Microsoft.OneDriveSDK)
## License
[License](LICENSE.txt)
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
================================================
FILE: docs/auth.md
================================================
Authenticate your C# app for OneDrive
=====
To authenticate your app to use OneDrive, you need to instantiate an object that implements `IAuthenticationProvider` from Microsoft.Graph and call `AuthenticateAsync` on it. Then, you must create a `OneDriveClient` object and pass in your auth provider as an argument. Note that if the user changes their password, your app must re-authenticate. If you see `401` error codes, this is most likely the case. See [Error codes for the OneDrive C# SDK](errors.md) for more info.
**Note** This topic assumes that you are familiar with app authentication. For more info about authentication in OneDrive, see [Authentication for the OneDrive API](https://dev.onedrive.com/auth/readme.htm).
## Standard authentication components
When implementing `IAuthenticationProvider`, a standard set of parameters will be required:
| Parameter | Description |
|:----------|:------------|
| _clientId_ | The client ID of the app. Required. |
| _returnUrl_ | A redirect URL. Required. |
| _baseUrl_ | URL where the target OneDrive service is found. Required. |
| _scopes_ | Permissions that your app requires from the user. Required. |
| _client\_secret_ | The client secret created for your app. Optional. Not available for Windows Store 8.1, Windows Phone 8.1, and Universal Windows Platform (UWP) apps. |
In addition to _clientId_, _returnURL_, _scopes_, and _client\_secret_ the method takes in implementations for a client type, credential cache, HTTP provider, and a service info provider or web authentication UI. If not provided, the default implementations of each item will be used.
### ClientType
A single client can only call OneDrive for Consumer or OneDrive for Business, not both. The target service is configured implicitly by the `IAuthenticationProvider` and the _baseUrl_ passed into the `OneDriveClient` constructor.
If the application would like to interact with both OneDrive for Consumer and OneDrive for Business, a client should be created for each.
## More Information
More information, and a fuller example of authentication, can be found at the [MSA Auth Adapter repository](https://github.com/OneDrive/onedrive-sdk-dotnet-msa-auth-adapter).
================================================
FILE: docs/chunked-uploads.md
================================================
# Chunked Uploads
## Uploading large files and pausing/resuming uploads
Chunked uploads are easy using `Helpers.ChunkedUploadProvider`. The easiest way to upload a large file
looks like this:
```csharp
var session = await oneDriveClient.ItemWithPath(uploadPath).CreateSession().Request().PostAsync();
var provider = new ChunkedUploadProvider(session, oneDriveClient, fileStream);
var uploadedItem = await provider.UploadAsync();
```
Your file will upload in default-sized chunks (5MiB). You can also adjust chunk size by adding a parameter to the `ChunkedUploadProvider`
constructor: `new ChunkedUploadProvider(session, oneDriveClient, fileStream, 1024*1024); // 1 MiB`.
## Controlling and Monitoring Large Uploads
You may want to monitor the progress of an upload (perhaps to show a progress bar to the user). You can get finer control of uploading each chunk using
the skeleton below. You will certainly need to make a few modifications. Also, you can check out how the [ChunkedUploadProvider](../src/OneDriveSdk/Helpers/ChunkedUploadProvider.cs)
```csharp
// Get the provider
var myMaxChunkSize = 5*1024*1024; // 5MB
var session = await oneDriveClient.ItemWithPath(uploadPath).CreateSession().Request().PostAsync();
var provider = new ChunkedUploadProvider(session, oneDriveClient, fileStream, myMaxChunkSize);
// Setup the chunk request necessities
var chunkRequests = provider.GetUploadChunkRequests();
var readBuffer = new byte[myMaxChunkSize];
var trackedExceptions = new List();
Item itemResult = null;
//upload the chunks
foreach(var request in chunkRequests)
{
// Do your updates here: update progress bar, etc.
// ...
// Send chunk request
var result = await provider.GetChunkRequestResponseAsync(request, readBuffer, trackedExceptions);
if(result.UploadSucceeded)
{
itemResult = result.ItemResponse;
}
}
// Check that upload succeeded
if (itemResult == null)
{
// Retry the upload
// ...
}
```
================================================
FILE: docs/collections.md
================================================
Collections in the OneDrive SDK for C#
=====
You can use the OneDrive SDK for C# to work with item collections in OneDrive.
## Getting a collection
To retrieve a collection, like a folder's children, you call `GetAsync`:
```csharp
await oneDriveClient
.Drive
.Items[itemId]
.Children
.Request()
.GetAsync();
```
`GetAsync` returns an `ICollectionPage` implementation on success and throws a `OneDriveException` on error. For children collections, the type returned is `IChildrenCollectionPage`, which inherits `ICollectionPage- `.
`IChildrenCollectionPage` contains three properties:
|Name |Description |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
|**CurrentPage** |An `IList
- `. |
|**NextPageRequest** |An `IChildrenPageRequest` used to get to the next page of items, if another page exists. This value will be null if there is not a next page.|
|**AdditionData** |An `IDictionary
` to any additional values returned by the service. In this case, none. |
## Adding to a collection
Some collections, like the children of a folder, can be changed. To add a folder to the children of an item, you can call the `AddAsync` method:
```csharp
var folderToCreate = new Item { Name = "New folder", Folder = new Folder() };
var newFolder = await oneDriveClient
.Drive
.Items[itemId]
.Children
.Request()
.AddAsync(folderToCreate);
```
`AddAsync` returns the created item on success and throws a `OneDriveException` on error.
## Expanding a collection
To expand a collection, you call `Expand` on the collection request object with the string value of the expand:
```csharp
var children = await oneDriveClient
.Drive
.Items[itemId]
.Children
.Request()
.Expand("thumbnails")
.GetAsync();
```
## Special collections
Some API calls will return collections with added properties. These properties will always be in the additional data dictionary. These collections are also their own objects (subclasses of `ICollectionPage`) that will have these properties attached to them.
To get the delta of an item you call:
```csharp
var deltaCollectionPage = await oneDriveClient
.Drive
.Items[itemId]
.Delta(deltaToken)
.Request()
.GetAsync();
```
`IItemDeltaCollectionPage` is an `ICollectionPage- ` object with a `Token` property and a `DeltaLink` property. The token link can be used to pass into `Delta:` when you want to check for more changes. You can also construct a delta request with the `DeltaLink` property. The `NextPageRequest` is an `IItemDeltaRequest` to be used for paging purposes and will be null when there are no more changes.
================================================
FILE: docs/errors.md
================================================
Handling errors in the OneDrive SDK for C#
=====
Errors in the OneDrive SDK for C# behave just like errors returned from the OneDrive service. You can read more about them [here](https://github.com/OneDrive/onedrive-api-docs/blob/master/misc/errors.md).
Anytime you make a request against the service there is the potential for an error. You will see that all requests to the service can return an error. In the case of an error, the request will throw a `OneDriveException` object with an inner `Error` object that contains the service error details.
## Checking the error
There are a few different types of errors that can occur during a network call. These error codes are defined in [OneDriveErrorCodes.cs](../src/OneDriveSdk/Enums/OneDriveErrorCodes.cs).
### Checking the error code
You can easily check if an error has a specific code by calling `IsMatch` on the error code value. `IsMatch` is not case sensitive:
```csharp
if (exception.IsMatch(OneDriveErrorCode.AccessDenied.ToString())
{
// Handle access denied error
}
```
Each error object has a `Message` property as well as code. This message is for debugging purposes and is not be meant to be displayed to the user. Common error codes are defined in [OneDriveErrorCodes.cs](../src/OneDriveSdk/Enums/OneDriveErrorCodes.cs).
### Authentication errors
There can be errors during the authentication process. Authentication errors will have the code `AuthenticationFailed`. Authentication cancelled errors will have the code `AuthenticationCancelled`.
```csharp
if (exception.IsMatch(OneDriveErrorCode.AuthenticationFailure.ToString())
{
// Handle auth error
}
```
The `Message` property will contain more detailed error information if available.
================================================
FILE: docs/items.md
================================================
Items in the OneDrive SDK for C#
=====
Items in the OneDrive SDK for C# behave just like items through the OneDrive API. All actions on items described in the OneDrive API are available through the SDK. For more information, see the [Items Reference](https://dev.onedrive.com/README.htm#item-resource).
The examples below assume that you have [Authenticated](/docs/auth.md) your app with a **OneDriveClient** object.
* [Get an Item](#get-an-item)
* [Delete an Item](#delete-an-item)
* [Get Children for an Item](#get-children-for-an-item)
* [Create a folder](#create-a-folder)
* [Uploading contents](#uploading-contents)
* [Downloading contents](#downloading-contents)
* [Moving and updating an Item](#moving-and-updating-an-item)
* [Copy an Item](#copy-an-item)
Get an Item
---------------
### 1. By ID
```csharp
var item = await oneDriveClient
.Items[itemId]
.Request()
.GetAsync();
```
### 2. By path
```csharp
var item = await oneDriveClient
.Drive
.Root
.ItemWithPath("path/to/file/txt")
.Request()
.GetAsync();
```
Access an item by parent reference path:
```csharp
var item = await oneDriveClient
.ItemWithPath(parentItem.ParentReference.Path + "/" + parentItem.Name + "/relative/path")
.Request()
.GetAsync();
```
Delete an Item
---------------
```csharp
await oneDriveClient
.Drive
.Items[itemId]
.Request()
.DeleteAsync();
```
Get children for an Item
-------------------------
More info about collections [here](/docs/collections.md).
```csharp
await oneDriveClient
.Drive
.Items[itemId]
.Children
.Request()
.GetAsync();
```
Create a folder
-------------------------
### 1. By POST to a known folder ID
```csharp
var folderToCreate = new Item { Folder = new Folder(), Name = "folder name" };
var createdFolder = await oneDriveClient
.Drive
.Items[itemId]
.Children
.Request()
.AddAsync(folderToCreate);
```
### 2. By PUT to a known folder ID
```csharp
var folderToCreate = new Item { Folder = new Folder() };
var createdFolder = await oneDriveClient
.Drive
.Items[itemId]
.ItemWithPath("folder name")
.Request()
.CreateAsync(folderToCreate);
```
### 3. By PUT with a given path
```csharp
var folderToCreate = new Item { Folder = new Folder() };
var createdFolder = await oneDriveClient
.Drive
.Root
.ItemWithPath("folder/subfolder")
.Request()
.CreateAsync(folderToCreate);
```
Note: If the specified path does not exist, every folder name in the path will also be created.
Uploading contents
------------------------------
```csharp
using (contentStream)
{
var uploadedItem = await oneDriveClient
.Drive
.Root
.ItemWithPath("path/to/file.txt")
.Content
.Request()
.PutAsync
- (contentStream);
}
```
Downloading contents
------------------------------
```csharp
var contentStream = await oneDriveClient
.Drive
.Items[itemId]
.Content
.Request()
.GetAsync();
```
Moving and updating an Item
--------------
To [move](https://dev.onedrive.com/items/move.htm) an item you must update its parent reference.
```csharp
var updateItem = new Item { ParentReference = new ItemReference { Id = newParentId } };
var itemWithUpdates = await oneDriveClient
.Drive
.Items[itemId]
.Request()
.UpdateAsync(updateItem);
```
To change an item's name you could:
```csharp
var updateItem = new Item { Name = "New name!" };
var itemWithUpdates = await oneDriveClient
.Drive
.Items[itemId]
.Request()
.UpdateAsync(updateItem);
```
Copy an Item
---------------
Copying an item is an async action described [here](https://dev.onedrive.com/items/copy.htm).
```csharp
var asyncStatus = await oneDriveClient
.Drive
.Items[itemId]
.Copy(newItemName, new ItemReference { Id = copyLocationId })
.Request()
.PostAsync();
```
The `Copy` action returns an `IItemCopyAsyncMonitor` instance that has a method to poll the monitor URL for completion. The poll method returns the created item on completion.
To poll until the copy action completes:
```csharp
var newItem = await asyncStatus.CompleteOperationAsync(null, CancellationToken.None);
```
`CompleteOperationAsync` takes in an `IProgress
` for reporting back progress status and a `CancellationToken` for action cancellation. The method will poll until completion unless cancelled.
================================================
FILE: docs/overview.md
================================================
OneDrive SDK for CSharp overview
=====
The OneDrive C# SDK is designed to look just like the [OneDrive API](https://github.com/onedrive/onedrive-api-docs/).
## OneDriveClient
When accessing the OneDrive APIs, all requests will be made through a **OneDriveClient** object. For a more detailed explanation, see [Authentication](/docs/auth.md).
## Resource model
Resources, like [items](/docs/items.md) or drives, are represented by `Item` and `Drive`. These objects contain properties that represent the properties of a resource. These objects are property bags and cannot make calls against the service.
To get the name of an item you would address the `Name` property. It is possible for any of these properties to be null at any time. To check if an item is a folder you can address the `Folder` property of the item. If the item is a folder, a `Folder` object that contains all of the properties described by the [folder](https://github.com/OneDrive/onedrive-api-docs/blob/master/facets/folder_facet.md) facet will be returned.
See [Resource model](https://github.com/onedrive/onedrive-api-docs/#resource-model) for more information.
## Requests
To make requests against the service, you construct request objects using a request builder object. The type of the request builder will depend on the type of the object you are addressing. This is meant to mimic creating the URL for any of the OneDrive APIs.
### 1. Request builders
To generate a request you chain together calls on request builder objects. You get the first request builder from the `OneDriveClient` object. To get a drive request builder you call:
|Task | SDK | URL |
|:---------------|:---------------------:|:--------------------------------|
|Get a drive | oneDriveClient.Drive | GET api.onedrive.com/v1.0/drive/|
The call will return an `IDriveRequestBuilder` object. From drive you can continue to chain the requests to get everything else in the API, like an item.
|Task | SDK | URL |
|:---------------|:------------------------------------:|:------------------------------------------|
|Get an item | oneDriveClient.Drive.Items["1234"] | GET api.onedrive.com/v1.0/drive/items/1234|
Here `oneDriveClient.Drive` returns an `IDriveRequestBuilder` that contains a property `Items` of type `IItemsCollectionRequestBuilder`. That builder has an accessor for the item ID and Items["1234"] returns an `IItemRequestBuilder`.
Similarly to get thumbnails:
|Task | SDK | URL |
|----------------|--------------------------------|--------------------------|
| Get thumbnails | ... Items["1234"].Thumbnails | .../items/1234/thumbnails|
Here, `oneDriveClient.Drive.Items["1234"]` returns an `IItemRequestBuilder` that contains the property Thumbnails of type `IThumbnailsCollectionRequestBuilder`.
This returns a collection of [thumbnail sets](https://github.com/OneDrive/onedrive-api-docs/blob/master/resources/thumbnailSet.md). To index the collection directly you can call:
|Task | SDK | URL |
|-------------------|-------------------------------------|----------------------------|
| Get thumbnail Set | ... Items["1234"].Thumbnails["0"] | ...items/1234/thumbnails/0 |
To return a thumbnail set, and to get a specific [thumbnail](https://github.com/OneDrive/onedrive-api-docs/blob/master/resources/thumbnail.md), you can add the name of the thumbnail to the URL like this:
|Task | SDK | URL |
|-----------------|-----------------------------|------------------------|
| Get a thumbnail | ... Thumbnails["0"].Small | .../thumbnails/0/small |
### 2. Request calls
After you build the request you call the `Request` method on the request builder. This will construct the request object needed to make calls against the service.
For an item you call:
```csharp
var itemRequest = oneDriveClient
.Drive
.Items[itemId]
.Request();
```
All request builders have a `Request` method that can generate a request object. Request objects may have different methods on them depending on the type of request. To get an item you call:
```csharp
var item = await oneDriveClient
.Drive
.Items[itemId]
.Request()
.GetAsync();
```
For more info, see [items](/docs/items.md) and [errors](/docs/errors.md).
## Query options
If you only want to retrieve certain properties of a resource you can select them. Here's how to get only the names and IDs of an item:
```csharp
var item = await oneDriveClient
.Drive
.Items[itemId]
.Request()
.Select("name,id")
.GetAsync();
```
All properties other than `Name` and `Id` will be null on the item.
To expand certain properties on resources you can call a similar expand method, like this:
```csharp
var item = await oneDriveClient
.Drive
.Items[itemId]
.Request()
.Expand("thumbnails,children(expand=thumbnails)")
.GetAsync();
```
The above call will expand thumbnails and children for the item, as well as thumbnails for all of the children.
================================================
FILE: src/OneDriveSdk/Constants.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public static class Constants
{
public const int PollingIntervalInMs = 5000;
public static class Headers
{
public const string SdkVersionHeaderPrefix = "onedrive";
}
public static class Url
{
public const string Drive = "drive";
public const string Root = "root";
public const string AppRoot = "approot";
public const string Documents = "documents";
public const string Photos = "photos";
public const string CameraRoll = "cameraroll";
public const string Music = "music";
}
}
}
================================================
FILE: src/OneDriveSdk/Enums/OneDriveErrorCode.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public enum OneDriveErrorCode
{
AccessDenied,
ActivityLimitReached,
GeneralException,
InvalidRange,
InvalidRequest,
ItemNotFound,
MalwareDetected,
NameAlreadyExists,
NotAllowed,
NotSupported,
ResourceModified,
ResyncRequired,
ServiceNotAvailable,
Timeout,
TooManyRedirects,
QuotaLimitReached,
Unauthenticated,
}
}
================================================
FILE: src/OneDriveSdk/Helpers/ChunkedUploadProvider.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk.Helpers
{
using Microsoft.Graph;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
///
/// Use this class to make resumable uploads or to upload large files. This
/// class allows the client to control the size of chunks uploaded (for example, can be useful
/// to use small chunks if the connection is slow). Also allows the client to
/// pause an upload and resume later.
///
public class ChunkedUploadProvider
{
private const int DefaultMaxChunkSize = 5 * 1024 * 1024;
private const int RequiredChunkSizeIncrement = 320 * 1024;
public UploadSession Session { get; private set; }
private IBaseClient client;
private Stream uploadStream;
private readonly int maxChunkSize;
private List> rangesRemaining;
private long totalUploadLength => uploadStream.Length;
///
/// Helps with resumable uploads. Generates chunk requests based on
/// information, and can control uploading of requests using
///
/// Session information.
/// Client used to upload chunks.
/// Readable, seekable stream to be uploaded. Length of session is determined via uploadStream.Length
/// Max size of each chunk to be uploaded. Multiple of 320 KiB (320 * 1024) is required.
/// If less than 0, default value of 5 MiB is used. .
public ChunkedUploadProvider(UploadSession session, IBaseClient client, Stream uploadStream, int maxChunkSize = -1)
{
if (!uploadStream.CanRead || !uploadStream.CanSeek)
{
throw new ArgumentException("Must provide stream that can read and seek");
}
this.Session = session;
this.client = client;
this.uploadStream = uploadStream;
this.rangesRemaining = this.GetRangesRemaining(session);
this.maxChunkSize = maxChunkSize < 0 ? DefaultMaxChunkSize : maxChunkSize;
if (this.maxChunkSize % RequiredChunkSizeIncrement != 0)
{
throw new ArgumentException("Max chunk size must be a multiple of 320 KiB", nameof(maxChunkSize));
}
}
///
/// Get the series of requests needed to complete the upload session. Call
/// first to update the internal session information.
///
/// Options to be applied to each request.
/// All requests currently needed to complete the upload session.
public virtual IEnumerable GetUploadChunkRequests(IEnumerable options = null)
{
foreach (var range in this.rangesRemaining)
{
var currentRangeBegins = range.Item1;
while (currentRangeBegins <= range.Item2)
{
var nextChunkSize = NextChunkSize(currentRangeBegins, range.Item2);
var uploadRequest = new UploadChunkRequest(
this.Session.UploadUrl,
this.client,
options,
currentRangeBegins,
currentRangeBegins + nextChunkSize - 1,
this.totalUploadLength);
yield return uploadRequest;
currentRangeBegins += nextChunkSize;
}
}
}
///
/// Get the status of the session. Stores returned session internally.
/// Updates internal list of ranges remaining to be uploaded (according to the server).
///
/// UploadSession returned by the server.
public virtual async Task UpdateSessionStatusAsync()
{
var request = new UploadSessionRequest(this.Session, this.client, null);
var newSession = await request.GetAsync();
var newRangesRemaining = this.GetRangesRemaining(newSession);
this.rangesRemaining = newRangesRemaining;
newSession.UploadUrl = this.Session.UploadUrl; // Sometimes the UploadUrl is not returned
this.Session = newSession;
return newSession;
}
///
/// Delete the session.
///
/// Once returned task is complete, the session has been deleted.
public async Task DeleteSession()
{
var request = new UploadSessionRequest(this.Session, this.client, null);
await request.DeleteAsync();
}
///
/// Upload the whole session.
///
/// Number of times to retry entire session before giving up.
/// Item information returned by server.
public async Task- UploadAsync(int maxTries = 3, IEnumerable
options = null)
{
var uploadTries = 0;
var readBuffer = new byte[this.maxChunkSize];
var trackedExceptions = new List();
while (uploadTries < maxTries)
{
var chunkRequests = this.GetUploadChunkRequests(options);
foreach (var request in chunkRequests)
{
var result = await this.GetChunkRequestResponseAsync(request, readBuffer, trackedExceptions);
if (result.UploadSucceeded)
{
return result.ItemResponse;
}
}
await this.UpdateSessionStatusAsync();
uploadTries += 1;
if (uploadTries < maxTries)
{
// Exponential backoff in case of failures.
await Task.Delay(2000 * uploadTries * uploadTries).ConfigureAwait(false);
}
}
throw new TaskCanceledException("Upload failed too many times. See InnerException for list of exceptions that occured.", new AggregateException(trackedExceptions.ToArray()));
}
public virtual async Task GetChunkRequestResponseAsync(UploadChunkRequest request, byte[] readBuffer, ICollection exceptionTrackingList)
{
var firstAttempt = true;
this.uploadStream.Seek(request.RangeBegin, SeekOrigin.Begin);
await this.uploadStream.ReadAsync(readBuffer, 0, request.RangeLength).ConfigureAwait(false);
while (true)
{
using (var requestBodyStream = new MemoryStream(request.RangeLength))
{
await requestBodyStream.WriteAsync(readBuffer, 0, request.RangeLength).ConfigureAwait(false);
requestBodyStream.Seek(0, SeekOrigin.Begin);
try
{
return await request.PutAsync(requestBodyStream).ConfigureAwait(false);
}
catch (ServiceException exception)
{
if (exception.IsMatch("generalException") || exception.IsMatch("timeout"))
{
if (firstAttempt)
{
firstAttempt = false;
exceptionTrackingList.Add(exception);
}
else
{
throw;
}
}
else if (exception.IsMatch("invalidRange"))
{
// Succeeded previously, but nothing to return right now
return new UploadChunkResult();
}
else
{
throw;
}
}
}
}
}
internal List> GetRangesRemaining(UploadSession session)
{
// nextExpectedRanges: https://dev.onedrive.com/items/upload_large_files.htm
// Sample: ["12345-55232","77829-99375"]
// Also, second number in range can be blank, which means 'until the end'
var newRangesRemaining = new List>();
foreach (var range in session.NextExpectedRanges)
{
var rangeSpecifiers = range.Split('-');
newRangesRemaining.Add(new Tuple(long.Parse(rangeSpecifiers[0]),
string.IsNullOrEmpty(rangeSpecifiers[1]) ? this.totalUploadLength - 1 : long.Parse(rangeSpecifiers[1])));
}
return newRangesRemaining;
}
private int NextChunkSize(long rangeBegin, long rangeEnd)
{
var sizeBasedOnRange = (int) (rangeEnd - rangeBegin) + 1;
return sizeBasedOnRange > this.maxChunkSize
? this.maxChunkSize
: sizeBasedOnRange;
}
}
}
================================================
FILE: src/OneDriveSdk/Microsoft.OneDrive.Sdk.csproj
================================================
10.0
Debug
AnyCPU
{1368527B-D7B2-46AD-893D-6DC8C073D819}
Library
Properties
Microsoft.OneDrive.Sdk
Microsoft.OneDrive.Sdk
en-US
512
{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
Profile111
v4.5
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
pdbonly
true
bin\Release\
TRACE
prompt
4
true
true
..\..\build\35MSSharedLib1024.snk
..\..\packages\Microsoft.Graph.Core.1.3.1\lib\portable45-net45+win8+wpa81\Microsoft.Graph.Core.dll
True
..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll
True
Designer
xcopy /Y /I "$(TargetDir)$(TargetName).dll" "$(SolutionDir)lib\"
================================================
FILE: src/OneDriveSdk/Models/Generated/Audio.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Audio.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Audio
{
///
/// Gets or sets album.
///
[DataMember(Name = "album", EmitDefaultValue = false, IsRequired = false)]
public string Album { get; set; }
///
/// Gets or sets albumArtist.
///
[DataMember(Name = "albumArtist", EmitDefaultValue = false, IsRequired = false)]
public string AlbumArtist { get; set; }
///
/// Gets or sets artist.
///
[DataMember(Name = "artist", EmitDefaultValue = false, IsRequired = false)]
public string Artist { get; set; }
///
/// Gets or sets bitrate.
///
[DataMember(Name = "bitrate", EmitDefaultValue = false, IsRequired = false)]
public Int64? Bitrate { get; set; }
///
/// Gets or sets composers.
///
[DataMember(Name = "composers", EmitDefaultValue = false, IsRequired = false)]
public string Composers { get; set; }
///
/// Gets or sets copyright.
///
[DataMember(Name = "copyright", EmitDefaultValue = false, IsRequired = false)]
public string Copyright { get; set; }
///
/// Gets or sets disc.
///
[DataMember(Name = "disc", EmitDefaultValue = false, IsRequired = false)]
public Int16? Disc { get; set; }
///
/// Gets or sets discCount.
///
[DataMember(Name = "discCount", EmitDefaultValue = false, IsRequired = false)]
public Int16? DiscCount { get; set; }
///
/// Gets or sets duration.
///
[DataMember(Name = "duration", EmitDefaultValue = false, IsRequired = false)]
public Int64? Duration { get; set; }
///
/// Gets or sets genre.
///
[DataMember(Name = "genre", EmitDefaultValue = false, IsRequired = false)]
public string Genre { get; set; }
///
/// Gets or sets hasDrm.
///
[DataMember(Name = "hasDrm", EmitDefaultValue = false, IsRequired = false)]
public bool? HasDrm { get; set; }
///
/// Gets or sets isVariableBitrate.
///
[DataMember(Name = "isVariableBitrate", EmitDefaultValue = false, IsRequired = false)]
public bool? IsVariableBitrate { get; set; }
///
/// Gets or sets title.
///
[DataMember(Name = "title", EmitDefaultValue = false, IsRequired = false)]
public string Title { get; set; }
///
/// Gets or sets track.
///
[DataMember(Name = "track", EmitDefaultValue = false, IsRequired = false)]
public Int32? Track { get; set; }
///
/// Gets or sets trackCount.
///
[DataMember(Name = "trackCount", EmitDefaultValue = false, IsRequired = false)]
public Int32? TrackCount { get; set; }
///
/// Gets or sets year.
///
[DataMember(Name = "year", EmitDefaultValue = false, IsRequired = false)]
public Int32? Year { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ChunkedUploadSessionDescriptor.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type ChunkedUploadSessionDescriptor.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class ChunkedUploadSessionDescriptor
{
///
/// Gets or sets name.
///
[DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
public string Name { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Deleted.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Deleted.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Deleted
{
///
/// Gets or sets state.
///
[DataMember(Name = "state", EmitDefaultValue = false, IsRequired = false)]
public string State { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Drive.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Drive.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Drive
{
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets drive type.
///
[DataMember(Name = "driveType", EmitDefaultValue = false, IsRequired = false)]
public string DriveType { get; set; }
///
/// Gets or sets owner.
///
[DataMember(Name = "owner", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet Owner { get; set; }
///
/// Gets or sets quota.
///
[DataMember(Name = "quota", EmitDefaultValue = false, IsRequired = false)]
public Quota Quota { get; set; }
///
/// Gets or sets items.
///
[DataMember(Name = "items", EmitDefaultValue = false, IsRequired = false)]
public IDriveItemsCollectionPage Items { get; set; }
///
/// Gets or sets shared.
///
[DataMember(Name = "shared", EmitDefaultValue = false, IsRequired = false)]
public IDriveSharedCollectionPage Shared { get; set; }
///
/// Gets or sets special.
///
[DataMember(Name = "special", EmitDefaultValue = false, IsRequired = false)]
public IDriveSpecialCollectionPage Special { get; set; }
///
/// Gets or sets @odata.type.
///
[DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
public string ODataType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/File.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type File.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class File
{
///
/// Gets or sets hashes.
///
[DataMember(Name = "hashes", EmitDefaultValue = false, IsRequired = false)]
public Hashes Hashes { get; set; }
///
/// Gets or sets mimeType.
///
[DataMember(Name = "mimeType", EmitDefaultValue = false, IsRequired = false)]
public string MimeType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/FileSystemInfo.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type FileSystemInfo.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class FileSystemInfo
{
///
/// Gets or sets createdDateTime.
///
[DataMember(Name = "createdDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? CreatedDateTime { get; set; }
///
/// Gets or sets lastModifiedDateTime.
///
[DataMember(Name = "lastModifiedDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? LastModifiedDateTime { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Folder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Folder.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Folder
{
///
/// Gets or sets childCount.
///
[DataMember(Name = "childCount", EmitDefaultValue = false, IsRequired = false)]
public Int32? ChildCount { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Hashes.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Hashes.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Hashes
{
///
/// Gets or sets crc32Hash.
///
[DataMember(Name = "crc32Hash", EmitDefaultValue = false, IsRequired = false)]
public string Crc32Hash { get; set; }
///
/// Gets or sets sha1Hash.
///
[DataMember(Name = "sha1Hash", EmitDefaultValue = false, IsRequired = false)]
public string Sha1Hash { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Identity.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Identity.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Identity
{
///
/// Gets or sets displayName.
///
[DataMember(Name = "displayName", EmitDefaultValue = false, IsRequired = false)]
public string DisplayName { get; set; }
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets thumbnails.
///
[DataMember(Name = "thumbnails", EmitDefaultValue = false, IsRequired = false)]
public ThumbnailSet Thumbnails { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/IdentitySet.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type IdentitySet.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class IdentitySet
{
///
/// Gets or sets application.
///
[DataMember(Name = "application", EmitDefaultValue = false, IsRequired = false)]
public Identity Application { get; set; }
///
/// Gets or sets device.
///
[DataMember(Name = "device", EmitDefaultValue = false, IsRequired = false)]
public Identity Device { get; set; }
///
/// Gets or sets user.
///
[DataMember(Name = "user", EmitDefaultValue = false, IsRequired = false)]
public Identity User { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Image.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Image.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Image
{
///
/// Gets or sets height.
///
[DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
public Int32? Height { get; set; }
///
/// Gets or sets width.
///
[DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
public Int32? Width { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Item.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Item.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Item
{
///
/// Gets or sets content.
///
[DataMember(Name = "content", EmitDefaultValue = false, IsRequired = false)]
public Stream Content { get; set; }
///
/// Gets or sets created by.
///
[DataMember(Name = "createdBy", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet CreatedBy { get; set; }
///
/// Gets or sets created date time.
///
[DataMember(Name = "createdDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? CreatedDateTime { get; set; }
///
/// Gets or sets c tag.
///
[DataMember(Name = "cTag", EmitDefaultValue = false, IsRequired = false)]
public string CTag { get; set; }
///
/// Gets or sets description.
///
[DataMember(Name = "description", EmitDefaultValue = false, IsRequired = false)]
public string Description { get; set; }
///
/// Gets or sets e tag.
///
[DataMember(Name = "eTag", EmitDefaultValue = false, IsRequired = false)]
public string ETag { get; set; }
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets last modified by.
///
[DataMember(Name = "lastModifiedBy", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet LastModifiedBy { get; set; }
///
/// Gets or sets last modified date time.
///
[DataMember(Name = "lastModifiedDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? LastModifiedDateTime { get; set; }
///
/// Gets or sets name.
///
[DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
public string Name { get; set; }
///
/// Gets or sets parent reference.
///
[DataMember(Name = "parentReference", EmitDefaultValue = false, IsRequired = false)]
public ItemReference ParentReference { get; set; }
///
/// Gets or sets size.
///
[DataMember(Name = "size", EmitDefaultValue = false, IsRequired = false)]
public Int64? Size { get; set; }
///
/// Gets or sets web url.
///
[DataMember(Name = "webUrl", EmitDefaultValue = false, IsRequired = false)]
public string WebUrl { get; set; }
///
/// Gets or sets audio.
///
[DataMember(Name = "audio", EmitDefaultValue = false, IsRequired = false)]
public Audio Audio { get; set; }
///
/// Gets or sets deleted.
///
[DataMember(Name = "deleted", EmitDefaultValue = false, IsRequired = false)]
public Deleted Deleted { get; set; }
///
/// Gets or sets file.
///
[DataMember(Name = "file", EmitDefaultValue = false, IsRequired = false)]
public File File { get; set; }
///
/// Gets or sets file system info.
///
[DataMember(Name = "fileSystemInfo", EmitDefaultValue = false, IsRequired = false)]
public FileSystemInfo FileSystemInfo { get; set; }
///
/// Gets or sets folder.
///
[DataMember(Name = "folder", EmitDefaultValue = false, IsRequired = false)]
public Folder Folder { get; set; }
///
/// Gets or sets image.
///
[DataMember(Name = "image", EmitDefaultValue = false, IsRequired = false)]
public Image Image { get; set; }
///
/// Gets or sets location.
///
[DataMember(Name = "location", EmitDefaultValue = false, IsRequired = false)]
public Location Location { get; set; }
///
/// Gets or sets open with.
///
[DataMember(Name = "openWith", EmitDefaultValue = false, IsRequired = false)]
public OpenWithSet OpenWith { get; set; }
///
/// Gets or sets photo.
///
[DataMember(Name = "photo", EmitDefaultValue = false, IsRequired = false)]
public Photo Photo { get; set; }
///
/// Gets or sets remote item.
///
[DataMember(Name = "remoteItem", EmitDefaultValue = false, IsRequired = false)]
public Item RemoteItem { get; set; }
///
/// Gets or sets search result.
///
[DataMember(Name = "searchResult", EmitDefaultValue = false, IsRequired = false)]
public SearchResult SearchResult { get; set; }
///
/// Gets or sets shared.
///
[DataMember(Name = "shared", EmitDefaultValue = false, IsRequired = false)]
public Shared Shared { get; set; }
///
/// Gets or sets special folder.
///
[DataMember(Name = "specialFolder", EmitDefaultValue = false, IsRequired = false)]
public SpecialFolder SpecialFolder { get; set; }
///
/// Gets or sets video.
///
[DataMember(Name = "video", EmitDefaultValue = false, IsRequired = false)]
public Video Video { get; set; }
///
/// Gets or sets permissions.
///
[DataMember(Name = "permissions", EmitDefaultValue = false, IsRequired = false)]
public IItemPermissionsCollectionPage Permissions { get; set; }
///
/// Gets or sets versions.
///
[DataMember(Name = "versions", EmitDefaultValue = false, IsRequired = false)]
public IItemVersionsCollectionPage Versions { get; set; }
///
/// Gets or sets children.
///
[DataMember(Name = "children", EmitDefaultValue = false, IsRequired = false)]
public IItemChildrenCollectionPage Children { get; set; }
///
/// Gets or sets thumbnails.
///
[DataMember(Name = "thumbnails", EmitDefaultValue = false, IsRequired = false)]
public IItemThumbnailsCollectionPage Thumbnails { get; set; }
///
/// Gets or sets @odata.type.
///
[DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
public string ODataType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ItemCopyRequestBody.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
///
/// The type ItemCopyRequestBody.
///
[DataContract]
public partial class ItemCopyRequestBody
{
///
/// Gets or sets Name.
///
[DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
public string Name { get; set; }
///
/// Gets or sets ParentReference.
///
[DataMember(Name = "parentReference", EmitDefaultValue = false, IsRequired = false)]
public ItemReference ParentReference { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ItemCreateLinkRequestBody.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
///
/// The type ItemCreateLinkRequestBody.
///
[DataContract]
public partial class ItemCreateLinkRequestBody
{
///
/// Gets or sets Type.
///
[DataMember(Name = "type", EmitDefaultValue = false, IsRequired = false)]
public string Type { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ItemCreateSessionRequestBody.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
///
/// The type ItemCreateSessionRequestBody.
///
[DataContract]
public partial class ItemCreateSessionRequestBody
{
///
/// Gets or sets Item.
///
[DataMember(Name = "item", EmitDefaultValue = false, IsRequired = false)]
public ChunkedUploadSessionDescriptor Item { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ItemInviteRequestBody.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
///
/// The type ItemCreateLinkRequestBody.
///
[DataContract]
public partial class ItemInviteRequestBody
{
[DataMember(Name = "requireSignIn", EmitDefaultValue = false, IsRequired = false)]
public bool RequireSignIn { get; set; }
[DataMember(Name = "sendInvitation", EmitDefaultValue = false, IsRequired = false)]
public bool SendInvitation { get; set; }
[DataMember(Name = "roles", EmitDefaultValue = false, IsRequired = false)]
public string[] Roles { get; set; }
[DataMember(Name = "recipients", EmitDefaultValue = false, IsRequired = false)]
public Recipient[] Recipients { get; set; }
[DataMember(Name = "message", EmitDefaultValue = false, IsRequired = false)]
public string Message { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ItemReference.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type ItemReference.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class ItemReference
{
///
/// Gets or sets driveId.
///
[DataMember(Name = "driveId", EmitDefaultValue = false, IsRequired = false)]
public string DriveId { get; set; }
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets path.
///
[DataMember(Name = "path", EmitDefaultValue = false, IsRequired = false)]
public string Path { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Location.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Location.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Location
{
///
/// Gets or sets altitude.
///
[DataMember(Name = "altitude", EmitDefaultValue = false, IsRequired = false)]
public double? Altitude { get; set; }
///
/// Gets or sets latitude.
///
[DataMember(Name = "latitude", EmitDefaultValue = false, IsRequired = false)]
public double? Latitude { get; set; }
///
/// Gets or sets longitude.
///
[DataMember(Name = "longitude", EmitDefaultValue = false, IsRequired = false)]
public double? Longitude { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/OpenWithApp.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type OpenWithApp.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class OpenWithApp
{
///
/// Gets or sets app.
///
[DataMember(Name = "app", EmitDefaultValue = false, IsRequired = false)]
public Identity App { get; set; }
///
/// Gets or sets viewUrl.
///
[DataMember(Name = "viewUrl", EmitDefaultValue = false, IsRequired = false)]
public string ViewUrl { get; set; }
///
/// Gets or sets editUrl.
///
[DataMember(Name = "editUrl", EmitDefaultValue = false, IsRequired = false)]
public string EditUrl { get; set; }
///
/// Gets or sets viewPostParameters.
///
[DataMember(Name = "viewPostParameters", EmitDefaultValue = false, IsRequired = false)]
public string ViewPostParameters { get; set; }
///
/// Gets or sets editPostParameters.
///
[DataMember(Name = "editPostParameters", EmitDefaultValue = false, IsRequired = false)]
public string EditPostParameters { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/OpenWithSet.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type OpenWithSet.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class OpenWithSet
{
///
/// Gets or sets web.
///
[DataMember(Name = "web", EmitDefaultValue = false, IsRequired = false)]
public OpenWithApp Web { get; set; }
///
/// Gets or sets webEmbed.
///
[DataMember(Name = "webEmbed", EmitDefaultValue = false, IsRequired = false)]
public OpenWithApp WebEmbed { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Permission.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Permission.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Permission
{
///
/// Gets or sets granted to.
///
[DataMember(Name = "grantedTo", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet GrantedTo { get; set; }
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets invitation.
///
[DataMember(Name = "invitation", EmitDefaultValue = false, IsRequired = false)]
public SharingInvitation Invitation { get; set; }
///
/// Gets or sets inherited from.
///
[DataMember(Name = "inheritedFrom", EmitDefaultValue = false, IsRequired = false)]
public ItemReference InheritedFrom { get; set; }
///
/// Gets or sets link.
///
[DataMember(Name = "link", EmitDefaultValue = false, IsRequired = false)]
public SharingLink Link { get; set; }
///
/// Gets or sets roles.
///
[DataMember(Name = "roles", EmitDefaultValue = false, IsRequired = false)]
public IEnumerable Roles { get; set; }
///
/// Gets or sets share id.
///
[DataMember(Name = "shareId", EmitDefaultValue = false, IsRequired = false)]
public string ShareId { get; set; }
///
/// Gets or sets @odata.type.
///
[DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
public string ODataType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Photo.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Photo.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Photo
{
///
/// Gets or sets cameraMake.
///
[DataMember(Name = "cameraMake", EmitDefaultValue = false, IsRequired = false)]
public string CameraMake { get; set; }
///
/// Gets or sets cameraModel.
///
[DataMember(Name = "cameraModel", EmitDefaultValue = false, IsRequired = false)]
public string CameraModel { get; set; }
///
/// Gets or sets exposureDenominator.
///
[DataMember(Name = "exposureDenominator", EmitDefaultValue = false, IsRequired = false)]
public double? ExposureDenominator { get; set; }
///
/// Gets or sets exposureNumerator.
///
[DataMember(Name = "exposureNumerator", EmitDefaultValue = false, IsRequired = false)]
public double? ExposureNumerator { get; set; }
///
/// Gets or sets focalLength.
///
[DataMember(Name = "focalLength", EmitDefaultValue = false, IsRequired = false)]
public double? FocalLength { get; set; }
///
/// Gets or sets fNumber.
///
[DataMember(Name = "fNumber", EmitDefaultValue = false, IsRequired = false)]
public double? FNumber { get; set; }
///
/// Gets or sets takenDateTime.
///
[DataMember(Name = "takenDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? TakenDateTime { get; set; }
///
/// Gets or sets iso.
///
[DataMember(Name = "iso", EmitDefaultValue = false, IsRequired = false)]
public Int32? Iso { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Quota.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Quota.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Quota
{
///
/// Gets or sets deleted.
///
[DataMember(Name = "deleted", EmitDefaultValue = false, IsRequired = false)]
public Int64? Deleted { get; set; }
///
/// Gets or sets remaining.
///
[DataMember(Name = "remaining", EmitDefaultValue = false, IsRequired = false)]
public Int64? Remaining { get; set; }
///
/// Gets or sets state.
///
[DataMember(Name = "state", EmitDefaultValue = false, IsRequired = false)]
public string State { get; set; }
///
/// Gets or sets total.
///
[DataMember(Name = "total", EmitDefaultValue = false, IsRequired = false)]
public Int64? Total { get; set; }
///
/// Gets or sets used.
///
[DataMember(Name = "used", EmitDefaultValue = false, IsRequired = false)]
public Int64? Used { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Recipient.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type SharingInvitation.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Recipient
{
///
/// Gets or sets email.
///
[DataMember(Name = "email", EmitDefaultValue = false, IsRequired = false)]
public string Email { get; set; }
///
/// Gets or sets alias.
///
[DataMember(Name = "alias", EmitDefaultValue = false, IsRequired = false)]
public string Alias { get; set; }
///
/// Gets or sets objectId.
///
[DataMember(Name = "objectId", EmitDefaultValue = false, IsRequired = false)]
public string ObjectId { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/SearchResult.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type SearchResult.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class SearchResult
{
///
/// Gets or sets onClickTelemetryUrl.
///
[DataMember(Name = "onClickTelemetryUrl", EmitDefaultValue = false, IsRequired = false)]
public string OnClickTelemetryUrl { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Share.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Share.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Share
{
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets name.
///
[DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
public string Name { get; set; }
///
/// Gets or sets owner.
///
[DataMember(Name = "owner", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet Owner { get; set; }
///
/// Gets or sets items.
///
[DataMember(Name = "items", EmitDefaultValue = false, IsRequired = false)]
public IShareItemsCollectionPage Items { get; set; }
///
/// Gets or sets @odata.type.
///
[DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
public string ODataType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Shared.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Shared.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Shared
{
///
/// Gets or sets effectiveRoles.
///
[DataMember(Name = "effectiveRoles", EmitDefaultValue = false, IsRequired = false)]
public IEnumerable EffectiveRoles { get; set; }
///
/// Gets or sets owner.
///
[DataMember(Name = "owner", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet Owner { get; set; }
///
/// Gets or sets scope.
///
[DataMember(Name = "scope", EmitDefaultValue = false, IsRequired = false)]
public string Scope { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/SharingInvitation.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type SharingInvitation.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class SharingInvitation
{
///
/// Gets or sets email.
///
[DataMember(Name = "email", EmitDefaultValue = false, IsRequired = false)]
public string Email { get; set; }
///
/// Gets or sets invitedBy.
///
[DataMember(Name = "invitedBy", EmitDefaultValue = false, IsRequired = false)]
public IdentitySet InvitedBy { get; set; }
///
/// Gets or sets signInRequired.
///
[DataMember(Name = "signInRequired", EmitDefaultValue = false, IsRequired = false)]
public bool? SignInRequired { get; set; }
///
/// Gets or sets sendInvitationStatus.
///
[DataMember(Name = "sendInvitationStatus", EmitDefaultValue = false, IsRequired = false)]
public string SendInvitationStatus { get; set; }
///
/// Gets or sets inviteErrorResolveUrl.
///
[DataMember(Name = "inviteErrorResolveUrl", EmitDefaultValue = false, IsRequired = false)]
public string InviteErrorResolveUrl { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/SharingLink.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type SharingLink.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class SharingLink
{
///
/// Gets or sets application.
///
[DataMember(Name = "application", EmitDefaultValue = false, IsRequired = false)]
public Identity Application { get; set; }
///
/// Gets or sets type.
///
[DataMember(Name = "type", EmitDefaultValue = false, IsRequired = false)]
public string Type { get; set; }
///
/// Gets or sets webUrl.
///
[DataMember(Name = "webUrl", EmitDefaultValue = false, IsRequired = false)]
public string WebUrl { get; set; }
///
/// Gets or sets webHtml.
///
[DataMember(Name = "webHtml", EmitDefaultValue = false, IsRequired = false)]
public string WebHtml { get; set; }
///
/// Gets or sets configuratorUrl.
///
[DataMember(Name = "configuratorUrl", EmitDefaultValue = false, IsRequired = false)]
public string ConfiguratorUrl { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/SpecialFolder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type SpecialFolder.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class SpecialFolder
{
///
/// Gets or sets name.
///
[DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
public string Name { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Thumbnail.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Thumbnail.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Thumbnail
{
///
/// Gets or sets content.
///
[DataMember(Name = "content", EmitDefaultValue = false, IsRequired = false)]
public Stream Content { get; set; }
///
/// Gets or sets height.
///
[DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
public Int32? Height { get; set; }
///
/// Gets or sets url.
///
[DataMember(Name = "url", EmitDefaultValue = false, IsRequired = false)]
public string Url { get; set; }
///
/// Gets or sets width.
///
[DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
public Int32? Width { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/ThumbnailSet.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Thumbnail Set.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class ThumbnailSet
{
///
/// Gets or sets id.
///
[DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
public string Id { get; set; }
///
/// Gets or sets large.
///
[DataMember(Name = "large", EmitDefaultValue = false, IsRequired = false)]
public Thumbnail Large { get; set; }
///
/// Gets or sets medium.
///
[DataMember(Name = "medium", EmitDefaultValue = false, IsRequired = false)]
public Thumbnail Medium { get; set; }
///
/// Gets or sets small.
///
[DataMember(Name = "small", EmitDefaultValue = false, IsRequired = false)]
public Thumbnail Small { get; set; }
///
/// Gets or sets source.
///
[DataMember(Name = "source", EmitDefaultValue = false, IsRequired = false)]
public Thumbnail Source { get; set; }
///
/// Gets or sets @odata.type.
///
[DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
public string ODataType { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true, WriteData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/UploadSession.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type UploadSession.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class UploadSession
{
///
/// Gets or sets uploadUrl.
///
[DataMember(Name = "uploadUrl", EmitDefaultValue = false, IsRequired = false)]
public string UploadUrl { get; set; }
///
/// Gets or sets expirationDateTime.
///
[DataMember(Name = "expirationDateTime", EmitDefaultValue = false, IsRequired = false)]
public DateTimeOffset? ExpirationDateTime { get; set; }
///
/// Gets or sets nextExpectedRanges.
///
[DataMember(Name = "nextExpectedRanges", EmitDefaultValue = false, IsRequired = false)]
public IEnumerable NextExpectedRanges { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Models/Generated/Video.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type Video.
///
[DataContract]
[JsonConverter(typeof(DerivedTypeConverter))]
public partial class Video
{
///
/// Gets or sets bitrate.
///
[DataMember(Name = "bitrate", EmitDefaultValue = false, IsRequired = false)]
public Int32? Bitrate { get; set; }
///
/// Gets or sets duration.
///
[DataMember(Name = "duration", EmitDefaultValue = false, IsRequired = false)]
public Int64? Duration { get; set; }
///
/// Gets or sets height.
///
[DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
public Int32? Height { get; set; }
///
/// Gets or sets width.
///
[DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
public Int32? Width { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Properties/AssemblyInfo.cs
================================================
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.OneDrive.Sdk")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Microsoft.OneDrive.Sdk")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0")]
[assembly: AssemblyFileVersion("2.0.0")]
#if DEBUG
[assembly: InternalsVisibleTo("Test.OneDrive.Sdk")]
#else
[assembly: InternalsVisibleTo("Test.OneDrive.Sdk, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
#endif
================================================
FILE: src/OneDriveSdk/Requests/Extensions/DriveRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial class DriveRequestBuilder
{
///
/// Gets root item request builder.
/// The item request builder.
///
public IItemRequestBuilder Root
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Root), this.Client); }
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/DriveSpecialCollectionRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial class DriveSpecialCollectionRequestBuilder
{
///
/// Gets app root special folder item request builder.
/// The item request builder.
///
public IItemRequestBuilder AppRoot
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.AppRoot), this.Client); }
}
///
/// Gets Documents special folder item request builder.
/// The item request builder.
///
public IItemRequestBuilder Documents
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Documents), this.Client); }
}
///
/// Gets Photos special folder item request builder.
/// The item request builder.
///
public IItemRequestBuilder Photos
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Photos), this.Client); }
}
///
/// Gets Camera Roll special folder item request builder.
/// The item request builder.
///
public IItemRequestBuilder CameraRoll
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.CameraRoll), this.Client); }
}
///
/// Gets Music special folder item request builder.
/// The item request builder.
///
public IItemRequestBuilder Music
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Music), this.Client); }
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IDriveRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial interface IDriveRequestBuilder
{
///
/// Gets root item request builder.
/// The item request builder.
///
IItemRequestBuilder Root { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IDriveSpecialCollectionRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial interface IDriveSpecialCollectionRequestBuilder
{
///
/// Gets app root special folder item request builder.
/// The item request builder.
///
IItemRequestBuilder AppRoot { get; }
///
/// Gets documents special folder item request builder.
/// The item request builder.
///
IItemRequestBuilder Documents { get; }
///
/// Gets photos special folder item request builder.
/// The item request builder.
///
IItemRequestBuilder Photos { get; }
///
/// Gets camera roll special folder item request builder.
/// The item request builder.
///
IItemRequestBuilder CameraRoll { get; }
///
/// Gets Music special folder item request builder.
/// The item request builder.
///
IItemRequestBuilder Music { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IItemRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
///
/// The type ItemRequestBuilder.
///
public partial interface IItemRequestBuilder
{
///
/// Gets item request builder for the specified item path.
/// The item request builder.
///
IItemRequestBuilder ItemWithPath(string path);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IOneDriveClientExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial interface IOneDriveClient
{
///
/// Gets the default drive.
///
IDriveRequestBuilder Drive { get; }
///
/// Gets item request builder for the specified item path.
/// The item request builder.
///
IItemRequestBuilder ItemWithPath(string path);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IShareRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial interface IShareRequestBuilder
{
///
/// Gets root item request builder.
/// The item request builder.
///
IItemRequestBuilder Root { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/IThumbnailSetRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial interface IThumbnailSetRequestBuilder
{
IThumbnailRequestBuilder this[string size] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/ItemRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
///
/// The type ItemRequestBuilder.
///
public partial class ItemRequestBuilder
{
///
/// Gets children request.
/// The children request.
///
public IItemRequestBuilder ItemWithPath(string path)
{
if (!string.IsNullOrEmpty(path))
{
if (!path.StartsWith("/"))
{
path = string.Format("/{0}", path);
}
}
return new ItemRequestBuilder(
string.Format("{0}:{1}:", this.RequestUrl, path),
this.Client);
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/OneDriveClientExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial class OneDriveClient
{
///
/// Gets the default drive.
///
public IDriveRequestBuilder Drive
{
get
{
return new DriveRequestBuilder(string.Format("{0}/{1}", this.BaseUrl, Constants.Url.Drive), this);
}
}
///
/// Gets item request builder for the specified item path.
/// The item request builder.
///
public IItemRequestBuilder ItemWithPath(string path)
{
return new ItemRequestBuilder(
string.Format("{0}{1}:", this.BaseUrl, path),
this);
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/ShareRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial class ShareRequestBuilder
{
///
/// Gets root item request builder.
/// The item request builder.
///
public IItemRequestBuilder Root
{
get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Root), this.Client); }
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/ThumbnailSetExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
public partial class ThumbnailSet
{
///
/// Allows for the lookup of custom thumbnails from this thumbnail set.
///
/// The name of the custom thumbnail.
/// The custom thumbnail.
public Thumbnail this[string customThumbnailName]
{
get
{
if (this.AdditionalData != null)
{
object thumbnail;
if (this.AdditionalData.TryGetValue(customThumbnailName, out thumbnail))
{
return thumbnail as Thumbnail;
}
}
return null;
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Extensions/ThumbnailSetRequestBuilderExtensions.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.OneDrive.Sdk
{
///
/// The type ThumbnailSetRequestBuilder.
///
public partial class ThumbnailSetRequestBuilder
{
public IThumbnailRequestBuilder this[string size]
{
get
{
return new ThumbnailRequestBuilder(
this.AppendSegmentToRequestUrl(size),
this.Client);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveItemsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
///
/// The type DriveItemsCollectionPage.
///
public partial class DriveItemsCollectionPage : CollectionPage- , IDriveItemsCollectionPage
{
///
/// Gets the next page instance.
///
public IDriveItemsCollectionRequest NextPageRequest { get; private set; }
///
/// Initializes the NextPageRequest property.
///
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new DriveItemsCollectionRequest(
nextPageLinkString,
client,
null);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveItemsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type DriveItemsCollectionRequest.
///
public partial class DriveItemsCollectionRequest : BaseRequest, IDriveItemsCollectionRequest
{
///
/// Constructs a new DriveItemsCollectionRequest.
///
/// The URL for the built request.
/// The for handling requests.
/// Query and header option name value pairs for the request.
public DriveItemsCollectionRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.SdkVersionHeaderPrefix = "onedrive";
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item)
{
return this.AddAsync(item, CancellationToken.None);
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "POST";
return this.SendAsync
- (item, cancellationToken);
}
///
/// Gets the collection page.
///
/// The collection page.
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
public async System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken)
{
this.Method = "GET";
var response = await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
if (response != null && response.Value != null && response.Value.CurrentPage != null)
{
if (response.AdditionalData != null)
{
object nextPageLink;
response.AdditionalData.TryGetValue("@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
response.Value.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
// Copy the additional data collection to the page itself so that information is not lost
response.Value.AdditionalData = response.AdditionalData;
}
return response.Value;
}
return null;
}
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
public IDriveItemsCollectionRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
public IDriveItemsCollectionRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
public IDriveItemsCollectionRequest Top(int value)
{
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
return this;
}
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
public IDriveItemsCollectionRequest Filter(string value)
{
this.QueryOptions.Add(new QueryOption("$filter", value));
return this;
}
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
public IDriveItemsCollectionRequest Skip(int value)
{
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
return this;
}
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
public IDriveItemsCollectionRequest OrderBy(string value)
{
this.QueryOptions.Add(new QueryOption("$orderby", value));
return this;
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveItemsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The type DriveItemsCollectionRequestBuilder.
///
public partial class DriveItemsCollectionRequestBuilder : BaseRequestBuilder, IDriveItemsCollectionRequestBuilder
{
///
/// Constructs a new DriveItemsCollectionRequestBuilder.
///
/// The URL for the built request.
/// The for handling requests.
public DriveItemsCollectionRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
}
///
/// Builds the request.
///
/// The built request.
public IDriveItemsCollectionRequest Request()
{
return this.Request(null);
}
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
public IDriveItemsCollectionRequest Request(IEnumerable options)
{
return new DriveItemsCollectionRequest(this.RequestUrl, this.Client, options);
}
///
/// Gets an for the specified DriveItem.
///
/// The ID for the DriveItem.
/// The .
public IItemRequestBuilder this[string id]
{
get
{
return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(id), this.Client);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveItemsCollectionResponse.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type DriveItemsCollectionResponse.
///
[DataContract]
public class DriveItemsCollectionResponse
{
///
/// Gets or sets the value.
///
[DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
public IDriveItemsCollectionPage Value { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRecentCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using Microsoft.Graph;
///
/// The type DriveRecentCollectionPage.
///
public partial class DriveRecentCollectionPage : CollectionPage- , IDriveRecentCollectionPage
{
///
/// Gets the next page instance.
///
public IDriveRecentRequest NextPageRequest { get; private set; }
///
/// Initializes the NextPageRequest property.
///
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new DriveRecentRequest(
nextPageLinkString,
client,
null);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRecentCollectionResponse.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type DriveRecentCollectionResponse.
///
[DataContract]
public class DriveRecentCollectionResponse
{
///
/// Gets or sets the value.
///
[DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
public IDriveRecentCollectionPage Value { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRecentRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type DriveRecentRequest.
///
public partial class DriveRecentRequest : BaseRequest, IDriveRecentRequest
{
///
/// Constructs a new DriveRecentRequest.
///
public DriveRecentRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.Method = "GET";
}
///
/// Issues the GET request.
///
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Issues the GET request.
///
/// The for the request.
/// The task to await for async call.
public async System.Threading.Tasks.Task GetAsync(
CancellationToken cancellationToken)
{
var response = await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
if (response != null && response.Value != null && response.Value.CurrentPage != null)
{
if (response.AdditionalData != null)
{
response.Value.AdditionalData = response.AdditionalData;
object nextPageLink;
response.AdditionalData.TryGetValue("@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
response.Value.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
}
return response.Value;
}
return null;
}
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
public IDriveRecentRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
public IDriveRecentRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
public IDriveRecentRequest Top(int value)
{
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
return this;
}
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
public IDriveRecentRequest Filter(string value)
{
this.QueryOptions.Add(new QueryOption("$filter", value));
return this;
}
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
public IDriveRecentRequest Skip(int value)
{
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
return this;
}
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
public IDriveRecentRequest OrderBy(string value)
{
this.QueryOptions.Add(new QueryOption("$orderby", value));
return this;
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRecentRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The type DriveRecentRequestBuilder.
///
public partial class DriveRecentRequestBuilder : BaseFunctionMethodRequestBuilder, IDriveRecentRequestBuilder
{
///
/// Constructs a new .
///
/// The URL for the request.
/// The for handling requests.
public DriveRecentRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
this.passParametersInQueryString = true;
}
///
/// A method used by the base class to construct a request class instance.
///
/// The request URL to
/// The query and header options for the request.
/// An instance of a specific request class.
protected override IDriveRecentRequest CreateRequest(string functionUrl, IEnumerable options)
{
var request = new DriveRecentRequest(functionUrl, this.Client, options);
return request;
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type DriveRequest.
///
public partial class DriveRequest : BaseRequest, IDriveRequest
{
///
/// Constructs a new DriveRequest.
///
/// The URL for the built request.
/// The for handling requests.
/// Query and header option name value pairs for the request.
public DriveRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.SdkVersionHeaderPrefix = "onedrive";
}
///
/// Creates the specified Drive using PUT.
///
/// The Drive to create.
/// The created Drive.
public System.Threading.Tasks.Task CreateAsync(Drive driveToCreate)
{
return this.CreateAsync(driveToCreate, CancellationToken.None);
}
///
/// Creates the specified Drive using PUT.
///
/// The Drive to create.
/// The for the request.
/// The created Drive.
public async System.Threading.Tasks.Task CreateAsync(Drive driveToCreate, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "PUT";
var newEntity = await this.SendAsync(driveToCreate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(newEntity);
return newEntity;
}
///
/// Deletes the specified Drive.
///
/// The task to await.
public System.Threading.Tasks.Task DeleteAsync()
{
return this.DeleteAsync(CancellationToken.None);
}
///
/// Deletes the specified Drive.
///
/// The for the request.
/// The task to await.
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
{
this.Method = "DELETE";
await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
}
///
/// Gets the specified Drive.
///
/// The Drive.
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Gets the specified Drive.
///
/// The for the request.
/// The Drive.
public async System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken)
{
this.Method = "GET";
var retrievedEntity = await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(retrievedEntity);
return retrievedEntity;
}
///
/// Updates the specified Drive using PATCH.
///
/// The Drive to update.
/// The updated Drive.
public System.Threading.Tasks.Task UpdateAsync(Drive driveToUpdate)
{
return this.UpdateAsync(driveToUpdate, CancellationToken.None);
}
///
/// Updates the specified Drive using PATCH.
///
/// The Drive to update.
/// The for the request.
/// The updated Drive.
public async System.Threading.Tasks.Task UpdateAsync(Drive driveToUpdate, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "PATCH";
var updatedEntity = await this.SendAsync(driveToUpdate, cancellationToken).ConfigureAwait(false);
this.InitializeCollectionProperties(updatedEntity);
return updatedEntity;
}
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
public IDriveRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
public IDriveRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
///
/// Initializes any collection properties after deserialization, like next requests for paging.
///
/// The with the collection properties to initialize.
private void InitializeCollectionProperties(Drive driveToInitialize)
{
if (driveToInitialize != null && driveToInitialize.AdditionalData != null)
{
if (driveToInitialize.Items != null && driveToInitialize.Items.CurrentPage != null)
{
driveToInitialize.Items.AdditionalData = driveToInitialize.AdditionalData;
object nextPageLink;
driveToInitialize.AdditionalData.TryGetValue("items@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
driveToInitialize.Items.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
}
if (driveToInitialize.Shared != null && driveToInitialize.Shared.CurrentPage != null)
{
driveToInitialize.Shared.AdditionalData = driveToInitialize.AdditionalData;
object nextPageLink;
driveToInitialize.AdditionalData.TryGetValue("shared@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
driveToInitialize.Shared.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
}
if (driveToInitialize.Special != null && driveToInitialize.Special.CurrentPage != null)
{
driveToInitialize.Special.AdditionalData = driveToInitialize.AdditionalData;
object nextPageLink;
driveToInitialize.AdditionalData.TryGetValue("special@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
driveToInitialize.Special.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
}
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The type DriveRequestBuilder.
///
public partial class DriveRequestBuilder : BaseRequestBuilder, IDriveRequestBuilder
{
///
/// Constructs a new DriveRequestBuilder.
///
/// The URL for the built request.
/// The for handling requests.
public DriveRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
}
///
/// Builds the request.
///
/// The built request.
public IDriveRequest Request()
{
return this.Request(null);
}
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
public IDriveRequest Request(IEnumerable options)
{
return new DriveRequest(this.RequestUrl, this.Client, options);
}
///
/// Gets the request builder for Items.
///
/// The .
public IDriveItemsCollectionRequestBuilder Items
{
get
{
return new DriveItemsCollectionRequestBuilder(this.AppendSegmentToRequestUrl("items"), this.Client);
}
}
///
/// Gets the request builder for Shared.
///
/// The .
public IDriveSharedCollectionRequestBuilder Shared
{
get
{
return new DriveSharedCollectionRequestBuilder(this.AppendSegmentToRequestUrl("shared"), this.Client);
}
}
///
/// Gets the request builder for Special.
///
/// The .
public IDriveSpecialCollectionRequestBuilder Special
{
get
{
return new DriveSpecialCollectionRequestBuilder(this.AppendSegmentToRequestUrl("special"), this.Client);
}
}
///
/// Gets the request builder for DriveRecent.
///
/// The .
public IDriveRecentRequestBuilder Recent()
{
return new DriveRecentRequestBuilder(
this.AppendSegmentToRequestUrl("oneDrive.recent"),
this.Client);
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSharedCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
///
/// The type DriveSharedCollectionPage.
///
public partial class DriveSharedCollectionPage : CollectionPage- , IDriveSharedCollectionPage
{
///
/// Gets the next page instance.
///
public IDriveSharedCollectionRequest NextPageRequest { get; private set; }
///
/// Initializes the NextPageRequest property.
///
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new DriveSharedCollectionRequest(
nextPageLinkString,
client,
null);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSharedCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type DriveSharedCollectionRequest.
///
public partial class DriveSharedCollectionRequest : BaseRequest, IDriveSharedCollectionRequest
{
///
/// Constructs a new DriveSharedCollectionRequest.
///
/// The URL for the built request.
/// The for handling requests.
/// Query and header option name value pairs for the request.
public DriveSharedCollectionRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.SdkVersionHeaderPrefix = "onedrive";
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item)
{
return this.AddAsync(item, CancellationToken.None);
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "POST";
return this.SendAsync
- (item, cancellationToken);
}
///
/// Gets the collection page.
///
/// The collection page.
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
public async System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken)
{
this.Method = "GET";
var response = await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
if (response != null && response.Value != null && response.Value.CurrentPage != null)
{
if (response.AdditionalData != null)
{
object nextPageLink;
response.AdditionalData.TryGetValue("@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
response.Value.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
// Copy the additional data collection to the page itself so that information is not lost
response.Value.AdditionalData = response.AdditionalData;
}
return response.Value;
}
return null;
}
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
public IDriveSharedCollectionRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
public IDriveSharedCollectionRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
public IDriveSharedCollectionRequest Top(int value)
{
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
return this;
}
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
public IDriveSharedCollectionRequest Filter(string value)
{
this.QueryOptions.Add(new QueryOption("$filter", value));
return this;
}
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
public IDriveSharedCollectionRequest Skip(int value)
{
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
return this;
}
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
public IDriveSharedCollectionRequest OrderBy(string value)
{
this.QueryOptions.Add(new QueryOption("$orderby", value));
return this;
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSharedCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The type DriveSharedCollectionRequestBuilder.
///
public partial class DriveSharedCollectionRequestBuilder : BaseRequestBuilder, IDriveSharedCollectionRequestBuilder
{
///
/// Constructs a new DriveSharedCollectionRequestBuilder.
///
/// The URL for the built request.
/// The for handling requests.
public DriveSharedCollectionRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
}
///
/// Builds the request.
///
/// The built request.
public IDriveSharedCollectionRequest Request()
{
return this.Request(null);
}
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
public IDriveSharedCollectionRequest Request(IEnumerable options)
{
return new DriveSharedCollectionRequest(this.RequestUrl, this.Client, options);
}
///
/// Gets an for the specified DriveItem.
///
/// The ID for the DriveItem.
/// The .
public IItemRequestBuilder this[string id]
{
get
{
return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(id), this.Client);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSharedCollectionResponse.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type DriveSharedCollectionResponse.
///
[DataContract]
public class DriveSharedCollectionResponse
{
///
/// Gets or sets the value.
///
[DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
public IDriveSharedCollectionPage Value { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSpecialCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
///
/// The type DriveSpecialCollectionPage.
///
public partial class DriveSpecialCollectionPage : CollectionPage- , IDriveSpecialCollectionPage
{
///
/// Gets the next page instance.
///
public IDriveSpecialCollectionRequest NextPageRequest { get; private set; }
///
/// Initializes the NextPageRequest property.
///
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new DriveSpecialCollectionRequest(
nextPageLinkString,
client,
null);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSpecialCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type DriveSpecialCollectionRequest.
///
public partial class DriveSpecialCollectionRequest : BaseRequest, IDriveSpecialCollectionRequest
{
///
/// Constructs a new DriveSpecialCollectionRequest.
///
/// The URL for the built request.
/// The for handling requests.
/// Query and header option name value pairs for the request.
public DriveSpecialCollectionRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.SdkVersionHeaderPrefix = "onedrive";
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item)
{
return this.AddAsync(item, CancellationToken.None);
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "POST";
return this.SendAsync
- (item, cancellationToken);
}
///
/// Gets the collection page.
///
/// The collection page.
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
public async System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken)
{
this.Method = "GET";
var response = await this.SendAsync(null, cancellationToken).ConfigureAwait(false);
if (response != null && response.Value != null && response.Value.CurrentPage != null)
{
if (response.AdditionalData != null)
{
object nextPageLink;
response.AdditionalData.TryGetValue("@odata.nextLink", out nextPageLink);
var nextPageLinkString = nextPageLink as string;
if (!string.IsNullOrEmpty(nextPageLinkString))
{
response.Value.InitializeNextPageRequest(
this.Client,
nextPageLinkString);
}
// Copy the additional data collection to the page itself so that information is not lost
response.Value.AdditionalData = response.AdditionalData;
}
return response.Value;
}
return null;
}
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
public IDriveSpecialCollectionRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
public IDriveSpecialCollectionRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
public IDriveSpecialCollectionRequest Top(int value)
{
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
return this;
}
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
public IDriveSpecialCollectionRequest Filter(string value)
{
this.QueryOptions.Add(new QueryOption("$filter", value));
return this;
}
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
public IDriveSpecialCollectionRequest Skip(int value)
{
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
return this;
}
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
public IDriveSpecialCollectionRequest OrderBy(string value)
{
this.QueryOptions.Add(new QueryOption("$orderby", value));
return this;
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSpecialCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The type DriveSpecialCollectionRequestBuilder.
///
public partial class DriveSpecialCollectionRequestBuilder : BaseRequestBuilder, IDriveSpecialCollectionRequestBuilder
{
///
/// Constructs a new DriveSpecialCollectionRequestBuilder.
///
/// The URL for the built request.
/// The for handling requests.
public DriveSpecialCollectionRequestBuilder(
string requestUrl,
IBaseClient client)
: base(requestUrl, client)
{
}
///
/// Builds the request.
///
/// The built request.
public IDriveSpecialCollectionRequest Request()
{
return this.Request(null);
}
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
public IDriveSpecialCollectionRequest Request(IEnumerable options)
{
return new DriveSpecialCollectionRequest(this.RequestUrl, this.Client, options);
}
///
/// Gets an for the specified DriveItem.
///
/// The ID for the DriveItem.
/// The .
public IItemRequestBuilder this[string id]
{
get
{
return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(id), this.Client);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/DriveSpecialCollectionResponse.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The type DriveSpecialCollectionResponse.
///
[DataContract]
public class DriveSpecialCollectionResponse
{
///
/// Gets or sets the value.
///
[DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
public IDriveSpecialCollectionPage Value { get; set; }
///
/// Gets or sets additional data.
///
[JsonExtensionData(ReadData = true)]
public IDictionary AdditionalData { get; set; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveItemsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IDriveItemsCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IDriveItemsCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IDriveItemsCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveItemsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IDriveItemsCollectionRequest.
///
public partial interface IDriveItemsCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IDriveItemsCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IDriveItemsCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IDriveItemsCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IDriveItemsCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IDriveItemsCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IDriveItemsCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveItemsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IDriveItemsCollectionRequestBuilder.
///
public partial interface IDriveItemsCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IDriveItemsCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IDriveItemsCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveRecentCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IDriveRecentCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IDriveRecentCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IDriveRecentRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveRecentRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IDriveRecentRequest.
///
public partial interface IDriveRecentRequest : IBaseRequest
{
///
/// Issues the GET request.
///
System.Threading.Tasks.Task GetAsync();
///
/// Issues the GET request.
///
/// /// The for the request.
/// TheIDriveRecentCollectionPage
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IDriveRecentRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IDriveRecentRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IDriveRecentRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IDriveRecentRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IDriveRecentRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IDriveRecentRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveRecentRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IDriveRecentRequestBuilder.
///
public partial interface IDriveRecentRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IDriveRecentRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IDriveRequest.
///
public partial interface IDriveRequest : IBaseRequest
{
///
/// Creates the specified Drive using PUT.
///
/// The Drive to create.
/// The created Drive.
System.Threading.Tasks.Task CreateAsync(Drive driveToCreate); ///
/// Creates the specified Drive using PUT.
///
/// The Drive to create.
/// The for the request.
/// The created Drive.
System.Threading.Tasks.Task CreateAsync(Drive driveToCreate, CancellationToken cancellationToken);
///
/// Deletes the specified Drive.
///
/// The task to await.
System.Threading.Tasks.Task DeleteAsync();
///
/// Deletes the specified Drive.
///
/// The for the request.
/// The task to await.
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
///
/// Gets the specified Drive.
///
/// The Drive.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the specified Drive.
///
/// The for the request.
/// The Drive.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Updates the specified Drive using PATCH.
///
/// The Drive to update.
/// The updated Drive.
System.Threading.Tasks.Task UpdateAsync(Drive driveToUpdate);
///
/// Updates the specified Drive using PATCH.
///
/// The Drive to update.
/// The for the request.
/// The updated Drive.
System.Threading.Tasks.Task UpdateAsync(Drive driveToUpdate, CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IDriveRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IDriveRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IDriveRequestBuilder.
///
public partial interface IDriveRequestBuilder : IBaseRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IDriveRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IDriveRequest Request(IEnumerable options);
///
/// Gets the request builder for Items.
///
/// The .
IDriveItemsCollectionRequestBuilder Items { get; }
///
/// Gets the request builder for Shared.
///
/// The .
IDriveSharedCollectionRequestBuilder Shared { get; }
///
/// Gets the request builder for Special.
///
/// The .
IDriveSpecialCollectionRequestBuilder Special { get; }
///
/// Gets the request builder for DriveRecent.
///
/// The .
IDriveRecentRequestBuilder Recent();
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSharedCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IDriveSharedCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IDriveSharedCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IDriveSharedCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSharedCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IDriveSharedCollectionRequest.
///
public partial interface IDriveSharedCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IDriveSharedCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IDriveSharedCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IDriveSharedCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IDriveSharedCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IDriveSharedCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IDriveSharedCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSharedCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IDriveSharedCollectionRequestBuilder.
///
public partial interface IDriveSharedCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IDriveSharedCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IDriveSharedCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSpecialCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IDriveSpecialCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IDriveSpecialCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IDriveSpecialCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSpecialCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IDriveSpecialCollectionRequest.
///
public partial interface IDriveSpecialCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IDriveSpecialCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IDriveSpecialCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IDriveSpecialCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IDriveSpecialCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IDriveSpecialCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IDriveSpecialCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IDriveSpecialCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IDriveSpecialCollectionRequestBuilder.
///
public partial interface IDriveSpecialCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IDriveSpecialCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IDriveSpecialCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemChildrenCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemChildrenCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemChildrenCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IItemChildrenCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemChildrenCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemChildrenCollectionRequest.
///
public partial interface IItemChildrenCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemChildrenCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemChildrenCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemChildrenCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemChildrenCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemChildrenCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemChildrenCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemChildrenCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IItemChildrenCollectionRequestBuilder.
///
public partial interface IItemChildrenCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemChildrenCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemChildrenCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemContentRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemContentRequest.
///
public partial interface IItemContentRequest : IBaseRequest
{
///
/// Gets the stream.
///
/// The stream.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the stream.
///
/// The for the request.
/// The to pass to the on send.
/// The stream.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead);
///
/// PUTs the specified stream.
///
/// The type returned by the PUT call.
/// The stream to PUT.
/// The object returned by the PUT call.
System.Threading.Tasks.Task PutAsync(Stream content) where T : Item;
///
/// PUTs the specified stream.
///
/// The type returned by the PUT call.
/// The stream to PUT.
/// The for the request.
/// The to pass to the on send.
/// The object returned by the PUT call.
System.Threading.Tasks.Task PutAsync(Stream content, CancellationToken cancellationToken, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) where T : Item;
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemContentRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IItemContentRequestBuilder.
///
public partial interface IItemContentRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemContentRequest Request();
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCopyRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemCopyRequest.
///
public partial interface IItemCopyRequest : IBaseRequest
{
///
/// Gets the request body.
///
ItemCopyRequestBody RequestBody { get; }
///
/// Issues the POST request.
///
System.Threading.Tasks.Task> PostAsync();
///
/// Issues the POST request.
///
/// /// The for the request.
/// TheIAsyncMonitor
System.Threading.Tasks.Task> PostAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemCopyRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemCopyRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCopyRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemCopyRequestBuilder.
///
public partial interface IItemCopyRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemCopyRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCreateLinkRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemCreateLinkRequest.
///
public partial interface IItemCreateLinkRequest : IBaseRequest
{
///
/// Gets the request body.
///
ItemCreateLinkRequestBody RequestBody { get; }
///
/// Issues the POST request.
///
System.Threading.Tasks.Task PostAsync();
///
/// Issues the POST request.
///
/// /// The for the request.
/// ThePermission
System.Threading.Tasks.Task PostAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemCreateLinkRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemCreateLinkRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCreateLinkRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemCreateLinkRequestBuilder.
///
public partial interface IItemCreateLinkRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemCreateLinkRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCreateSessionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemCreateSessionRequest.
///
public partial interface IItemCreateSessionRequest : IBaseRequest
{
///
/// Gets the request body.
///
ItemCreateSessionRequestBody RequestBody { get; }
///
/// Issues the POST request.
///
System.Threading.Tasks.Task PostAsync();
///
/// Issues the POST request.
///
/// /// The for the request.
/// TheUploadSession
System.Threading.Tasks.Task PostAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemCreateSessionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemCreateSessionRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemCreateSessionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemCreateSessionRequestBuilder.
///
public partial interface IItemCreateSessionRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemCreateSessionRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemDeltaCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemDeltaCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemDeltaCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IItemDeltaRequest NextPageRequest { get; }
///
/// Gets or sets the Token.
///
string Token { get; set; }
///
/// Gets or sets the DeltaLink.
///
string DeltaLink { get; set; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemDeltaRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemDeltaRequest.
///
public partial interface IItemDeltaRequest : IBaseRequest
{
///
/// Issues the GET request.
///
System.Threading.Tasks.Task GetAsync();
///
/// Issues the GET request.
///
/// /// The for the request.
/// TheIItemDeltaCollectionPage
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemDeltaRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemDeltaRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemDeltaRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemDeltaRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemDeltaRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemDeltaRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemDeltaRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemDeltaRequestBuilder.
///
public partial interface IItemDeltaRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemDeltaRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemInviteRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemCreateLinkRequest.
///
public partial interface IItemInviteRequest : IBaseRequest
{
///
/// Gets the request body.
///
ItemInviteRequestBody RequestBody { get; }
///
/// Issues the POST request.
///
System.Threading.Tasks.Task PostAsync();
///
/// Issues the POST request.
///
/// /// The for the request.
/// ThePermission
System.Threading.Tasks.Task PostAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemInviteRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemInviteRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemInviteRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemCreateLinkRequestBuilder.
///
public partial interface IItemInviteRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemInviteRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemPermissionsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemPermissionsCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemPermissionsCollectionPage : ICollectionPage
{
///
/// Gets the next page instance.
///
IItemPermissionsCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemPermissionsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemPermissionsCollectionRequest.
///
public partial interface IItemPermissionsCollectionRequest : IBaseRequest
{
///
/// Adds the specified Permission to the collection via POST.
///
/// The Permission to add.
/// The created Permission.
System.Threading.Tasks.Task AddAsync(Permission permission);
///
/// Adds the specified Permission to the collection via POST.
///
/// The Permission to add.
/// The for the request.
/// The created Permission.
System.Threading.Tasks.Task AddAsync(Permission permission, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemPermissionsCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemPermissionsCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemPermissionsCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemPermissionsCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemPermissionsCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemPermissionsCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemPermissionsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IItemPermissionsCollectionRequestBuilder.
///
public partial interface IItemPermissionsCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemPermissionsCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemPermissionsCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Permission.
///
/// The ID for the Permission.
/// The .
IPermissionRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemRequest.
///
public partial interface IItemRequest : IBaseRequest
{
///
/// Creates the specified Item using PUT.
///
/// The Item to create.
/// The created Item.
System.Threading.Tasks.Task- CreateAsync(Item itemToCreate); ///
/// Creates the specified Item using PUT.
///
/// The Item to create.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- CreateAsync(Item itemToCreate, CancellationToken cancellationToken);
///
/// Deletes the specified Item.
///
/// The task to await.
System.Threading.Tasks.Task DeleteAsync();
///
/// Deletes the specified Item.
///
/// The for the request.
/// The task to await.
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
///
/// Gets the specified Item.
///
/// The Item.
System.Threading.Tasks.Task- GetAsync();
///
/// Gets the specified Item.
///
/// The for the request.
/// The Item.
System.Threading.Tasks.Task- GetAsync(CancellationToken cancellationToken);
///
/// Updates the specified Item using PATCH.
///
/// The Item to update.
/// The updated Item.
System.Threading.Tasks.Task- UpdateAsync(Item itemToUpdate);
///
/// Updates the specified Item using PATCH.
///
/// The Item to update.
/// The for the request.
/// The updated Item.
System.Threading.Tasks.Task- UpdateAsync(Item itemToUpdate, CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemRequestBuilder.
///
public partial interface IItemRequestBuilder : IBaseRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemRequest Request(IEnumerable options);
///
/// Gets the request builder for Permissions.
///
/// The .
IItemPermissionsCollectionRequestBuilder Permissions { get; }
///
/// Gets the request builder for Versions.
///
/// The .
IItemVersionsCollectionRequestBuilder Versions { get; }
///
/// Gets the request builder for Children.
///
/// The .
IItemChildrenCollectionRequestBuilder Children { get; }
///
/// Gets the request builder for Thumbnails.
///
/// The .
IItemThumbnailsCollectionRequestBuilder Thumbnails { get; }
///
/// Gets the request builder for Content.
///
/// The .
IItemContentRequestBuilder Content { get; }
///
/// Gets the request builder for ItemCreateSession.
///
/// The .
IItemCreateSessionRequestBuilder CreateSession(
ChunkedUploadSessionDescriptor item = null);
///
/// Gets the request builder for ItemCopy.
///
/// The .
IItemCopyRequestBuilder Copy(
string name = null,
ItemReference parentReference = null);
///
/// Gets the request builder for ItemCreateLink.
///
/// The .
IItemCreateLinkRequestBuilder CreateLink(
string type);
///
/// Gets the request builder for ItemDelta.
///
/// The .
IItemDeltaRequestBuilder Delta(
string token = null);
///
/// Gets the request builder for ItemSearch.
///
/// The .
IItemSearchRequestBuilder Search(
string q = null);
///
/// Gets the request builder for ItemInvite.
///
/// The .
IItemInviteRequestBuilder Invite(string[] roles,
Recipient[] recipients,
bool requiresSignIn = false,
bool sendInvitation = false,
string message = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemSearchCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemSearchCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemSearchCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IItemSearchRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemSearchRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemSearchRequest.
///
public partial interface IItemSearchRequest : IBaseRequest
{
///
/// Issues the GET request.
///
System.Threading.Tasks.Task GetAsync();
///
/// Issues the GET request.
///
/// /// The for the request.
/// TheIItemSearchCollectionPage
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemSearchRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemSearchRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemSearchRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemSearchRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemSearchRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemSearchRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemSearchRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IItemSearchRequestBuilder.
///
public partial interface IItemSearchRequestBuilder
{
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemSearchRequest Request(IEnumerable options = null);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemThumbnailsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemThumbnailsCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemThumbnailsCollectionPage : ICollectionPage
{
///
/// Gets the next page instance.
///
IItemThumbnailsCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemThumbnailsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemThumbnailsCollectionRequest.
///
public partial interface IItemThumbnailsCollectionRequest : IBaseRequest
{
///
/// Adds the specified ThumbnailSet to the collection via POST.
///
/// The ThumbnailSet to add.
/// The created ThumbnailSet.
System.Threading.Tasks.Task AddAsync(ThumbnailSet thumbnailSet);
///
/// Adds the specified ThumbnailSet to the collection via POST.
///
/// The ThumbnailSet to add.
/// The for the request.
/// The created ThumbnailSet.
System.Threading.Tasks.Task AddAsync(ThumbnailSet thumbnailSet, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemThumbnailsCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemThumbnailsCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemThumbnailsCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemThumbnailsCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemThumbnailsCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemThumbnailsCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemThumbnailsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IItemThumbnailsCollectionRequestBuilder.
///
public partial interface IItemThumbnailsCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemThumbnailsCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemThumbnailsCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified ThumbnailSet.
///
/// The ID for the ThumbnailSet.
/// The .
IThumbnailSetRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemVersionsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IItemVersionsCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IItemVersionsCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IItemVersionsCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemVersionsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IItemVersionsCollectionRequest.
///
public partial interface IItemVersionsCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IItemVersionsCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IItemVersionsCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IItemVersionsCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IItemVersionsCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IItemVersionsCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IItemVersionsCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IItemVersionsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IItemVersionsCollectionRequestBuilder.
///
public partial interface IItemVersionsCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IItemVersionsCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IItemVersionsCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveClient.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using Microsoft.Graph;
///
/// The interface IOneDriveClient.
///
public partial interface IOneDriveClient : IBaseClient
{
///
/// Gets the OneDriveDrives request builder.
///
IOneDriveDrivesCollectionRequestBuilder Drives { get; }
///
/// Gets the OneDriveShares request builder.
///
IOneDriveSharesCollectionRequestBuilder Shares { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveDrivesCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IOneDriveDrivesCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IOneDriveDrivesCollectionPage : ICollectionPage
{
///
/// Gets the next page instance.
///
IOneDriveDrivesCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveDrivesCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IOneDriveDrivesCollectionRequest.
///
public partial interface IOneDriveDrivesCollectionRequest : IBaseRequest
{
///
/// Adds the specified Drive to the collection via POST.
///
/// The Drive to add.
/// The created Drive.
System.Threading.Tasks.Task AddAsync(Drive drive);
///
/// Adds the specified Drive to the collection via POST.
///
/// The Drive to add.
/// The for the request.
/// The created Drive.
System.Threading.Tasks.Task AddAsync(Drive drive, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IOneDriveDrivesCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IOneDriveDrivesCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IOneDriveDrivesCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IOneDriveDrivesCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IOneDriveDrivesCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IOneDriveDrivesCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveDrivesCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IOneDriveDrivesCollectionRequestBuilder.
///
public partial interface IOneDriveDrivesCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IOneDriveDrivesCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IOneDriveDrivesCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Drive.
///
/// The ID for the Drive.
/// The .
IDriveRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveSharesCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IOneDriveSharesCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IOneDriveSharesCollectionPage : ICollectionPage
{
///
/// Gets the next page instance.
///
IOneDriveSharesCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveSharesCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IOneDriveSharesCollectionRequest.
///
public partial interface IOneDriveSharesCollectionRequest : IBaseRequest
{
///
/// Adds the specified Share to the collection via POST.
///
/// The Share to add.
/// The created Share.
System.Threading.Tasks.Task AddAsync(Share share);
///
/// Adds the specified Share to the collection via POST.
///
/// The Share to add.
/// The for the request.
/// The created Share.
System.Threading.Tasks.Task AddAsync(Share share, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IOneDriveSharesCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IOneDriveSharesCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IOneDriveSharesCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IOneDriveSharesCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IOneDriveSharesCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IOneDriveSharesCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IOneDriveSharesCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IOneDriveSharesCollectionRequestBuilder.
///
public partial interface IOneDriveSharesCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IOneDriveSharesCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IOneDriveSharesCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Share.
///
/// The ID for the Share.
/// The .
IShareRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IPermissionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IPermissionRequest.
///
public partial interface IPermissionRequest : IBaseRequest
{
///
/// Creates the specified Permission using PUT.
///
/// The Permission to create.
/// The created Permission.
System.Threading.Tasks.Task CreateAsync(Permission permissionToCreate); ///
/// Creates the specified Permission using PUT.
///
/// The Permission to create.
/// The for the request.
/// The created Permission.
System.Threading.Tasks.Task CreateAsync(Permission permissionToCreate, CancellationToken cancellationToken);
///
/// Deletes the specified Permission.
///
/// The task to await.
System.Threading.Tasks.Task DeleteAsync();
///
/// Deletes the specified Permission.
///
/// The for the request.
/// The task to await.
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
///
/// Gets the specified Permission.
///
/// The Permission.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the specified Permission.
///
/// The for the request.
/// The Permission.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Updates the specified Permission using PATCH.
///
/// The Permission to update.
/// The updated Permission.
System.Threading.Tasks.Task UpdateAsync(Permission permissionToUpdate);
///
/// Updates the specified Permission using PATCH.
///
/// The Permission to update.
/// The for the request.
/// The updated Permission.
System.Threading.Tasks.Task UpdateAsync(Permission permissionToUpdate, CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IPermissionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IPermissionRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IPermissionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IPermissionRequestBuilder.
///
public partial interface IPermissionRequestBuilder : IBaseRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IPermissionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IPermissionRequest Request(IEnumerable options);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IShareItemsCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
using Newtonsoft.Json;
///
/// The interface IShareItemsCollectionPage.
///
[JsonConverter(typeof(InterfaceConverter))]
public interface IShareItemsCollectionPage : ICollectionPage-
{
///
/// Gets the next page instance.
///
IShareItemsCollectionRequest NextPageRequest { get; }
///
/// Initializes the NextPageRequest property.
///
void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IShareItemsCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IShareItemsCollectionRequest.
///
public partial interface IShareItemsCollectionRequest : IBaseRequest
{
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item);
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken);
///
/// Gets the collection page.
///
/// The collection page.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IShareItemsCollectionRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IShareItemsCollectionRequest Select(string value);
///
/// Adds the specified top value to the request.
///
/// The top value.
/// The request object to send.
IShareItemsCollectionRequest Top(int value);
///
/// Adds the specified filter value to the request.
///
/// The filter value.
/// The request object to send.
IShareItemsCollectionRequest Filter(string value);
///
/// Adds the specified skip value to the request.
///
/// The skip value.
/// The request object to send.
IShareItemsCollectionRequest Skip(int value);
///
/// Adds the specified orderby value to the request.
///
/// The orderby value.
/// The request object to send.
IShareItemsCollectionRequest OrderBy(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IShareItemsCollectionRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IShareItemsCollectionRequestBuilder.
///
public partial interface IShareItemsCollectionRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IShareItemsCollectionRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IShareItemsCollectionRequest Request(IEnumerable options);
///
/// Gets an for the specified Item.
///
/// The ID for the Item.
/// The .
IItemRequestBuilder this[string id] { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IShareRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IShareRequest.
///
public partial interface IShareRequest : IBaseRequest
{
///
/// Creates the specified Share using PUT.
///
/// The Share to create.
/// The created Share.
System.Threading.Tasks.Task CreateAsync(Share shareToCreate); ///
/// Creates the specified Share using PUT.
///
/// The Share to create.
/// The for the request.
/// The created Share.
System.Threading.Tasks.Task CreateAsync(Share shareToCreate, CancellationToken cancellationToken);
///
/// Deletes the specified Share.
///
/// The task to await.
System.Threading.Tasks.Task DeleteAsync();
///
/// Deletes the specified Share.
///
/// The for the request.
/// The task to await.
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
///
/// Gets the specified Share.
///
/// The Share.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the specified Share.
///
/// The for the request.
/// The Share.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Updates the specified Share using PATCH.
///
/// The Share to update.
/// The updated Share.
System.Threading.Tasks.Task UpdateAsync(Share shareToUpdate);
///
/// Updates the specified Share using PATCH.
///
/// The Share to update.
/// The for the request.
/// The updated Share.
System.Threading.Tasks.Task UpdateAsync(Share shareToUpdate, CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IShareRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IShareRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IShareRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IShareRequestBuilder.
///
public partial interface IShareRequestBuilder : IBaseRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IShareRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IShareRequest Request(IEnumerable options);
///
/// Gets the request builder for Items.
///
/// The .
IShareItemsCollectionRequestBuilder Items { get; }
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IThumbnailContentRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IThumbnailContentRequest.
///
public partial interface IThumbnailContentRequest : IBaseRequest
{
///
/// Gets the stream.
///
/// The stream.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the stream.
///
/// The for the request.
/// The to pass to the on send.
/// The stream.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead);
///
/// PUTs the specified stream.
///
/// The type returned by the PUT call.
/// The stream to PUT.
/// The object returned by the PUT call.
System.Threading.Tasks.Task PutAsync(Stream content) where T : Thumbnail;
///
/// PUTs the specified stream.
///
/// The type returned by the PUT call.
/// The stream to PUT.
/// The for the request.
/// The to pass to the on send.
/// The object returned by the PUT call.
System.Threading.Tasks.Task PutAsync(Stream content, CancellationToken cancellationToken, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) where T : Thumbnail;
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IThumbnailContentRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System.Collections.Generic;
using Microsoft.Graph;
///
/// The interface IThumbnailContentRequestBuilder.
///
public partial interface IThumbnailContentRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IThumbnailContentRequest Request();
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IThumbnailSetRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The interface IThumbnailSetRequest.
///
public partial interface IThumbnailSetRequest : IBaseRequest
{
///
/// Creates the specified ThumbnailSet using PUT.
///
/// The ThumbnailSet to create.
/// The created ThumbnailSet.
System.Threading.Tasks.Task CreateAsync(ThumbnailSet thumbnailSetToCreate); ///
/// Creates the specified ThumbnailSet using PUT.
///
/// The ThumbnailSet to create.
/// The for the request.
/// The created ThumbnailSet.
System.Threading.Tasks.Task CreateAsync(ThumbnailSet thumbnailSetToCreate, CancellationToken cancellationToken);
///
/// Deletes the specified ThumbnailSet.
///
/// The task to await.
System.Threading.Tasks.Task DeleteAsync();
///
/// Deletes the specified ThumbnailSet.
///
/// The for the request.
/// The task to await.
System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken);
///
/// Gets the specified ThumbnailSet.
///
/// The ThumbnailSet.
System.Threading.Tasks.Task GetAsync();
///
/// Gets the specified ThumbnailSet.
///
/// The for the request.
/// The ThumbnailSet.
System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken);
///
/// Updates the specified ThumbnailSet using PATCH.
///
/// The ThumbnailSet to update.
/// The updated ThumbnailSet.
System.Threading.Tasks.Task UpdateAsync(ThumbnailSet thumbnailSetToUpdate);
///
/// Updates the specified ThumbnailSet using PATCH.
///
/// The ThumbnailSet to update.
/// The for the request.
/// The updated ThumbnailSet.
System.Threading.Tasks.Task UpdateAsync(ThumbnailSet thumbnailSetToUpdate, CancellationToken cancellationToken);
///
/// Adds the specified expand value to the request.
///
/// The expand value.
/// The request object to send.
IThumbnailSetRequest Expand(string value);
///
/// Adds the specified select value to the request.
///
/// The select value.
/// The request object to send.
IThumbnailSetRequest Select(string value);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/IThumbnailSetRequestBuilder.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Graph;
///
/// The interface IThumbnailSetRequestBuilder.
///
public partial interface IThumbnailSetRequestBuilder : IBaseRequestBuilder
{
///
/// Builds the request.
///
/// The built request.
IThumbnailSetRequest Request();
///
/// Builds the request.
///
/// The query and header options for the request.
/// The built request.
IThumbnailSetRequest Request(IEnumerable options);
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/ItemChildrenCollectionPage.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using Microsoft.Graph;
///
/// The type ItemChildrenCollectionPage.
///
public partial class ItemChildrenCollectionPage : CollectionPage- , IItemChildrenCollectionPage
{
///
/// Gets the next page instance.
///
public IItemChildrenCollectionRequest NextPageRequest { get; private set; }
///
/// Initializes the NextPageRequest property.
///
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
{
if (!string.IsNullOrEmpty(nextPageLinkString))
{
this.NextPageRequest = new ItemChildrenCollectionRequest(
nextPageLinkString,
client,
null);
}
}
}
}
================================================
FILE: src/OneDriveSdk/Requests/Generated/ItemChildrenCollectionRequest.cs
================================================
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
namespace Microsoft.OneDrive.Sdk
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using Microsoft.Graph;
///
/// The type ItemChildrenCollectionRequest.
///
public partial class ItemChildrenCollectionRequest : BaseRequest, IItemChildrenCollectionRequest
{
///
/// Constructs a new ItemChildrenCollectionRequest.
///
/// The URL for the built request.
/// The for handling requests.
/// Query and header option name value pairs for the request.
public ItemChildrenCollectionRequest(
string requestUrl,
IBaseClient client,
IEnumerable options)
: base(requestUrl, client, options)
{
this.SdkVersionHeaderPrefix = "onedrive";
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item)
{
return this.AddAsync(item, CancellationToken.None);
}
///
/// Adds the specified Item to the collection via POST.
///
/// The Item to add.
/// The for the request.
/// The created Item.
public System.Threading.Tasks.Task- AddAsync(Item item, CancellationToken cancellationToken)
{
this.ContentType = "application/json";
this.Method = "POST";
return this.SendAsync
- (item, cancellationToken);
}
///
/// Gets the collection page.
///
/// The collection page.
public System.Threading.Tasks.Task GetAsync()
{
return this.GetAsync(CancellationToken.None);
}
///
/// Gets the collection page.
///
/// The for the request.
/// The collection page.
public async System.Threading.Tasks.Task GetAsync(CancellationToken cancellationToken)
{
this.Method = "GET";
var response = await this.SendAsync