/// <summary>
 /// Creates and returns a DataMaskingPolicyProperties object that holds the default settings for a data masking policy
 /// </summary>
 /// <returns>A DataMaskingPolicyProperties object with the default policy settings</returns>
 private DataMaskingPolicyProperties MakeDefaultDataMaskingPolicyProperties()
 {
     DataMaskingPolicyProperties props = new DataMaskingPolicyProperties();
     props.DataMaskingState = "NewCustomer";
     props.ExemptPrincipals = "";
     return props;
 }
 /// <summary>
 /// Creates and returns a DataMaskingPolicyProperties object that holds the default settings for a data masking policy
 /// </summary>
 /// <returns>A DataMaskingPolicyProperties object with the default policy settings</returns>
 private DataMaskingPolicyProperties MakeDefaultDataMaskingPolicyProperties()
 {
     DataMaskingPolicyProperties props = new DataMaskingPolicyProperties();
     props.DataMaskingState = "Disabled";
     props.MaskingLevel = "Relaxed";
     props.ExemptPrincipals = "";
     return props;
 }
 /// <summary>
 /// Initializes a new instance of the
 /// DataMaskingPolicyCreateOrUpdateParameters class with required
 /// arguments.
 /// </summary>
 public DataMaskingPolicyCreateOrUpdateParameters(DataMaskingPolicyProperties properties)
     : this()
 {
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     this.Properties = properties;
 }
 /// <summary>
 /// Initializes a new instance of the
 /// DataMaskingPolicyCreateOrUpdateParameters class with required
 /// arguments.
 /// </summary>
 public DataMaskingPolicyCreateOrUpdateParameters(DataMaskingPolicyProperties properties)
     : this()
 {
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     this.Properties = properties;
 }
 /// <summary>
 /// Takes the cmdlets model object and transform it to the policy as expected by the endpoint
 /// </summary>
 /// <param name="model">The data masking Policy model object</param>
 /// <returns>The communication model object</returns>
 private DataMaskingPolicyCreateOrUpdateParameters PolicizeDatabaseDataMaskingModel(DatabaseDataMaskingPolicyModel model)
 {
     DataMaskingPolicyCreateOrUpdateParameters updateParameters = new DataMaskingPolicyCreateOrUpdateParameters();
     DataMaskingPolicyProperties properties = new DataMaskingPolicyProperties();
     updateParameters.Properties = properties;
     properties.DataMaskingState = (model.DataMaskingState == DataMaskingStateType.Disabled) ? SecurityConstants.DataMaskingEndpoint.Disabled : SecurityConstants.DataMaskingEndpoint.Enabled;
     properties.ExemptPrincipals = model.PrivilegedUsers ?? "";
     return updateParameters;
 }
 /// <summary>
 /// Verify that the received properties match their expected values
 /// </summary>
 /// <param name="expected">The expected value of the properties object</param>
 /// <param name="actual">The properties object that needs to be checked</param>
 private static void VerifyDataMaskingPolicyInformation(DataMaskingPolicyProperties expected, DataMaskingPolicyProperties actual)
 {
     Assert.Equal(expected.DataMaskingState, actual.DataMaskingState);
     Assert.Equal(expected.ExemptPrincipals, actual.ExemptPrincipals);
 }