Skip to content

Commit 30498a4

Browse files
DropboxBotBrent Bumann
andauthored
Automated Spec Update (#303)
69f7bb2ea7702db5564f12549efb23956c5d6329 Change Notes: files Namespace - Update examples shared_links Namespace - Update get_shared_link_metadata route to include app and user auth team_folders Namespace - Update team_folder/create, team_folder/rename, team_folder/list, team_folder/list/continue, team_folder/get_info, team_folder/activate, team_folder/archive, team_folder/archive/check, team_folder/permanently_delete, team_folder/update_sync_settings routes to include updated scopes team_legal_holds Namespace - Update legal_holds/create_policy, legal_holds/get_policy, legal_holds/list_policies, legal_holds/list_held_revisions, legal_holds/list_held_revisions_continue, legal_holds/update_policy, legal_holds/release_policy routes to include updated scopes team_log_generated Namespace - Update AdminAlertingAlertConfiguration to include text and excluded_file_extensions - Update PlacementRestriction to include us_s3_only - Update examples Co-authored-by: DropboxBot <[email protected]> Co-authored-by: Brent Bumann <[email protected]>
1 parent d194ef0 commit 30498a4

File tree

6 files changed

+276
-2
lines changed

6 files changed

+276
-2
lines changed

dropbox-sdk-dotnet/Dropbox.Api/Generated/DropboxAppClient.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace Dropbox.Api
1010
using Dropbox.Api.Auth.Routes;
1111
using Dropbox.Api.Check.Routes;
1212
using Dropbox.Api.Files.Routes;
13+
using Dropbox.Api.Sharing.Routes;
1314

1415
public sealed partial class DropboxAppClient
1516
{
@@ -28,6 +29,11 @@ public sealed partial class DropboxAppClient
2829
/// </summary>
2930
public FilesAppRoutes Files { get; private set; }
3031

32+
/// <summary>
33+
/// <para>Gets the Sharing routes.</para>
34+
/// </summary>
35+
public SharingAppRoutes Sharing { get; private set; }
36+
3137
/// <summary>
3238
/// <para>Initializes the routes.</para>
3339
/// </summary>
@@ -37,6 +43,7 @@ internal override void InitializeRoutes(ITransport transport)
3743
this.Auth = new AuthAppRoutes(transport);
3844
this.Check = new CheckAppRoutes(transport);
3945
this.Files = new FilesAppRoutes(transport);
46+
this.Sharing = new SharingAppRoutes(transport);
4047
}
4148
}
4249
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,7 @@ public enc.IDownloadResponse<FileMetadata> EndDownload(sys.IAsyncResult asyncRes
20562056
/// less than 20 GB in size and any single file within must be less than 4 GB in size.
20572057
/// The resulting zip must have fewer than 10,000 total file and folder entries,
20582058
/// including the top level folder. The input cannot be a single file.</para>
2059+
/// <para>Note: this endpoint does not support HTTP range requests.</para>
20592060
/// </summary>
20602061
/// <param name="downloadZipArg">The request parameters</param>
20612062
/// <returns>The task that represents the asynchronous send operation. The TResult
@@ -2089,6 +2090,7 @@ public sys.IAsyncResult BeginDownloadZip(DownloadZipArg downloadZipArg, sys.Asyn
20892090
/// less than 20 GB in size and any single file within must be less than 4 GB in size.
20902091
/// The resulting zip must have fewer than 10,000 total file and folder entries,
20912092
/// including the top level folder. The input cannot be a single file.</para>
2093+
/// <para>Note: this endpoint does not support HTTP range requests.</para>
20922094
/// </summary>
20932095
/// <param name="path">The path of the folder to download.</param>
20942096
/// <returns>The task that represents the asynchronous send operation. The TResult
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// <auto-generated>
2+
// Auto-generated by StoneAPI, do not modify.
3+
// </auto-generated>
4+
5+
namespace Dropbox.Api.Sharing.Routes
6+
{
7+
using sys = System;
8+
using io = System.IO;
9+
using col = System.Collections.Generic;
10+
using t = System.Threading.Tasks;
11+
using enc = Dropbox.Api.Stone;
12+
13+
/// <summary>
14+
/// <para>The routes for the <see cref="N:Dropbox.Api.Sharing"/> namespace</para>
15+
/// </summary>
16+
public class SharingAppRoutes
17+
{
18+
/// <summary>
19+
/// <para>Initializes a new instance of the <see cref="SharingAppRoutes" />
20+
/// class.</para>
21+
/// </summary>
22+
/// <param name="transport">The transport to use</param>
23+
internal SharingAppRoutes(enc.ITransport transport)
24+
{
25+
this.Transport = transport;
26+
}
27+
28+
/// <summary>
29+
/// <para>Gets the transport used for these routes</para>
30+
/// </summary>
31+
internal enc.ITransport Transport { get; private set; }
32+
33+
/// <summary>
34+
/// <para>Get the shared link's metadata.</para>
35+
/// </summary>
36+
/// <param name="getSharedLinkMetadataArg">The request parameters</param>
37+
/// <returns>The task that represents the asynchronous send operation. The TResult
38+
/// parameter contains the response from the server.</returns>
39+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
40+
/// processing the request; This will contain a <see
41+
/// cref="SharedLinkError"/>.</exception>
42+
public t.Task<SharedLinkMetadata> GetSharedLinkMetadataAsync(GetSharedLinkMetadataArg getSharedLinkMetadataArg)
43+
{
44+
return this.Transport.SendRpcRequestAsync<GetSharedLinkMetadataArg, SharedLinkMetadata, SharedLinkError>(getSharedLinkMetadataArg, "api", "/sharing/get_shared_link_metadata", "app", global::Dropbox.Api.Sharing.GetSharedLinkMetadataArg.Encoder, global::Dropbox.Api.Sharing.SharedLinkMetadata.Decoder, global::Dropbox.Api.Sharing.SharedLinkError.Decoder);
45+
}
46+
47+
/// <summary>
48+
/// <para>Begins an asynchronous send to the get shared link metadata route.</para>
49+
/// </summary>
50+
/// <param name="getSharedLinkMetadataArg">The request parameters.</param>
51+
/// <param name="callback">The method to be called when the asynchronous send is
52+
/// completed.</param>
53+
/// <param name="state">A user provided object that distinguished this send from other
54+
/// send requests.</param>
55+
/// <returns>An object that represents the asynchronous send request.</returns>
56+
public sys.IAsyncResult BeginGetSharedLinkMetadata(GetSharedLinkMetadataArg getSharedLinkMetadataArg, sys.AsyncCallback callback, object state = null)
57+
{
58+
var task = this.GetSharedLinkMetadataAsync(getSharedLinkMetadataArg);
59+
60+
return enc.Util.ToApm(task, callback, state);
61+
}
62+
63+
/// <summary>
64+
/// <para>Get the shared link's metadata.</para>
65+
/// </summary>
66+
/// <param name="url">URL of the shared link.</param>
67+
/// <param name="path">If the shared link is to a folder, this parameter can be used to
68+
/// retrieve the metadata for a specific file or sub-folder in this folder. A relative
69+
/// path should be used.</param>
70+
/// <param name="linkPassword">If the shared link has a password, this parameter can be
71+
/// used.</param>
72+
/// <returns>The task that represents the asynchronous send operation. The TResult
73+
/// parameter contains the response from the server.</returns>
74+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
75+
/// processing the request; This will contain a <see
76+
/// cref="SharedLinkError"/>.</exception>
77+
public t.Task<SharedLinkMetadata> GetSharedLinkMetadataAsync(string url,
78+
string path = null,
79+
string linkPassword = null)
80+
{
81+
var getSharedLinkMetadataArg = new GetSharedLinkMetadataArg(url,
82+
path,
83+
linkPassword);
84+
85+
return this.GetSharedLinkMetadataAsync(getSharedLinkMetadataArg);
86+
}
87+
88+
/// <summary>
89+
/// <para>Begins an asynchronous send to the get shared link metadata route.</para>
90+
/// </summary>
91+
/// <param name="url">URL of the shared link.</param>
92+
/// <param name="path">If the shared link is to a folder, this parameter can be used to
93+
/// retrieve the metadata for a specific file or sub-folder in this folder. A relative
94+
/// path should be used.</param>
95+
/// <param name="linkPassword">If the shared link has a password, this parameter can be
96+
/// used.</param>
97+
/// <param name="callback">The method to be called when the asynchronous send is
98+
/// completed.</param>
99+
/// <param name="callbackState">A user provided object that distinguished this send
100+
/// from other send requests.</param>
101+
/// <returns>An object that represents the asynchronous send request.</returns>
102+
public sys.IAsyncResult BeginGetSharedLinkMetadata(string url,
103+
string path = null,
104+
string linkPassword = null,
105+
sys.AsyncCallback callback = null,
106+
object callbackState = null)
107+
{
108+
var getSharedLinkMetadataArg = new GetSharedLinkMetadataArg(url,
109+
path,
110+
linkPassword);
111+
112+
return this.BeginGetSharedLinkMetadata(getSharedLinkMetadataArg, callback, callbackState);
113+
}
114+
115+
/// <summary>
116+
/// <para>Waits for the pending asynchronous send to the get shared link metadata route
117+
/// to complete</para>
118+
/// </summary>
119+
/// <param name="asyncResult">The reference to the pending asynchronous send
120+
/// request</param>
121+
/// <returns>The response to the send request</returns>
122+
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
123+
/// processing the request; This will contain a <see
124+
/// cref="SharedLinkError"/>.</exception>
125+
public SharedLinkMetadata EndGetSharedLinkMetadata(sys.IAsyncResult asyncResult)
126+
{
127+
var task = asyncResult as t.Task<SharedLinkMetadata>;
128+
if (task == null)
129+
{
130+
throw new sys.InvalidOperationException();
131+
}
132+
133+
return task.Result;
134+
}
135+
}
136+
}

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

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ public class AdminAlertingAlertConfiguration
3535
/// <param name="alertState">Alert state.</param>
3636
/// <param name="sensitivityLevel">Sensitivity level.</param>
3737
/// <param name="recipientsSettings">Recipient settings.</param>
38+
/// <param name="text">Text.</param>
39+
/// <param name="excludedFileExtensions">Excluded file extensions.</param>
3840
public AdminAlertingAlertConfiguration(AdminAlertingAlertStatePolicy alertState = null,
3941
AdminAlertingAlertSensitivity sensitivityLevel = null,
40-
RecipientsConfiguration recipientsSettings = null)
42+
RecipientsConfiguration recipientsSettings = null,
43+
string text = null,
44+
string excludedFileExtensions = null)
4145
{
4246
this.AlertState = alertState;
4347
this.SensitivityLevel = sensitivityLevel;
4448
this.RecipientsSettings = recipientsSettings;
49+
this.Text = text;
50+
this.ExcludedFileExtensions = excludedFileExtensions;
4551
}
4652

4753
/// <summary>
@@ -70,6 +76,16 @@ public AdminAlertingAlertConfiguration()
7076
/// </summary>
7177
public RecipientsConfiguration RecipientsSettings { get; protected set; }
7278

79+
/// <summary>
80+
/// <para>Text.</para>
81+
/// </summary>
82+
public string Text { get; protected set; }
83+
84+
/// <summary>
85+
/// <para>Excluded file extensions.</para>
86+
/// </summary>
87+
public string ExcludedFileExtensions { get; protected set; }
88+
7389
#region Encoder class
7490

7591
/// <summary>
@@ -96,6 +112,14 @@ public override void EncodeFields(AdminAlertingAlertConfiguration value, enc.IJs
96112
{
97113
WriteProperty("recipients_settings", value.RecipientsSettings, writer, global::Dropbox.Api.TeamLog.RecipientsConfiguration.Encoder);
98114
}
115+
if (value.Text != null)
116+
{
117+
WriteProperty("text", value.Text, writer, enc.StringEncoder.Instance);
118+
}
119+
if (value.ExcludedFileExtensions != null)
120+
{
121+
WriteProperty("excluded_file_extensions", value.ExcludedFileExtensions, writer, enc.StringEncoder.Instance);
122+
}
99123
}
100124
}
101125

