Skip to content

Commit

Permalink
Automated Spec Update (dropbox#219)
Browse files Browse the repository at this point in the history
* Automated Spec Update
 9303b45bbfa3d1d3de75a2da609ac47c179d18ba

Change Notes:

Auth Namespace:

Update comments
Files Namespace:

Update comments
Team Linked Apps Namespace:

Update Examples
Team Log Generated Namespace:

Update AdminRole union to include billing_admin

Co-authored-by: mtruong-dbx [email protected]

 822caa80810d2248730a0c6c61309d45f0063f29

 Change Notes:

Files Namespace:
- Add paper/create, paper/update routes
- Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs
- Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions
- Update Comments

Team Log Generated Namespace:
- Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs
- Add DispositionActionType union
- Update ClassificationType union to include pii
- Update EventDetails union to include governance_policy_content_disposed_details
- Update EventType union to include governance_policy_content_disposed
- Update EventTypeArg uniont to include governance_policy_content_disposed
- Update Comments

Team Reports Namespace:
- Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes

Co-authored-by: jorges26 <[email protected]>

 0ba804f8549058d48474fb9f77638a2ee3889993

 Change Notes:

Files Namespace:

- Update ExportInfo struct to include export_options
- Update ExportError union to include invalid_export_format
- Update ExportArg struct to include export_format
- Update ExportMetadata to include paper_revision
- Update GetTemporaryLinkError union to include not_allowed
- Update Comments

Team Log Generated Namespace:

- Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs
- Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions
- Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings
- Update PlacementRestriction union to include uk_only
- Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details
- Update EventType union to include object_label_added, object_label_removed and object_label_updated_value
- Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value
- Update Examples

 cce31b9a2e810b260c4f9fa6250030d00e968533

 Change Notes:

Files Namespace:
- Update Comments
- Update Legacy Scopes

Shared Links Namespace:
- Update Comments
- Update Legacy Scopes

Sharing Files Namespace:
- Update Comments
- Update Legacy Scopes

Team Namespace:
- Update Comments
- Update Legacy Scopes

Team Devices Namespace:
- Update Comments
- Update Legacy Scopes

Team Linked Apps Namespace:
- Update Comments
- Update Legacy Scopes

 d5bb651e5b0236ccacd3860d6ce04508d7fd2c28

 files namespace:
Update comments

team_legal_holds namespace:
Update union LegalHoldsPolicyUpdateError

team_log_generated namespce:
Update union PolicyType
Update comments

Co-authored-by: Pranay Sowdaboina <[email protected]>

* Bump Version

Co-authored-by: DropboxBot <[email protected]>
Co-authored-by: Pranay Sowdaboina <[email protected]>
Co-authored-by: Melody Truong <[email protected]>
  • Loading branch information
4 people authored Mar 4, 2021
1 parent 587b5e4 commit 1fa8a86
Show file tree
Hide file tree
Showing 104 changed files with 10,176 additions and 346 deletions.
2 changes: 1 addition & 1 deletion dropbox-sdk-dotnet/Dropbox.Api/Dropbox.Api.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>Dropbox.Api</id>
<version>5.6.0</version>
<version>5.7.0</version>
<title>Dropbox v2 API</title>
<authors>Dropbox</authors>
<owners>Dropbox</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ internal AuthUserRoutes(enc.ITransport transport)
internal enc.ITransport Transport { get; private set; }

/// <summary>
/// <para>Disables the access token used to authenticate the call.</para>
/// <para>Disables the access token used to authenticate the call. If there is a
/// corresponding refresh token for the access token, this disables that refresh token,
/// as well as any other access tokens for that refresh token.</para>
/// </summary>
/// <returns>The task that represents the asynchronous send operation.</returns>
public t.Task TokenRevokeAsync()
Expand Down
25 changes: 24 additions & 1 deletion dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportArg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ public class ExportArg
/// <para>Initializes a new instance of the <see cref="ExportArg" /> class.</para>
/// </summary>
/// <param name="path">The path of the file to be exported.</param>
public ExportArg(string path)
/// <param name="exportFormat">The file format to which the file should be exported.
/// This must be one of the formats listed in the file's export_options returned by
/// <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.GetMetadataAsync" />. If none
/// is specified, the default format (specified in export_as in file metadata) will be
/// used.</param>
public ExportArg(string path,
string exportFormat = null)
{
if (path == null)
{
Expand All @@ -43,6 +49,7 @@ public ExportArg(string path)
}

this.Path = path;
this.ExportFormat = exportFormat;
}

/// <summary>
Expand All @@ -60,6 +67,15 @@ public ExportArg()
/// </summary>
public string Path { get; protected set; }

/// <summary>
/// <para>The file format to which the file should be exported. This must be one of the
/// formats listed in the file's export_options returned by <see
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.GetMetadataAsync" />. If none is
/// specified, the default format (specified in export_as in file metadata) will be
/// used.</para>
/// </summary>
public string ExportFormat { get; protected set; }

#region Encoder class

/// <summary>
Expand All @@ -75,6 +91,10 @@ private class ExportArgEncoder : enc.StructEncoder<ExportArg>
public override void EncodeFields(ExportArg value, enc.IJsonWriter writer)
{
WriteProperty("path", value.Path, writer, enc.StringEncoder.Instance);
if (value.ExportFormat != null)
{
WriteProperty("export_format", value.ExportFormat, writer, enc.StringEncoder.Instance);
}
}
}

