Skip to content

Commit 32f6813

Browse files
authored
Automated Spec Update (#179)
ed6e389b2d16d19b21e68413ae8f4743dd9b9223 Change Notes: File Namespace: - Add UploadSessionStartError union - Add UploadSessionType union - Update UploadSessionFinishError union to include concurrent_sessions_data_not_allowed, concurrent_session_not_closed, concurrent_session_missing_data - Update UploadSessionType struct to include session_type - Update upload_session/start to include UploadSessionStartError - Update Comments Team Log Namespace: - Add AdminAlertingAlertConfiguration, AdminAlertingChangedAlertConfigDetails, MemberChangeResellerRoleDetails, TeamProfileAddBackgroundDetails, TeamProfileChangeBackgroundDetails, TeamProfileRemoveBackgroundDetails, AdminAlertingChangedAlertConfigType, MemberChangeResellerRoleType, TeamProfileAddBackgroundType, TeamProfileChangeBackgroundType, TeamProfileRemoveBackgroundType structs - Add AdminAlertingAlertStatePolicy, ResellerRole unions - Update EventCategory union to include admin_alerting - Update GovernancePolicyRemoveFoldersDetails struct to include reason - Update EventDetails union to include admin_alerting_changed_alert_config_details, member_change_reseller_role_details, team_profile_add_background_details, team_profile_change_background_details, team_profile_remove_background_details - Update EventType union to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update EventTypeArg to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update Examples Co-authored-by: Brent Bumann <[email protected]> de3a7718946ee79f1a0d5ca499b9d22b41cc7c84 Co-authored-by: DropboxBot <[email protected]>
1 parent 749bb11 commit 32f6813

26 files changed

+5326
-7
lines changed

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesUserRoutes.cs

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6716,14 +6716,43 @@ public UploadSessionFinishBatchJobStatus EndUploadSessionFinishBatchCheck(sys.IA
67166716
/// month. For more information, see the <a
67176717
/// href="https://www.dropbox.com/developers/reference/data-transport-limit">Data
67186718
/// transport limit page</a>.</para>
6719+
/// <para>By default, upload sessions require you to send content of the file in
6720+
/// sequential order via consecutive <see
6721+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionStartAsync" />, <see
6722+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />, <see
6723+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" /> calls.
6724+
/// For better performance, you can instead optionally use a <see
6725+
/// cref="Dropbox.Api.Files.UploadSessionType.Concurrent" /> upload session. To start a
6726+
/// new concurrent session, set <see
6727+
/// cref="Dropbox.Api.Files.UploadSessionStartArg.SessionType" /> to <see
6728+
/// cref="Dropbox.Api.Files.UploadSessionType.Concurrent" />. After that, you can send
6729+
/// file data in concurrent <see
6730+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />
6731+
/// requests. Finally finish the session with <see
6732+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" />.</para>
6733+
/// <para>There are couple of constraints with concurrent sessions to make them work.
6734+
/// You can not send data with <see
6735+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionStartAsync" /> or <see
6736+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" /> call,
6737+
/// only with <see
6738+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> call.
6739+
/// Also data uploaded in <see
6740+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> call
6741+
/// must be multiple of 4194304 bytes (except for last <see
6742+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> with
6743+
/// <see cref="Dropbox.Api.Files.UploadSessionStartArg.Close" /> to <c>true</c>, that
6744+
/// may contain any remaining data).</para>
67196745
/// </summary>
67206746
/// <param name="uploadSessionStartArg">The request parameters</param>
67216747
/// <param name="body">The content to upload.</param>
67226748
/// <returns>The task that represents the asynchronous send operation. The TResult
67236749
/// parameter contains the response from the server.</returns>
6750+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
6751+
/// processing the request; This will contain a <see
6752+
/// cref="UploadSessionStartError"/>.</exception>
67246753
public t.Task<UploadSessionStartResult> UploadSessionStartAsync(UploadSessionStartArg uploadSessionStartArg, io.Stream body)
67256754
{
6726-
return this.Transport.SendUploadRequestAsync<UploadSessionStartArg, UploadSessionStartResult, enc.Empty>(uploadSessionStartArg, body, "content", "/files/upload_session/start", "user", global::Dropbox.Api.Files.UploadSessionStartArg.Encoder, global::Dropbox.Api.Files.UploadSessionStartResult.Decoder, enc.EmptyDecoder.Instance);
6755+
return this.Transport.SendUploadRequestAsync<UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError>(uploadSessionStartArg, body, "content", "/files/upload_session/start", "user", global::Dropbox.Api.Files.UploadSessionStartArg.Encoder, global::Dropbox.Api.Files.UploadSessionStartResult.Decoder, global::Dropbox.Api.Files.UploadSessionStartError.Decoder);
67276756
}
67286757

67296758
/// <summary>
@@ -6764,18 +6793,52 @@ public sys.IAsyncResult BeginUploadSessionStart(UploadSessionStartArg uploadSess
67646793
/// month. For more information, see the <a
67656794
/// href="https://www.dropbox.com/developers/reference/data-transport-limit">Data
67666795
/// transport limit page</a>.</para>
6796+
/// <para>By default, upload sessions require you to send content of the file in
6797+
/// sequential order via consecutive <see
6798+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionStartAsync" />, <see
6799+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />, <see
6800+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" /> calls.
6801+
/// For better performance, you can instead optionally use a <see
6802+
/// cref="Dropbox.Api.Files.UploadSessionType.Concurrent" /> upload session. To start a
6803+
/// new concurrent session, set <see
6804+
/// cref="Dropbox.Api.Files.UploadSessionStartArg.SessionType" /> to <see
6805+
/// cref="Dropbox.Api.Files.UploadSessionType.Concurrent" />. After that, you can send
6806+
/// file data in concurrent <see
6807+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />
6808+
/// requests. Finally finish the session with <see
6809+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" />.</para>
6810+
/// <para>There are couple of constraints with concurrent sessions to make them work.
6811+
/// You can not send data with <see
6812+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionStartAsync" /> or <see
6813+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync" /> call,
6814+
/// only with <see
6815+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> call.
6816+
/// Also data uploaded in <see
6817+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> call
6818+
/// must be multiple of 4194304 bytes (except for last <see
6819+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> with
6820+
/// <see cref="Dropbox.Api.Files.UploadSessionStartArg.Close" /> to <c>true</c>, that
6821+
/// may contain any remaining data).</para>
67676822
/// </summary>
67686823
/// <param name="close">If true, the current session will be closed, at which point you
67696824
/// won't be able to call <see
67706825
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />
67716826
/// anymore with the current session.</param>
6827+
/// <param name="sessionType">Type of upload session you want to start. If not
6828+
/// specified, default is <see cref="Dropbox.Api.Files.UploadSessionType.Sequential"
6829+
/// />.</param>
67726830
/// <param name="body">The document to upload</param>
67736831
/// <returns>The task that represents the asynchronous send operation. The TResult
67746832
/// parameter contains the response from the server.</returns>
6833+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
6834+
/// processing the request; This will contain a <see
6835+
/// cref="UploadSessionStartError"/>.</exception>
67756836
public t.Task<UploadSessionStartResult> UploadSessionStartAsync(bool close = false,
6837+
UploadSessionType sessionType = null,
67766838
io.Stream body = null)
67776839
{
6778-
var uploadSessionStartArg = new UploadSessionStartArg(close);
6840+
var uploadSessionStartArg = new UploadSessionStartArg(close,
6841+
sessionType);
67796842

67806843
return this.UploadSessionStartAsync(uploadSessionStartArg, body);
67816844
}
@@ -6787,18 +6850,23 @@ public t.Task<UploadSessionStartResult> UploadSessionStartAsync(bool close = fal
67876850
/// won't be able to call <see
67886851
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />
67896852
/// anymore with the current session.</param>
6853+
/// <param name="sessionType">Type of upload session you want to start. If not
6854+
/// specified, default is <see cref="Dropbox.Api.Files.UploadSessionType.Sequential"
6855+
/// />.</param>
67906856
/// <param name="body">The document to upload</param>
67916857
/// <param name="callback">The method to be called when the asynchronous send is
67926858
/// completed.</param>
67936859
/// <param name="callbackState">A user provided object that distinguished this send
67946860
/// from other send requests.</param>
67956861
/// <returns>An object that represents the asynchronous send request.</returns>
67966862
public sys.IAsyncResult BeginUploadSessionStart(bool close = false,
6863+
UploadSessionType sessionType = null,
67976864
io.Stream body = null,
67986865
sys.AsyncCallback callback = null,
67996866
object callbackState = null)
68006867
{
6801-
var uploadSessionStartArg = new UploadSessionStartArg(close);
6868+
var uploadSessionStartArg = new UploadSessionStartArg(close,
6869+
sessionType);
68026870

68036871
return this.BeginUploadSessionStart(uploadSessionStartArg, body, callback, callbackState);
68046872
}
@@ -6810,6 +6878,9 @@ public sys.IAsyncResult BeginUploadSessionStart(bool close = false,
68106878
/// <param name="asyncResult">The reference to the pending asynchronous send
68116879
/// request</param>
68126880
/// <returns>The response to the send request</returns>
6881+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
6882+
/// processing the request; This will contain a <see
6883+
/// cref="UploadSessionStartError"/>.</exception>
68136884
public UploadSessionStartResult EndUploadSessionStart(sys.IAsyncResult asyncResult)
68146885
{
68156886
var task = asyncResult as t.Task<UploadSessionStartResult>;

0 commit comments

Comments
 (0)