//----------------------
// <auto-generated>
//     Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------


using StreamChat.Core.InternalDTO.Responses;
using StreamChat.Core.InternalDTO.Requests;
using StreamChat.Core.InternalDTO.Events;

namespace StreamChat.Core.InternalDTO.Models
{
    using System = global::System;

    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]

    internal readonly struct MessageTypeInternalDTO : System.IEquatable<MessageTypeInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<MessageTypeInternalDTO>
    {
        public string Value { get; }

        public static readonly MessageTypeInternalDTO Regular = new MessageTypeInternalDTO("regular");
        public static readonly MessageTypeInternalDTO Ephemeral = new MessageTypeInternalDTO("ephemeral");
        public static readonly MessageTypeInternalDTO Error = new MessageTypeInternalDTO("error");
        public static readonly MessageTypeInternalDTO Reply = new MessageTypeInternalDTO("reply");
        public static readonly MessageTypeInternalDTO System = new MessageTypeInternalDTO("system");
        public static readonly MessageTypeInternalDTO Deleted = new MessageTypeInternalDTO("deleted");

        public MessageTypeInternalDTO(string value)
        {
            Value = value;
        }

        public MessageTypeInternalDTO Parse(string value) => new MessageTypeInternalDTO(value);

        public override string ToString() => Value;

        public bool Equals(MessageTypeInternalDTO other) => Value == other.Value;

        public override bool Equals(object obj) => obj is MessageTypeInternalDTO other && Equals(other);

        public override int GetHashCode() => Value.GetHashCode();

        public static bool operator ==(MessageTypeInternalDTO left, MessageTypeInternalDTO right) => left.Equals(right);

        public static bool operator !=(MessageTypeInternalDTO left, MessageTypeInternalDTO right) => !left.Equals(right);

        public static implicit operator MessageTypeInternalDTO(string value) => new MessageTypeInternalDTO(value);

        public static implicit operator string(MessageTypeInternalDTO type) => type.Value;
    }
}
