| | | 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> Provisioning status of the managed application. </summary> |
| | | 14 | | public readonly partial struct ProvisioningState : IEquatable<ProvisioningState> |
| | | 15 | | { |
| | | 16 | | private readonly string _value; |
| | | 17 | | |
| | | 18 | | /// <summary> Determines if two <see cref="ProvisioningState"/> values are the same. </summary> |
| | | 19 | | public ProvisioningState(string value) |
| | | 20 | | { |
| | 0 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| | 0 | 22 | | } |
| | | 23 | | |
| | | 24 | | private const string AcceptedValue = "Accepted"; |
| | | 25 | | private const string RunningValue = "Running"; |
| | | 26 | | private const string ReadyValue = "Ready"; |
| | | 27 | | private const string CreatingValue = "Creating"; |
| | | 28 | | private const string CreatedValue = "Created"; |
| | | 29 | | private const string DeletingValue = "Deleting"; |
| | | 30 | | private const string DeletedValue = "Deleted"; |
| | | 31 | | private const string CanceledValue = "Canceled"; |
| | | 32 | | private const string FailedValue = "Failed"; |
| | | 33 | | private const string SucceededValue = "Succeeded"; |
| | | 34 | | private const string UpdatingValue = "Updating"; |
| | | 35 | | |
| | | 36 | | /// <summary> Accepted. </summary> |
| | 0 | 37 | | public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); |
| | | 38 | | /// <summary> Running. </summary> |
| | 0 | 39 | | public static ProvisioningState Running { get; } = new ProvisioningState(RunningValue); |
| | | 40 | | /// <summary> Ready. </summary> |
| | 0 | 41 | | public static ProvisioningState Ready { get; } = new ProvisioningState(ReadyValue); |
| | | 42 | | /// <summary> Creating. </summary> |
| | 0 | 43 | | public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); |
| | | 44 | | /// <summary> Created. </summary> |
| | 0 | 45 | | public static ProvisioningState Created { get; } = new ProvisioningState(CreatedValue); |
| | | 46 | | /// <summary> Deleting. </summary> |
| | 0 | 47 | | public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); |
| | | 48 | | /// <summary> Deleted. </summary> |
| | 0 | 49 | | public static ProvisioningState Deleted { get; } = new ProvisioningState(DeletedValue); |
| | | 50 | | /// <summary> Canceled. </summary> |
| | 0 | 51 | | public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); |
| | | 52 | | /// <summary> Failed. </summary> |
| | 0 | 53 | | public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); |
| | | 54 | | /// <summary> Succeeded. </summary> |
| | 0 | 55 | | public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); |
| | | 56 | | /// <summary> Updating. </summary> |
| | 0 | 57 | | public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); |
| | | 58 | | /// <summary> Determines if two <see cref="ProvisioningState"/> values are the same. </summary> |
| | 0 | 59 | | public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); |
| | | 60 | | /// <summary> Determines if two <see cref="ProvisioningState"/> values are not the same. </summary> |
| | 0 | 61 | | public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); |
| | | 62 | | /// <summary> Converts a string to a <see cref="ProvisioningState"/>. </summary> |
| | 0 | 63 | | public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); |
| | | 64 | | |
| | | 65 | | /// <inheritdoc /> |
| | | 66 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 67 | | public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); |
| | | 68 | | /// <inheritdoc /> |
| | 0 | 69 | | public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCul |
| | | 70 | | |
| | | 71 | | /// <inheritdoc /> |
| | | 72 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 73 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | | 74 | | /// <inheritdoc /> |
| | 0 | 75 | | public override string ToString() => _value; |
| | | 76 | | } |
| | | 77 | | } |