< Summary

Class:Microsoft.Azure.Batch.PublicIPAddressConfiguration
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PublicIPAddressConfiguration.cs
Covered lines:34
Uncovered lines:2
Coverable lines:36
Total lines:138
Line coverage:94.4% (34 of 36)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
.ctor(...)-100%100%
.ctor(...)-100%100%
get_IpAddressIds()-100%100%
set_IpAddressIds(...)-100%100%
get_Provision()-100%100%
set_Provision(...)-100%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-0%100%
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()-0%100%
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)-100%100%
Microsoft.Azure.Batch.ITransportObjectProvider<Microsoft.Azure.Batch.Protocol.Models.PublicIPAddressConfiguration>.GetTransportObject()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PublicIPAddressConfiguration.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3//
 4// Code generated by Microsoft (R) AutoRest Code Generator.
 5// Changes may cause incorrect behavior and will be lost if the code is
 6// regenerated.
 7
 8//
 9// This file was autogenerated by a tool.
 10// Do not modify it.
 11//
 12
 13namespace Microsoft.Azure.Batch
 14{
 15    using Models = Microsoft.Azure.Batch.Protocol.Models;
 16    using System;
 17    using System.Collections.Generic;
 18    using System.Linq;
 19
 20    /// <summary>
 21    /// Details about an output file upload operation, including under what conditions to perform the upload.
 22    /// </summary>
 23    public partial class PublicIPAddressConfiguration : ITransportObjectProvider<Models.PublicIPAddressConfiguration>, I
 24    {
 25        private class PropertyContainer : PropertyCollection
 26        {
 27            public readonly PropertyAccessor<IList<string>> IpAddressIdsProperty;
 28            public readonly PropertyAccessor<Common.IPAddressProvisioningType?> ProvisionProperty;
 29
 23730            public PropertyContainer() : base(BindingState.Unbound)
 31            {
 23732                this.IpAddressIdsProperty = this.CreatePropertyAccessor<IList<string>>(nameof(IpAddressIds), BindingAcce
 23733                this.ProvisionProperty = this.CreatePropertyAccessor<Common.IPAddressProvisioningType?>(nameof(Provision
 23734            }
 35
 32236            public PropertyContainer(Models.PublicIPAddressConfiguration protocolObject) : base(BindingState.Bound)
 37            {
 32238                this.IpAddressIdsProperty = this.CreatePropertyAccessor(
 94739                    UtilitiesInternal.CollectionToThreadSafeCollection(protocolObject.IpAddressIds, o => o),
 32240                    nameof(IpAddressIds),
 32241                    BindingAccess.Read);
 32242                this.ProvisionProperty = this.CreatePropertyAccessor(
 32243                    UtilitiesInternal.MapNullableEnum<Models.IPAddressProvisioningType, Common.IPAddressProvisioningType
 32244                    nameof(Provision),
 32245                    BindingAccess.Read);
 32246            }
 47        }
 48
 49        private readonly PropertyContainer propertyContainer;
 50
 51        #region Constructors
 52
 53        /// <summary>
 54        /// Initializes a new instance of the <see cref="PublicIPAddressConfiguration"/> class.
 55        /// </summary>
 56        /// <param name='provision'>The provisioning type for Public IP Addresses for the Pool.</param>
 23757        public PublicIPAddressConfiguration(
 23758            Common.IPAddressProvisioningType? provision)
 59        {
 23760            this.propertyContainer = new PropertyContainer();
 23761            this.Provision = provision;
 23762        }
 63
 32264        internal PublicIPAddressConfiguration(Models.PublicIPAddressConfiguration protocolObject)
 65        {
 32266            this.propertyContainer = new PropertyContainer(protocolObject);
 32267        }
 68
 69        #endregion Constructors
 70
 71        #region PublicIPAddressConfiguration
 72
 73        /// <summary>
 74        /// Gets or sets the list of public IPs which the Batch service will use when provisioning Compute Nodes.
 75        /// </summary>
 76        /// <remarks>
 77        /// The number of IPs specified here limits the maximum size of the Pool - 50 dedicated nodes or 20 low-priority
 78        /// nodes can be allocated for each public IP. For example, a pool needing 150 dedicated VMs would need at least
 79        /// 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resour
 80        /// </remarks>
 81        public IList<string> IpAddressIds
 82        {
 79583            get { return this.propertyContainer.IpAddressIdsProperty.Value; }
 84            set
 85            {
 12386                this.propertyContainer.IpAddressIdsProperty.Value = ConcurrentChangeTrackedList<string>.TransformEnumera
 12287            }
 88        }
 89
 90        /// <summary>
 91        /// Gets the provisioning type for Public IP Addresses for the Pool.
 92        /// </summary>
 93        /// <remarks>
 94        /// If not specified, the default value is BatchManaged.
 95        /// </remarks>
 96        public Common.IPAddressProvisioningType? Provision
 97        {
 79598            get { return this.propertyContainer.ProvisionProperty.Value; }
 72799            private set { this.propertyContainer.ProvisionProperty.Value = value; }
 100        }
 101
 102        #endregion // PublicIPAddressConfiguration
 103
 104        #region IPropertyMetadata
 105
 106        bool IModifiable.HasBeenModified
 107        {
 0108            get { return this.propertyContainer.HasBeenModified; }
 109        }
 110
 111        bool IReadOnly.IsReadOnly
 112        {
 0113            get { return this.propertyContainer.IsReadOnly; }
 1290114            set { this.propertyContainer.IsReadOnly = value; }
 115        }
 116
 117        #endregion //IPropertyMetadata
 118
 119        #region Internal/private methods
 120        /// <summary>
 121        /// Return a protocol object of the requested type.
 122        /// </summary>
 123        /// <returns>The protocol object of the requested type.</returns>
 124        Models.PublicIPAddressConfiguration ITransportObjectProvider<Models.PublicIPAddressConfiguration>.GetTransportOb
 125        {
 236126            Models.PublicIPAddressConfiguration result = new Models.PublicIPAddressConfiguration()
 236127            {
 236128                IpAddressIds = this.IpAddressIds,
 236129                Provision = UtilitiesInternal.MapNullableEnum<Common.IPAddressProvisioningType, Models.IPAddressProvisio
 236130            };
 131
 236132            return result;
 133        }
 134
 135
 136        #endregion // Internal/private methods
 137    }
 138}