MicrosoftDocs/Azure-RMSDocs

ProtectionDescriptorBuilder is missing static member functions (C++)

Opened this issue · 0 comments

lvkv commented

All static member functions of class ProtectionDescriptorBuilder are missing from mip/develop/reference/class_mip_protectiondescriptorbuilder.md. These members are public and useful; could we add them? I've copied the missing functions below from the MIP SDK 1.12.101 protection_descriptor_builder.h header for your convenience:

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and rights
   * 
   * @param usersAndRights Collection of users-to-rights mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromUserRights(
      const std::vector<UserRights>& usersAndRights);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and roles
   * 
   * @param usersAndRoles Collection of users-to-roles mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromUserRoles(
      const std::vector<UserRoles>& usersAndRoles);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template
   * 
   * @param templateId protection template ID
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromTemplate(const std::string& templateId);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template
   * 
   * @param serializedTemplate protection template
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromSerializedTemplate(
    const std::vector<uint8_t>& serializedTemplate);

  /**
   * @brief Creates a ProtectionDescriptorBuilder whose access permissions are defined by a protection descriptor
   * 
   * @param protectionDescriptor protection descriptor
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromProtectionDescriptor(const ProtectionDescriptor& protectionDescriptor);

  /**
   * @brief Creates a ProtectionDescriptorBuilder for a license type with the specified users
   * 
   * @param licenseType The license type to create this ProtectionDescriptorBuilder for
   * @param usersWithDefaultRights Collection of users to add to the license with default rights for the specific type
   * @param additionalUsersAndRights Optional additional collection of users-to-rights mappings
   * 
   * @return New ProtectionDescriptorBuilder instance
   */
  MIP_API static std::shared_ptr<ProtectionDescriptorBuilder> CreateFromLicenseType(
      LicenseType licenseType,
      const std::vector<std::string>& usersWithDefaultRights,
      const std::vector<UserRights>& additionalUsersAndRights);

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.