Skip to content

Commit

Permalink
Automated Spec Update (dropbox#225)
Browse files Browse the repository at this point in the history
397eca2ba6c0fbc453fb8832ad5c562c89fd6502

 Change Notes:

Shared Links Namespace:
- Update Comments

Team Log Generated Namespace:
- Update AdminAlertCategoryEnum union to include information_governance
- Add AdminConsoleAppPermission union
- Add AdminConsoleAppPolicy union
- Update AdminRole union to include compliance_admin, content_admin, reporting_admin, security_admin
- Add AppBlockedByPermissionsDetails struct
- Add AppPermissionsChangedDetails struct
- Update EventDetails union to include app_blocked_by_permissions_details, app_permissions_changed_details
- Add AppBlockedByPermissionsType struct
- Add AppPermissionsChangedType struct
- Update EventType union to include app_blocked_by_permissions, app_permissions_changed
- Update EventTypeArg union to include app_blocked_by_permissions, app_permissions_changed

Co-authored-by: DropboxBot <[email protected]>
  • Loading branch information
DropboxBot and DropboxBot authored Apr 8, 2021
1 parent b5dff87 commit 7f870a2
Show file tree
Hide file tree
Showing 14 changed files with 2,604 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ protected override void SetField(SettingsError value, string fieldName, enc.IJso
}

/// <summary>
/// <para>Access to the requested path is forbidden.</para>
/// <para>The user is not allowed to create a shared link to the specified file. For
/// example, this can occur if the file is restricted or if the user's links are <a
/// href="https://help.dropbox.com/files-folders/share/banned-links">banned</a>.</para>
/// </summary>
public sealed class AccessDenied : CreateSharedLinkWithSettingsError
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,28 @@ public DataLossProtection AsDataLossProtection
}
}

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

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

/// <summary>
/// <para>Gets a value indicating whether this instance is MalwareSharing</para>
/// </summary>
Expand Down Expand Up @@ -215,6 +237,12 @@ public override void EncodeFields(AdminAlertCategoryEnum value, enc.IJsonWriter
DataLossProtection.Encoder.EncodeFields((DataLossProtection)value, writer);
return;
}
if (value is InformationGovernance)
{
WriteProperty(".tag", "information_governance", writer, enc.StringEncoder.Instance);
InformationGovernance.Encoder.EncodeFields((InformationGovernance)value, writer);
return;
}
if (value is MalwareSharing)
{
WriteProperty(".tag", "malware_sharing", writer, enc.StringEncoder.Instance);
Expand Down Expand Up @@ -282,6 +310,8 @@ protected override AdminAlertCategoryEnum Decode(string tag, enc.IJsonReader rea
return AccountTakeover.Decoder.DecodeFields(reader);
case "data_loss_protection":
return DataLossProtection.Decoder.DecodeFields(reader);
case "information_governance":
return InformationGovernance.Decoder.DecodeFields(reader);
case "malware_sharing":
return MalwareSharing.Decoder.DecodeFields(reader);
case "massive_file_operation":
Expand Down Expand Up @@ -439,6 +469,77 @@ protected override DataLossProtection Create()
#endregion
}

/// <summary>
/// <para>The information governance object</para>
/// </summary>
public sealed class InformationGovernance : AdminAlertCategoryEnum
{
#pragma warning disable 108

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

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

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

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

#region Encoder class

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

#endregion

#region Decoder class

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

}

#endregion
}

/// <summary>
/// <para>The malware sharing object</para>
/// </summary>
Expand Down
Loading

0 comments on commit 7f870a2

Please sign in to comment.