| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | | using System.ComponentModel; |
| | 6 | |
|
| | 7 | | namespace Azure.Storage.Blobs.ChangeFeed |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// BlobChangeFeedEventType. |
| | 11 | | /// </summary> |
| | 12 | | public readonly struct BlobChangeFeedEventType : IEquatable<BlobChangeFeedEventType> |
| | 13 | | { |
| | 14 | | private readonly string _value; |
| | 15 | |
|
| | 16 | | /// <summary> |
| | 17 | | /// Constructor. |
| | 18 | | /// </summary> |
| 59200 | 19 | | public BlobChangeFeedEventType(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// Unspecified Event Type. |
| | 23 | | /// </summary> |
| 0 | 24 | | public static BlobChangeFeedEventType UnspecifiedEventType { get; } = new BlobChangeFeedEventType("UnspecifiedEv |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Blob Created. |
| | 28 | | /// </summary> |
| 6 | 29 | | public static BlobChangeFeedEventType BlobCreated { get; } = new BlobChangeFeedEventType("BlobCreated"); |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Blob Deleted. |
| | 33 | | /// </summary> |
| 0 | 34 | | public static BlobChangeFeedEventType BlobDeleted { get; } = new BlobChangeFeedEventType("BlobDeleted"); |
| | 35 | |
|
| | 36 | | /// <summary> |
| | 37 | | /// Blob Properties Updated. |
| | 38 | | /// </summary> |
| 0 | 39 | | public static BlobChangeFeedEventType BlobPropertiesUpdated { get; } = new BlobChangeFeedEventType("BlobProperti |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// Blob Snapshot Created. |
| | 43 | | /// </summary> |
| 0 | 44 | | public static BlobChangeFeedEventType BlobSnapshotCreated { get; } = new BlobChangeFeedEventType("BlobSnapshotCr |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// Control. |
| | 48 | | /// </summary> |
| 0 | 49 | | public static BlobChangeFeedEventType Control { get; } = new BlobChangeFeedEventType("Control"); |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Blob Tier Changed. |
| | 53 | | /// </summary> |
| 0 | 54 | | public static BlobChangeFeedEventType BlobTierChanged { get; } = new BlobChangeFeedEventType("BlobTierChanged"); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Blob Async Operation Initiated. |
| | 58 | | /// </summary> |
| 0 | 59 | | public static BlobChangeFeedEventType BlobAsyncOperationInitiated { get; } = new BlobChangeFeedEventType("BlobAs |
| | 60 | |
|
| | 61 | | ///<inheritdoc/> |
| 0 | 62 | | public static bool operator ==(BlobChangeFeedEventType left, BlobChangeFeedEventType right) => left.Equals(right |
| | 63 | |
|
| | 64 | | ///<inheritdoc/> |
| 0 | 65 | | public static bool operator !=(BlobChangeFeedEventType left, BlobChangeFeedEventType right) => !left.Equals(righ |
| | 66 | |
|
| | 67 | | ///<inheritdoc/> |
| 0 | 68 | | public static implicit operator BlobChangeFeedEventType(string value) => new BlobChangeFeedEventType(value); |
| | 69 | |
|
| | 70 | | ///<inheritdoc/> |
| | 71 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 72 | | public override bool Equals(object obj) => obj is BlobChangeFeedEventType other && Equals(other); |
| | 73 | |
|
| | 74 | | ///<inheritdoc/> |
| 4 | 75 | | public bool Equals(BlobChangeFeedEventType other) => string.Equals(_value, other._value, StringComparison.Ordina |
| | 76 | |
|
| | 77 | | ///<inheritdoc/> |
| | 78 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 79 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 80 | |
|
| | 81 | | ///<inheritdoc/> |
| 600 | 82 | | public override string ToString() => _value; |
| | 83 | | } |
| | 84 | | } |