// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateIPConfigurationPropertiesData : VirtualMachineScaleSetUpdateIPConfigurationPropertiesProtocol {
    public var subnet: ApiEntityReferenceProtocol?
    public var primary: Bool?
    public var publicIPAddressConfiguration: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProtocol?
    public var privateIPAddressVersion: IPVersionEnum?
    public var applicationGatewayBackendAddressPools: [SubResourceProtocol?]?
    public var loadBalancerBackendAddressPools: [SubResourceProtocol?]?
    public var loadBalancerInboundNatPools: [SubResourceProtocol?]?

        enum CodingKeys: String, CodingKey {case subnet = "subnet"
        case primary = "primary"
        case publicIPAddressConfiguration = "publicIPAddressConfiguration"
        case privateIPAddressVersion = "privateIPAddressVersion"
        case applicationGatewayBackendAddressPools = "applicationGatewayBackendAddressPools"
        case loadBalancerBackendAddressPools = "loadBalancerBackendAddressPools"
        case loadBalancerInboundNatPools = "loadBalancerInboundNatPools"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.subnet) {
        self.subnet = try container.decode(ApiEntityReferenceData?.self, forKey: .subnet)
    }
    if container.contains(.primary) {
        self.primary = try container.decode(Bool?.self, forKey: .primary)
    }
    if container.contains(.publicIPAddressConfiguration) {
        self.publicIPAddressConfiguration = try container.decode(VirtualMachineScaleSetUpdatePublicIPAddressConfigurationData?.self, forKey: .publicIPAddressConfiguration)
    }
    if container.contains(.privateIPAddressVersion) {
        self.privateIPAddressVersion = try container.decode(IPVersionEnum?.self, forKey: .privateIPAddressVersion)
    }
    if container.contains(.applicationGatewayBackendAddressPools) {
        self.applicationGatewayBackendAddressPools = try container.decode([SubResourceData?]?.self, forKey: .applicationGatewayBackendAddressPools)
    }
    if container.contains(.loadBalancerBackendAddressPools) {
        self.loadBalancerBackendAddressPools = try container.decode([SubResourceData?]?.self, forKey: .loadBalancerBackendAddressPools)
    }
    if container.contains(.loadBalancerInboundNatPools) {
        self.loadBalancerInboundNatPools = try container.decode([SubResourceData?]?.self, forKey: .loadBalancerInboundNatPools)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.subnet != nil {try container.encode(self.subnet as! ApiEntityReferenceData?, forKey: .subnet)}
    if self.primary != nil {try container.encode(self.primary, forKey: .primary)}
    if self.publicIPAddressConfiguration != nil {try container.encode(self.publicIPAddressConfiguration as! VirtualMachineScaleSetUpdatePublicIPAddressConfigurationData?, forKey: .publicIPAddressConfiguration)}
    if self.privateIPAddressVersion != nil {try container.encode(self.privateIPAddressVersion, forKey: .privateIPAddressVersion)}
    if self.applicationGatewayBackendAddressPools != nil {try container.encode(self.applicationGatewayBackendAddressPools as! [SubResourceData?]?, forKey: .applicationGatewayBackendAddressPools)}
    if self.loadBalancerBackendAddressPools != nil {try container.encode(self.loadBalancerBackendAddressPools as! [SubResourceData?]?, forKey: .loadBalancerBackendAddressPools)}
    if self.loadBalancerInboundNatPools != nil {try container.encode(self.loadBalancerInboundNatPools as! [SubResourceData?]?, forKey: .loadBalancerInboundNatPools)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateIPConfigurationPropertiesProtocol() -> VirtualMachineScaleSetUpdateIPConfigurationPropertiesProtocol {
    return VirtualMachineScaleSetUpdateIPConfigurationPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateNetworkConfigurationData : VirtualMachineScaleSetUpdateNetworkConfigurationProtocol, SubResourceProtocol {
    public var id: String?
    public var name: String?
    public var properties: VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.properties != nil {try container.encode(self.properties as! VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateNetworkConfigurationProtocol() -> VirtualMachineScaleSetUpdateNetworkConfigurationProtocol {
    return VirtualMachineScaleSetUpdateNetworkConfigurationData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesData : VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesProtocol {
    public var primary: Bool?
    public var enableAcceleratedNetworking: Bool?
    public var networkSecurityGroup: SubResourceProtocol?
    public var dnsSettings: VirtualMachineScaleSetNetworkConfigurationDnsSettingsProtocol?
    public var ipConfigurations: [VirtualMachineScaleSetUpdateIPConfigurationProtocol?]?
    public var enableIPForwarding: Bool?

        enum CodingKeys: String, CodingKey {case primary = "primary"
        case enableAcceleratedNetworking = "enableAcceleratedNetworking"
        case networkSecurityGroup = "networkSecurityGroup"
        case dnsSettings = "dnsSettings"
        case ipConfigurations = "ipConfigurations"
        case enableIPForwarding = "enableIPForwarding"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.primary) {
        self.primary = try container.decode(Bool?.self, forKey: .primary)
    }
    if container.contains(.enableAcceleratedNetworking) {
        self.enableAcceleratedNetworking = try container.decode(Bool?.self, forKey: .enableAcceleratedNetworking)
    }
    if container.contains(.networkSecurityGroup) {
        self.networkSecurityGroup = try container.decode(SubResourceData?.self, forKey: .networkSecurityGroup)
    }
    if container.contains(.dnsSettings) {
        self.dnsSettings = try container.decode(VirtualMachineScaleSetNetworkConfigurationDnsSettingsData?.self, forKey: .dnsSettings)
    }
    if container.contains(.ipConfigurations) {
        self.ipConfigurations = try container.decode([VirtualMachineScaleSetUpdateIPConfigurationData?]?.self, forKey: .ipConfigurations)
    }
    if container.contains(.enableIPForwarding) {
        self.enableIPForwarding = try container.decode(Bool?.self, forKey: .enableIPForwarding)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.primary != nil {try container.encode(self.primary, forKey: .primary)}
    if self.enableAcceleratedNetworking != nil {try container.encode(self.enableAcceleratedNetworking, forKey: .enableAcceleratedNetworking)}
    if self.networkSecurityGroup != nil {try container.encode(self.networkSecurityGroup as! SubResourceData?, forKey: .networkSecurityGroup)}
    if self.dnsSettings != nil {try container.encode(self.dnsSettings as! VirtualMachineScaleSetNetworkConfigurationDnsSettingsData?, forKey: .dnsSettings)}
    if self.ipConfigurations != nil {try container.encode(self.ipConfigurations as! [VirtualMachineScaleSetUpdateIPConfigurationData?]?, forKey: .ipConfigurations)}
    if self.enableIPForwarding != nil {try container.encode(self.enableIPForwarding, forKey: .enableIPForwarding)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateNetworkConfigurationPropertiesProtocol() -> VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesProtocol {
    return VirtualMachineScaleSetUpdateNetworkConfigurationPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateNetworkProfileData : VirtualMachineScaleSetUpdateNetworkProfileProtocol {
    public var networkInterfaceConfigurations: [VirtualMachineScaleSetUpdateNetworkConfigurationProtocol?]?

        enum CodingKeys: String, CodingKey {case networkInterfaceConfigurations = "networkInterfaceConfigurations"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.networkInterfaceConfigurations) {
        self.networkInterfaceConfigurations = try container.decode([VirtualMachineScaleSetUpdateNetworkConfigurationData?]?.self, forKey: .networkInterfaceConfigurations)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.networkInterfaceConfigurations != nil {try container.encode(self.networkInterfaceConfigurations as! [VirtualMachineScaleSetUpdateNetworkConfigurationData?]?, forKey: .networkInterfaceConfigurations)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateNetworkProfileProtocol() -> VirtualMachineScaleSetUpdateNetworkProfileProtocol {
    return VirtualMachineScaleSetUpdateNetworkProfileData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateOSDiskData : VirtualMachineScaleSetUpdateOSDiskProtocol {
    public var caching: CachingTypesEnum?
    public var writeAcceleratorEnabled: Bool?
    public var image: VirtualHardDiskProtocol?
    public var vhdContainers: [String]?
    public var managedDisk: VirtualMachineScaleSetManagedDiskParametersProtocol?

        enum CodingKeys: String, CodingKey {case caching = "caching"
        case writeAcceleratorEnabled = "writeAcceleratorEnabled"
        case image = "image"
        case vhdContainers = "vhdContainers"
        case managedDisk = "managedDisk"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.caching) {
        self.caching = try container.decode(CachingTypesEnum?.self, forKey: .caching)
    }
    if container.contains(.writeAcceleratorEnabled) {
        self.writeAcceleratorEnabled = try container.decode(Bool?.self, forKey: .writeAcceleratorEnabled)
    }
    if container.contains(.image) {
        self.image = try container.decode(VirtualHardDiskData?.self, forKey: .image)
    }
    if container.contains(.vhdContainers) {
        self.vhdContainers = try container.decode([String]?.self, forKey: .vhdContainers)
    }
    if container.contains(.managedDisk) {
        self.managedDisk = try container.decode(VirtualMachineScaleSetManagedDiskParametersData?.self, forKey: .managedDisk)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.caching != nil {try container.encode(self.caching, forKey: .caching)}
    if self.writeAcceleratorEnabled != nil {try container.encode(self.writeAcceleratorEnabled, forKey: .writeAcceleratorEnabled)}
    if self.image != nil {try container.encode(self.image as! VirtualHardDiskData?, forKey: .image)}
    if self.vhdContainers != nil {try container.encode(self.vhdContainers as! [String]?, forKey: .vhdContainers)}
    if self.managedDisk != nil {try container.encode(self.managedDisk as! VirtualMachineScaleSetManagedDiskParametersData?, forKey: .managedDisk)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateOSDiskProtocol() -> VirtualMachineScaleSetUpdateOSDiskProtocol {
    return VirtualMachineScaleSetUpdateOSDiskData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateOSProfileData : VirtualMachineScaleSetUpdateOSProfileProtocol {
    public var customData: String?
    public var windowsConfiguration: WindowsConfigurationProtocol?
    public var linuxConfiguration: LinuxConfigurationProtocol?
    public var secrets: [VaultSecretGroupProtocol?]?

        enum CodingKeys: String, CodingKey {case customData = "customData"
        case windowsConfiguration = "windowsConfiguration"
        case linuxConfiguration = "linuxConfiguration"
        case secrets = "secrets"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.customData) {
        self.customData = try container.decode(String?.self, forKey: .customData)
    }
    if container.contains(.windowsConfiguration) {
        self.windowsConfiguration = try container.decode(WindowsConfigurationData?.self, forKey: .windowsConfiguration)
    }
    if container.contains(.linuxConfiguration) {
        self.linuxConfiguration = try container.decode(LinuxConfigurationData?.self, forKey: .linuxConfiguration)
    }
    if container.contains(.secrets) {
        self.secrets = try container.decode([VaultSecretGroupData?]?.self, forKey: .secrets)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.customData != nil {try container.encode(self.customData, forKey: .customData)}
    if self.windowsConfiguration != nil {try container.encode(self.windowsConfiguration as! WindowsConfigurationData?, forKey: .windowsConfiguration)}
    if self.linuxConfiguration != nil {try container.encode(self.linuxConfiguration as! LinuxConfigurationData?, forKey: .linuxConfiguration)}
    if self.secrets != nil {try container.encode(self.secrets as! [VaultSecretGroupData?]?, forKey: .secrets)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateOSProfileProtocol() -> VirtualMachineScaleSetUpdateOSProfileProtocol {
    return VirtualMachineScaleSetUpdateOSProfileData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdatePropertiesData : VirtualMachineScaleSetUpdatePropertiesProtocol {
    public var upgradePolicy: UpgradePolicyProtocol?
    public var virtualMachineProfile: VirtualMachineScaleSetUpdateVMProfileProtocol?
    public var overprovision: Bool?
    public var singlePlacementGroup: Bool?

        enum CodingKeys: String, CodingKey {case upgradePolicy = "upgradePolicy"
        case virtualMachineProfile = "virtualMachineProfile"
        case overprovision = "overprovision"
        case singlePlacementGroup = "singlePlacementGroup"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.upgradePolicy) {
        self.upgradePolicy = try container.decode(UpgradePolicyData?.self, forKey: .upgradePolicy)
    }
    if container.contains(.virtualMachineProfile) {
        self.virtualMachineProfile = try container.decode(VirtualMachineScaleSetUpdateVMProfileData?.self, forKey: .virtualMachineProfile)
    }
    if container.contains(.overprovision) {
        self.overprovision = try container.decode(Bool?.self, forKey: .overprovision)
    }
    if container.contains(.singlePlacementGroup) {
        self.singlePlacementGroup = try container.decode(Bool?.self, forKey: .singlePlacementGroup)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.upgradePolicy != nil {try container.encode(self.upgradePolicy as! UpgradePolicyData?, forKey: .upgradePolicy)}
    if self.virtualMachineProfile != nil {try container.encode(self.virtualMachineProfile as! VirtualMachineScaleSetUpdateVMProfileData?, forKey: .virtualMachineProfile)}
    if self.overprovision != nil {try container.encode(self.overprovision, forKey: .overprovision)}
    if self.singlePlacementGroup != nil {try container.encode(self.singlePlacementGroup, forKey: .singlePlacementGroup)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdatePropertiesProtocol() -> VirtualMachineScaleSetUpdatePropertiesProtocol {
    return VirtualMachineScaleSetUpdatePropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdatePublicIPAddressConfigurationData : VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProtocol {
    public var name: String?
    public var properties: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case name = "name"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.properties != nil {try container.encode(self.properties as! VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdatePublicIPAddressConfigurationProtocol() -> VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProtocol {
    return VirtualMachineScaleSetUpdatePublicIPAddressConfigurationData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesData : VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesProtocol {
    public var idleTimeoutInMinutes: Int32?
    public var dnsSettings: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsProtocol?

        enum CodingKeys: String, CodingKey {case idleTimeoutInMinutes = "idleTimeoutInMinutes"
        case dnsSettings = "dnsSettings"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.idleTimeoutInMinutes) {
        self.idleTimeoutInMinutes = try container.decode(Int32?.self, forKey: .idleTimeoutInMinutes)
    }
    if container.contains(.dnsSettings) {
        self.dnsSettings = try container.decode(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsData?.self, forKey: .dnsSettings)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.idleTimeoutInMinutes != nil {try container.encode(self.idleTimeoutInMinutes, forKey: .idleTimeoutInMinutes)}
    if self.dnsSettings != nil {try container.encode(self.dnsSettings as! VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsData?, forKey: .dnsSettings)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesProtocol() -> VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesProtocol {
    return VirtualMachineScaleSetUpdatePublicIPAddressConfigurationPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateStorageProfileData : VirtualMachineScaleSetUpdateStorageProfileProtocol {
    public var imageReference: ImageReferenceProtocol?
    public var osDisk: VirtualMachineScaleSetUpdateOSDiskProtocol?
    public var dataDisks: [VirtualMachineScaleSetDataDiskProtocol?]?

        enum CodingKeys: String, CodingKey {case imageReference = "imageReference"
        case osDisk = "osDisk"
        case dataDisks = "dataDisks"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.imageReference) {
        self.imageReference = try container.decode(ImageReferenceData?.self, forKey: .imageReference)
    }
    if container.contains(.osDisk) {
        self.osDisk = try container.decode(VirtualMachineScaleSetUpdateOSDiskData?.self, forKey: .osDisk)
    }
    if container.contains(.dataDisks) {
        self.dataDisks = try container.decode([VirtualMachineScaleSetDataDiskData?]?.self, forKey: .dataDisks)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.imageReference != nil {try container.encode(self.imageReference as! ImageReferenceData?, forKey: .imageReference)}
    if self.osDisk != nil {try container.encode(self.osDisk as! VirtualMachineScaleSetUpdateOSDiskData?, forKey: .osDisk)}
    if self.dataDisks != nil {try container.encode(self.dataDisks as! [VirtualMachineScaleSetDataDiskData?]?, forKey: .dataDisks)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateStorageProfileProtocol() -> VirtualMachineScaleSetUpdateStorageProfileProtocol {
    return VirtualMachineScaleSetUpdateStorageProfileData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetUpdateVMProfileData : VirtualMachineScaleSetUpdateVMProfileProtocol {
    public var osProfile: VirtualMachineScaleSetUpdateOSProfileProtocol?
    public var storageProfile: VirtualMachineScaleSetUpdateStorageProfileProtocol?
    public var networkProfile: VirtualMachineScaleSetUpdateNetworkProfileProtocol?
    public var diagnosticsProfile: DiagnosticsProfileProtocol?
    public var extensionProfile: VirtualMachineScaleSetExtensionProfileProtocol?
    public var licenseType: String?

        enum CodingKeys: String, CodingKey {case osProfile = "osProfile"
        case storageProfile = "storageProfile"
        case networkProfile = "networkProfile"
        case diagnosticsProfile = "diagnosticsProfile"
        case extensionProfile = "extensionProfile"
        case licenseType = "licenseType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.osProfile) {
        self.osProfile = try container.decode(VirtualMachineScaleSetUpdateOSProfileData?.self, forKey: .osProfile)
    }
    if container.contains(.storageProfile) {
        self.storageProfile = try container.decode(VirtualMachineScaleSetUpdateStorageProfileData?.self, forKey: .storageProfile)
    }
    if container.contains(.networkProfile) {
        self.networkProfile = try container.decode(VirtualMachineScaleSetUpdateNetworkProfileData?.self, forKey: .networkProfile)
    }
    if container.contains(.diagnosticsProfile) {
        self.diagnosticsProfile = try container.decode(DiagnosticsProfileData?.self, forKey: .diagnosticsProfile)
    }
    if container.contains(.extensionProfile) {
        self.extensionProfile = try container.decode(VirtualMachineScaleSetExtensionProfileData?.self, forKey: .extensionProfile)
    }
    if container.contains(.licenseType) {
        self.licenseType = try container.decode(String?.self, forKey: .licenseType)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.osProfile != nil {try container.encode(self.osProfile as! VirtualMachineScaleSetUpdateOSProfileData?, forKey: .osProfile)}
    if self.storageProfile != nil {try container.encode(self.storageProfile as! VirtualMachineScaleSetUpdateStorageProfileData?, forKey: .storageProfile)}
    if self.networkProfile != nil {try container.encode(self.networkProfile as! VirtualMachineScaleSetUpdateNetworkProfileData?, forKey: .networkProfile)}
    if self.diagnosticsProfile != nil {try container.encode(self.diagnosticsProfile as! DiagnosticsProfileData?, forKey: .diagnosticsProfile)}
    if self.extensionProfile != nil {try container.encode(self.extensionProfile as! VirtualMachineScaleSetExtensionProfileData?, forKey: .extensionProfile)}
    if self.licenseType != nil {try container.encode(self.licenseType, forKey: .licenseType)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateVMProfileProtocol() -> VirtualMachineScaleSetUpdateVMProfileProtocol {
    return VirtualMachineScaleSetUpdateVMProfileData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMData : VirtualMachineScaleSetVMProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String
    public var tags: [String:String]?
    public var instanceId: String?
    public var sku: SkuProtocol?
    public var properties: VirtualMachineScaleSetVMPropertiesProtocol?
    public var plan: PlanProtocol?
    public var resources: [VirtualMachineExtensionProtocol?]?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        case instanceId = "instanceId"
        case sku = "sku"
        case properties = "properties"
        case plan = "plan"
        case resources = "resources"
        }

  public init(location: String)  {
    self.location = location
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    self.location = try container.decode(String.self, forKey: .location)
    if container.contains(.tags) {
        self.tags = try container.decode([String:String]?.self, forKey: .tags)
    }
    if container.contains(.instanceId) {
        self.instanceId = try container.decode(String?.self, forKey: .instanceId)
    }
    if container.contains(.sku) {
        self.sku = try container.decode(SkuData?.self, forKey: .sku)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(VirtualMachineScaleSetVMPropertiesData?.self, forKey: .properties)
    }
    if container.contains(.plan) {
        self.plan = try container.decode(PlanData?.self, forKey: .plan)
    }
    if container.contains(.resources) {
        self.resources = try container.decode([VirtualMachineExtensionData?]?.self, forKey: .resources)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    try container.encode(self.location, forKey: .location)
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.instanceId != nil {try container.encode(self.instanceId, forKey: .instanceId)}
    if self.sku != nil {try container.encode(self.sku as! SkuData?, forKey: .sku)}
    if self.properties != nil {try container.encode(self.properties as! VirtualMachineScaleSetVMPropertiesData?, forKey: .properties)}
    if self.plan != nil {try container.encode(self.plan as! PlanData?, forKey: .plan)}
    if self.resources != nil {try container.encode(self.resources as! [VirtualMachineExtensionData?]?, forKey: .resources)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMProtocol(location: String) -> VirtualMachineScaleSetVMProtocol {
    return VirtualMachineScaleSetVMData(location: location)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMExtensionsSummaryData : VirtualMachineScaleSetVMExtensionsSummaryProtocol {
    public var name: String?
    public var statusesSummary: [VirtualMachineStatusCodeCountProtocol?]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case statusesSummary = "statusesSummary"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.statusesSummary) {
        self.statusesSummary = try container.decode([VirtualMachineStatusCodeCountData?]?.self, forKey: .statusesSummary)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.statusesSummary != nil {try container.encode(self.statusesSummary as! [VirtualMachineStatusCodeCountData?]?, forKey: .statusesSummary)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMExtensionsSummaryProtocol() -> VirtualMachineScaleSetVMExtensionsSummaryProtocol {
    return VirtualMachineScaleSetVMExtensionsSummaryData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMInstanceIDsData : VirtualMachineScaleSetVMInstanceIDsProtocol {
    public var instanceIds: [String]?

        enum CodingKeys: String, CodingKey {case instanceIds = "instanceIds"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.instanceIds) {
        self.instanceIds = try container.decode([String]?.self, forKey: .instanceIds)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.instanceIds != nil {try container.encode(self.instanceIds as! [String]?, forKey: .instanceIds)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMInstanceIDsProtocol() -> VirtualMachineScaleSetVMInstanceIDsProtocol {
    return VirtualMachineScaleSetVMInstanceIDsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMInstanceRequiredIDsData : VirtualMachineScaleSetVMInstanceRequiredIDsProtocol {
    public var instanceIds: [String]

        enum CodingKeys: String, CodingKey {case instanceIds = "instanceIds"
        }

  public init(instanceIds: [String])  {
    self.instanceIds = instanceIds
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.instanceIds = try container.decode([String].self, forKey: .instanceIds)
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.instanceIds as! [String], forKey: .instanceIds)
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMInstanceRequiredIDsProtocol(instanceIds: [String]) -> VirtualMachineScaleSetVMInstanceRequiredIDsProtocol {
    return VirtualMachineScaleSetVMInstanceRequiredIDsData(instanceIds: instanceIds)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMInstanceViewData : VirtualMachineScaleSetVMInstanceViewProtocol {
    public var platformUpdateDomain: Int32?
    public var platformFaultDomain: Int32?
    public var rdpThumbPrint: String?
    public var vmAgent: VirtualMachineAgentInstanceViewProtocol?
    public var disks: [DiskInstanceViewProtocol?]?
    public var extensions: [VirtualMachineExtensionInstanceViewProtocol?]?
    public var vmHealth: VirtualMachineHealthStatusProtocol?
    public var bootDiagnostics: BootDiagnosticsInstanceViewProtocol?
    public var statuses: [InstanceViewStatusProtocol?]?
    public var placementGroupId: String?

        enum CodingKeys: String, CodingKey {case platformUpdateDomain = "platformUpdateDomain"
        case platformFaultDomain = "platformFaultDomain"
        case rdpThumbPrint = "rdpThumbPrint"
        case vmAgent = "vmAgent"
        case disks = "disks"
        case extensions = "extensions"
        case vmHealth = "vmHealth"
        case bootDiagnostics = "bootDiagnostics"
        case statuses = "statuses"
        case placementGroupId = "placementGroupId"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.platformUpdateDomain) {
        self.platformUpdateDomain = try container.decode(Int32?.self, forKey: .platformUpdateDomain)
    }
    if container.contains(.platformFaultDomain) {
        self.platformFaultDomain = try container.decode(Int32?.self, forKey: .platformFaultDomain)
    }
    if container.contains(.rdpThumbPrint) {
        self.rdpThumbPrint = try container.decode(String?.self, forKey: .rdpThumbPrint)
    }
    if container.contains(.vmAgent) {
        self.vmAgent = try container.decode(VirtualMachineAgentInstanceViewData?.self, forKey: .vmAgent)
    }
    if container.contains(.disks) {
        self.disks = try container.decode([DiskInstanceViewData?]?.self, forKey: .disks)
    }
    if container.contains(.extensions) {
        self.extensions = try container.decode([VirtualMachineExtensionInstanceViewData?]?.self, forKey: .extensions)
    }
    if container.contains(.vmHealth) {
        self.vmHealth = try container.decode(VirtualMachineHealthStatusData?.self, forKey: .vmHealth)
    }
    if container.contains(.bootDiagnostics) {
        self.bootDiagnostics = try container.decode(BootDiagnosticsInstanceViewData?.self, forKey: .bootDiagnostics)
    }
    if container.contains(.statuses) {
        self.statuses = try container.decode([InstanceViewStatusData?]?.self, forKey: .statuses)
    }
    if container.contains(.placementGroupId) {
        self.placementGroupId = try container.decode(String?.self, forKey: .placementGroupId)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.platformUpdateDomain != nil {try container.encode(self.platformUpdateDomain, forKey: .platformUpdateDomain)}
    if self.platformFaultDomain != nil {try container.encode(self.platformFaultDomain, forKey: .platformFaultDomain)}
    if self.rdpThumbPrint != nil {try container.encode(self.rdpThumbPrint, forKey: .rdpThumbPrint)}
    if self.vmAgent != nil {try container.encode(self.vmAgent as! VirtualMachineAgentInstanceViewData?, forKey: .vmAgent)}
    if self.disks != nil {try container.encode(self.disks as! [DiskInstanceViewData?]?, forKey: .disks)}
    if self.extensions != nil {try container.encode(self.extensions as! [VirtualMachineExtensionInstanceViewData?]?, forKey: .extensions)}
    if self.vmHealth != nil {try container.encode(self.vmHealth as! VirtualMachineHealthStatusData?, forKey: .vmHealth)}
    if self.bootDiagnostics != nil {try container.encode(self.bootDiagnostics as! BootDiagnosticsInstanceViewData?, forKey: .bootDiagnostics)}
    if self.statuses != nil {try container.encode(self.statuses as! [InstanceViewStatusData?]?, forKey: .statuses)}
    if self.placementGroupId != nil {try container.encode(self.placementGroupId, forKey: .placementGroupId)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMInstanceViewProtocol() -> VirtualMachineScaleSetVMInstanceViewProtocol {
    return VirtualMachineScaleSetVMInstanceViewData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMListResultData : VirtualMachineScaleSetVMListResultProtocol {
    public var value: [VirtualMachineScaleSetVMProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [VirtualMachineScaleSetVMProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([VirtualMachineScaleSetVMData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [VirtualMachineScaleSetVMData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMListResultProtocol(value: [VirtualMachineScaleSetVMProtocol]) -> VirtualMachineScaleSetVMListResultProtocol {
    return VirtualMachineScaleSetVMListResultData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMProfileData : VirtualMachineScaleSetVMProfileProtocol {
    public var osProfile: VirtualMachineScaleSetOSProfileProtocol?
    public var storageProfile: VirtualMachineScaleSetStorageProfileProtocol?
    public var networkProfile: VirtualMachineScaleSetNetworkProfileProtocol?
    public var diagnosticsProfile: DiagnosticsProfileProtocol?
    public var extensionProfile: VirtualMachineScaleSetExtensionProfileProtocol?
    public var licenseType: String?
    public var priority: VirtualMachinePriorityTypesEnum?

        enum CodingKeys: String, CodingKey {case osProfile = "osProfile"
        case storageProfile = "storageProfile"
        case networkProfile = "networkProfile"
        case diagnosticsProfile = "diagnosticsProfile"
        case extensionProfile = "extensionProfile"
        case licenseType = "licenseType"
        case priority = "priority"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.osProfile) {
        self.osProfile = try container.decode(VirtualMachineScaleSetOSProfileData?.self, forKey: .osProfile)
    }
    if container.contains(.storageProfile) {
        self.storageProfile = try container.decode(VirtualMachineScaleSetStorageProfileData?.self, forKey: .storageProfile)
    }
    if container.contains(.networkProfile) {
        self.networkProfile = try container.decode(VirtualMachineScaleSetNetworkProfileData?.self, forKey: .networkProfile)
    }
    if container.contains(.diagnosticsProfile) {
        self.diagnosticsProfile = try container.decode(DiagnosticsProfileData?.self, forKey: .diagnosticsProfile)
    }
    if container.contains(.extensionProfile) {
        self.extensionProfile = try container.decode(VirtualMachineScaleSetExtensionProfileData?.self, forKey: .extensionProfile)
    }
    if container.contains(.licenseType) {
        self.licenseType = try container.decode(String?.self, forKey: .licenseType)
    }
    if container.contains(.priority) {
        self.priority = try container.decode(VirtualMachinePriorityTypesEnum?.self, forKey: .priority)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.osProfile != nil {try container.encode(self.osProfile as! VirtualMachineScaleSetOSProfileData?, forKey: .osProfile)}
    if self.storageProfile != nil {try container.encode(self.storageProfile as! VirtualMachineScaleSetStorageProfileData?, forKey: .storageProfile)}
    if self.networkProfile != nil {try container.encode(self.networkProfile as! VirtualMachineScaleSetNetworkProfileData?, forKey: .networkProfile)}
    if self.diagnosticsProfile != nil {try container.encode(self.diagnosticsProfile as! DiagnosticsProfileData?, forKey: .diagnosticsProfile)}
    if self.extensionProfile != nil {try container.encode(self.extensionProfile as! VirtualMachineScaleSetExtensionProfileData?, forKey: .extensionProfile)}
    if self.licenseType != nil {try container.encode(self.licenseType, forKey: .licenseType)}
    if self.priority != nil {try container.encode(self.priority, forKey: .priority)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMProfileProtocol() -> VirtualMachineScaleSetVMProfileProtocol {
    return VirtualMachineScaleSetVMProfileData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineScaleSetVMPropertiesData : VirtualMachineScaleSetVMPropertiesProtocol {
    public var latestModelApplied: Bool?
    public var vmId: String?
    public var instanceView: VirtualMachineInstanceViewProtocol?
    public var hardwareProfile: HardwareProfileProtocol?
    public var storageProfile: StorageProfileProtocol?
    public var osProfile: OSProfileProtocol?
    public var networkProfile: NetworkProfileProtocol?
    public var diagnosticsProfile: DiagnosticsProfileProtocol?
    public var availabilitySet: SubResourceProtocol?
    public var provisioningState: String?
    public var licenseType: String?

        enum CodingKeys: String, CodingKey {case latestModelApplied = "latestModelApplied"
        case vmId = "vmId"
        case instanceView = "instanceView"
        case hardwareProfile = "hardwareProfile"
        case storageProfile = "storageProfile"
        case osProfile = "osProfile"
        case networkProfile = "networkProfile"
        case diagnosticsProfile = "diagnosticsProfile"
        case availabilitySet = "availabilitySet"
        case provisioningState = "provisioningState"
        case licenseType = "licenseType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.latestModelApplied) {
        self.latestModelApplied = try container.decode(Bool?.self, forKey: .latestModelApplied)
    }
    if container.contains(.vmId) {
        self.vmId = try container.decode(String?.self, forKey: .vmId)
    }
    if container.contains(.instanceView) {
        self.instanceView = try container.decode(VirtualMachineInstanceViewData?.self, forKey: .instanceView)
    }
    if container.contains(.hardwareProfile) {
        self.hardwareProfile = try container.decode(HardwareProfileData?.self, forKey: .hardwareProfile)
    }
    if container.contains(.storageProfile) {
        self.storageProfile = try container.decode(StorageProfileData?.self, forKey: .storageProfile)
    }
    if container.contains(.osProfile) {
        self.osProfile = try container.decode(OSProfileData?.self, forKey: .osProfile)
    }
    if container.contains(.networkProfile) {
        self.networkProfile = try container.decode(NetworkProfileData?.self, forKey: .networkProfile)
    }
    if container.contains(.diagnosticsProfile) {
        self.diagnosticsProfile = try container.decode(DiagnosticsProfileData?.self, forKey: .diagnosticsProfile)
    }
    if container.contains(.availabilitySet) {
        self.availabilitySet = try container.decode(SubResourceData?.self, forKey: .availabilitySet)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.licenseType) {
        self.licenseType = try container.decode(String?.self, forKey: .licenseType)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.latestModelApplied != nil {try container.encode(self.latestModelApplied, forKey: .latestModelApplied)}
    if self.vmId != nil {try container.encode(self.vmId, forKey: .vmId)}
    if self.instanceView != nil {try container.encode(self.instanceView as! VirtualMachineInstanceViewData?, forKey: .instanceView)}
    if self.hardwareProfile != nil {try container.encode(self.hardwareProfile as! HardwareProfileData?, forKey: .hardwareProfile)}
    if self.storageProfile != nil {try container.encode(self.storageProfile as! StorageProfileData?, forKey: .storageProfile)}
    if self.osProfile != nil {try container.encode(self.osProfile as! OSProfileData?, forKey: .osProfile)}
    if self.networkProfile != nil {try container.encode(self.networkProfile as! NetworkProfileData?, forKey: .networkProfile)}
    if self.diagnosticsProfile != nil {try container.encode(self.diagnosticsProfile as! DiagnosticsProfileData?, forKey: .diagnosticsProfile)}
    if self.availabilitySet != nil {try container.encode(self.availabilitySet as! SubResourceData?, forKey: .availabilitySet)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.licenseType != nil {try container.encode(self.licenseType, forKey: .licenseType)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetVMPropertiesProtocol() -> VirtualMachineScaleSetVMPropertiesProtocol {
    return VirtualMachineScaleSetVMPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineSizeData : VirtualMachineSizeProtocol {
    public var name: String?
    public var numberOfCores: Int32?
    public var osDiskSizeInMB: Int32?
    public var resourceDiskSizeInMB: Int32?
    public var memoryInMB: Int32?
    public var maxDataDiskCount: Int32?

        enum CodingKeys: String, CodingKey {case name = "name"
        case numberOfCores = "numberOfCores"
        case osDiskSizeInMB = "osDiskSizeInMB"
        case resourceDiskSizeInMB = "resourceDiskSizeInMB"
        case memoryInMB = "memoryInMB"
        case maxDataDiskCount = "maxDataDiskCount"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.numberOfCores) {
        self.numberOfCores = try container.decode(Int32?.self, forKey: .numberOfCores)
    }
    if container.contains(.osDiskSizeInMB) {
        self.osDiskSizeInMB = try container.decode(Int32?.self, forKey: .osDiskSizeInMB)
    }
    if container.contains(.resourceDiskSizeInMB) {
        self.resourceDiskSizeInMB = try container.decode(Int32?.self, forKey: .resourceDiskSizeInMB)
    }
    if container.contains(.memoryInMB) {
        self.memoryInMB = try container.decode(Int32?.self, forKey: .memoryInMB)
    }
    if container.contains(.maxDataDiskCount) {
        self.maxDataDiskCount = try container.decode(Int32?.self, forKey: .maxDataDiskCount)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.numberOfCores != nil {try container.encode(self.numberOfCores, forKey: .numberOfCores)}
    if self.osDiskSizeInMB != nil {try container.encode(self.osDiskSizeInMB, forKey: .osDiskSizeInMB)}
    if self.resourceDiskSizeInMB != nil {try container.encode(self.resourceDiskSizeInMB, forKey: .resourceDiskSizeInMB)}
    if self.memoryInMB != nil {try container.encode(self.memoryInMB, forKey: .memoryInMB)}
    if self.maxDataDiskCount != nil {try container.encode(self.maxDataDiskCount, forKey: .maxDataDiskCount)}
  }
}

extension DataFactory {
  public static func createVirtualMachineSizeProtocol() -> VirtualMachineSizeProtocol {
    return VirtualMachineSizeData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineSizeListResultData : VirtualMachineSizeListResultProtocol {
    public var value: [VirtualMachineSizeProtocol?]?

        enum CodingKeys: String, CodingKey {case value = "value"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.value) {
        self.value = try container.decode([VirtualMachineSizeData?]?.self, forKey: .value)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.value != nil {try container.encode(self.value as! [VirtualMachineSizeData?]?, forKey: .value)}
  }
}

extension DataFactory {
  public static func createVirtualMachineSizeListResultProtocol() -> VirtualMachineSizeListResultProtocol {
    return VirtualMachineSizeListResultData()
  }
}


// VirtualMachineSizeTypes enumerates the values for virtual machine size types.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum VirtualMachineSizeTypesEnum: String, Codable
{
// VirtualMachineSizeTypesBasicA0 specifies the virtual machine size types basic a0 state for virtual machine size
// types.
    case VirtualMachineSizeTypesBasicA0 = "Basic_A0"
// VirtualMachineSizeTypesBasicA1 specifies the virtual machine size types basic a1 state for virtual machine size
// types.
    case VirtualMachineSizeTypesBasicA1 = "Basic_A1"
// VirtualMachineSizeTypesBasicA2 specifies the virtual machine size types basic a2 state for virtual machine size
// types.
    case VirtualMachineSizeTypesBasicA2 = "Basic_A2"
// VirtualMachineSizeTypesBasicA3 specifies the virtual machine size types basic a3 state for virtual machine size
// types.
    case VirtualMachineSizeTypesBasicA3 = "Basic_A3"
// VirtualMachineSizeTypesBasicA4 specifies the virtual machine size types basic a4 state for virtual machine size
// types.
    case VirtualMachineSizeTypesBasicA4 = "Basic_A4"
// VirtualMachineSizeTypesStandardA0 specifies the virtual machine size types standard a0 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA0 = "Standard_A0"
// VirtualMachineSizeTypesStandardA1 specifies the virtual machine size types standard a1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA1 = "Standard_A1"
// VirtualMachineSizeTypesStandardA10 specifies the virtual machine size types standard a10 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA10 = "Standard_A10"
// VirtualMachineSizeTypesStandardA11 specifies the virtual machine size types standard a11 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA11 = "Standard_A11"
// VirtualMachineSizeTypesStandardA1V2 specifies the virtual machine size types standard a1v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA1V2 = "Standard_A1_v2"
// VirtualMachineSizeTypesStandardA2 specifies the virtual machine size types standard a2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA2 = "Standard_A2"
// VirtualMachineSizeTypesStandardA2mV2 specifies the virtual machine size types standard a2mv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardA2mV2 = "Standard_A2m_v2"
// VirtualMachineSizeTypesStandardA2V2 specifies the virtual machine size types standard a2v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA2V2 = "Standard_A2_v2"
// VirtualMachineSizeTypesStandardA3 specifies the virtual machine size types standard a3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA3 = "Standard_A3"
// VirtualMachineSizeTypesStandardA4 specifies the virtual machine size types standard a4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA4 = "Standard_A4"
// VirtualMachineSizeTypesStandardA4mV2 specifies the virtual machine size types standard a4mv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardA4mV2 = "Standard_A4m_v2"
// VirtualMachineSizeTypesStandardA4V2 specifies the virtual machine size types standard a4v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA4V2 = "Standard_A4_v2"
// VirtualMachineSizeTypesStandardA5 specifies the virtual machine size types standard a5 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA5 = "Standard_A5"
// VirtualMachineSizeTypesStandardA6 specifies the virtual machine size types standard a6 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA6 = "Standard_A6"
// VirtualMachineSizeTypesStandardA7 specifies the virtual machine size types standard a7 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA7 = "Standard_A7"
// VirtualMachineSizeTypesStandardA8 specifies the virtual machine size types standard a8 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA8 = "Standard_A8"
// VirtualMachineSizeTypesStandardA8mV2 specifies the virtual machine size types standard a8mv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardA8mV2 = "Standard_A8m_v2"
// VirtualMachineSizeTypesStandardA8V2 specifies the virtual machine size types standard a8v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA8V2 = "Standard_A8_v2"
// VirtualMachineSizeTypesStandardA9 specifies the virtual machine size types standard a9 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardA9 = "Standard_A9"
// VirtualMachineSizeTypesStandardB1ms specifies the virtual machine size types standard b1ms state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB1ms = "Standard_B1ms"
// VirtualMachineSizeTypesStandardB1s specifies the virtual machine size types standard b1s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB1s = "Standard_B1s"
// VirtualMachineSizeTypesStandardB2ms specifies the virtual machine size types standard b2ms state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB2ms = "Standard_B2ms"
// VirtualMachineSizeTypesStandardB2s specifies the virtual machine size types standard b2s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB2s = "Standard_B2s"
// VirtualMachineSizeTypesStandardB4ms specifies the virtual machine size types standard b4ms state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB4ms = "Standard_B4ms"
// VirtualMachineSizeTypesStandardB8ms specifies the virtual machine size types standard b8ms state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardB8ms = "Standard_B8ms"
// VirtualMachineSizeTypesStandardD1 specifies the virtual machine size types standard d1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD1 = "Standard_D1"
// VirtualMachineSizeTypesStandardD11 specifies the virtual machine size types standard d11 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD11 = "Standard_D11"
// VirtualMachineSizeTypesStandardD11V2 specifies the virtual machine size types standard d11v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD11V2 = "Standard_D11_v2"
// VirtualMachineSizeTypesStandardD12 specifies the virtual machine size types standard d12 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD12 = "Standard_D12"
// VirtualMachineSizeTypesStandardD12V2 specifies the virtual machine size types standard d12v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD12V2 = "Standard_D12_v2"
// VirtualMachineSizeTypesStandardD13 specifies the virtual machine size types standard d13 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD13 = "Standard_D13"
// VirtualMachineSizeTypesStandardD13V2 specifies the virtual machine size types standard d13v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD13V2 = "Standard_D13_v2"
// VirtualMachineSizeTypesStandardD14 specifies the virtual machine size types standard d14 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD14 = "Standard_D14"
// VirtualMachineSizeTypesStandardD14V2 specifies the virtual machine size types standard d14v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD14V2 = "Standard_D14_v2"
// VirtualMachineSizeTypesStandardD15V2 specifies the virtual machine size types standard d15v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD15V2 = "Standard_D15_v2"
// VirtualMachineSizeTypesStandardD16sV3 specifies the virtual machine size types standard d16sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD16sV3 = "Standard_D16s_v3"
// VirtualMachineSizeTypesStandardD16V3 specifies the virtual machine size types standard d16v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD16V3 = "Standard_D16_v3"
// VirtualMachineSizeTypesStandardD1V2 specifies the virtual machine size types standard d1v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD1V2 = "Standard_D1_v2"
// VirtualMachineSizeTypesStandardD2 specifies the virtual machine size types standard d2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD2 = "Standard_D2"
// VirtualMachineSizeTypesStandardD2sV3 specifies the virtual machine size types standard d2sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD2sV3 = "Standard_D2s_v3"
// VirtualMachineSizeTypesStandardD2V2 specifies the virtual machine size types standard d2v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD2V2 = "Standard_D2_v2"
// VirtualMachineSizeTypesStandardD2V3 specifies the virtual machine size types standard d2v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD2V3 = "Standard_D2_v3"
// VirtualMachineSizeTypesStandardD3 specifies the virtual machine size types standard d3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD3 = "Standard_D3"
// VirtualMachineSizeTypesStandardD32sV3 specifies the virtual machine size types standard d32sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD32sV3 = "Standard_D32s_v3"
// VirtualMachineSizeTypesStandardD32V3 specifies the virtual machine size types standard d32v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD32V3 = "Standard_D32_v3"
// VirtualMachineSizeTypesStandardD3V2 specifies the virtual machine size types standard d3v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD3V2 = "Standard_D3_v2"
// VirtualMachineSizeTypesStandardD4 specifies the virtual machine size types standard d4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD4 = "Standard_D4"
// VirtualMachineSizeTypesStandardD4sV3 specifies the virtual machine size types standard d4sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD4sV3 = "Standard_D4s_v3"
// VirtualMachineSizeTypesStandardD4V2 specifies the virtual machine size types standard d4v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD4V2 = "Standard_D4_v2"
// VirtualMachineSizeTypesStandardD4V3 specifies the virtual machine size types standard d4v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD4V3 = "Standard_D4_v3"
// VirtualMachineSizeTypesStandardD5V2 specifies the virtual machine size types standard d5v2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD5V2 = "Standard_D5_v2"
// VirtualMachineSizeTypesStandardD64sV3 specifies the virtual machine size types standard d64sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD64sV3 = "Standard_D64s_v3"
// VirtualMachineSizeTypesStandardD64V3 specifies the virtual machine size types standard d64v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD64V3 = "Standard_D64_v3"
// VirtualMachineSizeTypesStandardD8sV3 specifies the virtual machine size types standard d8sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardD8sV3 = "Standard_D8s_v3"
// VirtualMachineSizeTypesStandardD8V3 specifies the virtual machine size types standard d8v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardD8V3 = "Standard_D8_v3"
// VirtualMachineSizeTypesStandardDS1 specifies the virtual machine size types standard ds1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS1 = "Standard_DS1"
// VirtualMachineSizeTypesStandardDS11 specifies the virtual machine size types standard ds11 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS11 = "Standard_DS11"
// VirtualMachineSizeTypesStandardDS11V2 specifies the virtual machine size types standard ds11v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS11V2 = "Standard_DS11_v2"
// VirtualMachineSizeTypesStandardDS12 specifies the virtual machine size types standard ds12 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS12 = "Standard_DS12"
// VirtualMachineSizeTypesStandardDS12V2 specifies the virtual machine size types standard ds12v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS12V2 = "Standard_DS12_v2"
// VirtualMachineSizeTypesStandardDS13 specifies the virtual machine size types standard ds13 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS13 = "Standard_DS13"
// VirtualMachineSizeTypesStandardDS132V2 specifies the virtual machine size types standard ds132v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS132V2 = "Standard_DS13-2_v2"
// VirtualMachineSizeTypesStandardDS134V2 specifies the virtual machine size types standard ds134v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS134V2 = "Standard_DS13-4_v2"
// VirtualMachineSizeTypesStandardDS13V2 specifies the virtual machine size types standard ds13v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS13V2 = "Standard_DS13_v2"
// VirtualMachineSizeTypesStandardDS14 specifies the virtual machine size types standard ds14 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS14 = "Standard_DS14"
// VirtualMachineSizeTypesStandardDS144V2 specifies the virtual machine size types standard ds144v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS144V2 = "Standard_DS14-4_v2"
// VirtualMachineSizeTypesStandardDS148V2 specifies the virtual machine size types standard ds148v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS148V2 = "Standard_DS14-8_v2"
// VirtualMachineSizeTypesStandardDS14V2 specifies the virtual machine size types standard ds14v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS14V2 = "Standard_DS14_v2"
// VirtualMachineSizeTypesStandardDS15V2 specifies the virtual machine size types standard ds15v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS15V2 = "Standard_DS15_v2"
// VirtualMachineSizeTypesStandardDS1V2 specifies the virtual machine size types standard ds1v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS1V2 = "Standard_DS1_v2"
// VirtualMachineSizeTypesStandardDS2 specifies the virtual machine size types standard ds2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS2 = "Standard_DS2"
// VirtualMachineSizeTypesStandardDS2V2 specifies the virtual machine size types standard ds2v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS2V2 = "Standard_DS2_v2"
// VirtualMachineSizeTypesStandardDS3 specifies the virtual machine size types standard ds3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS3 = "Standard_DS3"
// VirtualMachineSizeTypesStandardDS3V2 specifies the virtual machine size types standard ds3v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS3V2 = "Standard_DS3_v2"
// VirtualMachineSizeTypesStandardDS4 specifies the virtual machine size types standard ds4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardDS4 = "Standard_DS4"
// VirtualMachineSizeTypesStandardDS4V2 specifies the virtual machine size types standard ds4v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS4V2 = "Standard_DS4_v2"
// VirtualMachineSizeTypesStandardDS5V2 specifies the virtual machine size types standard ds5v2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardDS5V2 = "Standard_DS5_v2"
// VirtualMachineSizeTypesStandardE16sV3 specifies the virtual machine size types standard e16sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE16sV3 = "Standard_E16s_v3"
// VirtualMachineSizeTypesStandardE16V3 specifies the virtual machine size types standard e16v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE16V3 = "Standard_E16_v3"
// VirtualMachineSizeTypesStandardE2sV3 specifies the virtual machine size types standard e2sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE2sV3 = "Standard_E2s_v3"
// VirtualMachineSizeTypesStandardE2V3 specifies the virtual machine size types standard e2v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardE2V3 = "Standard_E2_v3"
// VirtualMachineSizeTypesStandardE3216V3 specifies the virtual machine size types standard e3216v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE3216V3 = "Standard_E32-16_v3"
// VirtualMachineSizeTypesStandardE328sV3 specifies the virtual machine size types standard e328sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE328sV3 = "Standard_E32-8s_v3"
// VirtualMachineSizeTypesStandardE32sV3 specifies the virtual machine size types standard e32sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE32sV3 = "Standard_E32s_v3"
// VirtualMachineSizeTypesStandardE32V3 specifies the virtual machine size types standard e32v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE32V3 = "Standard_E32_v3"
// VirtualMachineSizeTypesStandardE4sV3 specifies the virtual machine size types standard e4sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE4sV3 = "Standard_E4s_v3"
// VirtualMachineSizeTypesStandardE4V3 specifies the virtual machine size types standard e4v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardE4V3 = "Standard_E4_v3"
// VirtualMachineSizeTypesStandardE6416sV3 specifies the virtual machine size types standard e6416sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE6416sV3 = "Standard_E64-16s_v3"
// VirtualMachineSizeTypesStandardE6432sV3 specifies the virtual machine size types standard e6432sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE6432sV3 = "Standard_E64-32s_v3"
// VirtualMachineSizeTypesStandardE64sV3 specifies the virtual machine size types standard e64sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE64sV3 = "Standard_E64s_v3"
// VirtualMachineSizeTypesStandardE64V3 specifies the virtual machine size types standard e64v3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE64V3 = "Standard_E64_v3"
// VirtualMachineSizeTypesStandardE8sV3 specifies the virtual machine size types standard e8sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardE8sV3 = "Standard_E8s_v3"
// VirtualMachineSizeTypesStandardE8V3 specifies the virtual machine size types standard e8v3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardE8V3 = "Standard_E8_v3"
// VirtualMachineSizeTypesStandardF1 specifies the virtual machine size types standard f1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF1 = "Standard_F1"
// VirtualMachineSizeTypesStandardF16 specifies the virtual machine size types standard f16 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF16 = "Standard_F16"
// VirtualMachineSizeTypesStandardF16s specifies the virtual machine size types standard f16s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF16s = "Standard_F16s"
// VirtualMachineSizeTypesStandardF16sV2 specifies the virtual machine size types standard f16sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF16sV2 = "Standard_F16s_v2"
// VirtualMachineSizeTypesStandardF1s specifies the virtual machine size types standard f1s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF1s = "Standard_F1s"
// VirtualMachineSizeTypesStandardF2 specifies the virtual machine size types standard f2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF2 = "Standard_F2"
// VirtualMachineSizeTypesStandardF2s specifies the virtual machine size types standard f2s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF2s = "Standard_F2s"
// VirtualMachineSizeTypesStandardF2sV2 specifies the virtual machine size types standard f2sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF2sV2 = "Standard_F2s_v2"
// VirtualMachineSizeTypesStandardF32sV2 specifies the virtual machine size types standard f32sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF32sV2 = "Standard_F32s_v2"
// VirtualMachineSizeTypesStandardF4 specifies the virtual machine size types standard f4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF4 = "Standard_F4"
// VirtualMachineSizeTypesStandardF4s specifies the virtual machine size types standard f4s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF4s = "Standard_F4s"
// VirtualMachineSizeTypesStandardF4sV2 specifies the virtual machine size types standard f4sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF4sV2 = "Standard_F4s_v2"
// VirtualMachineSizeTypesStandardF64sV2 specifies the virtual machine size types standard f64sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF64sV2 = "Standard_F64s_v2"
// VirtualMachineSizeTypesStandardF72sV2 specifies the virtual machine size types standard f72sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF72sV2 = "Standard_F72s_v2"
// VirtualMachineSizeTypesStandardF8 specifies the virtual machine size types standard f8 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF8 = "Standard_F8"
// VirtualMachineSizeTypesStandardF8s specifies the virtual machine size types standard f8s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardF8s = "Standard_F8s"
// VirtualMachineSizeTypesStandardF8sV2 specifies the virtual machine size types standard f8sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardF8sV2 = "Standard_F8s_v2"
// VirtualMachineSizeTypesStandardG1 specifies the virtual machine size types standard g1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardG1 = "Standard_G1"
// VirtualMachineSizeTypesStandardG2 specifies the virtual machine size types standard g2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardG2 = "Standard_G2"
// VirtualMachineSizeTypesStandardG3 specifies the virtual machine size types standard g3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardG3 = "Standard_G3"
// VirtualMachineSizeTypesStandardG4 specifies the virtual machine size types standard g4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardG4 = "Standard_G4"
// VirtualMachineSizeTypesStandardG5 specifies the virtual machine size types standard g5 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardG5 = "Standard_G5"
// VirtualMachineSizeTypesStandardGS1 specifies the virtual machine size types standard gs1 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS1 = "Standard_GS1"
// VirtualMachineSizeTypesStandardGS2 specifies the virtual machine size types standard gs2 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS2 = "Standard_GS2"
// VirtualMachineSizeTypesStandardGS3 specifies the virtual machine size types standard gs3 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS3 = "Standard_GS3"
// VirtualMachineSizeTypesStandardGS4 specifies the virtual machine size types standard gs4 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS4 = "Standard_GS4"
// VirtualMachineSizeTypesStandardGS44 specifies the virtual machine size types standard gs44 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS44 = "Standard_GS4-4"
// VirtualMachineSizeTypesStandardGS48 specifies the virtual machine size types standard gs48 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS48 = "Standard_GS4-8"
// VirtualMachineSizeTypesStandardGS5 specifies the virtual machine size types standard gs5 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS5 = "Standard_GS5"
// VirtualMachineSizeTypesStandardGS516 specifies the virtual machine size types standard gs516 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardGS516 = "Standard_GS5-16"
// VirtualMachineSizeTypesStandardGS58 specifies the virtual machine size types standard gs58 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardGS58 = "Standard_GS5-8"
// VirtualMachineSizeTypesStandardH16 specifies the virtual machine size types standard h16 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardH16 = "Standard_H16"
// VirtualMachineSizeTypesStandardH16m specifies the virtual machine size types standard h16m state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardH16m = "Standard_H16m"
// VirtualMachineSizeTypesStandardH16mr specifies the virtual machine size types standard h16mr state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardH16mr = "Standard_H16mr"
// VirtualMachineSizeTypesStandardH16r specifies the virtual machine size types standard h16r state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardH16r = "Standard_H16r"
// VirtualMachineSizeTypesStandardH8 specifies the virtual machine size types standard h8 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardH8 = "Standard_H8"
// VirtualMachineSizeTypesStandardH8m specifies the virtual machine size types standard h8m state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardH8m = "Standard_H8m"
// VirtualMachineSizeTypesStandardL16s specifies the virtual machine size types standard l16s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardL16s = "Standard_L16s"
// VirtualMachineSizeTypesStandardL32s specifies the virtual machine size types standard l32s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardL32s = "Standard_L32s"
// VirtualMachineSizeTypesStandardL4s specifies the virtual machine size types standard l4s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardL4s = "Standard_L4s"
// VirtualMachineSizeTypesStandardL8s specifies the virtual machine size types standard l8s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardL8s = "Standard_L8s"
// VirtualMachineSizeTypesStandardM12832ms specifies the virtual machine size types standard m12832ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM12832ms = "Standard_M128-32ms"
// VirtualMachineSizeTypesStandardM12864ms specifies the virtual machine size types standard m12864ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM12864ms = "Standard_M128-64ms"
// VirtualMachineSizeTypesStandardM128ms specifies the virtual machine size types standard m128ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM128ms = "Standard_M128ms"
// VirtualMachineSizeTypesStandardM128s specifies the virtual machine size types standard m128s state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM128s = "Standard_M128s"
// VirtualMachineSizeTypesStandardM6416ms specifies the virtual machine size types standard m6416ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM6416ms = "Standard_M64-16ms"
// VirtualMachineSizeTypesStandardM6432ms specifies the virtual machine size types standard m6432ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM6432ms = "Standard_M64-32ms"
// VirtualMachineSizeTypesStandardM64ms specifies the virtual machine size types standard m64ms state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardM64ms = "Standard_M64ms"
// VirtualMachineSizeTypesStandardM64s specifies the virtual machine size types standard m64s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardM64s = "Standard_M64s"
// VirtualMachineSizeTypesStandardNC12 specifies the virtual machine size types standard nc12 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNC12 = "Standard_NC12"
// VirtualMachineSizeTypesStandardNC12sV2 specifies the virtual machine size types standard nc12sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC12sV2 = "Standard_NC12s_v2"
// VirtualMachineSizeTypesStandardNC12sV3 specifies the virtual machine size types standard nc12sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC12sV3 = "Standard_NC12s_v3"
// VirtualMachineSizeTypesStandardNC24 specifies the virtual machine size types standard nc24 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNC24 = "Standard_NC24"
// VirtualMachineSizeTypesStandardNC24r specifies the virtual machine size types standard nc24r state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC24r = "Standard_NC24r"
// VirtualMachineSizeTypesStandardNC24rsV2 specifies the virtual machine size types standard nc24rsv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC24rsV2 = "Standard_NC24rs_v2"
// VirtualMachineSizeTypesStandardNC24rsV3 specifies the virtual machine size types standard nc24rsv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC24rsV3 = "Standard_NC24rs_v3"
// VirtualMachineSizeTypesStandardNC24sV2 specifies the virtual machine size types standard nc24sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC24sV2 = "Standard_NC24s_v2"
// VirtualMachineSizeTypesStandardNC24sV3 specifies the virtual machine size types standard nc24sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC24sV3 = "Standard_NC24s_v3"
// VirtualMachineSizeTypesStandardNC6 specifies the virtual machine size types standard nc6 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNC6 = "Standard_NC6"
// VirtualMachineSizeTypesStandardNC6sV2 specifies the virtual machine size types standard nc6sv2 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC6sV2 = "Standard_NC6s_v2"
// VirtualMachineSizeTypesStandardNC6sV3 specifies the virtual machine size types standard nc6sv3 state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardNC6sV3 = "Standard_NC6s_v3"
// VirtualMachineSizeTypesStandardND12s specifies the virtual machine size types standard nd12s state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardND12s = "Standard_ND12s"
// VirtualMachineSizeTypesStandardND24rs specifies the virtual machine size types standard nd24rs state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardND24rs = "Standard_ND24rs"
// VirtualMachineSizeTypesStandardND24s specifies the virtual machine size types standard nd24s state for virtual
// machine size types.
    case VirtualMachineSizeTypesStandardND24s = "Standard_ND24s"
// VirtualMachineSizeTypesStandardND6s specifies the virtual machine size types standard nd6s state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardND6s = "Standard_ND6s"
// VirtualMachineSizeTypesStandardNV12 specifies the virtual machine size types standard nv12 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNV12 = "Standard_NV12"
// VirtualMachineSizeTypesStandardNV24 specifies the virtual machine size types standard nv24 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNV24 = "Standard_NV24"
// VirtualMachineSizeTypesStandardNV6 specifies the virtual machine size types standard nv6 state for virtual machine
// size types.
    case VirtualMachineSizeTypesStandardNV6 = "Standard_NV6"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct VirtualMachineStatusCodeCountData : VirtualMachineStatusCodeCountProtocol {
    public var code: String?
    public var count: Int32?

        enum CodingKeys: String, CodingKey {case code = "code"
        case count = "count"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.code) {
        self.code = try container.decode(String?.self, forKey: .code)
    }
    if container.contains(.count) {
        self.count = try container.decode(Int32?.self, forKey: .count)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.code != nil {try container.encode(self.code, forKey: .code)}
    if self.count != nil {try container.encode(self.count, forKey: .count)}
  }
}

extension DataFactory {
  public static func createVirtualMachineStatusCodeCountProtocol() -> VirtualMachineStatusCodeCountProtocol {
    return VirtualMachineStatusCodeCountData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct WindowsConfigurationData : WindowsConfigurationProtocol {
    public var provisionVMAgent: Bool?
    public var enableAutomaticUpdates: Bool?
    public var timeZone: String?
    public var additionalUnattendContent: [AdditionalUnattendContentProtocol?]?
    public var winRM: WinRMConfigurationProtocol?

        enum CodingKeys: String, CodingKey {case provisionVMAgent = "provisionVMAgent"
        case enableAutomaticUpdates = "enableAutomaticUpdates"
        case timeZone = "timeZone"
        case additionalUnattendContent = "additionalUnattendContent"
        case winRM = "winRM"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.provisionVMAgent) {
        self.provisionVMAgent = try container.decode(Bool?.self, forKey: .provisionVMAgent)
    }
    if container.contains(.enableAutomaticUpdates) {
        self.enableAutomaticUpdates = try container.decode(Bool?.self, forKey: .enableAutomaticUpdates)
    }
    if container.contains(.timeZone) {
        self.timeZone = try container.decode(String?.self, forKey: .timeZone)
    }
    if container.contains(.additionalUnattendContent) {
        self.additionalUnattendContent = try container.decode([AdditionalUnattendContentData?]?.self, forKey: .additionalUnattendContent)
    }
    if container.contains(.winRM) {
        self.winRM = try container.decode(WinRMConfigurationData?.self, forKey: .winRM)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.provisionVMAgent != nil {try container.encode(self.provisionVMAgent, forKey: .provisionVMAgent)}
    if self.enableAutomaticUpdates != nil {try container.encode(self.enableAutomaticUpdates, forKey: .enableAutomaticUpdates)}
    if self.timeZone != nil {try container.encode(self.timeZone, forKey: .timeZone)}
    if self.additionalUnattendContent != nil {try container.encode(self.additionalUnattendContent as! [AdditionalUnattendContentData?]?, forKey: .additionalUnattendContent)}
    if self.winRM != nil {try container.encode(self.winRM as! WinRMConfigurationData?, forKey: .winRM)}
  }
}

extension DataFactory {
  public static func createWindowsConfigurationProtocol() -> WindowsConfigurationProtocol {
    return WindowsConfigurationData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct WinRMConfigurationData : WinRMConfigurationProtocol {
    public var listeners: [WinRMListenerProtocol?]?

        enum CodingKeys: String, CodingKey {case listeners = "listeners"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.listeners) {
        self.listeners = try container.decode([WinRMListenerData?]?.self, forKey: .listeners)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.listeners != nil {try container.encode(self.listeners as! [WinRMListenerData?]?, forKey: .listeners)}
  }
}

extension DataFactory {
  public static func createWinRMConfigurationProtocol() -> WinRMConfigurationProtocol {
    return WinRMConfigurationData()
  }
}