| | 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.Network.Models |
| | 12 | | { |
| | 13 | | /// <summary> The status of the packet capture session. </summary> |
| | 14 | | public readonly partial struct PcStatus : IEquatable<PcStatus> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="PcStatus"/> values are the same. </summary> |
| | 19 | | public PcStatus(string value) |
| | 20 | | { |
| 8 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 8 | 22 | | } |
| | 23 | |
|
| | 24 | | private const string NotStartedValue = "NotStarted"; |
| | 25 | | private const string RunningValue = "Running"; |
| | 26 | | private const string StoppedValue = "Stopped"; |
| | 27 | | private const string ErrorValue = "Error"; |
| | 28 | | private const string UnknownValue = "Unknown"; |
| | 29 | |
|
| | 30 | | /// <summary> NotStarted. </summary> |
| 0 | 31 | | public static PcStatus NotStarted { get; } = new PcStatus(NotStartedValue); |
| | 32 | | /// <summary> Running. </summary> |
| 0 | 33 | | public static PcStatus Running { get; } = new PcStatus(RunningValue); |
| | 34 | | /// <summary> Stopped. </summary> |
| 0 | 35 | | public static PcStatus Stopped { get; } = new PcStatus(StoppedValue); |
| | 36 | | /// <summary> Error. </summary> |
| 0 | 37 | | public static PcStatus Error { get; } = new PcStatus(ErrorValue); |
| | 38 | | /// <summary> Unknown. </summary> |
| 0 | 39 | | public static PcStatus Unknown { get; } = new PcStatus(UnknownValue); |
| | 40 | | /// <summary> Determines if two <see cref="PcStatus"/> values are the same. </summary> |
| 0 | 41 | | public static bool operator ==(PcStatus left, PcStatus right) => left.Equals(right); |
| | 42 | | /// <summary> Determines if two <see cref="PcStatus"/> values are not the same. </summary> |
| 0 | 43 | | public static bool operator !=(PcStatus left, PcStatus right) => !left.Equals(right); |
| | 44 | | /// <summary> Converts a string to a <see cref="PcStatus"/>. </summary> |
| 0 | 45 | | public static implicit operator PcStatus(string value) => new PcStatus(value); |
| | 46 | |
|
| | 47 | | /// <inheritdoc /> |
| | 48 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 49 | | public override bool Equals(object obj) => obj is PcStatus other && Equals(other); |
| | 50 | | /// <inheritdoc /> |
| 0 | 51 | | public bool Equals(PcStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnor |
| | 52 | |
|
| | 53 | | /// <inheritdoc /> |
| | 54 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 55 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 56 | | /// <inheritdoc /> |
| 4 | 57 | | public override string ToString() => _value; |
| | 58 | | } |
| | 59 | | } |