| | 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 | |
|
| | 13 | | namespace 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 | | /// The configuration for compute nodes in a pool based on the Azure Cloud Services platform. |
| | 22 | | /// </summary> |
| | 23 | | public partial class CloudServiceConfiguration : ITransportObjectProvider<Models.CloudServiceConfiguration>, IProper |
| | 24 | | { |
| | 25 | | private class PropertyContainer : PropertyCollection |
| | 26 | | { |
| | 27 | | public readonly PropertyAccessor<string> OSFamilyProperty; |
| | 28 | | public readonly PropertyAccessor<string> OSVersionProperty; |
| | 29 | |
|
| 251 | 30 | | public PropertyContainer() : base(BindingState.Unbound) |
| | 31 | | { |
| 251 | 32 | | this.OSFamilyProperty = this.CreatePropertyAccessor<string>(nameof(OSFamily), BindingAccess.Read | Bindi |
| 251 | 33 | | this.OSVersionProperty = this.CreatePropertyAccessor<string>(nameof(OSVersion), BindingAccess.Read | Bin |
| 251 | 34 | | } |
| | 35 | |
|
| 584 | 36 | | public PropertyContainer(Models.CloudServiceConfiguration protocolObject) : base(BindingState.Bound) |
| | 37 | | { |
| 584 | 38 | | this.OSFamilyProperty = this.CreatePropertyAccessor( |
| 584 | 39 | | protocolObject.OsFamily, |
| 584 | 40 | | nameof(OSFamily), |
| 584 | 41 | | BindingAccess.Read | BindingAccess.Write); |
| 584 | 42 | | this.OSVersionProperty = this.CreatePropertyAccessor( |
| 584 | 43 | | protocolObject.OsVersion, |
| 584 | 44 | | nameof(OSVersion), |
| 584 | 45 | | BindingAccess.Read | BindingAccess.Write); |
| 584 | 46 | | } |
| | 47 | | } |
| | 48 | |
|
| | 49 | | private readonly PropertyContainer propertyContainer; |
| | 50 | |
|
| | 51 | | #region Constructors |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Initializes a new instance of the <see cref="CloudServiceConfiguration"/> class. |
| | 55 | | /// </summary> |
| | 56 | | /// <param name='osFamily'>The Azure Guest OS family to be installed on the virtual machines in the pool.</param |
| | 57 | | /// <param name='osVersion'>The Azure Guest OS version to be installed on the virtual machines in the pool. If n |
| | 58 | | /// Batch service will default to "'*", which specifies the latest operating system version for the <see cref="O |
| 251 | 59 | | public CloudServiceConfiguration( |
| 251 | 60 | | string osFamily, |
| 251 | 61 | | string osVersion = default(string)) |
| | 62 | | { |
| 251 | 63 | | this.propertyContainer = new PropertyContainer(); |
| 251 | 64 | | this.OSFamily = osFamily; |
| 251 | 65 | | this.OSVersion = osVersion; |
| 251 | 66 | | } |
| | 67 | |
|
| 584 | 68 | | internal CloudServiceConfiguration(Models.CloudServiceConfiguration protocolObject) |
| | 69 | | { |
| 584 | 70 | | this.propertyContainer = new PropertyContainer(protocolObject); |
| 584 | 71 | | } |
| | 72 | |
|
| | 73 | | #endregion Constructors |
| | 74 | |
|
| | 75 | | #region CloudServiceConfiguration |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets or sets the Azure Guest OS family to be installed on the virtual machines in the pool. |
| | 79 | | /// </summary> |
| | 80 | | /// <remarks> |
| | 81 | | /// For more information about Guest OS families, see https://azure.microsoft.com/documentation/articles/cloud-s |
| | 82 | | /// </remarks> |
| | 83 | | public string OSFamily |
| | 84 | | { |
| 1079 | 85 | | get { return this.propertyContainer.OSFamilyProperty.Value; } |
| 737 | 86 | | set { this.propertyContainer.OSFamilyProperty.Value = value; } |
| | 87 | | } |
| | 88 | |
|
| | 89 | | /// <summary> |
| | 90 | | /// Gets or sets the Azure Guest OS version to be installed on the virtual machines in the pool. If no value is |
| | 91 | | /// the Batch service will default to "'*", which specifies the latest operating system version for the <see cre |
| | 92 | | /// </summary> |
| | 93 | | public string OSVersion |
| | 94 | | { |
| 1077 | 95 | | get { return this.propertyContainer.OSVersionProperty.Value; } |
| 743 | 96 | | set { this.propertyContainer.OSVersionProperty.Value = value; } |
| | 97 | | } |
| | 98 | |
|
| | 99 | | #endregion // CloudServiceConfiguration |
| | 100 | |
|
| | 101 | | #region IPropertyMetadata |
| | 102 | |
|
| | 103 | | bool IModifiable.HasBeenModified |
| | 104 | | { |
| 2 | 105 | | get { return this.propertyContainer.HasBeenModified; } |
| | 106 | | } |
| | 107 | |
|
| | 108 | | bool IReadOnly.IsReadOnly |
| | 109 | | { |
| 0 | 110 | | get { return this.propertyContainer.IsReadOnly; } |
| 982 | 111 | | set { this.propertyContainer.IsReadOnly = value; } |
| | 112 | | } |
| | 113 | |
|
| | 114 | | #endregion //IPropertyMetadata |
| | 115 | |
|
| | 116 | | #region Internal/private methods |
| | 117 | | /// <summary> |
| | 118 | | /// Return a protocol object of the requested type. |
| | 119 | | /// </summary> |
| | 120 | | /// <returns>The protocol object of the requested type.</returns> |
| | 121 | | Models.CloudServiceConfiguration ITransportObjectProvider<Models.CloudServiceConfiguration>.GetTransportObject() |
| | 122 | | { |
| 249 | 123 | | Models.CloudServiceConfiguration result = new Models.CloudServiceConfiguration() |
| 249 | 124 | | { |
| 249 | 125 | | OsFamily = this.OSFamily, |
| 249 | 126 | | OsVersion = this.OSVersion, |
| 249 | 127 | | }; |
| | 128 | |
|
| 249 | 129 | | return result; |
| | 130 | | } |
| | 131 | |
|
| | 132 | |
|
| | 133 | | #endregion // Internal/private methods |
| | 134 | | } |
| | 135 | | } |