< Summary

Class:Azure.ResourceManager.Network.Models.IkeIntegrity
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IkeIntegrity.cs
Covered lines:6
Uncovered lines:9
Coverable lines:15
Total lines:62
Line coverage:40% (6 of 15)
Covered branches:1
Total branches:6
Branch coverage:16.6% (1 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%50%
get_MD5()-0%100%
get_SHA1()-100%100%
get_SHA256()-0%100%
get_SHA384()-100%100%
get_Gcmaes256()-0%100%
get_Gcmaes128()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-0%100%
Equals(...)-0%0%
Equals(...)-100%100%
GetHashCode()-0%0%
ToString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\IkeIntegrity.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.ComponentModel;
 10
 11namespace 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        {
 2821            _value = value ?? throw new ArgumentNullException(nameof(value));
 2822        }
 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>
 032        public static IkeIntegrity MD5 { get; } = new IkeIntegrity(MD5Value);
 33        /// <summary> SHA1. </summary>
 634        public static IkeIntegrity SHA1 { get; } = new IkeIntegrity(SHA1Value);
 35        /// <summary> SHA256. </summary>
 036        public static IkeIntegrity SHA256 { get; } = new IkeIntegrity(SHA256Value);
 37        /// <summary> SHA384. </summary>
 638        public static IkeIntegrity SHA384 { get; } = new IkeIntegrity(SHA384Value);
 39        /// <summary> GCMAES256. </summary>
 040        public static IkeIntegrity Gcmaes256 { get; } = new IkeIntegrity(Gcmaes256Value);
 41        /// <summary> GCMAES128. </summary>
 042        public static IkeIntegrity Gcmaes128 { get; } = new IkeIntegrity(Gcmaes128Value);
 43        /// <summary> Determines if two <see cref="IkeIntegrity"/> values are the same. </summary>
 044        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>
 046        public static bool operator !=(IkeIntegrity left, IkeIntegrity right) => !left.Equals(right);
 47        /// <summary> Converts a string to a <see cref="IkeIntegrity"/>. </summary>
 048        public static implicit operator IkeIntegrity(string value) => new IkeIntegrity(value);
 49
 50        /// <inheritdoc />
 51        [EditorBrowsable(EditorBrowsableState.Never)]
 052        public override bool Equals(object obj) => obj is IkeIntegrity other && Equals(other);
 53        /// <inheritdoc />
 854        public bool Equals(IkeIntegrity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureI
 55
 56        /// <inheritdoc />
 57        [EditorBrowsable(EditorBrowsableState.Never)]
 058        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 59        /// <inheritdoc />
 1660        public override string ToString() => _value;
 61    }
 62}