| | 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.Iot.Hub.Service.Models |
| | 12 | | { |
| | 13 | | /// <summary> System generated. Ignored at creation. The status of the job. </summary> |
| | 14 | | public readonly partial struct JobPropertiesStatus : IEquatable<JobPropertiesStatus> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="JobPropertiesStatus"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public JobPropertiesStatus(string value) |
| | 21 | | { |
| 0 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string UnknownValue = "unknown"; |
| | 26 | | private const string EnqueuedValue = "enqueued"; |
| | 27 | | private const string RunningValue = "running"; |
| | 28 | | private const string CompletedValue = "completed"; |
| | 29 | | private const string FailedValue = "failed"; |
| | 30 | | private const string CancelledValue = "cancelled"; |
| | 31 | | private const string ScheduledValue = "scheduled"; |
| | 32 | | private const string QueuedValue = "queued"; |
| | 33 | |
|
| | 34 | | /// <summary> unknown. </summary> |
| 0 | 35 | | public static JobPropertiesStatus Unknown { get; } = new JobPropertiesStatus(UnknownValue); |
| | 36 | | /// <summary> enqueued. </summary> |
| 0 | 37 | | public static JobPropertiesStatus Enqueued { get; } = new JobPropertiesStatus(EnqueuedValue); |
| | 38 | | /// <summary> running. </summary> |
| 0 | 39 | | public static JobPropertiesStatus Running { get; } = new JobPropertiesStatus(RunningValue); |
| | 40 | | /// <summary> completed. </summary> |
| 0 | 41 | | public static JobPropertiesStatus Completed { get; } = new JobPropertiesStatus(CompletedValue); |
| | 42 | | /// <summary> failed. </summary> |
| 0 | 43 | | public static JobPropertiesStatus Failed { get; } = new JobPropertiesStatus(FailedValue); |
| | 44 | | /// <summary> cancelled. </summary> |
| 0 | 45 | | public static JobPropertiesStatus Cancelled { get; } = new JobPropertiesStatus(CancelledValue); |
| | 46 | | /// <summary> scheduled. </summary> |
| 0 | 47 | | public static JobPropertiesStatus Scheduled { get; } = new JobPropertiesStatus(ScheduledValue); |
| | 48 | | /// <summary> queued. </summary> |
| 0 | 49 | | public static JobPropertiesStatus Queued { get; } = new JobPropertiesStatus(QueuedValue); |
| | 50 | | /// <summary> Determines if two <see cref="JobPropertiesStatus"/> values are the same. </summary> |
| 0 | 51 | | public static bool operator ==(JobPropertiesStatus left, JobPropertiesStatus right) => left.Equals(right); |
| | 52 | | /// <summary> Determines if two <see cref="JobPropertiesStatus"/> values are not the same. </summary> |
| 0 | 53 | | public static bool operator !=(JobPropertiesStatus left, JobPropertiesStatus right) => !left.Equals(right); |
| | 54 | | /// <summary> Converts a string to a <see cref="JobPropertiesStatus"/>. </summary> |
| 0 | 55 | | public static implicit operator JobPropertiesStatus(string value) => new JobPropertiesStatus(value); |
| | 56 | |
|
| | 57 | | /// <inheritdoc /> |
| | 58 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 59 | | public override bool Equals(object obj) => obj is JobPropertiesStatus other && Equals(other); |
| | 60 | | /// <inheritdoc /> |
| 0 | 61 | | public bool Equals(JobPropertiesStatus other) => string.Equals(_value, other._value, StringComparison.InvariantC |
| | 62 | |
|
| | 63 | | /// <inheritdoc /> |
| | 64 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 65 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 66 | | /// <inheritdoc /> |
| 0 | 67 | | public override string ToString() => _value; |
| | 68 | | } |
| | 69 | | } |