// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.MachineLearningServices.Models
{
    /// <summary> The Compute Instance Authorization type. Available values are personal (default). </summary>
    public readonly partial struct ComputeInstanceAuthorizationType : IEquatable<ComputeInstanceAuthorizationType>
    {
        private readonly string _value;

        /// <summary> Determines if two <see cref="ComputeInstanceAuthorizationType"/> values are the same. </summary>
        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
        public ComputeInstanceAuthorizationType(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string PersonalValue = "personal";

        /// <summary> personal. </summary>
        public static ComputeInstanceAuthorizationType Personal { get; } = new ComputeInstanceAuthorizationType(PersonalValue);
        /// <summary> Determines if two <see cref="ComputeInstanceAuthorizationType"/> values are the same. </summary>
        public static bool operator ==(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => left.Equals(right);
        /// <summary> Determines if two <see cref="ComputeInstanceAuthorizationType"/> values are not the same. </summary>
        public static bool operator !=(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => !left.Equals(right);
        /// <summary> Converts a string to a <see cref="ComputeInstanceAuthorizationType"/>. </summary>
        public static implicit operator ComputeInstanceAuthorizationType(string value) => new ComputeInstanceAuthorizationType(value);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is ComputeInstanceAuthorizationType other && Equals(other);
        /// <inheritdoc />
        public bool Equals(ComputeInstanceAuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        /// <inheritdoc />
        public override string ToString() => _value;
    }
}
