Skip to content

Commit

Permalink
Automated Spec Update (#333)
Browse files Browse the repository at this point in the history
3d1080a021a67c335c52361d8f61ec558bb80606

 Change Notes:

shared_links Namespace

Update RequestedLinkAccessLevel union
team Namespace

Update TeamGetInfoResult struct
team_log_generated Namespace

Add FolderLinkRestrictionPolicyChangedDetails, FolderLinkRestrictionPolicyChangedType structs
Add FolderLinkRestrictionPolicy unions

Co-authored-by: DropboxBot <[email protected]>
  • Loading branch information
DropboxBot and DropboxBot authored Nov 9, 2022
1 parent 7a4bc93 commit c6415d8
Show file tree
Hide file tree
Showing 9 changed files with 1,110 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ public Max AsMax
}
}

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

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

/// <summary>
/// <para>Gets a value indicating whether this instance is Other</para>
/// </summary>
Expand Down Expand Up @@ -155,6 +177,12 @@ public override void EncodeFields(RequestedLinkAccessLevel value, enc.IJsonWrite
Max.Encoder.EncodeFields((Max)value, writer);
return;
}
if (value is Default)
{
WriteProperty(".tag", "default", writer, enc.StringEncoder.Instance);
Default.Encoder.EncodeFields((Default)value, writer);
return;
}
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
Expand Down Expand Up @@ -200,6 +228,8 @@ protected override RequestedLinkAccessLevel Decode(string tag, enc.IJsonReader r
return Editor.Decoder.DecodeFields(reader);
case "max":
return Max.Decoder.DecodeFields(reader);
case "default":
return Default.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
Expand Down Expand Up @@ -416,6 +446,75 @@ protected override Max Create()
#endregion
}

/// <summary>
/// <para>Request for the default access level the user has set.</para>
/// </summary>
public sealed class Default : RequestedLinkAccessLevel
{
#pragma warning disable 108

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

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

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

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

#region Encoder class

/// <summary>
/// <para>Encoder for <see cref="Default" />.</para>
/// </summary>
private class DefaultEncoder : enc.StructEncoder<Default>
{
/// <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(Default value, enc.IJsonWriter writer)
{
}
}

#endregion

#region Decoder class

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

}

#endregion
}

/// <summary>
/// <para>The other object</para>
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions dropbox-sdk-dotnet/Dropbox.Api/Generated/Team/TeamGetInfoResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ public class TeamGetInfoResult
/// team.</param>
/// <param name="numProvisionedUsers">The number of accounts that have been invited or
/// are already active members of the team.</param>
/// <param name="numUsedLicenses">The number of licenses used on the team.</param>
/// <param name="policies">The policies</param>
public TeamGetInfoResult(string name,
string teamId,
uint numLicensedUsers,
uint numProvisionedUsers,
uint numUsedLicenses,
global::Dropbox.Api.TeamPolicies.TeamMemberPolicies policies)
{
if (name == null)
Expand All @@ -63,6 +65,7 @@ public TeamGetInfoResult(string name,
this.TeamId = teamId;
this.NumLicensedUsers = numLicensedUsers;
this.NumProvisionedUsers = numProvisionedUsers;
this.NumUsedLicenses = numUsedLicenses;
this.Policies = policies;
}

Expand Down Expand Up @@ -98,6 +101,11 @@ public TeamGetInfoResult()
/// </summary>
public uint NumProvisionedUsers { get; protected set; }

/// <summary>
/// <para>The number of licenses used on the team.</para>
/// </summary>
public uint NumUsedLicenses { get; protected set; }

/// <summary>
/// <para>Gets the policies of the team get info result</para>
/// </summary>
Expand All @@ -121,6 +129,7 @@ public override void EncodeFields(TeamGetInfoResult value, enc.IJsonWriter write
WriteProperty("team_id", value.TeamId, writer, enc.StringEncoder.Instance);
WriteProperty("num_licensed_users", value.NumLicensedUsers, writer, enc.UInt32Encoder.Instance);
WriteProperty("num_provisioned_users", value.NumProvisionedUsers, writer, enc.UInt32Encoder.Instance);
WriteProperty("num_used_licenses", value.NumUsedLicenses, writer, enc.UInt32Encoder.Instance);
WriteProperty("policies", value.Policies, writer, global::Dropbox.Api.TeamPolicies.TeamMemberPolicies.Encoder);
}
}
Expand Down Expand Up @@ -166,6 +175,9 @@ protected override void SetField(TeamGetInfoResult value, string fieldName, enc.
case "num_provisioned_users":
value.NumProvisionedUsers = enc.UInt32Decoder.Instance.Decode(reader);
break;
case "num_used_licenses":
value.NumUsedLicenses = enc.UInt32Decoder.Instance.Decode(reader);
break;
case "policies":
value.Policies = global::Dropbox.Api.TeamPolicies.TeamMemberPolicies.Decoder.Decode(reader);
break;
Expand Down
124 changes: 124 additions & 0 deletions dropbox-sdk-dotnet/Dropbox.Api/Generated/TeamLog/EventDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9033,6 +9033,30 @@ public FileTransfersPolicyChangedDetails AsFileTransfersPolicyChangedDetails
}
}

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

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

