< Summary

Class:Azure.ResourceManager.KeyVault.Models.SecretPermissions
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\SecretPermissions.cs
Covered lines:6
Uncovered lines:11
Coverable lines:17
Total lines:69
Line coverage:35.2% (6 of 17)
Covered branches:1
Total branches:6
Branch coverage:16.6% (1 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%50%
get_Get()-100%100%
get_List()-0%100%
get_Set()-100%100%
get_Delete()-0%100%
get_Backup()-0%100%
get_Restore()-0%100%
get_Recover()-0%100%
get_Purge()-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\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\SecretPermissions.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.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        {
 12422            _value = value ?? throw new ArgumentNullException(nameof(value));
 12423        }
 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>
 635        public static SecretPermissions Get { get; } = new SecretPermissions(GetValue);
 36        /// <summary> list. </summary>
 037        public static SecretPermissions List { get; } = new SecretPermissions(ListValue);
 38        /// <summary> set. </summary>
 639        public static SecretPermissions Set { get; } = new SecretPermissions(SetValue);
 40        /// <summary> delete. </summary>
 041        public static SecretPermissions Delete { get; } = new SecretPermissions(DeleteValue);
 42        /// <summary> backup. </summary>
 043        public static SecretPermissions Backup { get; } = new SecretPermissions(BackupValue);
 44        /// <summary> restore. </summary>
 045        public static SecretPermissions Restore { get; } = new SecretPermissions(RestoreValue);
 46        /// <summary> recover. </summary>
 047        public static SecretPermissions Recover { get; } = new SecretPermissions(RecoverValue);
 48        /// <summary> purge. </summary>
 049        public static SecretPermissions Purge { get; } = new SecretPermissions(PurgeValue);
 50        /// <summary> Determines if two <see cref="SecretPermissions"/> values are the same. </summary>
 051        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>
 053        public static bool operator !=(SecretPermissions left, SecretPermissions right) => !left.Equals(right);
 54        /// <summary> Converts a string to a <see cref="SecretPermissions"/>. </summary>
 055        public static implicit operator SecretPermissions(string value) => new SecretPermissions(value);
 56
 57        /// <inheritdoc />
 58        [EditorBrowsable(EditorBrowsableState.Never)]
 059        public override bool Equals(object obj) => obj is SecretPermissions other && Equals(other);
 60        /// <inheritdoc />
 3661        public bool Equals(SecretPermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCul
 62
 63        /// <inheritdoc />
 64        [EditorBrowsable(EditorBrowsableState.Never)]
 065        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 66        /// <inheritdoc />
 11267        public override string ToString() => _value;
 68    }
 69}