| | 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 JobResponseStatus : IEquatable<JobResponseStatus> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="JobResponseStatus"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public JobResponseStatus(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 JobResponseStatus Unknown { get; } = new JobResponseStatus(UnknownValue); |
| | 36 | | /// <summary> enqueued. </summary> |
| 0 | 37 | | public static JobResponseStatus Enqueued { get; } = new JobResponseStatus(EnqueuedValue); |
| | 38 | | /// <summary> running. </summary> |
| 0 | 39 | | public static JobResponseStatus Running { get; } = new JobResponseStatus(RunningValue); |
| | 40 | | /// <summary> completed. </summary> |
| 0 | 41 | | public static JobResponseStatus Completed { get; } = new JobResponseStatus(CompletedValue); |
| | 42 | | /// <summary> failed. </summary> |
| 0 | 43 | | public static JobResponseStatus Failed { get; } = new JobResponseStatus(FailedValue); |
| | 44 | | /// <summary> cancelled. </summary> |
| 0 | 45 | | public static JobResponseStatus Cancelled { get; } = new JobResponseStatus(CancelledValue); |
| | 46 | | /// <summary> scheduled. </summary> |
| 0 | 47 | | public static JobResponseStatus Scheduled { get; } = new JobResponseStatus(ScheduledValue); |
| | 48 | | /// <summary> queued. </summary> |
| 0 | 49 | | public static JobResponseStatus Queued { get; } = new JobResponseStatus(QueuedValue); |
| | 50 | | /// <summary> Determines if two <see cref="JobResponseStatus"/> values are the same. </summary> |
| 0 | 51 | | public static bool operator ==(JobResponseStatus left, JobResponseStatus right) => left.Equals(right); |
| | 52 | | /// <summary> Determines if two <see cref="JobResponseStatus"/> values are not the same. </summary> |
| 0 | 53 | | public static bool operator !=(JobResponseStatus left, JobResponseStatus right) => !left.Equals(right); |
| | 54 | | /// <summary> Converts a string to a <see cref="JobResponseStatus"/>. </summary> |
| 0 | 55 | | public static implicit operator JobResponseStatus(string value) => new JobResponseStatus(value); |
| | 56 | |
|
| | 57 | | /// <inheritdoc /> |
| | 58 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 59 | | public override bool Equals(object obj) => obj is JobResponseStatus other && Equals(other); |
| | 60 | | /// <inheritdoc /> |
| 0 | 61 | | public bool Equals(JobResponseStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCul |
| | 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 | | } |