| | 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.Network.Models |
| | 12 | | { |
| | 13 | | /// <summary> The IKE integrity algorithm (IKE phase 2). </summary> |
| | 14 | | public readonly partial struct IkeIntegrity : IEquatable<IkeIntegrity> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="IkeIntegrity"/> values are the same. </summary> |
| | 19 | | public IkeIntegrity(string value) |
| | 20 | | { |
| 28 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 28 | 22 | | } |
| | 23 | |
|
| | 24 | | private const string MD5Value = "MD5"; |
| | 25 | | private const string SHA1Value = "SHA1"; |
| | 26 | | private const string SHA256Value = "SHA256"; |
| | 27 | | private const string SHA384Value = "SHA384"; |
| | 28 | | private const string Gcmaes256Value = "GCMAES256"; |
| | 29 | | private const string Gcmaes128Value = "GCMAES128"; |
| | 30 | |
|
| | 31 | | /// <summary> MD5. </summary> |
| 0 | 32 | | public static IkeIntegrity MD5 { get; } = new IkeIntegrity(MD5Value); |
| | 33 | | /// <summary> SHA1. </summary> |
| 6 | 34 | | public static IkeIntegrity SHA1 { get; } = new IkeIntegrity(SHA1Value); |
| | 35 | | /// <summary> SHA256. </summary> |
| 0 | 36 | | public static IkeIntegrity SHA256 { get; } = new IkeIntegrity(SHA256Value); |
| | 37 | | /// <summary> SHA384. </summary> |
| 6 | 38 | | public static IkeIntegrity SHA384 { get; } = new IkeIntegrity(SHA384Value); |
| | 39 | | /// <summary> GCMAES256. </summary> |
| 0 | 40 | | public static IkeIntegrity Gcmaes256 { get; } = new IkeIntegrity(Gcmaes256Value); |
| | 41 | | /// <summary> GCMAES128. </summary> |
| 0 | 42 | | public static IkeIntegrity Gcmaes128 { get; } = new IkeIntegrity(Gcmaes128Value); |
| | 43 | | /// <summary> Determines if two <see cref="IkeIntegrity"/> values are the same. </summary> |
| 0 | 44 | | public static bool operator ==(IkeIntegrity left, IkeIntegrity right) => left.Equals(right); |
| | 45 | | /// <summary> Determines if two <see cref="IkeIntegrity"/> values are not the same. </summary> |
| 0 | 46 | | public static bool operator !=(IkeIntegrity left, IkeIntegrity right) => !left.Equals(right); |
| | 47 | | /// <summary> Converts a string to a <see cref="IkeIntegrity"/>. </summary> |
| 0 | 48 | | public static implicit operator IkeIntegrity(string value) => new IkeIntegrity(value); |
| | 49 | |
|
| | 50 | | /// <inheritdoc /> |
| | 51 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 52 | | public override bool Equals(object obj) => obj is IkeIntegrity other && Equals(other); |
| | 53 | | /// <inheritdoc /> |
| 8 | 54 | | public bool Equals(IkeIntegrity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureI |
| | 55 | |
|
| | 56 | | /// <inheritdoc /> |
| | 57 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 58 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 59 | | /// <inheritdoc /> |
| 16 | 60 | | public override string ToString() => _value; |
| | 61 | | } |
| | 62 | | } |