| | 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> The query result type. </summary> |
| | 14 | | public readonly partial struct QueryResultType : IEquatable<QueryResultType> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="QueryResultType"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public QueryResultType(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 TwinValue = "twin"; |
| | 27 | | private const string DeviceJobValue = "deviceJob"; |
| | 28 | | private const string JobResponseValue = "jobResponse"; |
| | 29 | | private const string RawValue = "raw"; |
| | 30 | | private const string EnrollmentValue = "enrollment"; |
| | 31 | | private const string EnrollmentGroupValue = "enrollmentGroup"; |
| | 32 | | private const string DeviceRegistrationValue = "deviceRegistration"; |
| | 33 | |
|
| | 34 | | /// <summary> unknown. </summary> |
| 0 | 35 | | public static QueryResultType Unknown { get; } = new QueryResultType(UnknownValue); |
| | 36 | | /// <summary> twin. </summary> |
| 0 | 37 | | public static QueryResultType Twin { get; } = new QueryResultType(TwinValue); |
| | 38 | | /// <summary> deviceJob. </summary> |
| 0 | 39 | | public static QueryResultType DeviceJob { get; } = new QueryResultType(DeviceJobValue); |
| | 40 | | /// <summary> jobResponse. </summary> |
| 0 | 41 | | public static QueryResultType JobResponse { get; } = new QueryResultType(JobResponseValue); |
| | 42 | | /// <summary> raw. </summary> |
| 0 | 43 | | public static QueryResultType Raw { get; } = new QueryResultType(RawValue); |
| | 44 | | /// <summary> enrollment. </summary> |
| 0 | 45 | | public static QueryResultType Enrollment { get; } = new QueryResultType(EnrollmentValue); |
| | 46 | | /// <summary> enrollmentGroup. </summary> |
| 0 | 47 | | public static QueryResultType EnrollmentGroup { get; } = new QueryResultType(EnrollmentGroupValue); |
| | 48 | | /// <summary> deviceRegistration. </summary> |
| 0 | 49 | | public static QueryResultType DeviceRegistration { get; } = new QueryResultType(DeviceRegistrationValue); |
| | 50 | | /// <summary> Determines if two <see cref="QueryResultType"/> values are the same. </summary> |
| 0 | 51 | | public static bool operator ==(QueryResultType left, QueryResultType right) => left.Equals(right); |
| | 52 | | /// <summary> Determines if two <see cref="QueryResultType"/> values are not the same. </summary> |
| 0 | 53 | | public static bool operator !=(QueryResultType left, QueryResultType right) => !left.Equals(right); |
| | 54 | | /// <summary> Converts a string to a <see cref="QueryResultType"/>. </summary> |
| 0 | 55 | | public static implicit operator QueryResultType(string value) => new QueryResultType(value); |
| | 56 | |
|
| | 57 | | /// <inheritdoc /> |
| | 58 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 59 | | public override bool Equals(object obj) => obj is QueryResultType other && Equals(other); |
| | 60 | | /// <inheritdoc /> |
| 0 | 61 | | public bool Equals(QueryResultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultu |
| | 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 | | } |