├── .gitignore
├── Common
└── Microsoft.OneDriveSDK.nuspec
├── LICENSE.txt
├── OneDriveSdk.sln
├── README.md
├── build
└── 35MSSharedLib1024.snk
├── 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
/.gitignore:
--------------------------------------------------------------------------------
1 | *.sln.docstates
2 | *.suo
3 | *.user
4 | *.userosscache
5 | *.sln.ide
6 | TestResults/*
7 | .vs/*
8 |
9 | # UWP project files
10 | project.lock.json
11 | *StoreKey.pfx
12 | Package.StoreAssociation.xml
13 |
14 | # Build results
15 | **/[Dd]ebug/
16 | **/[Dd]ebugPublic/
17 | **/[Rr]elease/
18 | **/[Rr]eleases/
19 | **/x64/
20 | **/x86/
21 | **/build/
22 | **/bld/
23 | **/[Bb]in/
24 | **/[Oo]bj/
25 | /lib
26 |
27 | # NuGet
28 | *.nupkg
29 | **/packages/*
30 | !**/packages/build/
31 |
32 | # VS project upgrade files
33 | _UpgradeReport_Files/
34 | Backup*/
35 | UpgradeLog*.XML
36 | UpgradeLog*.htm
--------------------------------------------------------------------------------
/Common/Microsoft.OneDriveSDK.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.OneDriveSDK
5 | 2.0.7
6 | OneDrive .NET SDK
7 | Microsoft
8 | Microsoft
9 | false
10 | Integrate the OneDrive API into your .NET App!
11 | Copyright 2016 Microsoft Corporation
12 | https://github.com/OneDrive/onedrive-sdk-csharp
13 | http://msdn.microsoft.com/en-US/cc300389
14 | https://dev.onedrive.com/images/OneDriveCloud.png
15 | onedrive sharepoint files livesdk liveconnect cloud storage microsoftaccount windowsliveid microsoftid windowsphone windowsstore metro xaml html
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | OneDrive SDK for CSharp
2 |
3 | Copyright 2015 Microsoft Corporation
4 |
5 | All right reserved.
6 |
7 | MIT License
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy
10 | of this software and associated documentation files (the "Software"), to deal
11 | in the Software without restriction, including without limitation the rights
12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the Software is
14 | furnished to do so, subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in
17 | all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | THE SOFTWARE.
26 |
--------------------------------------------------------------------------------
/build/35MSSharedLib1024.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneDrive/onedrive-sdk-csharp/3594584535a452595c3cc6b3b2a752043bf0f339/build/35MSSharedLib1024.snk
--------------------------------------------------------------------------------
/docs/auth.md:
--------------------------------------------------------------------------------
1 | Authenticate your C# app for OneDrive
2 | =====
3 |
4 | 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.
5 |
6 | **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).
7 |
8 | ## Standard authentication components
9 |
10 | When implementing `IAuthenticationProvider`, a standard set of parameters will be required:
11 |
12 | | Parameter | Description |
13 | |:----------|:------------|
14 | | _clientId_ | The client ID of the app. Required. |
15 | | _returnUrl_ | A redirect URL. Required. |
16 | | _baseUrl_ | URL where the target OneDrive service is found. Required. |
17 | | _scopes_ | Permissions that your app requires from the user. Required. |
18 | | _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. |
19 |
20 | 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.
21 |
22 | ### ClientType
23 | 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.
24 |
25 | If the application would like to interact with both OneDrive for Consumer and OneDrive for Business, a client should be created for each.
26 |
27 |
28 | ## More Information
29 | 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).
--------------------------------------------------------------------------------
/docs/chunked-uploads.md:
--------------------------------------------------------------------------------
1 | # Chunked Uploads
2 | ## Uploading large files and pausing/resuming uploads
3 |
4 | Chunked uploads are easy using `Helpers.ChunkedUploadProvider`. The easiest way to upload a large file
5 | looks like this:
6 |
7 | ```csharp
8 | var session = await oneDriveClient.ItemWithPath(uploadPath).CreateSession().Request().PostAsync();
9 | var provider = new ChunkedUploadProvider(session, oneDriveClient, fileStream);
10 |
11 | var uploadedItem = await provider.UploadAsync();
12 | ```
13 |
14 | Your file will upload in default-sized chunks (5MiB). You can also adjust chunk size by adding a parameter to the `ChunkedUploadProvider`
15 | constructor: `new ChunkedUploadProvider(session, oneDriveClient, fileStream, 1024*1024); // 1 MiB`.
16 |
17 | ## Controlling and Monitoring Large Uploads
18 |
19 | 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
20 | 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)
21 |
22 | ```csharp
23 | // Get the provider
24 | var myMaxChunkSize = 5*1024*1024; // 5MB
25 | var session = await oneDriveClient.ItemWithPath(uploadPath).CreateSession().Request().PostAsync();
26 | var provider = new ChunkedUploadProvider(session, oneDriveClient, fileStream, myMaxChunkSize);
27 |
28 | // Setup the chunk request necessities
29 | var chunkRequests = provider.GetUploadChunkRequests();
30 | var readBuffer = new byte[myMaxChunkSize];
31 | var trackedExceptions = new List();
32 | Item itemResult = null;
33 |
34 | //upload the chunks
35 | foreach(var request in chunkRequests)
36 | {
37 | // Do your updates here: update progress bar, etc.
38 | // ...
39 | // Send chunk request
40 | var result = await provider.GetChunkRequestResponseAsync(request, readBuffer, trackedExceptions);
41 |
42 | if(result.UploadSucceeded)
43 | {
44 | itemResult = result.ItemResponse;
45 | }
46 | }
47 |
48 | // Check that upload succeeded
49 | if (itemResult == null)
50 | {
51 | // Retry the upload
52 | // ...
53 | }
54 | ```
55 |
56 |
--------------------------------------------------------------------------------
/docs/errors.md:
--------------------------------------------------------------------------------
1 | Handling errors in the OneDrive SDK for C#
2 | =====
3 |
4 | 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).
5 |
6 | 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.
7 |
8 | ## Checking the error
9 |
10 | 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).
11 |
12 | ### Checking the error code
13 | You can easily check if an error has a specific code by calling `IsMatch` on the error code value. `IsMatch` is not case sensitive:
14 | ```csharp
15 | if (exception.IsMatch(OneDriveErrorCode.AccessDenied.ToString())
16 | {
17 | // Handle access denied error
18 | }
19 | ```
20 |
21 | 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).
22 |
23 |
24 | ### Authentication errors
25 |
26 | There can be errors during the authentication process. Authentication errors will have the code `AuthenticationFailed`. Authentication cancelled errors will have the code `AuthenticationCancelled`.
27 |
28 | ```csharp
29 | if (exception.IsMatch(OneDriveErrorCode.AuthenticationFailure.ToString())
30 | {
31 | // Handle auth error
32 | }
33 | ```
34 |
35 | The `Message` property will contain more detailed error information if available.
--------------------------------------------------------------------------------
/src/OneDriveSdk/Constants.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public static class Constants
8 | {
9 | public const int PollingIntervalInMs = 5000;
10 |
11 | public static class Headers
12 | {
13 | public const string SdkVersionHeaderPrefix = "onedrive";
14 | }
15 |
16 | public static class Url
17 | {
18 | public const string Drive = "drive";
19 |
20 | public const string Root = "root";
21 |
22 | public const string AppRoot = "approot";
23 |
24 | public const string Documents = "documents";
25 |
26 | public const string Photos = "photos";
27 |
28 | public const string CameraRoll = "cameraroll";
29 |
30 | public const string Music = "music";
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Enums/OneDriveErrorCode.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public enum OneDriveErrorCode
8 | {
9 | AccessDenied,
10 | ActivityLimitReached,
11 | GeneralException,
12 | InvalidRange,
13 | InvalidRequest,
14 | ItemNotFound,
15 | MalwareDetected,
16 | NameAlreadyExists,
17 | NotAllowed,
18 | NotSupported,
19 | ResourceModified,
20 | ResyncRequired,
21 | ServiceNotAvailable,
22 | Timeout,
23 | TooManyRedirects,
24 | QuotaLimitReached,
25 | Unauthenticated,
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ChunkedUploadSessionDescriptor.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type ChunkedUploadSessionDescriptor.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class ChunkedUploadSessionDescriptor
23 | {
24 |
25 | ///
26 | /// Gets or sets name.
27 | ///
28 | [DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
29 | public string Name { get; set; }
30 |
31 | ///
32 | /// Gets or sets additional data.
33 | ///
34 | [JsonExtensionData(ReadData = true)]
35 | public IDictionary AdditionalData { get; set; }
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Deleted.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Deleted.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Deleted
23 | {
24 |
25 | ///
26 | /// Gets or sets state.
27 | ///
28 | [DataMember(Name = "state", EmitDefaultValue = false, IsRequired = false)]
29 | public string State { get; set; }
30 |
31 | ///
32 | /// Gets or sets additional data.
33 | ///
34 | [JsonExtensionData(ReadData = true)]
35 | public IDictionary AdditionalData { get; set; }
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/File.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type File.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class File
23 | {
24 |
25 | ///
26 | /// Gets or sets hashes.
27 | ///
28 | [DataMember(Name = "hashes", EmitDefaultValue = false, IsRequired = false)]
29 | public Hashes Hashes { get; set; }
30 |
31 | ///
32 | /// Gets or sets mimeType.
33 | ///
34 | [DataMember(Name = "mimeType", EmitDefaultValue = false, IsRequired = false)]
35 | public string MimeType { get; set; }
36 |
37 | ///
38 | /// Gets or sets additional data.
39 | ///
40 | [JsonExtensionData(ReadData = true)]
41 | public IDictionary AdditionalData { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/FileSystemInfo.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type FileSystemInfo.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class FileSystemInfo
23 | {
24 |
25 | ///
26 | /// Gets or sets createdDateTime.
27 | ///
28 | [DataMember(Name = "createdDateTime", EmitDefaultValue = false, IsRequired = false)]
29 | public DateTimeOffset? CreatedDateTime { get; set; }
30 |
31 | ///
32 | /// Gets or sets lastModifiedDateTime.
33 | ///
34 | [DataMember(Name = "lastModifiedDateTime", EmitDefaultValue = false, IsRequired = false)]
35 | public DateTimeOffset? LastModifiedDateTime { get; set; }
36 |
37 | ///
38 | /// Gets or sets additional data.
39 | ///
40 | [JsonExtensionData(ReadData = true)]
41 | public IDictionary AdditionalData { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Folder.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Folder.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Folder
23 | {
24 |
25 | ///
26 | /// Gets or sets childCount.
27 | ///
28 | [DataMember(Name = "childCount", EmitDefaultValue = false, IsRequired = false)]
29 | public Int32? ChildCount { get; set; }
30 |
31 | ///
32 | /// Gets or sets additional data.
33 | ///
34 | [JsonExtensionData(ReadData = true)]
35 | public IDictionary AdditionalData { get; set; }
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Hashes.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Hashes.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Hashes
23 | {
24 |
25 | ///
26 | /// Gets or sets crc32Hash.
27 | ///
28 | [DataMember(Name = "crc32Hash", EmitDefaultValue = false, IsRequired = false)]
29 | public string Crc32Hash { get; set; }
30 |
31 | ///
32 | /// Gets or sets sha1Hash.
33 | ///
34 | [DataMember(Name = "sha1Hash", EmitDefaultValue = false, IsRequired = false)]
35 | public string Sha1Hash { get; set; }
36 |
37 | ///
38 | /// Gets or sets additional data.
39 | ///
40 | [JsonExtensionData(ReadData = true)]
41 | public IDictionary AdditionalData { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Identity.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Identity.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Identity
23 | {
24 |
25 | ///
26 | /// Gets or sets displayName.
27 | ///
28 | [DataMember(Name = "displayName", EmitDefaultValue = false, IsRequired = false)]
29 | public string DisplayName { get; set; }
30 |
31 | ///
32 | /// Gets or sets id.
33 | ///
34 | [DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
35 | public string Id { get; set; }
36 |
37 | ///
38 | /// Gets or sets thumbnails.
39 | ///
40 | [DataMember(Name = "thumbnails", EmitDefaultValue = false, IsRequired = false)]
41 | public ThumbnailSet Thumbnails { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/IdentitySet.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type IdentitySet.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class IdentitySet
23 | {
24 |
25 | ///
26 | /// Gets or sets application.
27 | ///
28 | [DataMember(Name = "application", EmitDefaultValue = false, IsRequired = false)]
29 | public Identity Application { get; set; }
30 |
31 | ///
32 | /// Gets or sets device.
33 | ///
34 | [DataMember(Name = "device", EmitDefaultValue = false, IsRequired = false)]
35 | public Identity Device { get; set; }
36 |
37 | ///
38 | /// Gets or sets user.
39 | ///
40 | [DataMember(Name = "user", EmitDefaultValue = false, IsRequired = false)]
41 | public Identity User { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Image.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Image.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Image
23 | {
24 |
25 | ///
26 | /// Gets or sets height.
27 | ///
28 | [DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
29 | public Int32? Height { get; set; }
30 |
31 | ///
32 | /// Gets or sets width.
33 | ///
34 | [DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
35 | public Int32? Width { get; set; }
36 |
37 | ///
38 | /// Gets or sets additional data.
39 | ///
40 | [JsonExtensionData(ReadData = true)]
41 | public IDictionary AdditionalData { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ItemCopyRequestBody.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 |
16 | ///
17 | /// The type ItemCopyRequestBody.
18 | ///
19 | [DataContract]
20 | public partial class ItemCopyRequestBody
21 | {
22 |
23 | ///
24 | /// Gets or sets Name.
25 | ///
26 | [DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
27 | public string Name { get; set; }
28 |
29 | ///
30 | /// Gets or sets ParentReference.
31 | ///
32 | [DataMember(Name = "parentReference", EmitDefaultValue = false, IsRequired = false)]
33 | public ItemReference ParentReference { get; set; }
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ItemCreateLinkRequestBody.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 |
16 | ///
17 | /// The type ItemCreateLinkRequestBody.
18 | ///
19 | [DataContract]
20 | public partial class ItemCreateLinkRequestBody
21 | {
22 |
23 | ///
24 | /// Gets or sets Type.
25 | ///
26 | [DataMember(Name = "type", EmitDefaultValue = false, IsRequired = false)]
27 | public string Type { get; set; }
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ItemCreateSessionRequestBody.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 |
16 | ///
17 | /// The type ItemCreateSessionRequestBody.
18 | ///
19 | [DataContract]
20 | public partial class ItemCreateSessionRequestBody
21 | {
22 |
23 | ///
24 | /// Gets or sets Item.
25 | ///
26 | [DataMember(Name = "item", EmitDefaultValue = false, IsRequired = false)]
27 | public ChunkedUploadSessionDescriptor Item { get; set; }
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ItemInviteRequestBody.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 |
16 | ///
17 | /// The type ItemCreateLinkRequestBody.
18 | ///
19 | [DataContract]
20 | public partial class ItemInviteRequestBody
21 | {
22 | [DataMember(Name = "requireSignIn", EmitDefaultValue = false, IsRequired = false)]
23 | public bool RequireSignIn { get; set; }
24 |
25 | [DataMember(Name = "sendInvitation", EmitDefaultValue = false, IsRequired = false)]
26 | public bool SendInvitation { get; set; }
27 |
28 | [DataMember(Name = "roles", EmitDefaultValue = false, IsRequired = false)]
29 | public string[] Roles { get; set; }
30 |
31 | [DataMember(Name = "recipients", EmitDefaultValue = false, IsRequired = false)]
32 | public Recipient[] Recipients { get; set; }
33 |
34 | [DataMember(Name = "message", EmitDefaultValue = false, IsRequired = false)]
35 | public string Message { get; set; }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/ItemReference.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type ItemReference.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class ItemReference
23 | {
24 |
25 | ///
26 | /// Gets or sets driveId.
27 | ///
28 | [DataMember(Name = "driveId", EmitDefaultValue = false, IsRequired = false)]
29 | public string DriveId { get; set; }
30 |
31 | ///
32 | /// Gets or sets id.
33 | ///
34 | [DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
35 | public string Id { get; set; }
36 |
37 | ///
38 | /// Gets or sets path.
39 | ///
40 | [DataMember(Name = "path", EmitDefaultValue = false, IsRequired = false)]
41 | public string Path { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Location.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Location.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Location
23 | {
24 |
25 | ///
26 | /// Gets or sets altitude.
27 | ///
28 | [DataMember(Name = "altitude", EmitDefaultValue = false, IsRequired = false)]
29 | public double? Altitude { get; set; }
30 |
31 | ///
32 | /// Gets or sets latitude.
33 | ///
34 | [DataMember(Name = "latitude", EmitDefaultValue = false, IsRequired = false)]
35 | public double? Latitude { get; set; }
36 |
37 | ///
38 | /// Gets or sets longitude.
39 | ///
40 | [DataMember(Name = "longitude", EmitDefaultValue = false, IsRequired = false)]
41 | public double? Longitude { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/OpenWithApp.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type OpenWithApp.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class OpenWithApp
23 | {
24 |
25 | ///
26 | /// Gets or sets app.
27 | ///
28 | [DataMember(Name = "app", EmitDefaultValue = false, IsRequired = false)]
29 | public Identity App { get; set; }
30 |
31 | ///
32 | /// Gets or sets viewUrl.
33 | ///
34 | [DataMember(Name = "viewUrl", EmitDefaultValue = false, IsRequired = false)]
35 | public string ViewUrl { get; set; }
36 |
37 | ///
38 | /// Gets or sets editUrl.
39 | ///
40 | [DataMember(Name = "editUrl", EmitDefaultValue = false, IsRequired = false)]
41 | public string EditUrl { get; set; }
42 |
43 | ///
44 | /// Gets or sets viewPostParameters.
45 | ///
46 | [DataMember(Name = "viewPostParameters", EmitDefaultValue = false, IsRequired = false)]
47 | public string ViewPostParameters { get; set; }
48 |
49 | ///
50 | /// Gets or sets editPostParameters.
51 | ///
52 | [DataMember(Name = "editPostParameters", EmitDefaultValue = false, IsRequired = false)]
53 | public string EditPostParameters { get; set; }
54 |
55 | ///
56 | /// Gets or sets additional data.
57 | ///
58 | [JsonExtensionData(ReadData = true)]
59 | public IDictionary AdditionalData { get; set; }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/OpenWithSet.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type OpenWithSet.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class OpenWithSet
23 | {
24 |
25 | ///
26 | /// Gets or sets web.
27 | ///
28 | [DataMember(Name = "web", EmitDefaultValue = false, IsRequired = false)]
29 | public OpenWithApp Web { get; set; }
30 |
31 | ///
32 | /// Gets or sets webEmbed.
33 | ///
34 | [DataMember(Name = "webEmbed", EmitDefaultValue = false, IsRequired = false)]
35 | public OpenWithApp WebEmbed { get; set; }
36 |
37 | ///
38 | /// Gets or sets additional data.
39 | ///
40 | [JsonExtensionData(ReadData = true)]
41 | public IDictionary AdditionalData { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Quota.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Quota.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Quota
23 | {
24 |
25 | ///
26 | /// Gets or sets deleted.
27 | ///
28 | [DataMember(Name = "deleted", EmitDefaultValue = false, IsRequired = false)]
29 | public Int64? Deleted { get; set; }
30 |
31 | ///
32 | /// Gets or sets remaining.
33 | ///
34 | [DataMember(Name = "remaining", EmitDefaultValue = false, IsRequired = false)]
35 | public Int64? Remaining { get; set; }
36 |
37 | ///
38 | /// Gets or sets state.
39 | ///
40 | [DataMember(Name = "state", EmitDefaultValue = false, IsRequired = false)]
41 | public string State { get; set; }
42 |
43 | ///
44 | /// Gets or sets total.
45 | ///
46 | [DataMember(Name = "total", EmitDefaultValue = false, IsRequired = false)]
47 | public Int64? Total { get; set; }
48 |
49 | ///
50 | /// Gets or sets used.
51 | ///
52 | [DataMember(Name = "used", EmitDefaultValue = false, IsRequired = false)]
53 | public Int64? Used { get; set; }
54 |
55 | ///
56 | /// Gets or sets additional data.
57 | ///
58 | [JsonExtensionData(ReadData = true)]
59 | public IDictionary AdditionalData { get; set; }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Recipient.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type SharingInvitation.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Recipient
23 | {
24 | ///
25 | /// Gets or sets email.
26 | ///
27 | [DataMember(Name = "email", EmitDefaultValue = false, IsRequired = false)]
28 | public string Email { get; set; }
29 |
30 | ///
31 | /// Gets or sets alias.
32 | ///
33 | [DataMember(Name = "alias", EmitDefaultValue = false, IsRequired = false)]
34 | public string Alias { get; set; }
35 |
36 | ///
37 | /// Gets or sets objectId.
38 | ///
39 | [DataMember(Name = "objectId", EmitDefaultValue = false, IsRequired = false)]
40 | public string ObjectId { get; set; }
41 |
42 | ///
43 | /// Gets or sets additional data.
44 | ///
45 | [JsonExtensionData(ReadData = true)]
46 | public IDictionary AdditionalData { get; set; }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/SearchResult.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type SearchResult.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class SearchResult
23 | {
24 |
25 | ///
26 | /// Gets or sets onClickTelemetryUrl.
27 | ///
28 | [DataMember(Name = "onClickTelemetryUrl", EmitDefaultValue = false, IsRequired = false)]
29 | public string OnClickTelemetryUrl { get; set; }
30 |
31 | ///
32 | /// Gets or sets additional data.
33 | ///
34 | [JsonExtensionData(ReadData = true)]
35 | public IDictionary AdditionalData { get; set; }
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Share.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Share.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Share
23 | {
24 |
25 | ///
26 | /// Gets or sets id.
27 | ///
28 | [DataMember(Name = "id", EmitDefaultValue = false, IsRequired = false)]
29 | public string Id { get; set; }
30 |
31 | ///
32 | /// Gets or sets name.
33 | ///
34 | [DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
35 | public string Name { get; set; }
36 |
37 | ///
38 | /// Gets or sets owner.
39 | ///
40 | [DataMember(Name = "owner", EmitDefaultValue = false, IsRequired = false)]
41 | public IdentitySet Owner { get; set; }
42 |
43 | ///
44 | /// Gets or sets items.
45 | ///
46 | [DataMember(Name = "items", EmitDefaultValue = false, IsRequired = false)]
47 | public IShareItemsCollectionPage Items { get; set; }
48 |
49 | ///
50 | /// Gets or sets @odata.type.
51 | ///
52 | [DataMember(Name = "@odata.type", EmitDefaultValue = false, IsRequired = false)]
53 | public string ODataType { get; set; }
54 |
55 | ///
56 | /// Gets or sets additional data.
57 | ///
58 | [JsonExtensionData(ReadData = true, WriteData = true)]
59 | public IDictionary AdditionalData { get; set; }
60 |
61 | }
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Shared.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Shared.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Shared
23 | {
24 |
25 | ///
26 | /// Gets or sets effectiveRoles.
27 | ///
28 | [DataMember(Name = "effectiveRoles", EmitDefaultValue = false, IsRequired = false)]
29 | public IEnumerable EffectiveRoles { get; set; }
30 |
31 | ///
32 | /// Gets or sets owner.
33 | ///
34 | [DataMember(Name = "owner", EmitDefaultValue = false, IsRequired = false)]
35 | public IdentitySet Owner { get; set; }
36 |
37 | ///
38 | /// Gets or sets scope.
39 | ///
40 | [DataMember(Name = "scope", EmitDefaultValue = false, IsRequired = false)]
41 | public string Scope { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/SharingInvitation.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type SharingInvitation.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class SharingInvitation
23 | {
24 |
25 | ///
26 | /// Gets or sets email.
27 | ///
28 | [DataMember(Name = "email", EmitDefaultValue = false, IsRequired = false)]
29 | public string Email { get; set; }
30 |
31 | ///
32 | /// Gets or sets invitedBy.
33 | ///
34 | [DataMember(Name = "invitedBy", EmitDefaultValue = false, IsRequired = false)]
35 | public IdentitySet InvitedBy { get; set; }
36 |
37 | ///
38 | /// Gets or sets signInRequired.
39 | ///
40 | [DataMember(Name = "signInRequired", EmitDefaultValue = false, IsRequired = false)]
41 | public bool? SignInRequired { get; set; }
42 |
43 | ///
44 | /// Gets or sets sendInvitationStatus.
45 | ///
46 | [DataMember(Name = "sendInvitationStatus", EmitDefaultValue = false, IsRequired = false)]
47 | public string SendInvitationStatus { get; set; }
48 |
49 | ///
50 | /// Gets or sets inviteErrorResolveUrl.
51 | ///
52 | [DataMember(Name = "inviteErrorResolveUrl", EmitDefaultValue = false, IsRequired = false)]
53 | public string InviteErrorResolveUrl { get; set; }
54 |
55 | ///
56 | /// Gets or sets additional data.
57 | ///
58 | [JsonExtensionData(ReadData = true)]
59 | public IDictionary AdditionalData { get; set; }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/SharingLink.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type SharingLink.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class SharingLink
23 | {
24 |
25 | ///
26 | /// Gets or sets application.
27 | ///
28 | [DataMember(Name = "application", EmitDefaultValue = false, IsRequired = false)]
29 | public Identity Application { get; set; }
30 |
31 | ///
32 | /// Gets or sets type.
33 | ///
34 | [DataMember(Name = "type", EmitDefaultValue = false, IsRequired = false)]
35 | public string Type { get; set; }
36 |
37 | ///
38 | /// Gets or sets webUrl.
39 | ///
40 | [DataMember(Name = "webUrl", EmitDefaultValue = false, IsRequired = false)]
41 | public string WebUrl { get; set; }
42 |
43 | ///
44 | /// Gets or sets webHtml.
45 | ///
46 | [DataMember(Name = "webHtml", EmitDefaultValue = false, IsRequired = false)]
47 | public string WebHtml { get; set; }
48 |
49 | ///
50 | /// Gets or sets configuratorUrl.
51 | ///
52 | [DataMember(Name = "configuratorUrl", EmitDefaultValue = false, IsRequired = false)]
53 | public string ConfiguratorUrl { get; set; }
54 |
55 | ///
56 | /// Gets or sets additional data.
57 | ///
58 | [JsonExtensionData(ReadData = true)]
59 | public IDictionary AdditionalData { get; set; }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/SpecialFolder.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type SpecialFolder.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class SpecialFolder
23 | {
24 |
25 | ///
26 | /// Gets or sets name.
27 | ///
28 | [DataMember(Name = "name", EmitDefaultValue = false, IsRequired = false)]
29 | public string Name { get; set; }
30 |
31 | ///
32 | /// Gets or sets additional data.
33 | ///
34 | [JsonExtensionData(ReadData = true)]
35 | public IDictionary AdditionalData { get; set; }
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Thumbnail.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Thumbnail.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Thumbnail
23 | {
24 |
25 | ///
26 | /// Gets or sets content.
27 | ///
28 | [DataMember(Name = "content", EmitDefaultValue = false, IsRequired = false)]
29 | public Stream Content { get; set; }
30 |
31 | ///
32 | /// Gets or sets height.
33 | ///
34 | [DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
35 | public Int32? Height { get; set; }
36 |
37 | ///
38 | /// Gets or sets url.
39 | ///
40 | [DataMember(Name = "url", EmitDefaultValue = false, IsRequired = false)]
41 | public string Url { get; set; }
42 |
43 | ///
44 | /// Gets or sets width.
45 | ///
46 | [DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
47 | public Int32? Width { get; set; }
48 |
49 | ///
50 | /// Gets or sets additional data.
51 | ///
52 | [JsonExtensionData(ReadData = true)]
53 | public IDictionary AdditionalData { get; set; }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/UploadSession.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type UploadSession.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class UploadSession
23 | {
24 |
25 | ///
26 | /// Gets or sets uploadUrl.
27 | ///
28 | [DataMember(Name = "uploadUrl", EmitDefaultValue = false, IsRequired = false)]
29 | public string UploadUrl { get; set; }
30 |
31 | ///
32 | /// Gets or sets expirationDateTime.
33 | ///
34 | [DataMember(Name = "expirationDateTime", EmitDefaultValue = false, IsRequired = false)]
35 | public DateTimeOffset? ExpirationDateTime { get; set; }
36 |
37 | ///
38 | /// Gets or sets nextExpectedRanges.
39 | ///
40 | [DataMember(Name = "nextExpectedRanges", EmitDefaultValue = false, IsRequired = false)]
41 | public IEnumerable NextExpectedRanges { get; set; }
42 |
43 | ///
44 | /// Gets or sets additional data.
45 | ///
46 | [JsonExtensionData(ReadData = true)]
47 | public IDictionary AdditionalData { get; set; }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Models/Generated/Video.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using System.Runtime.Serialization;
14 | using Microsoft.Graph;
15 | using Newtonsoft.Json;
16 |
17 | ///
18 | /// The type Video.
19 | ///
20 | [DataContract]
21 | [JsonConverter(typeof(DerivedTypeConverter))]
22 | public partial class Video
23 | {
24 |
25 | ///
26 | /// Gets or sets bitrate.
27 | ///
28 | [DataMember(Name = "bitrate", EmitDefaultValue = false, IsRequired = false)]
29 | public Int32? Bitrate { get; set; }
30 |
31 | ///
32 | /// Gets or sets duration.
33 | ///
34 | [DataMember(Name = "duration", EmitDefaultValue = false, IsRequired = false)]
35 | public Int64? Duration { get; set; }
36 |
37 | ///
38 | /// Gets or sets height.
39 | ///
40 | [DataMember(Name = "height", EmitDefaultValue = false, IsRequired = false)]
41 | public Int32? Height { get; set; }
42 |
43 | ///
44 | /// Gets or sets width.
45 | ///
46 | [DataMember(Name = "width", EmitDefaultValue = false, IsRequired = false)]
47 | public Int32? Width { get; set; }
48 |
49 | ///
50 | /// Gets or sets additional data.
51 | ///
52 | [JsonExtensionData(ReadData = true)]
53 | public IDictionary AdditionalData { get; set; }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Microsoft.OneDrive.Sdk")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Microsoft.OneDrive.Sdk")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 | [assembly: NeutralResourcesLanguage("en")]
17 |
18 | // Version information for an assembly consists of the following four values:
19 | //
20 | // Major Version
21 | // Minor Version
22 | // Build Number
23 | // Revision
24 | //
25 | // You can specify all the values or you can default the Build and Revision Numbers
26 | // by using the '*' as shown below:
27 | // [assembly: AssemblyVersion("1.0.*")]
28 | [assembly: AssemblyVersion("2.0.0")]
29 | [assembly: AssemblyFileVersion("2.0.0")]
30 |
31 | #if DEBUG
32 | [assembly: InternalsVisibleTo("Test.OneDrive.Sdk")]
33 | #else
34 | [assembly: InternalsVisibleTo("Test.OneDrive.Sdk, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
35 | #endif
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/DriveRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial class DriveRequestBuilder
8 | {
9 | ///
10 | /// Gets root item request builder.
11 | /// The item request builder.
12 | ///
13 | public IItemRequestBuilder Root
14 | {
15 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Root), this.Client); }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/DriveSpecialCollectionRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial class DriveSpecialCollectionRequestBuilder
8 | {
9 | ///
10 | /// Gets app root special folder item request builder.
11 | /// The item request builder.
12 | ///
13 | public IItemRequestBuilder AppRoot
14 | {
15 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.AppRoot), this.Client); }
16 | }
17 |
18 | ///
19 | /// Gets Documents special folder item request builder.
20 | /// The item request builder.
21 | ///
22 | public IItemRequestBuilder Documents
23 | {
24 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Documents), this.Client); }
25 | }
26 |
27 | ///
28 | /// Gets Photos special folder item request builder.
29 | /// The item request builder.
30 | ///
31 | public IItemRequestBuilder Photos
32 | {
33 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Photos), this.Client); }
34 | }
35 |
36 | ///
37 | /// Gets Camera Roll special folder item request builder.
38 | /// The item request builder.
39 | ///
40 | public IItemRequestBuilder CameraRoll
41 | {
42 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.CameraRoll), this.Client); }
43 | }
44 |
45 | ///
46 | /// Gets Music special folder item request builder.
47 | /// The item request builder.
48 | ///
49 | public IItemRequestBuilder Music
50 | {
51 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Music), this.Client); }
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IDriveRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 | namespace Microsoft.OneDrive.Sdk
5 | {
6 | public partial interface IDriveRequestBuilder
7 | {
8 | ///
9 | /// Gets root item request builder.
10 | /// The item request builder.
11 | ///
12 | IItemRequestBuilder Root { get; }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IDriveSpecialCollectionRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial interface IDriveSpecialCollectionRequestBuilder
8 | {
9 | ///
10 | /// Gets app root special folder item request builder.
11 | /// The item request builder.
12 | ///
13 | IItemRequestBuilder AppRoot { get; }
14 |
15 | ///
16 | /// Gets documents special folder item request builder.
17 | /// The item request builder.
18 | ///
19 | IItemRequestBuilder Documents { get; }
20 |
21 | ///
22 | /// Gets photos special folder item request builder.
23 | /// The item request builder.
24 | ///
25 | IItemRequestBuilder Photos { get; }
26 |
27 | ///
28 | /// Gets camera roll special folder item request builder.
29 | /// The item request builder.
30 | ///
31 | IItemRequestBuilder CameraRoll { get; }
32 |
33 | ///
34 | /// Gets Music special folder item request builder.
35 | /// The item request builder.
36 | ///
37 | IItemRequestBuilder Music { get; }
38 | }
39 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IItemRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | ///
8 | /// The type ItemRequestBuilder.
9 | ///
10 | public partial interface IItemRequestBuilder
11 | {
12 | ///
13 | /// Gets item request builder for the specified item path.
14 | /// The item request builder.
15 | ///
16 | IItemRequestBuilder ItemWithPath(string path);
17 | }
18 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IOneDriveClientExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial interface IOneDriveClient
8 | {
9 |
10 | ///
11 | /// Gets the default drive.
12 | ///
13 | IDriveRequestBuilder Drive { get; }
14 |
15 | ///
16 | /// Gets item request builder for the specified item path.
17 | /// The item request builder.
18 | ///
19 | IItemRequestBuilder ItemWithPath(string path);
20 | }
21 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IShareRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial interface IShareRequestBuilder
8 | {
9 | ///
10 | /// Gets root item request builder.
11 | /// The item request builder.
12 | ///
13 | IItemRequestBuilder Root { get; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/IThumbnailSetRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial interface IThumbnailSetRequestBuilder
8 | {
9 | IThumbnailRequestBuilder this[string size] { get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/ItemRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | ///
8 | /// The type ItemRequestBuilder.
9 | ///
10 | public partial class ItemRequestBuilder
11 | {
12 | ///
13 | /// Gets children request.
14 | /// The children request.
15 | ///
16 | public IItemRequestBuilder ItemWithPath(string path)
17 | {
18 | if (!string.IsNullOrEmpty(path))
19 | {
20 | if (!path.StartsWith("/"))
21 | {
22 | path = string.Format("/{0}", path);
23 | }
24 | }
25 |
26 | return new ItemRequestBuilder(
27 | string.Format("{0}:{1}:", this.RequestUrl, path),
28 | this.Client);
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/OneDriveClientExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial class OneDriveClient
8 | {
9 | ///
10 | /// Gets the default drive.
11 | ///
12 | public IDriveRequestBuilder Drive
13 | {
14 | get
15 | {
16 | return new DriveRequestBuilder(string.Format("{0}/{1}", this.BaseUrl, Constants.Url.Drive), this);
17 | }
18 | }
19 |
20 | ///
21 | /// Gets item request builder for the specified item path.
22 | /// The item request builder.
23 | ///
24 | public IItemRequestBuilder ItemWithPath(string path)
25 | {
26 | return new ItemRequestBuilder(
27 | string.Format("{0}{1}:", this.BaseUrl, path),
28 | this);
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/ShareRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial class ShareRequestBuilder
8 | {
9 | ///
10 | /// Gets root item request builder.
11 | /// The item request builder.
12 | ///
13 | public IItemRequestBuilder Root
14 | {
15 | get { return new ItemRequestBuilder(this.AppendSegmentToRequestUrl(Constants.Url.Root), this.Client); }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/ThumbnailSetExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | public partial class ThumbnailSet
8 | {
9 | ///
10 | /// Allows for the lookup of custom thumbnails from this thumbnail set.
11 | ///
12 | /// The name of the custom thumbnail.
13 | /// The custom thumbnail.
14 | public Thumbnail this[string customThumbnailName]
15 | {
16 | get
17 | {
18 | if (this.AdditionalData != null)
19 | {
20 | object thumbnail;
21 | if (this.AdditionalData.TryGetValue(customThumbnailName, out thumbnail))
22 | {
23 | return thumbnail as Thumbnail;
24 | }
25 | }
26 |
27 | return null;
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Extensions/ThumbnailSetRequestBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | namespace Microsoft.OneDrive.Sdk
6 | {
7 | ///
8 | /// The type ThumbnailSetRequestBuilder.
9 | ///
10 | public partial class ThumbnailSetRequestBuilder
11 | {
12 | public IThumbnailRequestBuilder this[string size]
13 | {
14 | get
15 | {
16 | return new ThumbnailRequestBuilder(
17 | this.AppendSegmentToRequestUrl(size),
18 | this.Client);
19 | }
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Generated/DriveItemsCollectionPage.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using Microsoft.Graph;
12 |
13 | ///
14 | /// The type DriveItemsCollectionPage.
15 | ///
16 | public partial class DriveItemsCollectionPage : CollectionPage- , IDriveItemsCollectionPage
17 | {
18 | ///
19 | /// Gets the next page instance.
20 | ///
21 | public IDriveItemsCollectionRequest NextPageRequest { get; private set; }
22 |
23 | ///
24 | /// Initializes the NextPageRequest property.
25 | ///
26 | public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
27 | {
28 | if (!string.IsNullOrEmpty(nextPageLinkString))
29 | {
30 | this.NextPageRequest = new DriveItemsCollectionRequest(
31 | nextPageLinkString,
32 | client,
33 | null);
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Generated/DriveItemsCollectionResponse.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 | namespace Microsoft.OneDrive.Sdk
8 | {
9 | using System.Collections.Generic;
10 | using System.Runtime.Serialization;
11 | using Microsoft.Graph;
12 | using Newtonsoft.Json;
13 |
14 | ///
15 | /// The type DriveItemsCollectionResponse.
16 | ///
17 | [DataContract]
18 | public class DriveItemsCollectionResponse
19 | {
20 | ///
21 | /// Gets or sets the value.
22 | ///
23 | [DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
24 | public IDriveItemsCollectionPage Value { get; set; }
25 |
26 | ///
27 | /// Gets or sets additional data.
28 | ///
29 | [JsonExtensionData(ReadData = true)]
30 | public IDictionary AdditionalData { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Generated/DriveRecentCollectionPage.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using Microsoft.Graph;
11 |
12 | ///
13 | /// The type DriveRecentCollectionPage.
14 | ///
15 | public partial class DriveRecentCollectionPage : CollectionPage
- , IDriveRecentCollectionPage
16 | {
17 | ///
18 | /// Gets the next page instance.
19 | ///
20 | public IDriveRecentRequest NextPageRequest { get; private set; }
21 |
22 | ///
23 | /// Initializes the NextPageRequest property.
24 | ///
25 | public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
26 | {
27 | if (!string.IsNullOrEmpty(nextPageLinkString))
28 | {
29 | this.NextPageRequest = new DriveRecentRequest(
30 | nextPageLinkString,
31 | client,
32 | null);
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Generated/DriveRecentCollectionResponse.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System.Collections.Generic;
11 | using System.Runtime.Serialization;
12 | using Microsoft.Graph;
13 | using Newtonsoft.Json;
14 |
15 | ///
16 | /// The type DriveRecentCollectionResponse.
17 | ///
18 | [DataContract]
19 | public class DriveRecentCollectionResponse
20 | {
21 | ///
22 | /// Gets or sets the value.
23 | ///
24 | [DataMember(Name = "value", EmitDefaultValue = false, IsRequired = false)]
25 | public IDriveRecentCollectionPage Value { get; set; }
26 |
27 | ///
28 | /// Gets or sets additional data.
29 | ///
30 | [JsonExtensionData(ReadData = true)]
31 | public IDictionary AdditionalData { get; set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/OneDriveSdk/Requests/Generated/DriveRecentRequestBuilder.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3 | // ------------------------------------------------------------------------------
4 |
5 | // **NOTE** This file was generated by a tool and any changes will be overwritten.
6 |
7 |
8 | namespace Microsoft.OneDrive.Sdk
9 | {
10 | using System;
11 | using System.Collections.Generic;
12 | using System.IO;
13 | using Microsoft.Graph;
14 |
15 | ///
16 | /// The type DriveRecentRequestBuilder.
17 | ///
18 | public partial class DriveRecentRequestBuilder : BaseFunctionMethodRequestBuilder, IDriveRecentRequestBuilder
19 | {
20 | ///
21 | /// Constructs a new .
22 | ///
23 | /// The URL for the request.
24 | /// The for handling requests.
25 | public DriveRecentRequestBuilder(
26 | string requestUrl,
27 | IBaseClient client)
28 | : base(requestUrl, client)
29 | {
30 | this.passParametersInQueryString = true;
31 | }
32 |
33 | ///
34 | /// A method used by the base class to construct a request class instance.
35 | ///
36 | /// The request URL to
37 | /// The query and header options for the request.
38 | /// An instance of a specific request class.
39 | protected override IDriveRecentRequest CreateRequest(string functionUrl, IEnumerable