< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.CheckNameAvailabilityParameters
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\CheckNameAvailabilityParameters.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\CheckNameAvailabilityParameters.Serialization.cs
Covered lines:13
Uncovered lines:6
Coverable lines:19
Total lines:67
Line coverage:68.4% (13 of 19)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%100%
get_Name()-100%100%
get_Type()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\CheckNameAvailabilityParameters.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.AppConfiguration.Models
 11{
 12    /// <summary> Parameters used for checking whether a resource name is available. </summary>
 13    public partial class CheckNameAvailabilityParameters
 14    {
 15        /// <summary> Initializes a new instance of CheckNameAvailabilityParameters. </summary>
 16        /// <param name="name"> The name to check for availability. </param>
 017        public CheckNameAvailabilityParameters(string name)
 18        {
 019            if (name == null)
 20            {
 021                throw new ArgumentNullException(nameof(name));
 22            }
 23
 024            Name = name;
 025            Type = "Microsoft.AppConfiguration/configurationStores";
 026        }
 27
 28        /// <summary> Initializes a new instance of CheckNameAvailabilityParameters. </summary>
 29        /// <param name="name"> The name to check for availability. </param>
 30        /// <param name="type"> The resource type to check for name availability. </param>
 431        internal CheckNameAvailabilityParameters(string name, string type)
 32        {
 433            Name = name;
 434            Type = type;
 435        }
 36
 37        /// <summary> The name to check for availability. </summary>
 438        public string Name { get; }
 39        /// <summary> The resource type to check for name availability. </summary>
 440        public string Type { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\CheckNameAvailabilityParameters.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.AppConfiguration.Models
 12{
 13    public partial class CheckNameAvailabilityParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            writer.WritePropertyName("name");
 419            writer.WriteStringValue(Name);
 420            writer.WritePropertyName("type");
 421            writer.WriteStringValue(Type);
 422            writer.WriteEndObject();
 423        }
 24    }
 25}