| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.ComponentModel; |
| | 10 | |
|
| | 11 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 12 | | { |
| | 13 | | /// <summary> Stored procedure parameter type. </summary> |
| | 14 | | public readonly partial struct StoredProcedureParameterType : IEquatable<StoredProcedureParameterType> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="StoredProcedureParameterType"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public StoredProcedureParameterType(string value) |
| | 21 | | { |
| 0 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string StringValue = "String"; |
| | 26 | | private const string IntValue = "Int"; |
| | 27 | | private const string Int64Value = "Int64"; |
| | 28 | | private const string DecimalValue = "Decimal"; |
| | 29 | | private const string GuidValue = "Guid"; |
| | 30 | | private const string BooleanValue = "Boolean"; |
| | 31 | | private const string DateValue = "Date"; |
| | 32 | |
|
| | 33 | | /// <summary> String. </summary> |
| 0 | 34 | | public static StoredProcedureParameterType String { get; } = new StoredProcedureParameterType(StringValue); |
| | 35 | | /// <summary> Int. </summary> |
| 0 | 36 | | public static StoredProcedureParameterType Int { get; } = new StoredProcedureParameterType(IntValue); |
| | 37 | | /// <summary> Int64. </summary> |
| 0 | 38 | | public static StoredProcedureParameterType Int64 { get; } = new StoredProcedureParameterType(Int64Value); |
| | 39 | | /// <summary> Decimal. </summary> |
| 0 | 40 | | public static StoredProcedureParameterType Decimal { get; } = new StoredProcedureParameterType(DecimalValue); |
| | 41 | | /// <summary> Guid. </summary> |
| 0 | 42 | | public static StoredProcedureParameterType Guid { get; } = new StoredProcedureParameterType(GuidValue); |
| | 43 | | /// <summary> Boolean. </summary> |
| 0 | 44 | | public static StoredProcedureParameterType Boolean { get; } = new StoredProcedureParameterType(BooleanValue); |
| | 45 | | /// <summary> Date. </summary> |
| 0 | 46 | | public static StoredProcedureParameterType Date { get; } = new StoredProcedureParameterType(DateValue); |
| | 47 | | /// <summary> Determines if two <see cref="StoredProcedureParameterType"/> values are the same. </summary> |
| 0 | 48 | | public static bool operator ==(StoredProcedureParameterType left, StoredProcedureParameterType right) => left.Eq |
| | 49 | | /// <summary> Determines if two <see cref="StoredProcedureParameterType"/> values are not the same. </summary> |
| 0 | 50 | | public static bool operator !=(StoredProcedureParameterType left, StoredProcedureParameterType right) => !left.E |
| | 51 | | /// <summary> Converts a string to a <see cref="StoredProcedureParameterType"/>. </summary> |
| 0 | 52 | | public static implicit operator StoredProcedureParameterType(string value) => new StoredProcedureParameterType(v |
| | 53 | |
|
| | 54 | | /// <inheritdoc /> |
| | 55 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 56 | | public override bool Equals(object obj) => obj is StoredProcedureParameterType other && Equals(other); |
| | 57 | | /// <inheritdoc /> |
| 0 | 58 | | public bool Equals(StoredProcedureParameterType other) => string.Equals(_value, other._value, StringComparison.I |
| | 59 | |
|
| | 60 | | /// <inheritdoc /> |
| | 61 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 62 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 63 | | /// <inheritdoc /> |
| 0 | 64 | | public override string ToString() => _value; |
| | 65 | | } |
| | 66 | | } |