/// <summary>
/// <para>Gets a value indicating whether this instance is
/// GoogleSsoChangePolicyDetails</para>
Expand Down Expand Up @@ -13707,6 +13731,12 @@ public override void EncodeFields(EventDetails value, enc.IJsonWriter writer)
FileTransfersPolicyChangedDetails.Encoder.EncodeFields((FileTransfersPolicyChangedDetails)value, writer);
return;
}
if (value is FolderLinkRestrictionPolicyChangedDetails)
{
WriteProperty(".tag", "folder_link_restriction_policy_changed_details", writer, enc.StringEncoder.Instance);
FolderLinkRestrictionPolicyChangedDetails.Encoder.EncodeFields((FolderLinkRestrictionPolicyChangedDetails)value, writer);
return;
}
if (value is GoogleSsoChangePolicyDetails)
{
WriteProperty(".tag", "google_sso_change_policy_details", writer, enc.StringEncoder.Instance);
Expand Down Expand Up @@ -15105,6 +15135,8 @@ protected override EventDetails Decode(string tag, enc.IJsonReader reader)
return FileRequestsEmailsRestrictedToTeamOnlyDetails.Decoder.DecodeFields(reader);
case "file_transfers_policy_changed_details":
return FileTransfersPolicyChangedDetails.Decoder.DecodeFields(reader);
case "folder_link_restriction_policy_changed_details":
return FolderLinkRestrictionPolicyChangedDetails.Decoder.DecodeFields(reader);
case "google_sso_change_policy_details":
return GoogleSsoChangePolicyDetails.Decoder.DecodeFields(reader);
case "group_user_management_change_policy_details":
Expand Down Expand Up @@ -50161,6 +50193,98 @@ public override FileTransfersPolicyChangedDetails DecodeFields(enc.IJsonReader r
#endregion
}

/// <summary>
/// <para>The folder link restriction policy changed details object</para>
/// </summary>
public sealed class FolderLinkRestrictionPolicyChangedDetails : EventDetails
{
#pragma warning disable 108

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

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

/// <summary>
/// <para>Initializes a new instance of the <see
/// cref="FolderLinkRestrictionPolicyChangedDetails" /> class.</para>
/// </summary>
/// <param name="value">The value</param>
public FolderLinkRestrictionPolicyChangedDetails(global::Dropbox.Api.TeamLog.FolderLinkRestrictionPolicyChangedDetails value)
{
this.Value = value;
}
/// <summary>
/// <para>Initializes a new instance of the <see
/// cref="FolderLinkRestrictionPolicyChangedDetails" /> class.</para>
/// </summary>
private FolderLinkRestrictionPolicyChangedDetails()
{
}

/// <summary>
/// <para>Gets the value of this instance.</para>
/// </summary>
public global::Dropbox.Api.TeamLog.FolderLinkRestrictionPolicyChangedDetails Value { get; private set; }

#region Encoder class

/// <summary>
/// <para>Encoder for <see cref="FolderLinkRestrictionPolicyChangedDetails"
/// />.</para>
/// </summary>
private class FolderLinkRestrictionPolicyChangedDetailsEncoder : enc.StructEncoder<FolderLinkRestrictionPolicyChangedDetails>
{
/// <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(FolderLinkRestrictionPolicyChangedDetails value, enc.IJsonWriter writer)
{
WriteProperty("folder_link_restriction_policy_changed_details", value.Value, writer, global::Dropbox.Api.TeamLog.FolderLinkRestrictionPolicyChangedDetails.Encoder);
}
}

#endregion

#region Decoder class

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

/// <summary>
/// <para>Decode fields without ensuring start and end object.</para>
/// </summary>
/// <param name="reader">The json reader.</param>
/// <returns>The decoded object.</returns>
public override FolderLinkRestrictionPolicyChangedDetails DecodeFields(enc.IJsonReader reader)
{
return new FolderLinkRestrictionPolicyChangedDetails(global::Dropbox.Api.TeamLog.FolderLinkRestrictionPolicyChangedDetails.Decoder.DecodeFields(reader));
}
}

#endregion
}

/// <summary>
/// <para>The google sso change policy details object</para>
/// </summary>
Expand Down
Loading

0 comments on commit c6415d8

Please sign in to comment.