< Summary

Class:Azure.ResourceManager.KeyVault.Models.CertificatePermissions
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\CertificatePermissions.cs
Covered lines:4
Uncovered lines:21
Coverable lines:25
Total lines:93
Line coverage:16% (4 of 25)
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()-0%100%
get_List()-0%100%
get_Delete()-0%100%
get_Create()-0%100%
get_Import()-0%100%
get_Update()-0%100%
get_Managecontacts()-0%100%
get_Getissuers()-0%100%
get_Listissuers()-0%100%
get_Setissuers()-0%100%
get_Deleteissuers()-0%100%
get_Manageissuers()-0%100%
get_Recover()-0%100%
get_Purge()-0%100%
get_Backup()-0%100%
get_Restore()-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\CertificatePermissions.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 CertificatePermissions. </summary>
 14    public readonly partial struct CertificatePermissions : IEquatable<CertificatePermissions>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="CertificatePermissions"/> values are the same. </summary>
 19        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 20        public CertificatePermissions(string value)
 21        {
 10022            _value = value ?? throw new ArgumentNullException(nameof(value));
 10023        }
 24
 25        private const string GetValue = "get";
 26        private const string ListValue = "list";
 27        private const string DeleteValue = "delete";
 28        private const string CreateValue = "create";
 29        private const string ImportValue = "import";
 30        private const string UpdateValue = "update";
 31        private const string ManagecontactsValue = "managecontacts";
 32        private const string GetissuersValue = "getissuers";
 33        private const string ListissuersValue = "listissuers";
 34        private const string SetissuersValue = "setissuers";
 35        private const string DeleteissuersValue = "deleteissuers";
 36        private const string ManageissuersValue = "manageissuers";
 37        private const string RecoverValue = "recover";
 38        private const string PurgeValue = "purge";
 39        private const string BackupValue = "backup";
 40        private const string RestoreValue = "restore";
 41
 42        /// <summary> get. </summary>
 043        public static CertificatePermissions Get { get; } = new CertificatePermissions(GetValue);
 44        /// <summary> list. </summary>
 045        public static CertificatePermissions List { get; } = new CertificatePermissions(ListValue);
 46        /// <summary> delete. </summary>
 047        public static CertificatePermissions Delete { get; } = new CertificatePermissions(DeleteValue);
 48        /// <summary> create. </summary>
 049        public static CertificatePermissions Create { get; } = new CertificatePermissions(CreateValue);
 50        /// <summary> import. </summary>
 051        public static CertificatePermissions Import { get; } = new CertificatePermissions(ImportValue);
 52        /// <summary> update. </summary>
 053        public static CertificatePermissions Update { get; } = new CertificatePermissions(UpdateValue);
 54        /// <summary> managecontacts. </summary>
 055        public static CertificatePermissions Managecontacts { get; } = new CertificatePermissions(ManagecontactsValue);
 56        /// <summary> getissuers. </summary>
 057        public static CertificatePermissions Getissuers { get; } = new CertificatePermissions(GetissuersValue);
 58        /// <summary> listissuers. </summary>
 059        public static CertificatePermissions Listissuers { get; } = new CertificatePermissions(ListissuersValue);
 60        /// <summary> setissuers. </summary>
 061        public static CertificatePermissions Setissuers { get; } = new CertificatePermissions(SetissuersValue);
 62        /// <summary> deleteissuers. </summary>
 063        public static CertificatePermissions Deleteissuers { get; } = new CertificatePermissions(DeleteissuersValue);
 64        /// <summary> manageissuers. </summary>
 065        public static CertificatePermissions Manageissuers { get; } = new CertificatePermissions(ManageissuersValue);
 66        /// <summary> recover. </summary>
 067        public static CertificatePermissions Recover { get; } = new CertificatePermissions(RecoverValue);
 68        /// <summary> purge. </summary>
 069        public static CertificatePermissions Purge { get; } = new CertificatePermissions(PurgeValue);
 70        /// <summary> backup. </summary>
 071        public static CertificatePermissions Backup { get; } = new CertificatePermissions(BackupValue);
 72        /// <summary> restore. </summary>
 073        public static CertificatePermissions Restore { get; } = new CertificatePermissions(RestoreValue);
 74        /// <summary> Determines if two <see cref="CertificatePermissions"/> values are the same. </summary>
 075        public static bool operator ==(CertificatePermissions left, CertificatePermissions right) => left.Equals(right);
 76        /// <summary> Determines if two <see cref="CertificatePermissions"/> values are not the same. </summary>
 077        public static bool operator !=(CertificatePermissions left, CertificatePermissions right) => !left.Equals(right)
 78        /// <summary> Converts a string to a <see cref="CertificatePermissions"/>. </summary>
 079        public static implicit operator CertificatePermissions(string value) => new CertificatePermissions(value);
 80
 81        /// <inheritdoc />
 82        [EditorBrowsable(EditorBrowsableState.Never)]
 083        public override bool Equals(object obj) => obj is CertificatePermissions other && Equals(other);
 84        /// <inheritdoc />
 2885        public bool Equals(CertificatePermissions other) => string.Equals(_value, other._value, StringComparison.Invaria
 86
 87        /// <inheritdoc />
 88        [EditorBrowsable(EditorBrowsableState.Never)]
 089        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 90        /// <inheritdoc />
 10491        public override string ToString() => _value;
 92    }
 93}