//----------------------
// <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.Events;
using StreamChat.Core.InternalDTO.Models;

namespace StreamChat.Core.InternalDTO.Requests
{
    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 CreatePollRequestVotingVisibilityInternalDTO : System.IEquatable<CreatePollRequestVotingVisibilityInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<CreatePollRequestVotingVisibilityInternalDTO>
    {
        public string Value { get; }

        public static readonly CreatePollRequestVotingVisibilityInternalDTO Anonymous = new CreatePollRequestVotingVisibilityInternalDTO("anonymous");
        public static readonly CreatePollRequestVotingVisibilityInternalDTO Public = new CreatePollRequestVotingVisibilityInternalDTO("public");

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

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

        public override string ToString() => Value;

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

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

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

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

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

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

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