< Summary

Class:Microsoft.Azure.Batch.PoolInformation
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PoolInformation.cs
Covered lines:32
Uncovered lines:1
Coverable lines:33
Total lines:130
Line coverage:96.9% (32 of 33)
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_AutoPoolSpecification()-100%100%
set_AutoPoolSpecification(...)-100%100%
get_PoolId()-100%100%
set_PoolId(...)-100%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-100%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.PoolInformation>.GetTransportObject()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PoolInformation.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    /// Specifies how a job should be assigned to a pool.
 22    /// </summary>
 23    public partial class PoolInformation : ITransportObjectProvider<Models.PoolInformation>, IPropertyMetadata
 24    {
 25        private class PropertyContainer : PropertyCollection
 26        {
 27            public readonly PropertyAccessor<AutoPoolSpecification> AutoPoolSpecificationProperty;
 28            public readonly PropertyAccessor<string> PoolIdProperty;
 29
 22830            public PropertyContainer() : base(BindingState.Unbound)
 31            {
 22832                this.AutoPoolSpecificationProperty = this.CreatePropertyAccessor<AutoPoolSpecification>(nameof(AutoPoolS
 22833                this.PoolIdProperty = this.CreatePropertyAccessor<string>(nameof(PoolId), BindingAccess.Read | BindingAc
 22834            }
 35
 99336            public PropertyContainer(Models.PoolInformation protocolObject) : base(BindingState.Bound)
 37            {
 99338                this.AutoPoolSpecificationProperty = this.CreatePropertyAccessor(
 137939                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AutoPoolSpecification, o => new AutoPoolS
 99340                    nameof(AutoPoolSpecification),
 99341                    BindingAccess.Read | BindingAccess.Write);
 99342                this.PoolIdProperty = this.CreatePropertyAccessor(
 99343                    protocolObject.PoolId,
 99344                    nameof(PoolId),
 99345                    BindingAccess.Read | BindingAccess.Write);
 99346            }
 47        }
 48
 49        private readonly PropertyContainer propertyContainer;
 50
 51        #region Constructors
 52
 53        /// <summary>
 54        /// Initializes a new instance of the <see cref="PoolInformation"/> class.
 55        /// </summary>
 22856        public PoolInformation()
 57        {
 22858            this.propertyContainer = new PropertyContainer();
 22859        }
 60
 99361        internal PoolInformation(Models.PoolInformation protocolObject)
 62        {
 99363            this.propertyContainer = new PropertyContainer(protocolObject);
 99364        }
 65
 66        #endregion Constructors
 67
 68        #region PoolInformation
 69
 70        /// <summary>
 71        /// Gets or sets the properties for the auto pool that will be created.
 72        /// </summary>
 73        /// <remarks>
 74        /// If this property is set, then <see cref="PoolId"/> must be left unset.
 75        /// </remarks>
 76        public AutoPoolSpecification AutoPoolSpecification
 77        {
 143878            get { return this.propertyContainer.AutoPoolSpecificationProperty.Value; }
 23379            set { this.propertyContainer.AutoPoolSpecificationProperty.Value = value; }
 80        }
 81
 82        /// <summary>
 83        /// Gets or sets the name of an existing pool that can be used for running tasks.
 84        /// </summary>
 85        /// <remarks>
 86        /// If this property is set, then <see cref="AutoPoolSpecification"/> must be left unset.
 87        /// </remarks>
 88        public string PoolId
 89        {
 142990            get { return this.propertyContainer.PoolIdProperty.Value; }
 23391            set { this.propertyContainer.PoolIdProperty.Value = value; }
 92        }
 93
 94        #endregion // PoolInformation
 95
 96        #region IPropertyMetadata
 97
 98        bool IModifiable.HasBeenModified
 99        {
 4100            get { return this.propertyContainer.HasBeenModified; }
 101        }
 102
 103        bool IReadOnly.IsReadOnly
 104        {
 0105            get { return this.propertyContainer.IsReadOnly; }
 16106            set { this.propertyContainer.IsReadOnly = value; }
 107        }
 108
 109        #endregion //IPropertyMetadata
 110
 111        #region Internal/private methods
 112        /// <summary>
 113        /// Return a protocol object of the requested type.
 114        /// </summary>
 115        /// <returns>The protocol object of the requested type.</returns>
 116        Models.PoolInformation ITransportObjectProvider<Models.PoolInformation>.GetTransportObject()
 117        {
 224118            Models.PoolInformation result = new Models.PoolInformation()
 224119            {
 338120                AutoPoolSpecification = UtilitiesInternal.CreateObjectWithNullCheck(this.AutoPoolSpecification, (o) => o
 224121                PoolId = this.PoolId,
 224122            };
 123
 224124            return result;
 125        }
 126
 127
 128        #endregion // Internal/private methods
 129    }
 130}