| | 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.KeyVault.Models |
| | 12 | | { |
| | 13 | | /// <summary> The SecretPermissions. </summary> |
| | 14 | | public readonly partial struct SecretPermissions : IEquatable<SecretPermissions> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="SecretPermissions"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public SecretPermissions(string value) |
| | 21 | | { |
| 124 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 124 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string GetValue = "get"; |
| | 26 | | private const string ListValue = "list"; |
| | 27 | | private const string SetValue = "set"; |
| | 28 | | private const string DeleteValue = "delete"; |
| | 29 | | private const string BackupValue = "backup"; |
| | 30 | | private const string RestoreValue = "restore"; |
| | 31 | | private const string RecoverValue = "recover"; |
| | 32 | | private const string PurgeValue = "purge"; |
| | 33 | |
|
| | 34 | | /// <summary> get. </summary> |
| 6 | 35 | | public static SecretPermissions Get { get; } = new SecretPermissions(GetValue); |
| | 36 | | /// <summary> list. </summary> |
| 0 | 37 | | public static SecretPermissions List { get; } = new SecretPermissions(ListValue); |
| | 38 | | /// <summary> set. </summary> |
| 6 | 39 | | public static SecretPermissions Set { get; } = new SecretPermissions(SetValue); |
| | 40 | | /// <summary> delete. </summary> |
| 0 | 41 | | public static SecretPermissions Delete { get; } = new SecretPermissions(DeleteValue); |
| | 42 | | /// <summary> backup. </summary> |
| 0 | 43 | | public static SecretPermissions Backup { get; } = new SecretPermissions(BackupValue); |
| | 44 | | /// <summary> restore. </summary> |
| 0 | 45 | | public static SecretPermissions Restore { get; } = new SecretPermissions(RestoreValue); |
| | 46 | | /// <summary> recover. </summary> |
| 0 | 47 | | public static SecretPermissions Recover { get; } = new SecretPermissions(RecoverValue); |
| | 48 | | /// <summary> purge. </summary> |
| 0 | 49 | | public static SecretPermissions Purge { get; } = new SecretPermissions(PurgeValue); |
| | 50 | | /// <summary> Determines if two <see cref="SecretPermissions"/> values are the same. </summary> |
| 0 | 51 | | public static bool operator ==(SecretPermissions left, SecretPermissions right) => left.Equals(right); |
| | 52 | | /// <summary> Determines if two <see cref="SecretPermissions"/> values are not the same. </summary> |
| 0 | 53 | | public static bool operator !=(SecretPermissions left, SecretPermissions right) => !left.Equals(right); |
| | 54 | | /// <summary> Converts a string to a <see cref="SecretPermissions"/>. </summary> |
| 0 | 55 | | public static implicit operator SecretPermissions(string value) => new SecretPermissions(value); |
| | 56 | |
|
| | 57 | | /// <inheritdoc /> |
| | 58 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 59 | | public override bool Equals(object obj) => obj is SecretPermissions other && Equals(other); |
| | 60 | | /// <inheritdoc /> |
| 36 | 61 | | public bool Equals(SecretPermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCul |
| | 62 | |
|
| | 63 | | /// <inheritdoc /> |
| | 64 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 65 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 66 | | /// <inheritdoc /> |
| 112 | 67 | | public override string ToString() => _value; |
| | 68 | | } |
| | 69 | | } |