void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("directoryServiceOptions");
     writer.WriteStringValue(DirectoryServiceOptions.ToString());
     if (ActiveDirectoryProperties != null)
     {
         writer.WritePropertyName("activeDirectoryProperties");
         writer.WriteObjectValue(ActiveDirectoryProperties);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("directoryServiceOptions");
     writer.WriteStringValue(DirectoryServiceOptions.ToString());
     if (Optional.IsDefined(ActiveDirectoryProperties))
     {
         writer.WritePropertyName("activeDirectoryProperties");
         writer.WriteObjectValue(ActiveDirectoryProperties);
     }
     if (Optional.IsDefined(DefaultSharePermission))
     {
         writer.WritePropertyName("defaultSharePermission");
         writer.WriteStringValue(DefaultSharePermission.Value.ToString());
     }
     writer.WriteEndObject();
 }