@@ -138,6 +162,12 @@ protected override void SetField(AdminAlertingAlertConfiguration value, string f
138162
case "recipients_settings":
139163
value.RecipientsSettings = global::Dropbox.Api.TeamLog.RecipientsConfiguration.Decoder.Decode(reader);
140164
break;
165+
case "text":
166+
value.Text = enc.StringDecoder.Instance.Decode(reader);
167+
break;
168+
case "excluded_file_extensions":
169+
value.ExcludedFileExtensions = enc.StringDecoder.Instance.Decode(reader);
170+
break;
141171
default:
142172
reader.Skip();
143173
break;

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

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,28 @@ public UkOnly AsUkOnly
145145
}
146146
}
147147

148+
/// <summary>
149+
/// <para>Gets a value indicating whether this instance is UsS3Only</para>
150+
/// </summary>
151+
public bool IsUsS3Only
152+
{
153+
get
154+
{
155+
return this is UsS3Only;
156+
}
157+
}
158+
159+
/// <summary>
160+
/// <para>Gets this instance as a UsS3Only, or <c>null</c>.</para>
161+
/// </summary>
162+
public UsS3Only AsUsS3Only
163+
{
164+
get
165+
{
166+
return this as UsS3Only;
167+
}
168+
}
169+
148170
/// <summary>
149171
/// <para>Gets a value indicating whether this instance is Other</para>
150172
/// </summary>
@@ -211,6 +233,12 @@ public override void EncodeFields(PlacementRestriction value, enc.IJsonWriter wr
211233
UkOnly.Encoder.EncodeFields((UkOnly)value, writer);
212234
return;
213235
}
236+
if (value is UsS3Only)
237+
{
238+
WriteProperty(".tag", "us_s3_only", writer, enc.StringEncoder.Instance);
239+
UsS3Only.Encoder.EncodeFields((UsS3Only)value, writer);
240+
return;
241+
}
214242
if (value is Other)
215243
{
216244
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -259,6 +287,8 @@ protected override PlacementRestriction Decode(string tag, enc.IJsonReader reade
259287
return None.Decoder.DecodeFields(reader);
260288
case "uk_only":
261289
return UkOnly.Decoder.DecodeFields(reader);
290+
case "us_s3_only":
291+
return UsS3Only.Decoder.DecodeFields(reader);
262292
default:
263293
return Other.Decoder.DecodeFields(reader);
264294
}
@@ -613,6 +643,75 @@ protected override UkOnly Create()
613643
#endregion
614644
}
615645

