// 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 VirtualMachineScaleSetSkuCapacityData : VirtualMachineScaleSetSkuCapacityProtocol {
    public var minimum: Int64?
    public var maximum: Int64?
    public var defaultCapacity: Int64?
    public var scaleType: VirtualMachineScaleSetSkuScaleTypeEnum?

        enum CodingKeys: String, CodingKey {case minimum = "minimum"
        case maximum = "maximum"
        case defaultCapacity = "defaultCapacity"
        case scaleType = "scaleType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.minimum) {
        self.minimum = try container.decode(Int64?.self, forKey: .minimum)
    }
    if container.contains(.maximum) {
        self.maximum = try container.decode(Int64?.self, forKey: .maximum)
    }
    if container.contains(.defaultCapacity) {
        self.defaultCapacity = try container.decode(Int64?.self, forKey: .defaultCapacity)
    }
    if container.contains(.scaleType) {
        self.scaleType = try container.decode(VirtualMachineScaleSetSkuScaleTypeEnum?.self, forKey: .scaleType)
    }
    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.minimum != nil {try container.encode(self.minimum, forKey: .minimum)}
    if self.maximum != nil {try container.encode(self.maximum, forKey: .maximum)}
    if self.defaultCapacity != nil {try container.encode(self.defaultCapacity, forKey: .defaultCapacity)}
    if self.scaleType != nil {try container.encode(self.scaleType, forKey: .scaleType)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetSkuCapacityProtocol() -> VirtualMachineScaleSetSkuCapacityProtocol {
    return VirtualMachineScaleSetSkuCapacityData()
  }
}


// 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 VirtualMachineScaleSetSkuData : VirtualMachineScaleSetSkuProtocol {
    public var resourceType: String?
    public var sku: SkuProtocol?
    public var capacity: VirtualMachineScaleSetSkuCapacityProtocol?

        enum CodingKeys: String, CodingKey {case resourceType = "resourceType"
        case sku = "sku"
        case capacity = "capacity"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceType) {
        self.resourceType = try container.decode(String?.self, forKey: .resourceType)
    }
    if container.contains(.sku) {
        self.sku = try container.decode(SkuData?.self, forKey: .sku)
    }
    if container.contains(.capacity) {
        self.capacity = try container.decode(VirtualMachineScaleSetSkuCapacityData?.self, forKey: .capacity)
    }
    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.resourceType != nil {try container.encode(self.resourceType, forKey: .resourceType)}
    if self.sku != nil {try container.encode(self.sku as! SkuData?, forKey: .sku)}
    if self.capacity != nil {try container.encode(self.capacity as! VirtualMachineScaleSetSkuCapacityData?, forKey: .capacity)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetSkuProtocol() -> VirtualMachineScaleSetSkuProtocol {
    return VirtualMachineScaleSetSkuData()
  }
}


// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.

// 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 VirtualMachineScaleSetSkuScaleTypeEnum: String, Codable
{
// VirtualMachineScaleSetSkuScaleTypeAutomatic specifies the virtual machine scale set sku scale type automatic state
// for virtual machine scale set sku scale type.
    case VirtualMachineScaleSetSkuScaleTypeAutomatic = "Automatic"
// VirtualMachineScaleSetSkuScaleTypeNone specifies the virtual machine scale set sku scale type none state for virtual
// machine scale set sku scale type.
    case VirtualMachineScaleSetSkuScaleTypeNone = "None"
}


// 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 VirtualMachineScaleSetStorageProfileData : VirtualMachineScaleSetStorageProfileProtocol {
    public var imageReference: ImageReferenceProtocol?
    public var osDisk: VirtualMachineScaleSetOSDiskProtocol?
    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(VirtualMachineScaleSetOSDiskData?.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! VirtualMachineScaleSetOSDiskData?, forKey: .osDisk)}
    if self.dataDisks != nil {try container.encode(self.dataDisks as! [VirtualMachineScaleSetDataDiskData?]?, forKey: .dataDisks)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetStorageProfileProtocol() -> VirtualMachineScaleSetStorageProfileProtocol {
    return VirtualMachineScaleSetStorageProfileData()
  }
}


// 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 VirtualMachineScaleSetUpdateData : VirtualMachineScaleSetUpdateProtocol, UpdateResourceProtocol {
    public var tags: [String:String]?
    public var sku: SkuProtocol?
    public var plan: PlanProtocol?
    public var properties: VirtualMachineScaleSetUpdatePropertiesProtocol?
    public var identity: VirtualMachineScaleSetIdentityProtocol?

        enum CodingKeys: String, CodingKey {case tags = "tags"
        case sku = "sku"
        case plan = "plan"
        case properties = "properties"
        case identity = "identity"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.tags) {
        self.tags = try container.decode([String:String]?.self, forKey: .tags)
    }
    if container.contains(.sku) {
        self.sku = try container.decode(SkuData?.self, forKey: .sku)
    }
    if container.contains(.plan) {
        self.plan = try container.decode(PlanData?.self, forKey: .plan)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(VirtualMachineScaleSetUpdatePropertiesData?.self, forKey: .properties)
    }
    if container.contains(.identity) {
        self.identity = try container.decode(VirtualMachineScaleSetIdentityData?.self, forKey: .identity)
    }
    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.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.sku != nil {try container.encode(self.sku as! SkuData?, forKey: .sku)}
    if self.plan != nil {try container.encode(self.plan as! PlanData?, forKey: .plan)}
    if self.properties != nil {try container.encode(self.properties as! VirtualMachineScaleSetUpdatePropertiesData?, forKey: .properties)}
    if self.identity != nil {try container.encode(self.identity as! VirtualMachineScaleSetIdentityData?, forKey: .identity)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateProtocol() -> VirtualMachineScaleSetUpdateProtocol {
    return VirtualMachineScaleSetUpdateData()
  }
}


// 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 VirtualMachineScaleSetUpdateIPConfigurationData : VirtualMachineScaleSetUpdateIPConfigurationProtocol, SubResourceProtocol {
    public var id: String?
    public var name: String?
    public var properties: VirtualMachineScaleSetUpdateIPConfigurationPropertiesProtocol?

        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(VirtualMachineScaleSetUpdateIPConfigurationPropertiesData?.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! VirtualMachineScaleSetUpdateIPConfigurationPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createVirtualMachineScaleSetUpdateIPConfigurationProtocol() -> VirtualMachineScaleSetUpdateIPConfigurationProtocol {
    return VirtualMachineScaleSetUpdateIPConfigurationData()
  }
}


// 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()
  }
}