| | 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.ResourceManager.Resources.Models |
| | 12 | | { |
| | 13 | | /// <summary> The data type of the parameter. </summary> |
| | 14 | | public readonly partial struct ParameterType : IEquatable<ParameterType> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="ParameterType"/> values are the same. </summary> |
| | 19 | | public ParameterType(string value) |
| | 20 | | { |
| 64050 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 64050 | 22 | | } |
| | 23 | |
|
| | 24 | | private const string StringValue = "String"; |
| | 25 | | private const string ArrayValue = "Array"; |
| | 26 | | private const string ObjectValue = "Object"; |
| | 27 | | private const string BooleanValue = "Boolean"; |
| | 28 | | private const string IntegerValue = "Integer"; |
| | 29 | | private const string FloatValue = "Float"; |
| | 30 | | private const string DateTimeValue = "DateTime"; |
| | 31 | |
|
| | 32 | | /// <summary> String. </summary> |
| 8 | 33 | | public static ParameterType String { get; } = new ParameterType(StringValue); |
| | 34 | | /// <summary> Array. </summary> |
| 0 | 35 | | public static ParameterType Array { get; } = new ParameterType(ArrayValue); |
| | 36 | | /// <summary> Object. </summary> |
| 0 | 37 | | public static ParameterType Object { get; } = new ParameterType(ObjectValue); |
| | 38 | | /// <summary> Boolean. </summary> |
| 0 | 39 | | public static ParameterType Boolean { get; } = new ParameterType(BooleanValue); |
| | 40 | | /// <summary> Integer. </summary> |
| 0 | 41 | | public static ParameterType Integer { get; } = new ParameterType(IntegerValue); |
| | 42 | | /// <summary> Float. </summary> |
| 0 | 43 | | public static ParameterType Float { get; } = new ParameterType(FloatValue); |
| | 44 | | /// <summary> DateTime. </summary> |
| 0 | 45 | | public static ParameterType DateTime { get; } = new ParameterType(DateTimeValue); |
| | 46 | | /// <summary> Determines if two <see cref="ParameterType"/> values are the same. </summary> |
| 0 | 47 | | public static bool operator ==(ParameterType left, ParameterType right) => left.Equals(right); |
| | 48 | | /// <summary> Determines if two <see cref="ParameterType"/> values are not the same. </summary> |
| 0 | 49 | | public static bool operator !=(ParameterType left, ParameterType right) => !left.Equals(right); |
| | 50 | | /// <summary> Converts a string to a <see cref="ParameterType"/>. </summary> |
| 0 | 51 | | public static implicit operator ParameterType(string value) => new ParameterType(value); |
| | 52 | |
|
| | 53 | | /// <inheritdoc /> |
| | 54 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 55 | | public override bool Equals(object obj) => obj is ParameterType other && Equals(other); |
| | 56 | | /// <inheritdoc /> |
| 0 | 57 | | public bool Equals(ParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCulture |
| | 58 | |
|
| | 59 | | /// <inheritdoc /> |
| | 60 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 61 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 62 | | /// <inheritdoc /> |
| 20 | 63 | | public override string ToString() => _value; |
| | 64 | | } |
| | 65 | | } |