| | 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 | |
|
| 0 | 13 | | namespace Microsoft.Azure.Batch |
| | 14 | | { |
| 0 | 15 | | using Models = Microsoft.Azure.Batch.Protocol.Models; |
| | 16 | | using System; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| 0 | 20 | | /// <summary> |
| | 21 | | /// The file system to mount on each node. |
| 0 | 22 | | /// </summary> |
| | 23 | | public partial class MountConfiguration : ITransportObjectProvider<Models.MountConfiguration>, IPropertyMetadata |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | | /// <summary> |
| 0 | 27 | | /// Initializes a new instance of the <see cref="MountConfiguration"/> class. |
| | 28 | | /// </summary> |
| 0 | 29 | | /// <param name='azureBlobFileSystemConfiguration'>The Azure Storage Container to mount using blob FUSE on each |
| | 30 | | /// <param name='nfsMountConfiguration'>The NFS file system to mount on each node.</param> |
| | 31 | | /// <param name='cifsMountConfiguration'>The CIFS/SMB file system to mount on each node.</param> |
| | 32 | | /// <param name='azureFileShareConfiguration'>The Azure File Share to mount on each node.</param> |
| 834 | 33 | | internal MountConfiguration( |
| 834 | 34 | | AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration = default(AzureBlobFileSystemConfiguration |
| 834 | 35 | | NfsMountConfiguration nfsMountConfiguration = default(NfsMountConfiguration), |
| 834 | 36 | | CifsMountConfiguration cifsMountConfiguration = default(CifsMountConfiguration), |
| 834 | 37 | | AzureFileShareConfiguration azureFileShareConfiguration = default(AzureFileShareConfiguration)) |
| | 38 | | { |
| 834 | 39 | | this.AzureBlobFileSystemConfiguration = azureBlobFileSystemConfiguration; |
| 834 | 40 | | this.NfsMountConfiguration = nfsMountConfiguration; |
| 834 | 41 | | this.CifsMountConfiguration = cifsMountConfiguration; |
| 834 | 42 | | this.AzureFileShareConfiguration = azureFileShareConfiguration; |
| 834 | 43 | | } |
| | 44 | |
|
| 2684 | 45 | | internal MountConfiguration(Models.MountConfiguration protocolObject) |
| | 46 | | { |
| 4056 | 47 | | this.AzureBlobFileSystemConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AzureBlob |
| 4035 | 48 | | this.AzureFileShareConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AzureFileShare |
| 4028 | 49 | | this.CifsMountConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.CifsMountConfigurat |
| 4047 | 50 | | this.NfsMountConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NfsMountConfiguratio |
| 2684 | 51 | | } |
| | 52 | |
|
| | 53 | | #endregion Constructors |
| | 54 | |
|
| | 55 | | #region MountConfiguration |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// Gets the Azure Storage Container to mount using blob FUSE on each node. |
| | 59 | | /// </summary> |
| 4351 | 60 | | public AzureBlobFileSystemConfiguration AzureBlobFileSystemConfiguration { get; } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Gets the Azure File Share to mount on each node. |
| | 64 | | /// </summary> |
| 4351 | 65 | | public AzureFileShareConfiguration AzureFileShareConfiguration { get; } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets the CIFS/SMB file system to mount on each node. |
| | 69 | | /// </summary> |
| 4351 | 70 | | public CifsMountConfiguration CifsMountConfiguration { get; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets the NFS file system to mount on each node. |
| | 74 | | /// </summary> |
| 4351 | 75 | | public NfsMountConfiguration NfsMountConfiguration { get; } |
| | 76 | |
|
| | 77 | | #endregion // MountConfiguration |
| | 78 | |
|
| | 79 | | #region IPropertyMetadata |
| | 80 | |
|
| | 81 | | bool IModifiable.HasBeenModified |
| | 82 | | { |
| | 83 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 84 | | get { return false; } |
| | 85 | | } |
| | 86 | |
|
| | 87 | | bool IReadOnly.IsReadOnly |
| | 88 | | { |
| 0 | 89 | | get { return true; } |
| | 90 | | set |
| | 91 | | { |
| | 92 | | // This class is compile time readonly already |
| 8786 | 93 | | } |
| | 94 | | } |
| | 95 | |
|
| | 96 | | #endregion // IPropertyMetadata |
| | 97 | |
|
| | 98 | | #region Internal/private methods |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// Return a protocol object of the requested type. |
| | 102 | | /// </summary> |
| | 103 | | /// <returns>The protocol object of the requested type.</returns> |
| | 104 | | Models.MountConfiguration ITransportObjectProvider<Models.MountConfiguration>.GetTransportObject() |
| | 105 | | { |
| 833 | 106 | | Models.MountConfiguration result = new Models.MountConfiguration() |
| 833 | 107 | | { |
| 1666 | 108 | | AzureBlobFileSystemConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.AzureBlobFileSystemC |
| 1666 | 109 | | AzureFileShareConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.AzureFileShareConfigurati |
| 1666 | 110 | | CifsMountConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.CifsMountConfiguration, (o) => |
| 1666 | 111 | | NfsMountConfiguration = UtilitiesInternal.CreateObjectWithNullCheck(this.NfsMountConfiguration, (o) => o |
| 833 | 112 | | }; |
| | 113 | |
|
| 833 | 114 | | return result; |
| | 115 | | } |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// Converts a collection of protocol layer objects to object layer collection objects. |
| | 119 | | /// </summary> |
| | 120 | | internal static IList<MountConfiguration> ConvertFromProtocolCollection(IEnumerable<Models.MountConfiguration> p |
| | 121 | | { |
| 0 | 122 | | ConcurrentChangeTrackedModifiableList<MountConfiguration> converted = UtilitiesInternal.CollectionToThreadSa |
| 0 | 123 | | items: protoCollection, |
| 0 | 124 | | objectCreationFunc: o => new MountConfiguration(o)); |
| | 125 | |
|
| 0 | 126 | | return converted; |
| | 127 | | } |
| | 128 | |
|
| | 129 | | /// <summary> |
| | 130 | | /// Converts a collection of protocol layer objects to object layer collection objects, in a frozen state. |
| | 131 | | /// </summary> |
| | 132 | | internal static IList<MountConfiguration> ConvertFromProtocolCollectionAndFreeze(IEnumerable<Models.MountConfigu |
| | 133 | | { |
| 1224 | 134 | | ConcurrentChangeTrackedModifiableList<MountConfiguration> converted = UtilitiesInternal.CollectionToThreadSa |
| 1224 | 135 | | items: protoCollection, |
| 3908 | 136 | | objectCreationFunc: o => new MountConfiguration(o).Freeze()); |
| | 137 | |
|
| 1810 | 138 | | converted = UtilitiesInternal.CreateObjectWithNullCheck(converted, o => o.Freeze()); |
| | 139 | |
|
| 1224 | 140 | | return converted; |
| | 141 | | } |
| | 142 | |
|
| | 143 | | /// <summary> |
| | 144 | | /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked |
| | 145 | | /// and returned as a readonly collection. |
| | 146 | | /// </summary> |
| | 147 | | internal static IReadOnlyList<MountConfiguration> ConvertFromProtocolCollectionReadOnly(IEnumerable<Models.Mount |
| | 148 | | { |
| 0 | 149 | | IReadOnlyList<MountConfiguration> converted = |
| 0 | 150 | | UtilitiesInternal.CreateObjectWithNullCheck( |
| 0 | 151 | | UtilitiesInternal.CollectionToNonThreadSafeCollection( |
| 0 | 152 | | items: protoCollection, |
| 0 | 153 | | objectCreationFunc: o => new MountConfiguration(o).Freeze()), o => o.AsReadOnly()); |
| | 154 | |
|
| 0 | 155 | | return converted; |
| | 156 | | } |
| | 157 | |
|
| | 158 | | #endregion // Internal/private methods |
| | 159 | | } |
| | 160 | | } |