< Summary

Class:Microsoft.Azure.Batch.PoolSpecification
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PoolSpecification.cs
C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\PoolSpecification.cs
Covered lines:192
Uncovered lines:3
Coverable lines:195
Total lines:520
Line coverage:98.4% (192 of 195)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_TargetDedicated()-100%100%
set_TargetDedicated(...)-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
get_ApplicationLicenses()-100%100%
set_ApplicationLicenses(...)-100%100%
get_ApplicationPackageReferences()-100%100%
set_ApplicationPackageReferences(...)-100%100%
get_AutoScaleEnabled()-100%100%
set_AutoScaleEnabled(...)-100%100%
get_AutoScaleEvaluationInterval()-100%100%
set_AutoScaleEvaluationInterval(...)-100%100%
get_AutoScaleFormula()-100%100%
set_AutoScaleFormula(...)-100%100%
get_CertificateReferences()-100%100%
set_CertificateReferences(...)-100%100%
get_CloudServiceConfiguration()-100%100%
set_CloudServiceConfiguration(...)-100%100%
get_DisplayName()-100%100%
set_DisplayName(...)-100%100%
get_InterComputeNodeCommunicationEnabled()-100%100%
set_InterComputeNodeCommunicationEnabled(...)-100%100%
get_MaxTasksPerComputeNode()-100%100%
set_MaxTasksPerComputeNode(...)-100%100%
get_Metadata()-100%100%
set_Metadata(...)-100%100%
get_MountConfiguration()-100%100%
set_MountConfiguration(...)-100%100%
get_NetworkConfiguration()-100%100%
set_NetworkConfiguration(...)-100%100%
get_ResizeTimeout()-100%100%
set_ResizeTimeout(...)-100%100%
get_StartTask()-100%100%
set_StartTask(...)-100%100%
get_TargetDedicatedComputeNodes()-100%100%
set_TargetDedicatedComputeNodes(...)-100%100%
get_TargetLowPriorityComputeNodes()-100%100%
set_TargetLowPriorityComputeNodes(...)-100%100%
get_TaskSchedulingPolicy()-100%100%
set_TaskSchedulingPolicy(...)-100%100%
get_UserAccounts()-100%100%
set_UserAccounts(...)-100%100%
get_VirtualMachineConfiguration()-100%100%
set_VirtualMachineConfiguration(...)-100%100%
get_VirtualMachineSize()-100%100%
set_VirtualMachineSize(...)-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.PoolSpecification>.GetTransportObject()-100%100%
get_TargetDedicated()-0%100%
set_TargetDedicated(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\PoolSpecification.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;
 116    using System;
 21917    using System.Collections.Generic;
 18    using System.Linq;
 19
 20    /// <summary>
 21    /// The specification for a pool.
 22    /// </summary>
 23    public partial class PoolSpecification : ITransportObjectProvider<Models.PoolSpecification>, IPropertyMetadata
 24    {
 25        private class PropertyContainer : PropertyCollection
 26        {
 27            public readonly PropertyAccessor<IList<string>> ApplicationLicensesProperty;
 28            public readonly PropertyAccessor<IList<ApplicationPackageReference>> ApplicationPackageReferencesProperty;
 29            public readonly PropertyAccessor<bool?> AutoScaleEnabledProperty;
 30            public readonly PropertyAccessor<TimeSpan?> AutoScaleEvaluationIntervalProperty;
 31            public readonly PropertyAccessor<string> AutoScaleFormulaProperty;
 32            public readonly PropertyAccessor<IList<CertificateReference>> CertificateReferencesProperty;
 33            public readonly PropertyAccessor<CloudServiceConfiguration> CloudServiceConfigurationProperty;
 34            public readonly PropertyAccessor<string> DisplayNameProperty;
 35            public readonly PropertyAccessor<bool?> InterComputeNodeCommunicationEnabledProperty;
 36            public readonly PropertyAccessor<int?> MaxTasksPerComputeNodeProperty;
 37            public readonly PropertyAccessor<IList<MetadataItem>> MetadataProperty;
 38            public readonly PropertyAccessor<IList<MountConfiguration>> MountConfigurationProperty;
 39            public readonly PropertyAccessor<NetworkConfiguration> NetworkConfigurationProperty;
 40            public readonly PropertyAccessor<TimeSpan?> ResizeTimeoutProperty;
 41            public readonly PropertyAccessor<StartTask> StartTaskProperty;
 42            public readonly PropertyAccessor<int?> TargetDedicatedComputeNodesProperty;
 43            public readonly PropertyAccessor<int?> TargetLowPriorityComputeNodesProperty;
 44            public readonly PropertyAccessor<TaskSchedulingPolicy> TaskSchedulingPolicyProperty;
 45            public readonly PropertyAccessor<IList<UserAccount>> UserAccountsProperty;
 46            public readonly PropertyAccessor<VirtualMachineConfiguration> VirtualMachineConfigurationProperty;
 47            public readonly PropertyAccessor<string> VirtualMachineSizeProperty;
 48
 21049            public PropertyContainer() : base(BindingState.Unbound)
 50            {
 21051                this.ApplicationLicensesProperty = this.CreatePropertyAccessor<IList<string>>(nameof(ApplicationLicenses
 21052                this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor<IList<ApplicationPackageReferenc
 21053                this.AutoScaleEnabledProperty = this.CreatePropertyAccessor<bool?>(nameof(AutoScaleEnabled), BindingAcce
 21054                this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor<TimeSpan?>(nameof(AutoScaleEvalua
 21055                this.AutoScaleFormulaProperty = this.CreatePropertyAccessor<string>(nameof(AutoScaleFormula), BindingAcc
 21056                this.CertificateReferencesProperty = this.CreatePropertyAccessor<IList<CertificateReference>>(nameof(Cer
 21057                this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor<CloudServiceConfiguration>(nameof(C
 21058                this.DisplayNameProperty = this.CreatePropertyAccessor<string>(nameof(DisplayName), BindingAccess.Read |
 21059                this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor<bool?>(nameof(InterCompu
 21060                this.MaxTasksPerComputeNodeProperty = this.CreatePropertyAccessor<int?>(nameof(MaxTasksPerComputeNode), 
 21061                this.MetadataProperty = this.CreatePropertyAccessor<IList<MetadataItem>>(nameof(Metadata), BindingAccess
 21062                this.MountConfigurationProperty = this.CreatePropertyAccessor<IList<MountConfiguration>>(nameof(MountCon
 21063                this.NetworkConfigurationProperty = this.CreatePropertyAccessor<NetworkConfiguration>(nameof(NetworkConf
 21064                this.ResizeTimeoutProperty = this.CreatePropertyAccessor<TimeSpan?>(nameof(ResizeTimeout), BindingAccess
 21065                this.StartTaskProperty = this.CreatePropertyAccessor<StartTask>(nameof(StartTask), BindingAccess.Read | 
 21066                this.TargetDedicatedComputeNodesProperty = this.CreatePropertyAccessor<int?>(nameof(TargetDedicatedCompu
 21067                this.TargetLowPriorityComputeNodesProperty = this.CreatePropertyAccessor<int?>(nameof(TargetLowPriorityC
 21068                this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor<TaskSchedulingPolicy>(nameof(TaskSchedul
 21069                this.UserAccountsProperty = this.CreatePropertyAccessor<IList<UserAccount>>(nameof(UserAccounts), Bindin
 21070                this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor<VirtualMachineConfiguration>(name
 21071                this.VirtualMachineSizeProperty = this.CreatePropertyAccessor<string>(nameof(VirtualMachineSize), Bindin
 21072            }
 73
 19874            public PropertyContainer(Models.PoolSpecification protocolObject) : base(BindingState.Bound)
 75            {
 19876                this.ApplicationLicensesProperty = this.CreatePropertyAccessor(
 54877                    UtilitiesInternal.CollectionToThreadSafeCollection(protocolObject.ApplicationLicenses, o => o),
 19878                    nameof(ApplicationLicenses),
 19879                    BindingAccess.Read | BindingAccess.Write);
 19880                this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
 19881                    ApplicationPackageReference.ConvertFromProtocolCollection(protocolObject.ApplicationPackageReference
 19882                    nameof(ApplicationPackageReferences),
 19883                    BindingAccess.Read | BindingAccess.Write);
 19884                this.AutoScaleEnabledProperty = this.CreatePropertyAccessor(
 19885                    protocolObject.EnableAutoScale,
 19886                    nameof(AutoScaleEnabled),
 19887                    BindingAccess.Read | BindingAccess.Write);
 19888                this.AutoScaleEvaluationIntervalProperty = this.CreatePropertyAccessor(
 19889                    protocolObject.AutoScaleEvaluationInterval,
 19890                    nameof(AutoScaleEvaluationInterval),
 19891                    BindingAccess.Read | BindingAccess.Write);
 19892                this.AutoScaleFormulaProperty = this.CreatePropertyAccessor(
 19893                    protocolObject.AutoScaleFormula,
 19894                    nameof(AutoScaleFormula),
 19895                    BindingAccess.Read | BindingAccess.Write);
 19896                this.CertificateReferencesProperty = this.CreatePropertyAccessor(
 19897                    CertificateReference.ConvertFromProtocolCollection(protocolObject.CertificateReferences),
 19898                    nameof(CertificateReferences),
 19899                    BindingAccess.Read | BindingAccess.Write);
 198100                this.CloudServiceConfigurationProperty = this.CreatePropertyAccessor(
 295101                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CloudServiceConfiguration, o => new Cloud
 198102                    nameof(CloudServiceConfiguration),
 198103                    BindingAccess.Read | BindingAccess.Write);
 198104                this.DisplayNameProperty = this.CreatePropertyAccessor(
 198105                    protocolObject.DisplayName,
 198106                    nameof(DisplayName),
 198107                    BindingAccess.Read | BindingAccess.Write);
 198108                this.InterComputeNodeCommunicationEnabledProperty = this.CreatePropertyAccessor(
 198109                    protocolObject.EnableInterNodeCommunication,
 198110                    nameof(InterComputeNodeCommunicationEnabled),
 198111                    BindingAccess.Read);
 198112                this.MaxTasksPerComputeNodeProperty = this.CreatePropertyAccessor(
 198113                    protocolObject.MaxTasksPerNode,
 198114                    nameof(MaxTasksPerComputeNode),
 198115                    BindingAccess.Read | BindingAccess.Write);
 198116                this.MetadataProperty = this.CreatePropertyAccessor(
 198117                    MetadataItem.ConvertFromProtocolCollection(protocolObject.Metadata),
 198118                    nameof(Metadata),
 198119                    BindingAccess.Read | BindingAccess.Write);
 198120                this.MountConfigurationProperty = this.CreatePropertyAccessor(
 198121                    Batch.MountConfiguration.ConvertFromProtocolCollectionAndFreeze(protocolObject.MountConfiguration),
 198122                    nameof(MountConfiguration),
 198123                    BindingAccess.Read);
 198124                this.NetworkConfigurationProperty = this.CreatePropertyAccessor(
 279125                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NetworkConfiguration, o => new NetworkCon
 198126                    nameof(NetworkConfiguration),
 198127                    BindingAccess.Read);
 198128                this.ResizeTimeoutProperty = this.CreatePropertyAccessor(
 198129                    protocolObject.ResizeTimeout,
 198130                    nameof(ResizeTimeout),
 198131                    BindingAccess.Read | BindingAccess.Write);
 198132                this.StartTaskProperty = this.CreatePropertyAccessor(
 290133                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o)),
 198134                    nameof(StartTask),
 198135                    BindingAccess.Read | BindingAccess.Write);
 198136                this.TargetDedicatedComputeNodesProperty = this.CreatePropertyAccessor(
 198137                    protocolObject.TargetDedicatedNodes,
 198138                    nameof(TargetDedicatedComputeNodes),
 198139                    BindingAccess.Read | BindingAccess.Write);
 198140                this.TargetLowPriorityComputeNodesProperty = this.CreatePropertyAccessor(
 198141                    protocolObject.TargetLowPriorityNodes,
 198142                    nameof(TargetLowPriorityComputeNodes),
 198143                    BindingAccess.Read | BindingAccess.Write);
 198144                this.TaskSchedulingPolicyProperty = this.CreatePropertyAccessor(
 285145                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.TaskSchedulingPolicy, o => new TaskSchedu
 198146                    nameof(TaskSchedulingPolicy),
 198147                    BindingAccess.Read | BindingAccess.Write);
 198148                this.UserAccountsProperty = this.CreatePropertyAccessor(
 198149                    UserAccount.ConvertFromProtocolCollection(protocolObject.UserAccounts),
 198150                    nameof(UserAccounts),
 198151                    BindingAccess.Read | BindingAccess.Write);
 198152                this.VirtualMachineConfigurationProperty = this.CreatePropertyAccessor(
 290153                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.VirtualMachineConfiguration, o => new Vir
 198154                    nameof(VirtualMachineConfiguration),
 198155                    BindingAccess.Read | BindingAccess.Write);
 198156                this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
 198157                    protocolObject.VmSize,
 198158                    nameof(VirtualMachineSize),
 198159                    BindingAccess.Read | BindingAccess.Write);
 198160            }
 161        }
 162
 163        private readonly PropertyContainer propertyContainer;
 164
 165        #region Constructors
 166
 167        /// <summary>
 168        /// Initializes a new instance of the <see cref="PoolSpecification"/> class.
 169        /// </summary>
 210170        public PoolSpecification()
 171        {
 210172            this.propertyContainer = new PropertyContainer();
 210173        }
 174
 198175        internal PoolSpecification(Models.PoolSpecification protocolObject)
 176        {
 198177            this.propertyContainer = new PropertyContainer(protocolObject);
 198178        }
 179
 180        #endregion Constructors
 181
 182        #region PoolSpecification
 183
 184        /// <summary>
 185        /// Gets or sets the list of application licenses the Batch service will make available on each compute node in 
 186        /// pool.
 187        /// </summary>
 188        /// <remarks>
 189        /// The list of application licenses must be a subset of available Batch service application licenses.
 190        /// </remarks>
 191        public IList<string> ApplicationLicenses
 192        {
 605193            get { return this.propertyContainer.ApplicationLicensesProperty.Value; }
 194            set
 195            {
 106196                this.propertyContainer.ApplicationLicensesProperty.Value = ConcurrentChangeTrackedList<string>.Transform
 105197            }
 198        }
 199
 200        /// <summary>
 201        /// Gets or sets a list of application package references to be installed on each compute node in the pool.
 202        /// </summary>
 203        public IList<ApplicationPackageReference> ApplicationPackageReferences
 204        {
 610205            get { return this.propertyContainer.ApplicationPackageReferencesProperty.Value; }
 206            set
 207            {
 108208                this.propertyContainer.ApplicationPackageReferencesProperty.Value = ConcurrentChangeTrackedModifiableLis
 107209            }
 210        }
 211
 212        /// <summary>
 213        /// Gets or sets whether the pool size should automatically adjust over time.
 214        /// </summary>
 215        /// <remarks>
 216        /// <para>If false, one of the <see cref="TargetDedicatedComputeNodes"/> or <see cref="TargetLowPriorityComputeN
 217        /// property is required.</para> <para>If true, the <see cref="AutoScaleFormula"/> property is required. The poo
 218        /// automatically resizes according to the formula.</para> <para>The default value is false.</para>
 219        /// </remarks>
 220        public bool? AutoScaleEnabled
 221        {
 605222            get { return this.propertyContainer.AutoScaleEnabledProperty.Value; }
 229223            set { this.propertyContainer.AutoScaleEnabledProperty.Value = value; }
 224        }
 225
 226        /// <summary>
 227        /// Gets or sets a time interval at which to automatically adjust the pool size according to the <see cref="Auto
 228        /// </summary>
 229        /// <remarks>
 230        /// The default value is 15 minutes. The minimum allowed value is 5 minutes.
 231        /// </remarks>
 232        public TimeSpan? AutoScaleEvaluationInterval
 233        {
 605234            get { return this.propertyContainer.AutoScaleEvaluationIntervalProperty.Value; }
 205235            set { this.propertyContainer.AutoScaleEvaluationIntervalProperty.Value = value; }
 236        }
 237
 238        /// <summary>
 239        /// Gets or sets a formula for the desired number of compute nodes in the pool.
 240        /// </summary>
 241        /// <remarks>
 242        /// <para>For how to write autoscale formulas, see https://azure.microsoft.com/documentation/articles/batch-auto
 243        /// This property is required if <see cref="AutoScaleEnabled"/> is set to true. It must be null if AutoScaleEnab
 244        /// is false.</para><para>The formula is checked for validity before the pool is created. If the formula is not 
 245        /// an exception is thrown when you try to commit the <see cref="PoolSpecification"/>.</para>
 246        /// </remarks>
 247        public string AutoScaleFormula
 248        {
 605249            get { return this.propertyContainer.AutoScaleFormulaProperty.Value; }
 231250            set { this.propertyContainer.AutoScaleFormulaProperty.Value = value; }
 251        }
 252
 253        /// <summary>
 254        /// Gets or sets a list of certificates to be installed on each compute node in the pool.
 255        /// </summary>
 256        public IList<CertificateReference> CertificateReferences
 257        {
 605258            get { return this.propertyContainer.CertificateReferencesProperty.Value; }
 259            set
 260            {
 111261                this.propertyContainer.CertificateReferencesProperty.Value = ConcurrentChangeTrackedModifiableList<Certi
 110262            }
 263        }
 264
 265        /// <summary>
 266        /// Gets or sets the <see cref="CloudServiceConfiguration"/> for the pool.
 267        /// </summary>
 268        /// <remarks>
 269        /// This property is mutually exclusive with <see cref="VirtualMachineConfiguration"/>.
 270        /// </remarks>
 271        public CloudServiceConfiguration CloudServiceConfiguration
 272        {
 607273            get { return this.propertyContainer.CloudServiceConfigurationProperty.Value; }
 205274            set { this.propertyContainer.CloudServiceConfigurationProperty.Value = value; }
 275        }
 276
 277        /// <summary>
 278        /// Gets or sets the display name for the pool.
 279        /// </summary>
 280        public string DisplayName
 281        {
 606282            get { return this.propertyContainer.DisplayNameProperty.Value; }
 229283            set { this.propertyContainer.DisplayNameProperty.Value = value; }
 284        }
 285
 286        /// <summary>
 287        /// Gets or sets whether the pool permits direct communication between its compute nodes.
 288        /// </summary>
 289        /// <remarks>
 290        /// Enabling inter-node communication limits the maximum size of the pool due to deployment restrictions on the 
 291        /// of the pool. This may result in the pool not reaching its desired size.
 292        /// </remarks>
 293        public bool? InterComputeNodeCommunicationEnabled
 294        {
 605295            get { return this.propertyContainer.InterComputeNodeCommunicationEnabledProperty.Value; }
 209296            set { this.propertyContainer.InterComputeNodeCommunicationEnabledProperty.Value = value; }
 297        }
 298
 299        /// <summary>
 300        /// Gets or sets the maximum number of tasks that can run concurrently on a single compute node in the pool.
 301        /// </summary>
 302        /// <remarks>
 303        /// The default value is 1. The maximum value is the smaller of 4 times the number of cores of the <see cref="Vi
 304        /// of the pool or 256.
 305        /// </remarks>
 306        public int? MaxTasksPerComputeNode
 307        {
 605308            get { return this.propertyContainer.MaxTasksPerComputeNodeProperty.Value; }
 230309            set { this.propertyContainer.MaxTasksPerComputeNodeProperty.Value = value; }
 310        }
 311
 312        /// <summary>
 313        /// Gets or sets a list of name-value pairs associated with the pool as metadata.
 314        /// </summary>
 315        public IList<MetadataItem> Metadata
 316        {
 605317            get { return this.propertyContainer.MetadataProperty.Value; }
 318            set
 319            {
 115320                this.propertyContainer.MetadataProperty.Value = ConcurrentChangeTrackedModifiableList<MetadataItem>.Tran
 114321            }
 322        }
 323
 324        /// <summary>
 325        /// Gets or sets a list of file systems to mount on each node in the pool.
 326        /// </summary>
 327        /// <remarks>
 328        /// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
 329        /// </remarks>
 330        public IList<MountConfiguration> MountConfiguration
 331        {
 605332            get { return this.propertyContainer.MountConfigurationProperty.Value; }
 333            set
 334            {
 112335                this.propertyContainer.MountConfigurationProperty.Value = ConcurrentChangeTrackedModifiableList<MountCon
 111336            }
 337        }
 338
 339        /// <summary>
 340        /// Gets or sets the network configuration of the pool.
 341        /// </summary>
 342        public NetworkConfiguration NetworkConfiguration
 343        {
 605344            get { return this.propertyContainer.NetworkConfigurationProperty.Value; }
 201345            set { this.propertyContainer.NetworkConfigurationProperty.Value = value; }
 346        }
 347
 348        /// <summary>
 349        /// Gets or sets the timeout for allocation of compute nodes to the pool.
 350        /// </summary>
 351        /// <remarks>
 352        /// <para>This timeout applies only to manual scaling; it has no effect when <see cref="AutoScaleEnabled"/> is s
 353        /// to true.</para><para>The default value is 15 minutes. The minimum value is 5 minutes.</para>
 354        /// </remarks>
 355        public TimeSpan? ResizeTimeout
 356        {
 606357            get { return this.propertyContainer.ResizeTimeoutProperty.Value; }
 213358            set { this.propertyContainer.ResizeTimeoutProperty.Value = value; }
 359        }
 360
 361        /// <summary>
 362        /// Gets or sets a task to run on each compute node as it joins the pool. The task runs when the node is added t
 363        /// the pool or when the node is restarted.
 364        /// </summary>
 365        public StartTask StartTask
 366        {
 607367            get { return this.propertyContainer.StartTaskProperty.Value; }
 209368            set { this.propertyContainer.StartTaskProperty.Value = value; }
 369        }
 370
 371        /// <summary>
 372        /// Gets or sets the desired number of dedicated compute nodes in the pool.
 373        /// </summary>
 374        /// <remarks>
 375        /// This setting cannot be specified if <see cref="AutoScaleEnabled"/> is set to true. At least one of this prop
 376        /// and <see cref="TargetLowPriorityComputeNodes"/> must be specified if <see cref="AutoScaleEnabled"/> is false
 377        /// If not specified, the default is 0.
 378        /// </remarks>
 379        public int? TargetDedicatedComputeNodes
 380        {
 606381            get { return this.propertyContainer.TargetDedicatedComputeNodesProperty.Value; }
 434382            set { this.propertyContainer.TargetDedicatedComputeNodesProperty.Value = value; }
 383        }
 384
 385        /// <summary>
 386        /// Gets or sets the desired number of low-priority compute nodes in the pool.
 387        /// </summary>
 388        /// <remarks>
 389        /// This setting cannot be specified if <see cref="AutoScaleEnabled"/> is set to true. At least one of <see cref
 390        /// and this property must be specified if <see cref="AutoScaleEnabled"/> is false. If not specified, the defaul
 391        /// is 0.
 392        /// </remarks>
 393        public int? TargetLowPriorityComputeNodes
 394        {
 605395            get { return this.propertyContainer.TargetLowPriorityComputeNodesProperty.Value; }
 199396            set { this.propertyContainer.TargetLowPriorityComputeNodesProperty.Value = value; }
 397        }
 398
 399        /// <summary>
 400        /// Gets or sets how tasks are distributed among compute nodes in the pool.
 401        /// </summary>
 402        public TaskSchedulingPolicy TaskSchedulingPolicy
 403        {
 605404            get { return this.propertyContainer.TaskSchedulingPolicyProperty.Value; }
 225405            set { this.propertyContainer.TaskSchedulingPolicyProperty.Value = value; }
 406        }
 407
 408        /// <summary>
 409        /// Gets or sets the list of user accounts to be created on each node in the pool.
 410        /// </summary>
 411        public IList<UserAccount> UserAccounts
 412        {
 605413            get { return this.propertyContainer.UserAccountsProperty.Value; }
 414            set
 415            {
 110416                this.propertyContainer.UserAccountsProperty.Value = ConcurrentChangeTrackedModifiableList<UserAccount>.T
 109417            }
 418        }
 419
 420        /// <summary>
 421        /// Gets or sets the <see cref="VirtualMachineConfiguration"/> of the pool.
 422        /// </summary>
 423        /// <remarks>
 424        /// This property is mutually exclusive with <see cref="CloudServiceConfiguration"/>.
 425        /// </remarks>
 426        public VirtualMachineConfiguration VirtualMachineConfiguration
 427        {
 605428            get { return this.propertyContainer.VirtualMachineConfigurationProperty.Value; }
 235429            set { this.propertyContainer.VirtualMachineConfigurationProperty.Value = value; }
 430        }
 431
 432        /// <summary>
 433        /// Gets or sets the size of the virtual machines in the pool.  All virtual machines in a pool are the same size
 434        /// </summary>
 435        /// <remarks>
 436        /// <para>For information about available sizes of virtual machines in pools, see Choose a VM size for compute n
 437        /// in an Azure Batch pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).</para>
 438        /// </remarks>
 439        public string VirtualMachineSize
 440        {
 606441            get { return this.propertyContainer.VirtualMachineSizeProperty.Value; }
 237442            set { this.propertyContainer.VirtualMachineSizeProperty.Value = value; }
 443        }
 444
 445        #endregion // PoolSpecification
 446
 447        #region IPropertyMetadata
 448
 449        bool IModifiable.HasBeenModified
 450        {
 4451            get { return this.propertyContainer.HasBeenModified; }
 452        }
 453
 454        bool IReadOnly.IsReadOnly
 455        {
 0456            get { return this.propertyContainer.IsReadOnly; }
 8457            set { this.propertyContainer.IsReadOnly = value; }
 458        }
 459
 460        #endregion //IPropertyMetadata
 461
 462        #region Internal/private methods
 463        /// <summary>
 464        /// Return a protocol object of the requested type.
 465        /// </summary>
 466        /// <returns>The protocol object of the requested type.</returns>
 467        Models.PoolSpecification ITransportObjectProvider<Models.PoolSpecification>.GetTransportObject()
 468        {
 206469            Models.PoolSpecification result = new Models.PoolSpecification()
 206470            {
 206471                ApplicationLicenses = this.ApplicationLicenses,
 206472                ApplicationPackageReferences = UtilitiesInternal.ConvertToProtocolCollection(this.ApplicationPackageRefe
 206473                EnableAutoScale = this.AutoScaleEnabled,
 206474                AutoScaleEvaluationInterval = this.AutoScaleEvaluationInterval,
 206475                AutoScaleFormula = this.AutoScaleFormula,
 206476                CertificateReferences = UtilitiesInternal.ConvertToProtocolCollection(this.CertificateReferences),
 307477                CloudServiceConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.CloudServiceConfiguration, 
 206478                DisplayName = this.DisplayName,
 206479                EnableInterNodeCommunication = this.InterComputeNodeCommunicationEnabled,
 206480                MaxTasksPerNode = this.MaxTasksPerComputeNode,
 206481                Metadata = UtilitiesInternal.ConvertToProtocolCollection(this.Metadata),
 206482                MountConfiguration = UtilitiesInternal.ConvertToProtocolCollection(this.MountConfiguration),
 306483                NetworkConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.NetworkConfiguration, (o) => o.G
 206484                ResizeTimeout = this.ResizeTimeout,
 310485                StartTask = UtilitiesInternal.CreateObjectWithNullCheck(this.StartTask, (o) => o.GetTransportObject()),
 206486                TargetDedicatedNodes = this.TargetDedicatedComputeNodes,
 206487                TargetLowPriorityNodes = this.TargetLowPriorityComputeNodes,
 318488                TaskSchedulingPolicy = UtilitiesInternal.CreateObjectWithNullCheck(this.TaskSchedulingPolicy, (o) => o.G
 206489                UserAccounts = UtilitiesInternal.ConvertToProtocolCollection(this.UserAccounts),
 323490                VirtualMachineConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.VirtualMachineConfigurati
 206491                VmSize = this.VirtualMachineSize,
 206492            };
 493
 206494            return result;
 495        }
 496
 497
 498        #endregion // Internal/private methods
 499    }
 500}

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\PoolSpecification.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
 4namespace Microsoft.Azure.Batch
 5{
 6    using System;
 7
 8    public partial class PoolSpecification
 9    {
 10        /// <summary>
 11        /// This property is an alias for <see cref="TargetDedicatedComputeNodes"/> and is supported only for backward c
 12        /// </summary>
 13        [Obsolete("Obsolete after 05/2017, use TargetDedicatedComputeNodes instead.")]
 14        public int? TargetDedicated
 15        {
 016            get { return this.TargetDedicatedComputeNodes; }
 017            set { this.TargetDedicatedComputeNodes = value; }
 18        }
 19    }
 20}

Methods/Properties

get_TargetDedicated()
set_TargetDedicated(...)
.ctor()
.ctor(...)
.ctor()
.ctor(...)
get_ApplicationLicenses()
set_ApplicationLicenses(...)
get_ApplicationPackageReferences()
set_ApplicationPackageReferences(...)
get_AutoScaleEnabled()
set_AutoScaleEnabled(...)
get_AutoScaleEvaluationInterval()
set_AutoScaleEvaluationInterval(...)
get_AutoScaleFormula()
set_AutoScaleFormula(...)
get_CertificateReferences()
set_CertificateReferences(...)
get_CloudServiceConfiguration()
set_CloudServiceConfiguration(...)
get_DisplayName()
set_DisplayName(...)
get_InterComputeNodeCommunicationEnabled()
set_InterComputeNodeCommunicationEnabled(...)
get_MaxTasksPerComputeNode()
set_MaxTasksPerComputeNode(...)
get_Metadata()
set_Metadata(...)
get_MountConfiguration()
set_MountConfiguration(...)
get_NetworkConfiguration()
set_NetworkConfiguration(...)
get_ResizeTimeout()
set_ResizeTimeout(...)
get_StartTask()
set_StartTask(...)
get_TargetDedicatedComputeNodes()
set_TargetDedicatedComputeNodes(...)
get_TargetLowPriorityComputeNodes()
set_TargetLowPriorityComputeNodes(...)
get_TaskSchedulingPolicy()
set_TaskSchedulingPolicy(...)
get_UserAccounts()
set_UserAccounts(...)
get_VirtualMachineConfiguration()
set_VirtualMachineConfiguration(...)
get_VirtualMachineSize()
set_VirtualMachineSize(...)
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)
Microsoft.Azure.Batch.ITransportObjectProvider<Microsoft.Azure.Batch.Protocol.Models.PoolSpecification>.GetTransportObject()
get_TargetDedicated()
set_TargetDedicated(...)