< Summary

Class:Azure.ResourceManager.EventHubs.Models.RegenerateAccessKeyParameters
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\RegenerateAccessKeyParameters.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\RegenerateAccessKeyParameters.Serialization.cs
Covered lines:10
Uncovered lines:7
Coverable lines:17
Total lines:62
Line coverage:58.8% (10 of 17)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
.ctor(...)-0%100%
get_KeyType()-100%100%
get_Key()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-75%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\RegenerateAccessKeyParameters.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
 8namespace Azure.ResourceManager.EventHubs.Models
 9{
 10    /// <summary> Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be re
 11    public partial class RegenerateAccessKeyParameters
 12    {
 13        /// <summary> Initializes a new instance of RegenerateAccessKeyParameters. </summary>
 14        /// <param name="keyType"> The access key to regenerate. </param>
 2415        public RegenerateAccessKeyParameters(KeyType keyType)
 16        {
 2417            KeyType = keyType;
 2418        }
 19
 20        /// <summary> Initializes a new instance of RegenerateAccessKeyParameters. </summary>
 21        /// <param name="keyType"> The access key to regenerate. </param>
 22        /// <param name="key"> Optional, if the key value provided, is set for KeyType or autogenerated Key value set fo
 023        internal RegenerateAccessKeyParameters(KeyType keyType, string key)
 24        {
 025            KeyType = keyType;
 026            Key = key;
 027        }
 28
 29        /// <summary> The access key to regenerate. </summary>
 2430        public KeyType KeyType { get; }
 31        /// <summary> Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType
 032        public string Key { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\RegenerateAccessKeyParameters.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.EventHubs.Models
 12{
 13    public partial class RegenerateAccessKeyParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 2417            writer.WriteStartObject();
 2418            writer.WritePropertyName("keyType");
 2419            writer.WriteStringValue(KeyType.ToSerialString());
 2420            if (Key != null)
 21            {
 022                writer.WritePropertyName("key");
 023                writer.WriteStringValue(Key);
 24            }
 2425            writer.WriteEndObject();
 2426        }
 27    }
 28}