Expand Down Expand Up @@ -110,6 +130,9 @@ protected override void SetField(ExportArg value, string fieldName, enc.IJsonRea
case "path":
value.Path = enc.StringDecoder.Instance.Decode(reader);
break;
case "export_format":
value.ExportFormat = enc.StringDecoder.Instance.Decode(reader);
break;
default:
reader.Skip();
break;
Expand Down
101 changes: 101 additions & 0 deletions dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ public NonExportable AsNonExportable
}
}

/// <summary>
/// <para>Gets a value indicating whether this instance is InvalidExportFormat</para>
/// </summary>
public bool IsInvalidExportFormat
{
get
{
return this is InvalidExportFormat;
}
}

/// <summary>
/// <para>Gets this instance as a InvalidExportFormat, or <c>null</c>.</para>
/// </summary>
public InvalidExportFormat AsInvalidExportFormat
{
get
{
return this as InvalidExportFormat;
}
}

/// <summary>
/// <para>Gets a value indicating whether this instance is RetryError</para>
/// </summary>
Expand Down Expand Up @@ -148,6 +170,12 @@ public override void EncodeFields(ExportError value, enc.IJsonWriter writer)
NonExportable.Encoder.EncodeFields((NonExportable)value, writer);
return;
}
if (value is InvalidExportFormat)
{
WriteProperty(".tag", "invalid_export_format", writer, enc.StringEncoder.Instance);
InvalidExportFormat.Encoder.EncodeFields((InvalidExportFormat)value, writer);
return;
}
if (value is RetryError)
{
WriteProperty(".tag", "retry_error", writer, enc.StringEncoder.Instance);
Expand Down Expand Up @@ -196,6 +224,8 @@ protected override ExportError Decode(string tag, enc.IJsonReader reader)
return Path.Decoder.DecodeFields(reader);
case "non_exportable":
return NonExportable.Decoder.DecodeFields(reader);
case "invalid_export_format":
return InvalidExportFormat.Decoder.DecodeFields(reader);
case "retry_error":
return RetryError.Decoder.DecodeFields(reader);
default:
Expand Down Expand Up @@ -373,6 +403,77 @@ protected override NonExportable Create()
#endregion
}

/// <summary>
/// <para>The specified export format is not a valid option for this file type.</para>
/// </summary>
public sealed class InvalidExportFormat : ExportError
{
#pragma warning disable 108

/// <summary>
/// <para>The encoder instance.</para>
/// </summary>
internal static enc.StructEncoder<InvalidExportFormat> Encoder = new InvalidExportFormatEncoder();

/// <summary>
/// <para>The decoder instance.</para>
/// </summary>
internal static enc.StructDecoder<InvalidExportFormat> Decoder = new InvalidExportFormatDecoder();

/// <summary>
/// <para>Initializes a new instance of the <see cref="InvalidExportFormat" />
/// class.</para>
/// </summary>
private InvalidExportFormat()
{
}

/// <summary>
/// <para>A singleton instance of InvalidExportFormat</para>
/// </summary>
public static readonly InvalidExportFormat Instance = new InvalidExportFormat();

#region Encoder class

/// <summary>
/// <para>Encoder for <see cref="InvalidExportFormat" />.</para>
/// </summary>
private class InvalidExportFormatEncoder : enc.StructEncoder<InvalidExportFormat>
{
/// <summary>
/// <para>Encode fields of given value.</para>
/// </summary>
/// <param name="value">The value.</param>
/// <param name="writer">The writer.</param>
public override void EncodeFields(InvalidExportFormat value, enc.IJsonWriter writer)
{
}
}

#endregion

#region Decoder class

/// <summary>
/// <para>Decoder for <see cref="InvalidExportFormat" />.</para>
/// </summary>
private class InvalidExportFormatDecoder : enc.StructDecoder<InvalidExportFormat>
{
/// <summary>
/// <para>Create a new instance of type <see cref="InvalidExportFormat"
/// />.</para>
/// </summary>
/// <returns>The struct instance.</returns>
protected override InvalidExportFormat Create()
{
return InvalidExportFormat.Instance;
}

}

#endregion
}

