package com.aip.gateway.api.aip.model;

import lombok.Builder;
import lombok.Data;

import java.util.Date;

@Data
@Builder
public class AipProtectionDescriptor {

    public enum AipProtectionType {
        /// <summary>Protection was created from a template</summary>
        TemplateBased,
        /// <summary>Protection was created ad hoc</summary>
        Custom,
    }

    private int protectionType;

/// <summary>Collection of users-to-roles mappings</summary>
// private List<Microsoft.InformationProtection.UserRoles> UserRoles;
//
// /// <summary>Collection of users-to-rights mappings</summary>
// private List<Microsoft.InformationProtection.UserRights> UserRights;

    /// <summary>
/// The RMS template id for template protection, license id for adhoc protection, if any
/// </summary>
    private String templateId;

    /// <summary>
/// Gets the Label info, if any
/// This property will only be populated in ProtectionDescriptors for preexisting protected content. i.e. It is
/// a field populated by the server at the moment protected content is consumed.
/// </summary>
    private AipLabelInfo labelInformation;

    /// <summary>
/// Gets the Label id, if any
/// This property will only be populated in ProtectionDescriptors for preexisting protected content. i.e. It is
/// a field populated by the server at the moment protected content is consumed.
/// </summary>
    private String labelId;

    /// <summary>The owner of protection</summary>
    private String owner;

    /// <summary>
/// Gets the content id
/// Publishing licenses will have this identifier surrounded by curly braces "{}".
/// Those braces are removed from the value returned here
/// </summary>
    private String contentId;

    /// <summary>The protection name</summary>
    private String name;

    /// <summary>The protection description</summary>
    private String description;

    /// <summary>
/// Whether or not protection allows offline content access (default = true)
/// </summary>
    private boolean allowOfflineAccess;

    /// <summary>Protection referrer address</summary>
    private String referrer;

/// <summary>Protection expiration time</summary>
    private Date contentValidUntil;

/// <summary>App-specific data that was encrypted</summary>
// private Dictionary<String, String> EncryptedAppData;
//
// /// <summary>App-specific data that was signed</summary>
// private Dictionary<String, String> SignedAppData;

    /// <summary>The double key url</summary>
    private String doubleKeyUrl;
}
