using Unity.Plastic.Newtonsoft.Json; using PlasticGui.WebApi.Responses; namespace Unity.PlasticSCM.Editor.WebApi { /// /// Response to credentials request. /// public class CredentialsResponse { /// /// Error caused by the request. /// [JsonProperty("error")] public ErrorResponse.ErrorFields Error { get; set; } /// /// Type of the token. /// public enum TokenType : int { /// /// Password token. /// Password = 0, /// /// Bearer token. /// Bearer = 1, } /// /// Get the type of the token. /// [JsonIgnore] public TokenType Type { get { return (TokenType)TokenTypeValue; } } /// /// The user's email. /// [JsonProperty("email")] public string Email; /// /// The credential's token. /// [JsonProperty("token")] public string Token; /// /// The token type represented as an integer. /// [JsonProperty("tokenTypeValue")] public int TokenTypeValue; } }