/// <summary>
/// <para>The exportable content is not yet available. Please retry later.</para>
/// </summary>
Expand Down
21 changes: 20 additions & 1 deletion dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ public class ExportInfo
/// <para>Initializes a new instance of the <see cref="ExportInfo" /> class.</para>
/// </summary>
/// <param name="exportAs">Format to which the file can be exported to.</param>
public ExportInfo(string exportAs = null)
/// <param name="exportOptions">Additional formats to which the file can be exported.
/// These values can be specified as the export_format in /files/export.</param>
public ExportInfo(string exportAs = null,
col.IEnumerable<string> exportOptions = null)
{
var exportOptionsList = enc.Util.ToList(exportOptions);

this.ExportAs = exportAs;
this.ExportOptions = exportOptionsList;
}

/// <summary>
Expand All @@ -51,6 +57,12 @@ public ExportInfo()
/// </summary>
public string ExportAs { get; protected set; }

/// <summary>
/// <para>Additional formats to which the file can be exported. These values can be
/// specified as the export_format in /files/export.</para>
/// </summary>
public col.IList<string> ExportOptions { get; protected set; }

#region Encoder class

/// <summary>
Expand All @@ -69,6 +81,10 @@ public override void EncodeFields(ExportInfo value, enc.IJsonWriter writer)
{
WriteProperty("export_as", value.ExportAs, writer, enc.StringEncoder.Instance);
}
if (value.ExportOptions.Count > 0)
{
WriteListProperty("export_options", value.ExportOptions, writer, enc.StringEncoder.Instance);
}
}
}

Expand Down Expand Up @@ -104,6 +120,9 @@ protected override void SetField(ExportInfo value, string fieldName, enc.IJsonRe
case "export_as":
value.ExportAs = enc.StringDecoder.Instance.Decode(reader);
break;
case "export_options":
value.ExportOptions = ReadList<string>(reader, enc.StringDecoder.Instance);
break;
default:
reader.Skip();
break;
Expand Down
21 changes: 20 additions & 1 deletion dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/ExportMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ public class ExportMetadata
/// be used to verify data integrity. Similar to content hash. For more information see
/// our <a href="https://www.dropbox.com/developers/reference/content-hash">Content
/// hash</a> page.</param>
/// <param name="paperRevision">If the file is a Paper doc, this gives the latest doc
/// revision which can be used in <see
/// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.PaperUpdateAsync" />.</param>
public ExportMetadata(string name,
ulong size,
string exportHash = null)
string exportHash = null,
long? paperRevision = null)
{
if (name == null)
{
Expand All @@ -62,6 +66,7 @@ public ExportMetadata(string name,
this.Name = name;
this.Size = size;
this.ExportHash = exportHash;
this.PaperRevision = paperRevision;
}

/// <summary>
Expand Down Expand Up @@ -93,6 +98,13 @@ public ExportMetadata()
/// </summary>
public string ExportHash { get; protected set; }

/// <summary>
/// <para>If the file is a Paper doc, this gives the latest doc revision which can be
/// used in <see cref="Dropbox.Api.Files.Routes.FilesUserRoutes.PaperUpdateAsync"
/// />.</para>
/// </summary>
public long? PaperRevision { get; protected set; }

#region Encoder class

/// <summary>
Expand All @@ -113,6 +125,10 @@ public override void EncodeFields(ExportMetadata value, enc.IJsonWriter writer)
{
WriteProperty("export_hash", value.ExportHash, writer, enc.StringEncoder.Instance);
}
if (value.PaperRevision != null)
{
WriteProperty("paper_revision", value.PaperRevision.Value, writer, enc.Int64Encoder.Instance);
}
}
}

Expand Down Expand Up @@ -154,6 +170,9 @@ protected override void SetField(ExportMetadata value, string fieldName, enc.IJs
case "export_hash":
value.ExportHash = enc.StringDecoder.Instance.Decode(reader);
break;
case "paper_revision":
value.PaperRevision = enc.Int64Decoder.Instance.Decode(reader);
break;
default:
reader.Skip();
break;
Expand Down
10 changes: 8 additions & 2 deletions dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesAppRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ internal FilesAppRoutes(enc.ITransport transport)
internal enc.ITransport Transport { get; private set; }

/// <summary>
/// <para>Get a thumbnail for a file.</para>
/// <para>Get a thumbnail for an image.</para>
/// <para>This method currently supports files with the following file extensions: jpg,
/// jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in
/// size won't be converted to a thumbnail.</para>
/// </summary>
/// <param name="thumbnailV2Arg">The request parameters</param>
/// <returns>The task that represents the asynchronous send operation. The TResult
Expand Down Expand Up @@ -60,7 +63,10 @@ public sys.IAsyncResult BeginGetThumbnailV2(ThumbnailV2Arg thumbnailV2Arg, sys.A
}

/// <summary>
/// <para>Get a thumbnail for a file.</para>
/// <para>Get a thumbnail for an image.</para>
/// <para>This method currently supports files with the following file extensions: jpg,
/// jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in
/// size won't be converted to a thumbnail.</para>
/// </summary>
/// <param name="resource">Information specifying which file to preview. This could be
/// a path to a file, a shared link pointing to a file, or a shared link pointing to a
Expand Down
Loading

0 comments on commit 1fa8a86

Please sign in to comment.