< Summary

Class:Azure.ResourceManager.Storage.Models.Permissions
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Permissions.cs
Covered lines:5
Uncovered lines:12
Coverable lines:17
Total lines:68
Line coverage:29.4% (5 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_R()-0%100%
get_D()-0%100%
get_W()-0%100%
get_L()-0%100%
get_A()-0%100%
get_C()-0%100%
get_U()-0%100%
get_P()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-100%100%
Equals(...)-0%0%
Equals(...)-100%100%
GetHashCode()-0%0%
ToString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Permissions.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.Storage.Models
 12{
 13    /// <summary> The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), 
 14    public readonly partial struct Permissions : IEquatable<Permissions>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="Permissions"/> values are the same. </summary>
 19        public Permissions(string value)
 20        {
 4021            _value = value ?? throw new ArgumentNullException(nameof(value));
 4022        }
 23
 24        private const string RValue = "r";
 25        private const string DValue = "d";
 26        private const string WValue = "w";
 27        private const string LValue = "l";
 28        private const string AValue = "a";
 29        private const string CValue = "c";
 30        private const string UValue = "u";
 31        private const string PValue = "p";
 32
 33        /// <summary> r. </summary>
 034        public static Permissions R { get; } = new Permissions(RValue);
 35        /// <summary> d. </summary>
 036        public static Permissions D { get; } = new Permissions(DValue);
 37        /// <summary> w. </summary>
 038        public static Permissions W { get; } = new Permissions(WValue);
 39        /// <summary> l. </summary>
 040        public static Permissions L { get; } = new Permissions(LValue);
 41        /// <summary> a. </summary>
 042        public static Permissions A { get; } = new Permissions(AValue);
 43        /// <summary> c. </summary>
 044        public static Permissions C { get; } = new Permissions(CValue);
 45        /// <summary> u. </summary>
 046        public static Permissions U { get; } = new Permissions(UValue);
 47        /// <summary> p. </summary>
 048        public static Permissions P { get; } = new Permissions(PValue);
 49        /// <summary> Determines if two <see cref="Permissions"/> values are the same. </summary>
 050        public static bool operator ==(Permissions left, Permissions right) => left.Equals(right);
 51        /// <summary> Determines if two <see cref="Permissions"/> values are not the same. </summary>
 052        public static bool operator !=(Permissions left, Permissions right) => !left.Equals(right);
 53        /// <summary> Converts a string to a <see cref="Permissions"/>. </summary>
 4054        public static implicit operator Permissions(string value) => new Permissions(value);
 55
 56        /// <inheritdoc />
 57        [EditorBrowsable(EditorBrowsableState.Never)]
 058        public override bool Equals(object obj) => obj is Permissions other && Equals(other);
 59        /// <inheritdoc />
 1660        public bool Equals(Permissions other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIg
 61
 62        /// <inheritdoc />
 63        [EditorBrowsable(EditorBrowsableState.Never)]
 064        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 65        /// <inheritdoc />
 2466        public override string ToString() => _value;
 67    }
 68}