Skip to content

Commit d194ef0

Browse files
DropboxBotBrent Bumann
andauthored
Automated Spec Update (#295)
ef6b1680d9a05ec7475f503149d771e44db913a2 Change Notes: files Namespace - Add upload_session/start_batch routes - Add UploadSessionStartBatchArg, UploadSessionStartBatchResult structs team_log_generated Namespace - Add ExternalDriveBackupEligibilityStatusCheckedDetails, ExternalDriveBackupStatusChangedDetails, ExternalDriveBackupEligibilityStatusCheckedType, ExternalDriveBackupStatusChangedType structs - Add ExternalDriveBackupEligibilityStatus, ExternalDriveBackupStatus unions Co-authored-by: Brent Bumann <[email protected]> Co-authored-by: DropboxBot <[email protected]> Co-authored-by: Brent Bumann <[email protected]>
1 parent e105efa commit d194ef0

14 files changed

+2794
-1
lines changed

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

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7590,5 +7590,93 @@ public UploadSessionStartResult EndUploadSessionStart(sys.IAsyncResult asyncResu
75907590

75917591
return task.Result;
75927592
}
7593+
7594+
/// <summary>
7595+
/// <para>This route starts batch of upload_sessions. Please refer to
7596+
/// `upload_session/start` usage.</para>
7597+
/// </summary>
7598+
/// <param name="uploadSessionStartBatchArg">The request parameters</param>
7599+
/// <returns>The task that represents the asynchronous send operation. The TResult
7600+
/// parameter contains the response from the server.</returns>
7601+
public t.Task<UploadSessionStartBatchResult> UploadSessionStartBatchAsync(UploadSessionStartBatchArg uploadSessionStartBatchArg)
7602+
{
7603+
return this.Transport.SendRpcRequestAsync<UploadSessionStartBatchArg, UploadSessionStartBatchResult, enc.Empty>(uploadSessionStartBatchArg, "api", "/files/upload_session/start_batch", "user", global::Dropbox.Api.Files.UploadSessionStartBatchArg.Encoder, global::Dropbox.Api.Files.UploadSessionStartBatchResult.Decoder, enc.EmptyDecoder.Instance);
7604+
}
7605+
7606+
/// <summary>
7607+
/// <para>Begins an asynchronous send to the upload session start batch route.</para>
7608+
/// </summary>
7609+
/// <param name="uploadSessionStartBatchArg">The request parameters.</param>
7610+
/// <param name="callback">The method to be called when the asynchronous send is
7611+
/// completed.</param>
7612+
/// <param name="state">A user provided object that distinguished this send from other
7613+
/// send requests.</param>
7614+
/// <returns>An object that represents the asynchronous send request.</returns>
7615+
public sys.IAsyncResult BeginUploadSessionStartBatch(UploadSessionStartBatchArg uploadSessionStartBatchArg, sys.AsyncCallback callback, object state = null)
7616+
{
7617+
var task = this.UploadSessionStartBatchAsync(uploadSessionStartBatchArg);
7618+
7619+
return enc.Util.ToApm(task, callback, state);
7620+
}
7621+
7622+
/// <summary>
7623+
/// <para>This route starts batch of upload_sessions. Please refer to
7624+
/// `upload_session/start` usage.</para>
7625+
/// </summary>
7626+
/// <param name="numSessions">The number of upload sessions to start.</param>
7627+
/// <param name="sessionType">Type of upload session you want to start. If not
7628+
/// specified, default is <see cref="Dropbox.Api.Files.UploadSessionType.Sequential"
7629+
/// />.</param>
7630+
/// <returns>The task that represents the asynchronous send operation. The TResult
7631+
/// parameter contains the response from the server.</returns>
7632+
public t.Task<UploadSessionStartBatchResult> UploadSessionStartBatchAsync(ulong numSessions,
7633+
UploadSessionType sessionType = null)
7634+
{
7635+
var uploadSessionStartBatchArg = new UploadSessionStartBatchArg(numSessions,
7636+
sessionType);
7637+
7638+
return this.UploadSessionStartBatchAsync(uploadSessionStartBatchArg);
7639+
}
7640+
7641+
/// <summary>
7642+
/// <para>Begins an asynchronous send to the upload session start batch route.</para>
7643+
/// </summary>
7644+
/// <param name="numSessions">The number of upload sessions to start.</param>
7645+
/// <param name="sessionType">Type of upload session you want to start. If not
7646+
/// specified, default is <see cref="Dropbox.Api.Files.UploadSessionType.Sequential"
7647+
/// />.</param>
7648+
/// <param name="callback">The method to be called when the asynchronous send is
7649+
/// completed.</param>
7650+
/// <param name="callbackState">A user provided object that distinguished this send
7651+
/// from other send requests.</param>
7652+
/// <returns>An object that represents the asynchronous send request.</returns>
7653+
public sys.IAsyncResult BeginUploadSessionStartBatch(ulong numSessions,
7654+
UploadSessionType sessionType = null,
7655+
sys.AsyncCallback callback = null,
7656+
object callbackState = null)
7657+
{
7658+
var uploadSessionStartBatchArg = new UploadSessionStartBatchArg(numSessions,
7659+
sessionType);
7660+
7661+
return this.BeginUploadSessionStartBatch(uploadSessionStartBatchArg, callback, callbackState);
7662+
}
7663+
7664+
/// <summary>
7665+
/// <para>Waits for the pending asynchronous send to the upload session start batch
7666+
/// route to complete</para>
7667+
/// </summary>
7668+
/// <param name="asyncResult">The reference to the pending asynchronous send
7669+
/// request</param>
7670+
/// <returns>The response to the send request</returns>
7671+
public UploadSessionStartBatchResult EndUploadSessionStartBatch(sys.IAsyncResult asyncResult)
7672+
{
7673+
var task = asyncResult as t.Task<UploadSessionStartBatchResult>;
7674+
if (task == null)
7675+
{
7676+
throw new sys.InvalidOperationException();
7677+
}
7678+
7679+
return task.Result;
7680+
}
75937681
}
75947682
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// <auto-generated>
2+
// Auto-generated by StoneAPI, do not modify.
3+
// </auto-generated>
4+
5+
namespace Dropbox.Api.Files
6+
{
7+
using sys = System;
8+
using col = System.Collections.Generic;
9+
using re = System.Text.RegularExpressions;
10+
11+
using enc = Dropbox.Api.Stone;
12+
13+
/// <summary>
14+
/// <para>The upload session start batch arg object</para>
15+
/// </summary>
16+
public class UploadSessionStartBatchArg
17+
{
18+
#pragma warning disable 108
19+
20+
/// <summary>
21+
/// <para>The encoder instance.</para>
22+
/// </summary>
23+
internal static enc.StructEncoder<UploadSessionStartBatchArg> Encoder = new UploadSessionStartBatchArgEncoder();
24+
25+
/// <summary>
26+
/// <para>The decoder instance.</para>
27+
/// </summary>
28+
internal static enc.StructDecoder<UploadSessionStartBatchArg> Decoder = new UploadSessionStartBatchArgDecoder();
29+
30+
/// <summary>
31+
/// <para>Initializes a new instance of the <see cref="UploadSessionStartBatchArg" />
32+
/// class.</para>
33+
/// </summary>
34+
/// <param name="numSessions">The number of upload sessions to start.</param>
35+
/// <param name="sessionType">Type of upload session you want to start. If not
36+
/// specified, default is <see cref="Dropbox.Api.Files.UploadSessionType.Sequential"
37+
/// />.</param>
38+
public UploadSessionStartBatchArg(ulong numSessions,
39+
UploadSessionType sessionType = null)
40+
{
41+
if (numSessions < 1UL)
42+
{
43+
throw new sys.ArgumentOutOfRangeException("numSessions", "Value should be greater or equal than 1");
44+
}
45+
if (numSessions > 1000UL)
46+
{
47+
throw new sys.ArgumentOutOfRangeException("numSessions", "Value should be less of equal than 1000");
48+
}
49+
50+
this.NumSessions = numSessions;
51+
this.SessionType = sessionType;
52+
}
53+
54+
/// <summary>
55+
/// <para>Initializes a new instance of the <see cref="UploadSessionStartBatchArg" />
56+
/// class.</para>
57+
/// </summary>
58+
/// <remarks>This is to construct an instance of the object when
59+
/// deserializing.</remarks>
60+
[sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
61+
public UploadSessionStartBatchArg()
62+
{
63+
}
64+
65+
/// <summary>
66+
/// <para>The number of upload sessions to start.</para>
67+
/// </summary>
68+
public ulong NumSessions { get; protected set; }
69+
70+
/// <summary>
71+
/// <para>Type of upload session you want to start. If not specified, default is <see
72+
/// cref="Dropbox.Api.Files.UploadSessionType.Sequential" />.</para>
73+
/// </summary>
74+
public UploadSessionType SessionType { get; protected set; }
75+
76+
#region Encoder class
77+
78+
/// <summary>
79+
/// <para>Encoder for <see cref="UploadSessionStartBatchArg" />.</para>
80+
/// </summary>
81+
private class UploadSessionStartBatchArgEncoder : enc.StructEncoder<UploadSessionStartBatchArg>
82+
{
83+
/// <summary>
84+
/// <para>Encode fields of given value.</para>
85+
/// </summary>
86+
/// <param name="value">The value.</param>
87+
/// <param name="writer">The writer.</param>
88+
public override void EncodeFields(UploadSessionStartBatchArg value, enc.IJsonWriter writer)
89+
{
90+
WriteProperty("num_sessions", value.NumSessions, writer, enc.UInt64Encoder.Instance);
91+
if (value.SessionType != null)
92+
{
93+
WriteProperty("session_type", value.SessionType, writer, global::Dropbox.Api.Files.UploadSessionType.Encoder);
94+
}
95+
}
96+
}
97+
98+
#endregion
99+
100+
101+
#region Decoder class
102+
103+
/// <summary>
104+
/// <para>Decoder for <see cref="UploadSessionStartBatchArg" />.</para>
105+
/// </summary>
106+
private class UploadSessionStartBatchArgDecoder : enc.StructDecoder<UploadSessionStartBatchArg>
107+
{
108+
/// <summary>
109+
/// <para>Create a new instance of type <see cref="UploadSessionStartBatchArg"
110+
/// />.</para>
111+
/// </summary>
112+
/// <returns>The struct instance.</returns>
113+
protected override UploadSessionStartBatchArg Create()
114+
{
115+
return new UploadSessionStartBatchArg();
116+
}
117+
118+
/// <summary>
119+
/// <para>Set given field.</para>
120+
/// </summary>
121+
/// <param name="value">The field value.</param>
122+
/// <param name="fieldName">The field name.</param>
123+
/// <param name="reader">The json reader.</param>
124+
protected override void SetField(UploadSessionStartBatchArg value, string fieldName, enc.IJsonReader reader)
125+
{
126+
switch (fieldName)
127+
{
128+
case "num_sessions":
129+
value.NumSessions = enc.UInt64Decoder.Instance.Decode(reader);
130+
break;
131+
case "session_type":
132+
value.SessionType = global::Dropbox.Api.Files.UploadSessionType.Decoder.Decode(reader);
133+
break;
134+
default:
135+
reader.Skip();
136+
break;
137+
}
138+
}
139+
}
140+
141+
#endregion
142+
}
143+
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
// <auto-generated>
2+
// Auto-generated by StoneAPI, do not modify.
3+
// </auto-generated>
4+
5+
namespace Dropbox.Api.Files
6+
{
7+
using sys = System;
8+
using col = System.Collections.Generic;
9+
using re = System.Text.RegularExpressions;
10+
11+
using enc = Dropbox.Api.Stone;
12+
13+
/// <summary>
14+
/// <para>The upload session start batch result object</para>
15+
/// </summary>
16+
public class UploadSessionStartBatchResult
17+
{
18+
#pragma warning disable 108
19+
20+
/// <summary>
21+
/// <para>The encoder instance.</para>
22+
/// </summary>
23+
internal static enc.StructEncoder<UploadSessionStartBatchResult> Encoder = new UploadSessionStartBatchResultEncoder();
24+
25+
/// <summary>
26+
/// <para>The decoder instance.</para>
27+
/// </summary>
28+
internal static enc.StructDecoder<UploadSessionStartBatchResult> Decoder = new UploadSessionStartBatchResultDecoder();
29+
30+
/// <summary>
31+
/// <para>Initializes a new instance of the <see cref="UploadSessionStartBatchResult"
32+
/// /> class.</para>
33+
/// </summary>
34+
/// <param name="sessionIds">A List of unique identifiers for the upload session. Pass
35+
/// each session_id to <see
36+
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" /> and
37+
/// <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync"
38+
/// />.</param>
39+
public UploadSessionStartBatchResult(col.IEnumerable<string> sessionIds)
40+
{
41+
var sessionIdsList = enc.Util.ToList(sessionIds);
42+
43+
if (sessionIds == null)
44+
{
45+
throw new sys.ArgumentNullException("sessionIds");
46+
}
47+
48+
this.SessionIds = sessionIdsList;
49+
}
50+
51+
/// <summary>
52+
/// <para>Initializes a new instance of the <see cref="UploadSessionStartBatchResult"
53+
/// /> class.</para>
54+
/// </summary>
55+
/// <remarks>This is to construct an instance of the object when
56+
/// deserializing.</remarks>
57+
[sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
58+
public UploadSessionStartBatchResult()
59+
{
60+
}
61+
62+
/// <summary>
63+
/// <para>A List of unique identifiers for the upload session. Pass each session_id to
64+
/// <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionAppendV2Async" />
65+
/// and <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.UploadSessionFinishAsync"
66+
/// />.</para>
67+
/// </summary>
68+
public col.IList<string> SessionIds { get; protected set; }
69+
70+
#region Encoder class
71+
72+
/// <summary>
73+
/// <para>Encoder for <see cref="UploadSessionStartBatchResult" />.</para>
74+
/// </summary>
75+
private class UploadSessionStartBatchResultEncoder : enc.StructEncoder<UploadSessionStartBatchResult>
76+
{
77+
/// <summary>
78+
/// <para>Encode fields of given value.</para>
79+
/// </summary>
80+
/// <param name="value">The value.</param>
81+
/// <param name="writer">The writer.</param>
82+
public override void EncodeFields(UploadSessionStartBatchResult value, enc.IJsonWriter writer)
83+
{
84+
WriteListProperty("session_ids", value.SessionIds, writer, enc.StringEncoder.Instance);
85+
}
86+
}
87+
88+
#endregion
89+
90+
91+
#region Decoder class
92+
93+
/// <summary>
94+
/// <para>Decoder for <see cref="UploadSessionStartBatchResult" />.</para>
95+
/// </summary>
96+
private class UploadSessionStartBatchResultDecoder : enc.StructDecoder<UploadSessionStartBatchResult>
97+
{
98+
/// <summary>
99+
/// <para>Create a new instance of type <see cref="UploadSessionStartBatchResult"
100+
/// />.</para>
101+
/// </summary>
102+
/// <returns>The struct instance.</returns>
103+
protected override UploadSessionStartBatchResult Create()
104+
{
105+
return new UploadSessionStartBatchResult();
106+
}
107+
108+
/// <summary>
109+
/// <para>Set given field.</para>
110+
/// </summary>
111+
/// <param name="value">The field value.</param>
112+
/// <param name="fieldName">The field name.</param>
113+
/// <param name="reader">The json reader.</param>
114+
protected override void SetField(UploadSessionStartBatchResult value, string fieldName, enc.IJsonReader reader)
115+
{
116+
switch (fieldName)
117+
{
118+
case "session_ids":
119+
value.SessionIds = ReadList<string>(reader, enc.StringDecoder.Instance);
120+
break;
121+
default:
122+
reader.Skip();
123+
break;
124+
}
125+
}
126+
}
127+
128+
#endregion
129+
}
130+
}

dropbox-sdk-dotnet/Dropbox.Api/Generated/TeamLog/DesktopDeviceSessionLogInfo.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace Dropbox.Api.TeamLog
1414
/// <para>Information about linked Dropbox desktop client sessions</para>
1515
/// </summary>
1616
/// <seealso cref="DeviceSyncBackupStatusChangedDetails" />
17+
/// <seealso cref="ExternalDriveBackupEligibilityStatusCheckedDetails" />
18+
/// <seealso cref="ExternalDriveBackupStatusChangedDetails" />
1719
/// <seealso cref="Global::Dropbox.Api.TeamLog.DeviceSessionLogInfo" />
1820
public class DesktopDeviceSessionLogInfo : DeviceSessionLogInfo
1921
{

0 commit comments

Comments
 (0)