| | 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.Messaging.EventGrid.SystemEvents |
| | 12 | | { |
| | 13 | | /// <summary> Type of action of the operation. </summary> |
| | 14 | | public readonly partial struct AppAction : IEquatable<AppAction> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="AppAction"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public AppAction(string value) |
| | 21 | | { |
| 24 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 24 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string RestartedValue = "Restarted"; |
| | 26 | | private const string StoppedValue = "Stopped"; |
| | 27 | | private const string ChangedAppSettingsValue = "ChangedAppSettings"; |
| | 28 | | private const string StartedValue = "Started"; |
| | 29 | | private const string CompletedValue = "Completed"; |
| | 30 | | private const string FailedValue = "Failed"; |
| | 31 | |
|
| | 32 | | /// <summary> Web app was restarted. </summary> |
| 0 | 33 | | public static AppAction Restarted { get; } = new AppAction(RestartedValue); |
| | 34 | | /// <summary> Web app was stopped. </summary> |
| 0 | 35 | | public static AppAction Stopped { get; } = new AppAction(StoppedValue); |
| | 36 | | /// <summary> There was an operation to change app setting on the web app. </summary> |
| 0 | 37 | | public static AppAction ChangedAppSettings { get; } = new AppAction(ChangedAppSettingsValue); |
| | 38 | | /// <summary> The job has started. </summary> |
| 0 | 39 | | public static AppAction Started { get; } = new AppAction(StartedValue); |
| | 40 | | /// <summary> The job has completed. </summary> |
| 0 | 41 | | public static AppAction Completed { get; } = new AppAction(CompletedValue); |
| | 42 | | /// <summary> The job has failed to complete. </summary> |
| 0 | 43 | | public static AppAction Failed { get; } = new AppAction(FailedValue); |
| | 44 | | /// <summary> Determines if two <see cref="AppAction"/> values are the same. </summary> |
| 0 | 45 | | public static bool operator ==(AppAction left, AppAction right) => left.Equals(right); |
| | 46 | | /// <summary> Determines if two <see cref="AppAction"/> values are not the same. </summary> |
| 0 | 47 | | public static bool operator !=(AppAction left, AppAction right) => !left.Equals(right); |
| | 48 | | /// <summary> Converts a string to a <see cref="AppAction"/>. </summary> |
| 0 | 49 | | public static implicit operator AppAction(string value) => new AppAction(value); |
| | 50 | |
|
| | 51 | | /// <inheritdoc /> |
| | 52 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 53 | | public override bool Equals(object obj) => obj is AppAction other && Equals(other); |
| | 54 | | /// <inheritdoc /> |
| 0 | 55 | | public bool Equals(AppAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgno |
| | 56 | |
|
| | 57 | | /// <inheritdoc /> |
| | 58 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 59 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 60 | | /// <inheritdoc /> |
| 0 | 61 | | public override string ToString() => _value; |
| | 62 | | } |
| | 63 | | } |