| | 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 type of registry operation and ETag preferences. </summary> |
| | 14 | | public readonly partial struct ExportImportDeviceImportMode : IEquatable<ExportImportDeviceImportMode> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="ExportImportDeviceImportMode"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public ExportImportDeviceImportMode(string value) |
| | 21 | | { |
| 14 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 14 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string CreateValue = "create"; |
| | 26 | | private const string UpdateValue = "update"; |
| | 27 | | private const string UpdateIfMatchETagValue = "updateIfMatchETag"; |
| | 28 | | private const string DeleteValue = "delete"; |
| | 29 | | private const string DeleteIfMatchETagValue = "deleteIfMatchETag"; |
| | 30 | | private const string UpdateTwinValue = "updateTwin"; |
| | 31 | | private const string UpdateTwinIfMatchETagValue = "updateTwinIfMatchETag"; |
| | 32 | |
|
| | 33 | | /// <summary> create. </summary> |
| 322 | 34 | | public static ExportImportDeviceImportMode Create { get; } = new ExportImportDeviceImportMode(CreateValue); |
| | 35 | | /// <summary> update. </summary> |
| 50 | 36 | | public static ExportImportDeviceImportMode Update { get; } = new ExportImportDeviceImportMode(UpdateValue); |
| | 37 | | /// <summary> updateIfMatchETag. </summary> |
| 0 | 38 | | public static ExportImportDeviceImportMode UpdateIfMatchETag { get; } = new ExportImportDeviceImportMode(UpdateI |
| | 39 | | /// <summary> delete. </summary> |
| 170 | 40 | | public static ExportImportDeviceImportMode Delete { get; } = new ExportImportDeviceImportMode(DeleteValue); |
| | 41 | | /// <summary> deleteIfMatchETag. </summary> |
| 0 | 42 | | public static ExportImportDeviceImportMode DeleteIfMatchETag { get; } = new ExportImportDeviceImportMode(DeleteI |
| | 43 | | /// <summary> updateTwin. </summary> |
| 0 | 44 | | public static ExportImportDeviceImportMode UpdateTwin { get; } = new ExportImportDeviceImportMode(UpdateTwinValu |
| | 45 | | /// <summary> updateTwinIfMatchETag. </summary> |
| 0 | 46 | | public static ExportImportDeviceImportMode UpdateTwinIfMatchETag { get; } = new ExportImportDeviceImportMode(Upd |
| | 47 | | /// <summary> Determines if two <see cref="ExportImportDeviceImportMode"/> values are the same. </summary> |
| 0 | 48 | | public static bool operator ==(ExportImportDeviceImportMode left, ExportImportDeviceImportMode right) => left.Eq |
| | 49 | | /// <summary> Determines if two <see cref="ExportImportDeviceImportMode"/> values are not the same. </summary> |
| 0 | 50 | | public static bool operator !=(ExportImportDeviceImportMode left, ExportImportDeviceImportMode right) => !left.E |
| | 51 | | /// <summary> Converts a string to a <see cref="ExportImportDeviceImportMode"/>. </summary> |
| 0 | 52 | | public static implicit operator ExportImportDeviceImportMode(string value) => new ExportImportDeviceImportMode(v |
| | 53 | |
|
| | 54 | | /// <inheritdoc /> |
| | 55 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 56 | | public override bool Equals(object obj) => obj is ExportImportDeviceImportMode other && Equals(other); |
| | 57 | | /// <inheritdoc /> |
| 0 | 58 | | public bool Equals(ExportImportDeviceImportMode other) => string.Equals(_value, other._value, StringComparison.I |
| | 59 | |
|
| | 60 | | /// <inheritdoc /> |
| | 61 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 62 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 63 | | /// <inheritdoc /> |
| 536 | 64 | | public override string ToString() => _value; |
| | 65 | | } |
| | 66 | | } |