| | 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.ResourceManager.Storage.Models |
| | 12 | | { |
| | 13 | | /// <summary> The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. </summary> |
| | 14 | | public readonly partial struct EncryptionScopeState : IEquatable<EncryptionScopeState> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="EncryptionScopeState"/> values are the same. </summary> |
| | 19 | | public EncryptionScopeState(string value) |
| | 20 | | { |
| 28 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 28 | 22 | | } |
| | 23 | |
|
| | 24 | | private const string EnabledValue = "Enabled"; |
| | 25 | | private const string DisabledValue = "Disabled"; |
| | 26 | |
|
| | 27 | | /// <summary> Enabled. </summary> |
| 14 | 28 | | public static EncryptionScopeState Enabled { get; } = new EncryptionScopeState(EnabledValue); |
| | 29 | | /// <summary> Disabled. </summary> |
| 22 | 30 | | public static EncryptionScopeState Disabled { get; } = new EncryptionScopeState(DisabledValue); |
| | 31 | | /// <summary> Determines if two <see cref="EncryptionScopeState"/> values are the same. </summary> |
| 0 | 32 | | public static bool operator ==(EncryptionScopeState left, EncryptionScopeState right) => left.Equals(right); |
| | 33 | | /// <summary> Determines if two <see cref="EncryptionScopeState"/> values are not the same. </summary> |
| 0 | 34 | | public static bool operator !=(EncryptionScopeState left, EncryptionScopeState right) => !left.Equals(right); |
| | 35 | | /// <summary> Converts a string to a <see cref="EncryptionScopeState"/>. </summary> |
| 0 | 36 | | public static implicit operator EncryptionScopeState(string value) => new EncryptionScopeState(value); |
| | 37 | |
|
| | 38 | | /// <inheritdoc /> |
| | 39 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 40 | | public override bool Equals(object obj) => obj is EncryptionScopeState other && Equals(other); |
| | 41 | | /// <inheritdoc /> |
| 16 | 42 | | public bool Equals(EncryptionScopeState other) => string.Equals(_value, other._value, StringComparison.Invariant |
| | 43 | |
|
| | 44 | | /// <inheritdoc /> |
| | 45 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 46 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 47 | | /// <inheritdoc /> |
| 16 | 48 | | public override string ToString() => _value; |
| | 49 | | } |
| | 50 | | } |