646+
/// <summary>
647+
/// <para>The us s3 only object</para>
648+
/// </summary>
649+
public sealed class UsS3Only : PlacementRestriction
650+
{
651+
#pragma warning disable 108
652+
653+
/// <summary>
654+
/// <para>The encoder instance.</para>
655+
/// </summary>
656+
internal static enc.StructEncoder<UsS3Only> Encoder = new UsS3OnlyEncoder();
657+
658+
/// <summary>
659+
/// <para>The decoder instance.</para>
660+
/// </summary>
661+
internal static enc.StructDecoder<UsS3Only> Decoder = new UsS3OnlyDecoder();
662+
663+
/// <summary>
664+
/// <para>Initializes a new instance of the <see cref="UsS3Only" /> class.</para>
665+
/// </summary>
666+
private UsS3Only()
667+
{
668+
}
669+
670+
/// <summary>
671+
/// <para>A singleton instance of UsS3Only</para>
672+
/// </summary>
673+
public static readonly UsS3Only Instance = new UsS3Only();
674+
675+
#region Encoder class
676+
677+
/// <summary>
678+
/// <para>Encoder for <see cref="UsS3Only" />.</para>
679+
/// </summary>
680+
private class UsS3OnlyEncoder : enc.StructEncoder<UsS3Only>
681+
{
682+
/// <summary>
683+
/// <para>Encode fields of given value.</para>
684+
/// </summary>
685+
/// <param name="value">The value.</param>
686+
/// <param name="writer">The writer.</param>
687+
public override void EncodeFields(UsS3Only value, enc.IJsonWriter writer)
688+
{
689+
}
690+
}
691+
692+
#endregion
693+
694+
#region Decoder class
695+
696+
/// <summary>
697+
/// <para>Decoder for <see cref="UsS3Only" />.</para>
698+
/// </summary>
699+
private class UsS3OnlyDecoder : enc.StructDecoder<UsS3Only>
700+
{
701+
/// <summary>
702+
/// <para>Create a new instance of type <see cref="UsS3Only" />.</para>
703+
/// </summary>
704+
/// <returns>The struct instance.</returns>
705+
protected override UsS3Only Create()
706+
{
707+
return UsS3Only.Instance;
708+
}
709+
710+
}
711+
712+
#endregion
713+
}
714+
616715
/// <summary>
617716
/// <para>The other object</para>
618717
/// </summary>

0 commit comments

Comments
 (0)