2022-06-29 19:46:41 -04:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2017-05-11 11:41:13 -04:00
|
|
|
|
using Bit.Core.Models.Data;
|
|
|
|
|
|
|
2021-12-14 15:05:07 +00:00
|
|
|
|
namespace Bit.Api.Models.Request;
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2017-05-11 11:41:13 -04:00
|
|
|
|
public class SelectionReadOnlyRequestModel
|
|
|
|
|
|
{
|
|
|
|
|
|
[Required]
|
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
|
public bool ReadOnly { get; set; }
|
2020-05-21 15:36:47 +02:00
|
|
|
|
public bool HidePasswords { get; set; }
|
2022-08-29 15:53:48 -04:00
|
|
|
|
|
2017-05-11 11:41:13 -04:00
|
|
|
|
public SelectionReadOnly ToSelectionReadOnly()
|
2022-08-29 16:06:55 -04:00
|
|
|
|
{
|
2017-05-11 11:41:13 -04:00
|
|
|
|
return new SelectionReadOnly
|
|
|
|
|
|
{
|
|
|
|
|
|
Id = new Guid(Id),
|
2020-05-21 15:36:47 +02:00
|
|
|
|
ReadOnly = ReadOnly,
|
2020-05-22 22:16:01 +02:00
|
|
|
|
HidePasswords = HidePasswords,
|
2017-05-11 11:41:13 -04:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|