< Summary

Class:Azure.ResourceManager.KeyVault.Models.StoragePermissions
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\StoragePermissions.cs
Covered lines:6
Uncovered lines:17
Coverable lines:23
Total lines:87
Line coverage:26% (6 of 23)
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_Delete()-0%100%
get_Set()-0%100%
get_Update()-0%100%
get_Regeneratekey()-100%100%
get_Recover()-0%100%
get_Purge()-0%100%
get_Backup()-0%100%
get_Restore()-0%100%
get_Setsas()-0%100%
get_Listsas()-0%100%
get_Getsas()-0%100%
get_Deletesas()-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\StoragePermissions.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 StoragePermissions. </summary>
 14    public readonly partial struct StoragePermissions : IEquatable<StoragePermissions>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="StoragePermissions"/> values are the same. </summary>
 19        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 20        public StoragePermissions(string value)
 21        {
 13622            _value = value ?? throw new ArgumentNullException(nameof(value));
 13623        }
 24
 25        private const string GetValue = "get";
 26        private const string ListValue = "list";
 27        private const string DeleteValue = "delete";
 28        private const string SetValue = "set";
 29        private const string UpdateValue = "update";
 30        private const string RegeneratekeyValue = "regeneratekey";
 31        private const string RecoverValue = "recover";
 32        private const string PurgeValue = "purge";
 33        private const string BackupValue = "backup";
 34        private const string RestoreValue = "restore";
 35        private const string SetsasValue = "setsas";
 36        private const string ListsasValue = "listsas";
 37        private const string GetsasValue = "getsas";
 38        private const string DeletesasValue = "deletesas";
 39
 40        /// <summary> get. </summary>
 641        public static StoragePermissions Get { get; } = new StoragePermissions(GetValue);
 42        /// <summary> list. </summary>
 043        public static StoragePermissions List { get; } = new StoragePermissions(ListValue);
 44        /// <summary> delete. </summary>
 045        public static StoragePermissions Delete { get; } = new StoragePermissions(DeleteValue);
 46        /// <summary> set. </summary>
 047        public static StoragePermissions Set { get; } = new StoragePermissions(SetValue);
 48        /// <summary> update. </summary>
 049        public static StoragePermissions Update { get; } = new StoragePermissions(UpdateValue);
 50        /// <summary> regeneratekey. </summary>
 651        public static StoragePermissions Regeneratekey { get; } = new StoragePermissions(RegeneratekeyValue);
 52        /// <summary> recover. </summary>
 053        public static StoragePermissions Recover { get; } = new StoragePermissions(RecoverValue);
 54        /// <summary> purge. </summary>
 055        public static StoragePermissions Purge { get; } = new StoragePermissions(PurgeValue);
 56        /// <summary> backup. </summary>
 057        public static StoragePermissions Backup { get; } = new StoragePermissions(BackupValue);
 58        /// <summary> restore. </summary>
 059        public static StoragePermissions Restore { get; } = new StoragePermissions(RestoreValue);
 60        /// <summary> setsas. </summary>
 061        public static StoragePermissions Setsas { get; } = new StoragePermissions(SetsasValue);
 62        /// <summary> listsas. </summary>
 063        public static StoragePermissions Listsas { get; } = new StoragePermissions(ListsasValue);
 64        /// <summary> getsas. </summary>
 065        public static StoragePermissions Getsas { get; } = new StoragePermissions(GetsasValue);
 66        /// <summary> deletesas. </summary>
 067        public static StoragePermissions Deletesas { get; } = new StoragePermissions(DeletesasValue);
 68        /// <summary> Determines if two <see cref="StoragePermissions"/> values are the same. </summary>
 069        public static bool operator ==(StoragePermissions left, StoragePermissions right) => left.Equals(right);
 70        /// <summary> Determines if two <see cref="StoragePermissions"/> values are not the same. </summary>
 071        public static bool operator !=(StoragePermissions left, StoragePermissions right) => !left.Equals(right);
 72        /// <summary> Converts a string to a <see cref="StoragePermissions"/>. </summary>
 073        public static implicit operator StoragePermissions(string value) => new StoragePermissions(value);
 74
 75        /// <inheritdoc />
 76        [EditorBrowsable(EditorBrowsableState.Never)]
 077        public override bool Equals(object obj) => obj is StoragePermissions other && Equals(other);
 78        /// <inheritdoc />
 3679        public bool Equals(StoragePermissions other) => string.Equals(_value, other._value, StringComparison.InvariantCu
 80
 81        /// <inheritdoc />
 82        [EditorBrowsable(EditorBrowsableState.Never)]
 083        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 84        /// <inheritdoc />
 11285        public override string ToString() => _value;
 86    }
 87}