| | 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 | | /// 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 | |
|
| 237 | 30 | | public PropertyContainer() : base(BindingState.Unbound) |
| | 31 | | { |
| 237 | 32 | | this.IpAddressIdsProperty = this.CreatePropertyAccessor<IList<string>>(nameof(IpAddressIds), BindingAcce |
| 237 | 33 | | this.ProvisionProperty = this.CreatePropertyAccessor<Common.IPAddressProvisioningType?>(nameof(Provision |
| 237 | 34 | | } |
| | 35 | |
|
| 322 | 36 | | public PropertyContainer(Models.PublicIPAddressConfiguration protocolObject) : base(BindingState.Bound) |
| | 37 | | { |
| 322 | 38 | | this.IpAddressIdsProperty = this.CreatePropertyAccessor( |
| 947 | 39 | | UtilitiesInternal.CollectionToThreadSafeCollection(protocolObject.IpAddressIds, o => o), |
| 322 | 40 | | nameof(IpAddressIds), |
| 322 | 41 | | BindingAccess.Read); |
| 322 | 42 | | this.ProvisionProperty = this.CreatePropertyAccessor( |
| 322 | 43 | | UtilitiesInternal.MapNullableEnum<Models.IPAddressProvisioningType, Common.IPAddressProvisioningType |
| 322 | 44 | | nameof(Provision), |
| 322 | 45 | | BindingAccess.Read); |
| 322 | 46 | | } |
| | 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> |
| 237 | 57 | | public PublicIPAddressConfiguration( |
| 237 | 58 | | Common.IPAddressProvisioningType? provision) |
| | 59 | | { |
| 237 | 60 | | this.propertyContainer = new PropertyContainer(); |
| 237 | 61 | | this.Provision = provision; |
| 237 | 62 | | } |
| | 63 | |
|
| 322 | 64 | | internal PublicIPAddressConfiguration(Models.PublicIPAddressConfiguration protocolObject) |
| | 65 | | { |
| 322 | 66 | | this.propertyContainer = new PropertyContainer(protocolObject); |
| 322 | 67 | | } |
| | 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 | | { |
| 795 | 83 | | get { return this.propertyContainer.IpAddressIdsProperty.Value; } |
| | 84 | | set |
| | 85 | | { |
| 123 | 86 | | this.propertyContainer.IpAddressIdsProperty.Value = ConcurrentChangeTrackedList<string>.TransformEnumera |
| 122 | 87 | | } |
| | 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 | | { |
| 795 | 98 | | get { return this.propertyContainer.ProvisionProperty.Value; } |
| 727 | 99 | | private set { this.propertyContainer.ProvisionProperty.Value = value; } |
| | 100 | | } |
| | 101 | |
|
| | 102 | | #endregion // PublicIPAddressConfiguration |
| | 103 | |
|
| | 104 | | #region IPropertyMetadata |
| | 105 | |
|
| | 106 | | bool IModifiable.HasBeenModified |
| | 107 | | { |
| 0 | 108 | | get { return this.propertyContainer.HasBeenModified; } |
| | 109 | | } |
| | 110 | |
|
| | 111 | | bool IReadOnly.IsReadOnly |
| | 112 | | { |
| 0 | 113 | | get { return this.propertyContainer.IsReadOnly; } |
| 1290 | 114 | | 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 | | { |
| 236 | 126 | | Models.PublicIPAddressConfiguration result = new Models.PublicIPAddressConfiguration() |
| 236 | 127 | | { |
| 236 | 128 | | IpAddressIds = this.IpAddressIds, |
| 236 | 129 | | Provision = UtilitiesInternal.MapNullableEnum<Common.IPAddressProvisioningType, Models.IPAddressProvisio |
| 236 | 130 | | }; |
| | 131 | |
|
| 236 | 132 | | return result; |
| | 133 | | } |
| | 134 | |
|
| | 135 | |
|
| | 136 | | #endregion // Internal/private methods |
| | 137 | | } |
| | 138 | | } |