Skip to content

Commit

Permalink
Automated Spec Update (#310)
Browse files Browse the repository at this point in the history
c26b11df5170dcc03a86046b162c284ed24f7487

 Change Notes:

files Namespace
- Update upload_session/start_batch  route to include account_id

Co-authored-by: DropboxBot <[email protected]>
Co-authored-by: Brent Bumann <[email protected]>
  • Loading branch information
3 people authored Jun 15, 2022
1 parent 56e9e79 commit 6bbadbe
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
10 changes: 10 additions & 0 deletions dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesUserRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7596,6 +7596,11 @@ public UploadSessionStartResult EndUploadSessionStart(sys.IAsyncResult asyncResu
/// <summary>
/// <para>This route starts batch of upload_sessions. Please refer to
/// `upload_session/start` usage.</para>
/// <para>Calls to this endpoint will count as data transport calls for any Dropbox
/// Business teams with a limit on the number of data transport calls allowed per
/// month. For more information, see the <a
/// href="https://www.dropbox.com/developers/reference/data-transport-limit">Data
/// transport limit page</a>.</para>
/// </summary>
/// <param name="uploadSessionStartBatchArg">The request parameters</param>
/// <returns>The task that represents the asynchronous send operation. The TResult
Expand Down Expand Up @@ -7624,6 +7629,11 @@ public sys.IAsyncResult BeginUploadSessionStartBatch(UploadSessionStartBatchArg
/// <summary>
/// <para>This route starts batch of upload_sessions. Please refer to
/// `upload_session/start` usage.</para>
/// <para>Calls to this endpoint will count as data transport calls for any Dropbox
/// Business teams with a limit on the number of data transport calls allowed per
/// month. For more information, see the <a
/// href="https://www.dropbox.com/developers/reference/data-transport-limit">Data
/// transport limit page</a>.</para>
/// </summary>
/// <param name="numSessions">The number of upload sessions to start.</param>
/// <param name="sessionType">Type of upload session you want to start. If not
Expand Down
29 changes: 28 additions & 1 deletion dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/SearchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ public class SearchOptions
/// Only supported for active file search.</param>
/// <param name="fileCategories">Restricts search to only the file categories
/// specified. Only supported for active file search.</param>
/// <param name="accountId">Restricts results to the given account id.</param>
public SearchOptions(string path = null,
ulong maxResults = 100,
SearchOrderBy orderBy = null,
FileStatus fileStatus = null,
bool filenameOnly = false,
col.IEnumerable<string> fileExtensions = null,
col.IEnumerable<FileCategory> fileCategories = null)
col.IEnumerable<FileCategory> fileCategories = null,
string accountId = null)
{
if (path != null)
{
Expand All @@ -74,13 +76,26 @@ public SearchOptions(string path = null,

var fileCategoriesList = enc.Util.ToList(fileCategories);

if (accountId != null)
{
if (accountId.Length < 40)
{
throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at least 40");
}
if (accountId.Length > 40)
{
throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at most 40");
}
}

this.Path = path;
this.MaxResults = maxResults;
this.OrderBy = orderBy;
this.FileStatus = fileStatus;
this.FilenameOnly = filenameOnly;
this.FileExtensions = fileExtensionsList;
this.FileCategories = fileCategoriesList;
this.AccountId = accountId;
}

/// <summary>
Expand Down Expand Up @@ -135,6 +150,11 @@ public SearchOptions()
/// </summary>
public col.IList<FileCategory> FileCategories { get; protected set; }

/// <summary>
/// <para>Restricts results to the given account id.</para>
/// </summary>
public string AccountId { get; protected set; }

#region Encoder class

/// <summary>
Expand Down Expand Up @@ -168,6 +188,10 @@ public override void EncodeFields(SearchOptions value, enc.IJsonWriter writer)
{
WriteListProperty("file_categories", value.FileCategories, writer, global::Dropbox.Api.Files.FileCategory.Encoder);
}
if (value.AccountId != null)
{
WriteProperty("account_id", value.AccountId, writer, enc.StringEncoder.Instance);
}
}
}

Expand Down Expand Up @@ -221,6 +245,9 @@ protected override void SetField(SearchOptions value, string fieldName, enc.IJso
case "file_categories":
value.FileCategories = ReadList<FileCategory>(reader, global::Dropbox.Api.Files.FileCategory.Decoder);
break;
case "account_id":
value.AccountId = enc.StringDecoder.Instance.Decode(reader);
break;
default:
reader.Skip();
break;
Expand Down
2 changes: 1 addition & 1 deletion spec
Submodule spec updated 1 files
+9 −1 files.stone

0 comments on commit 6bbadbe

Please sign in to comment.