< Summary

Class:Azure.ResourceManager.Storage.Models.ServiceSasParameters
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ServiceSasParameters.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ServiceSasParameters.Serialization.cs
Covered lines:45
Uncovered lines:54
Coverable lines:99
Total lines:213
Line coverage:45.4% (45 of 99)
Covered branches:24
Total branches:36
Branch coverage:66.6% (24 of 36)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-80%50%
.ctor(...)-0%100%
get_CanonicalizedResource()-100%100%
get_Resource()-100%100%
get_Permissions()-100%100%
get_IPAddressOrRange()-0%100%
get_Protocols()-100%100%
get_SharedAccessStartTime()-100%100%
get_SharedAccessExpiryTime()-100%100%
get_Identifier()-0%100%
get_PartitionKeyStart()-0%100%
get_PartitionKeyEnd()-0%100%
get_RowKeyStart()-0%100%
get_RowKeyEnd()-0%100%
get_KeyToSign()-100%100%
get_CacheControl()-0%100%
get_ContentDisposition()-0%100%
get_ContentEncoding()-0%100%
get_ContentLanguage()-0%100%
get_ContentType()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-60.71%67.65%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ServiceSasParameters.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;
 9
 10namespace Azure.ResourceManager.Storage.Models
 11{
 12    /// <summary> The parameters to list service SAS credentials of a specific resource. </summary>
 13    public partial class ServiceSasParameters
 14    {
 15        /// <summary> Initializes a new instance of ServiceSasParameters. </summary>
 16        /// <param name="canonicalizedResource"> The canonical path to the signed resource. </param>
 2017        public ServiceSasParameters(string canonicalizedResource)
 18        {
 2019            if (canonicalizedResource == null)
 20            {
 021                throw new ArgumentNullException(nameof(canonicalizedResource));
 22            }
 23
 2024            CanonicalizedResource = canonicalizedResource;
 2025        }
 26
 27        /// <summary> Initializes a new instance of ServiceSasParameters. </summary>
 28        /// <param name="canonicalizedResource"> The canonical path to the signed resource. </param>
 29        /// <param name="resource"> The signed services accessible with the service SAS. Possible values include: Blob (
 30        /// <param name="permissions"> The signed permissions for the service SAS. Possible values include: Read (r), Wr
 31        /// <param name="iPAddressOrRange"> An IP address or a range of IP addresses from which to accept requests. </pa
 32        /// <param name="protocols"> The protocol permitted for a request made with the account SAS. </param>
 33        /// <param name="sharedAccessStartTime"> The time at which the SAS becomes valid. </param>
 34        /// <param name="sharedAccessExpiryTime"> The time at which the shared access signature becomes invalid. </param
 35        /// <param name="identifier"> A unique value up to 64 characters in length that correlates to an access policy s
 36        /// <param name="partitionKeyStart"> The start of partition key. </param>
 37        /// <param name="partitionKeyEnd"> The end of partition key. </param>
 38        /// <param name="rowKeyStart"> The start of row key. </param>
 39        /// <param name="rowKeyEnd"> The end of row key. </param>
 40        /// <param name="keyToSign"> The key to sign the account SAS token with. </param>
 41        /// <param name="cacheControl"> The response header override for cache control. </param>
 42        /// <param name="contentDisposition"> The response header override for content disposition. </param>
 43        /// <param name="contentEncoding"> The response header override for content encoding. </param>
 44        /// <param name="contentLanguage"> The response header override for content language. </param>
 45        /// <param name="contentType"> The response header override for content type. </param>
 046        internal ServiceSasParameters(string canonicalizedResource, SignedResource? resource, Permissions? permissions, 
 47        {
 048            CanonicalizedResource = canonicalizedResource;
 049            Resource = resource;
 050            Permissions = permissions;
 051            IPAddressOrRange = iPAddressOrRange;
 052            Protocols = protocols;
 053            SharedAccessStartTime = sharedAccessStartTime;
 054            SharedAccessExpiryTime = sharedAccessExpiryTime;
 055            Identifier = identifier;
 056            PartitionKeyStart = partitionKeyStart;
 057            PartitionKeyEnd = partitionKeyEnd;
 058            RowKeyStart = rowKeyStart;
 059            RowKeyEnd = rowKeyEnd;
 060            KeyToSign = keyToSign;
 061            CacheControl = cacheControl;
 062            ContentDisposition = contentDisposition;
 063            ContentEncoding = contentEncoding;
 064            ContentLanguage = contentLanguage;
 065            ContentType = contentType;
 066        }
 67
 68        /// <summary> The canonical path to the signed resource. </summary>
 1269        public string CanonicalizedResource { get; }
 70        /// <summary> The signed services accessible with the service SAS. Possible values include: Blob (b), Container 
 6071        public SignedResource? Resource { get; set; }
 72        /// <summary> The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (
 6073        public Permissions? Permissions { get; set; }
 74        /// <summary> An IP address or a range of IP addresses from which to accept requests. </summary>
 075        public string IPAddressOrRange { get; set; }
 76        /// <summary> The protocol permitted for a request made with the account SAS. </summary>
 3277        public HttpProtocol? Protocols { get; set; }
 78        /// <summary> The time at which the SAS becomes valid. </summary>
 2879        public DateTimeOffset? SharedAccessStartTime { get; set; }
 80        /// <summary> The time at which the shared access signature becomes invalid. </summary>
 4481        public DateTimeOffset? SharedAccessExpiryTime { get; set; }
 82        /// <summary> A unique value up to 64 characters in length that correlates to an access policy specified for the
 083        public string Identifier { get; set; }
 84        /// <summary> The start of partition key. </summary>
 085        public string PartitionKeyStart { get; set; }
 86        /// <summary> The end of partition key. </summary>
 087        public string PartitionKeyEnd { get; set; }
 88        /// <summary> The start of row key. </summary>
 089        public string RowKeyStart { get; set; }
 90        /// <summary> The end of row key. </summary>
 091        public string RowKeyEnd { get; set; }
 92        /// <summary> The key to sign the account SAS token with. </summary>
 2093        public string KeyToSign { get; set; }
 94        /// <summary> The response header override for cache control. </summary>
 095        public string CacheControl { get; set; }
 96        /// <summary> The response header override for content disposition. </summary>
 097        public string ContentDisposition { get; set; }
 98        /// <summary> The response header override for content encoding. </summary>
 099        public string ContentEncoding { get; set; }
 100        /// <summary> The response header override for content language. </summary>
 0101        public string ContentLanguage { get; set; }
 102        /// <summary> The response header override for content type. </summary>
 0103        public string ContentType { get; set; }
 104    }
 105}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ServiceSasParameters.Serialization.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Storage.Models
 12{
 13    public partial class ServiceSasParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1217            writer.WriteStartObject();
 1218            writer.WritePropertyName("canonicalizedResource");
 1219            writer.WriteStringValue(CanonicalizedResource);
 1220            if (Resource != null)
 21            {
 1222                writer.WritePropertyName("signedResource");
 1223                writer.WriteStringValue(Resource.Value.ToString());
 24            }
 1225            if (Permissions != null)
 26            {
 1227                writer.WritePropertyName("signedPermission");
 1228                writer.WriteStringValue(Permissions.Value.ToString());
 29            }
 1230            if (IPAddressOrRange != null)
 31            {
 032                writer.WritePropertyName("signedIp");
 033                writer.WriteStringValue(IPAddressOrRange);
 34            }
 1235            if (Protocols != null)
 36            {
 437                writer.WritePropertyName("signedProtocol");
 438                writer.WriteStringValue(Protocols.Value.ToSerialString());
 39            }
 1240            if (SharedAccessStartTime != null)
 41            {
 442                writer.WritePropertyName("signedStart");
 443                writer.WriteStringValue(SharedAccessStartTime.Value, "O");
 44            }
 1245            if (SharedAccessExpiryTime != null)
 46            {
 847                writer.WritePropertyName("signedExpiry");
 848                writer.WriteStringValue(SharedAccessExpiryTime.Value, "O");
 49            }
 1250            if (Identifier != null)
 51            {
 052                writer.WritePropertyName("signedIdentifier");
 053                writer.WriteStringValue(Identifier);
 54            }
 1255            if (PartitionKeyStart != null)
 56            {
 057                writer.WritePropertyName("startPk");
 058                writer.WriteStringValue(PartitionKeyStart);
 59            }
 1260            if (PartitionKeyEnd != null)
 61            {
 062                writer.WritePropertyName("endPk");
 063                writer.WriteStringValue(PartitionKeyEnd);
 64            }
 1265            if (RowKeyStart != null)
 66            {
 067                writer.WritePropertyName("startRk");
 068                writer.WriteStringValue(RowKeyStart);
 69            }
 1270            if (RowKeyEnd != null)
 71            {
 072                writer.WritePropertyName("endRk");
 073                writer.WriteStringValue(RowKeyEnd);
 74            }
 1275            if (KeyToSign != null)
 76            {
 477                writer.WritePropertyName("keyToSign");
 478                writer.WriteStringValue(KeyToSign);
 79            }
 1280            if (CacheControl != null)
 81            {
 082                writer.WritePropertyName("rscc");
 083                writer.WriteStringValue(CacheControl);
 84            }
 1285            if (ContentDisposition != null)
 86            {
 087                writer.WritePropertyName("rscd");
 088                writer.WriteStringValue(ContentDisposition);
 89            }
 1290            if (ContentEncoding != null)
 91            {
 092                writer.WritePropertyName("rsce");
 093                writer.WriteStringValue(ContentEncoding);
 94            }
 1295            if (ContentLanguage != null)
 96            {
 097                writer.WritePropertyName("rscl");
 098                writer.WriteStringValue(ContentLanguage);
 99            }
 12100            if (ContentType != null)
 101            {
 0102                writer.WritePropertyName("rsct");
 0103                writer.WriteStringValue(ContentType);
 104            }
 12105            writer.WriteEndObject();
 12106        }
 107    }
 108}