// 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 ShutdownNotificationContentData : ShutdownNotificationContentProtocol {
    public var skipUrl: String?
    public var delayUrl60: String?
    public var delayUrl120: String?
    public var vmName: String?
    public var guid: String?
    public var owner: String?
    public var eventType: String?
    public var text: String?
    public var subscriptionId: String?
    public var resourceGroupName: String?
    public var labName: String?

        enum CodingKeys: String, CodingKey {case skipUrl = "skipUrl"
        case delayUrl60 = "delayUrl60"
        case delayUrl120 = "delayUrl120"
        case vmName = "vmName"
        case guid = "guid"
        case owner = "owner"
        case eventType = "eventType"
        case text = "text"
        case subscriptionId = "subscriptionId"
        case resourceGroupName = "resourceGroupName"
        case labName = "labName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.skipUrl) {
        self.skipUrl = try container.decode(String?.self, forKey: .skipUrl)
    }
    if container.contains(.delayUrl60) {
        self.delayUrl60 = try container.decode(String?.self, forKey: .delayUrl60)
    }
    if container.contains(.delayUrl120) {
        self.delayUrl120 = try container.decode(String?.self, forKey: .delayUrl120)
    }
    if container.contains(.vmName) {
        self.vmName = try container.decode(String?.self, forKey: .vmName)
    }
    if container.contains(.guid) {
        self.guid = try container.decode(String?.self, forKey: .guid)
    }
    if container.contains(.owner) {
        self.owner = try container.decode(String?.self, forKey: .owner)
    }
    if container.contains(.eventType) {
        self.eventType = try container.decode(String?.self, forKey: .eventType)
    }
    if container.contains(.text) {
        self.text = try container.decode(String?.self, forKey: .text)
    }
    if container.contains(.subscriptionId) {
        self.subscriptionId = try container.decode(String?.self, forKey: .subscriptionId)
    }
    if container.contains(.resourceGroupName) {
        self.resourceGroupName = try container.decode(String?.self, forKey: .resourceGroupName)
    }
    if container.contains(.labName) {
        self.labName = try container.decode(String?.self, forKey: .labName)
    }
    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.skipUrl != nil {try container.encode(self.skipUrl, forKey: .skipUrl)}
    if self.delayUrl60 != nil {try container.encode(self.delayUrl60, forKey: .delayUrl60)}
    if self.delayUrl120 != nil {try container.encode(self.delayUrl120, forKey: .delayUrl120)}
    if self.vmName != nil {try container.encode(self.vmName, forKey: .vmName)}
    if self.guid != nil {try container.encode(self.guid, forKey: .guid)}
    if self.owner != nil {try container.encode(self.owner, forKey: .owner)}
    if self.eventType != nil {try container.encode(self.eventType, forKey: .eventType)}
    if self.text != nil {try container.encode(self.text, forKey: .text)}
    if self.subscriptionId != nil {try container.encode(self.subscriptionId, forKey: .subscriptionId)}
    if self.resourceGroupName != nil {try container.encode(self.resourceGroupName, forKey: .resourceGroupName)}
    if self.labName != nil {try container.encode(self.labName, forKey: .labName)}
  }
}

extension DataFactory {
  public static func createShutdownNotificationContentProtocol() -> ShutdownNotificationContentProtocol {
    return ShutdownNotificationContentData()
  }
}


// SourceControlType enumerates the values for source control 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 SourceControlTypeEnum: String, Codable
{
// GitHub specifies the git hub state for source control type.
    case GitHub = "GitHub"
// VsoGit specifies the vso git state for source control type.
    case VsoGit = "VsoGit"
}


// StorageType enumerates the values for storage 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 StorageTypeEnum: String, Codable
{
// Premium specifies the premium state for storage type.
    case Premium = "Premium"
// Standard specifies the standard state for storage type.
    case Standard = "Standard"
}


// 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 SubnetData : SubnetProtocol {
    public var resourceId: String?
    public var labSubnetName: String?
    public var allowPublicIp: UsagePermissionTypeEnum?

        enum CodingKeys: String, CodingKey {case resourceId = "resourceId"
        case labSubnetName = "labSubnetName"
        case allowPublicIp = "allowPublicIp"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceId) {
        self.resourceId = try container.decode(String?.self, forKey: .resourceId)
    }
    if container.contains(.labSubnetName) {
        self.labSubnetName = try container.decode(String?.self, forKey: .labSubnetName)
    }
    if container.contains(.allowPublicIp) {
        self.allowPublicIp = try container.decode(UsagePermissionTypeEnum?.self, forKey: .allowPublicIp)
    }
    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.resourceId != nil {try container.encode(self.resourceId, forKey: .resourceId)}
    if self.labSubnetName != nil {try container.encode(self.labSubnetName, forKey: .labSubnetName)}
    if self.allowPublicIp != nil {try container.encode(self.allowPublicIp, forKey: .allowPublicIp)}
  }
}

extension DataFactory {
  public static func createSubnetProtocol() -> SubnetProtocol {
    return SubnetData()
  }
}


// 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 SubnetFragmentData : SubnetFragmentProtocol {
    public var resourceId: String?
    public var labSubnetName: String?
    public var allowPublicIp: UsagePermissionTypeEnum?

        enum CodingKeys: String, CodingKey {case resourceId = "resourceId"
        case labSubnetName = "labSubnetName"
        case allowPublicIp = "allowPublicIp"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceId) {
        self.resourceId = try container.decode(String?.self, forKey: .resourceId)
    }
    if container.contains(.labSubnetName) {
        self.labSubnetName = try container.decode(String?.self, forKey: .labSubnetName)
    }
    if container.contains(.allowPublicIp) {
        self.allowPublicIp = try container.decode(UsagePermissionTypeEnum?.self, forKey: .allowPublicIp)
    }
    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.resourceId != nil {try container.encode(self.resourceId, forKey: .resourceId)}
    if self.labSubnetName != nil {try container.encode(self.labSubnetName, forKey: .labSubnetName)}
    if self.allowPublicIp != nil {try container.encode(self.allowPublicIp, forKey: .allowPublicIp)}
  }
}

extension DataFactory {
  public static func createSubnetFragmentProtocol() -> SubnetFragmentProtocol {
    return SubnetFragmentData()
  }
}


// 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 SubnetOverrideData : SubnetOverrideProtocol {
    public var resourceId: String?
    public var labSubnetName: String?
    public var useInVmCreationPermission: UsagePermissionTypeEnum?
    public var usePublicIpAddressPermission: UsagePermissionTypeEnum?
    public var sharedPublicIpAddressConfiguration: SubnetSharedPublicIpAddressConfigurationProtocol?
    public var virtualNetworkPoolName: String?

        enum CodingKeys: String, CodingKey {case resourceId = "resourceId"
        case labSubnetName = "labSubnetName"
        case useInVmCreationPermission = "useInVmCreationPermission"
        case usePublicIpAddressPermission = "usePublicIpAddressPermission"
        case sharedPublicIpAddressConfiguration = "sharedPublicIpAddressConfiguration"
        case virtualNetworkPoolName = "virtualNetworkPoolName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceId) {
        self.resourceId = try container.decode(String?.self, forKey: .resourceId)
    }
    if container.contains(.labSubnetName) {
        self.labSubnetName = try container.decode(String?.self, forKey: .labSubnetName)
    }
    if container.contains(.useInVmCreationPermission) {
        self.useInVmCreationPermission = try container.decode(UsagePermissionTypeEnum?.self, forKey: .useInVmCreationPermission)
    }
    if container.contains(.usePublicIpAddressPermission) {
        self.usePublicIpAddressPermission = try container.decode(UsagePermissionTypeEnum?.self, forKey: .usePublicIpAddressPermission)
    }
    if container.contains(.sharedPublicIpAddressConfiguration) {
        self.sharedPublicIpAddressConfiguration = try container.decode(SubnetSharedPublicIpAddressConfigurationData?.self, forKey: .sharedPublicIpAddressConfiguration)
    }
    if container.contains(.virtualNetworkPoolName) {
        self.virtualNetworkPoolName = try container.decode(String?.self, forKey: .virtualNetworkPoolName)
    }
    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.resourceId != nil {try container.encode(self.resourceId, forKey: .resourceId)}
    if self.labSubnetName != nil {try container.encode(self.labSubnetName, forKey: .labSubnetName)}
    if self.useInVmCreationPermission != nil {try container.encode(self.useInVmCreationPermission, forKey: .useInVmCreationPermission)}
    if self.usePublicIpAddressPermission != nil {try container.encode(self.usePublicIpAddressPermission, forKey: .usePublicIpAddressPermission)}
    if self.sharedPublicIpAddressConfiguration != nil {try container.encode(self.sharedPublicIpAddressConfiguration as! SubnetSharedPublicIpAddressConfigurationData?, forKey: .sharedPublicIpAddressConfiguration)}
    if self.virtualNetworkPoolName != nil {try container.encode(self.virtualNetworkPoolName, forKey: .virtualNetworkPoolName)}
  }
}

extension DataFactory {
  public static func createSubnetOverrideProtocol() -> SubnetOverrideProtocol {
    return SubnetOverrideData()
  }
}


// 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 SubnetOverrideFragmentData : SubnetOverrideFragmentProtocol {
    public var resourceId: String?
    public var labSubnetName: String?
    public var useInVmCreationPermission: UsagePermissionTypeEnum?
    public var usePublicIpAddressPermission: UsagePermissionTypeEnum?
    public var sharedPublicIpAddressConfiguration: SubnetSharedPublicIpAddressConfigurationFragmentProtocol?
    public var virtualNetworkPoolName: String?

        enum CodingKeys: String, CodingKey {case resourceId = "resourceId"
        case labSubnetName = "labSubnetName"
        case useInVmCreationPermission = "useInVmCreationPermission"
        case usePublicIpAddressPermission = "usePublicIpAddressPermission"
        case sharedPublicIpAddressConfiguration = "sharedPublicIpAddressConfiguration"
        case virtualNetworkPoolName = "virtualNetworkPoolName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceId) {
        self.resourceId = try container.decode(String?.self, forKey: .resourceId)
    }
    if container.contains(.labSubnetName) {
        self.labSubnetName = try container.decode(String?.self, forKey: .labSubnetName)
    }
    if container.contains(.useInVmCreationPermission) {
        self.useInVmCreationPermission = try container.decode(UsagePermissionTypeEnum?.self, forKey: .useInVmCreationPermission)
    }
    if container.contains(.usePublicIpAddressPermission) {
        self.usePublicIpAddressPermission = try container.decode(UsagePermissionTypeEnum?.self, forKey: .usePublicIpAddressPermission)
    }
    if container.contains(.sharedPublicIpAddressConfiguration) {
        self.sharedPublicIpAddressConfiguration = try container.decode(SubnetSharedPublicIpAddressConfigurationFragmentData?.self, forKey: .sharedPublicIpAddressConfiguration)
    }
    if container.contains(.virtualNetworkPoolName) {
        self.virtualNetworkPoolName = try container.decode(String?.self, forKey: .virtualNetworkPoolName)
    }
    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.resourceId != nil {try container.encode(self.resourceId, forKey: .resourceId)}
    if self.labSubnetName != nil {try container.encode(self.labSubnetName, forKey: .labSubnetName)}
    if self.useInVmCreationPermission != nil {try container.encode(self.useInVmCreationPermission, forKey: .useInVmCreationPermission)}
    if self.usePublicIpAddressPermission != nil {try container.encode(self.usePublicIpAddressPermission, forKey: .usePublicIpAddressPermission)}
    if self.sharedPublicIpAddressConfiguration != nil {try container.encode(self.sharedPublicIpAddressConfiguration as! SubnetSharedPublicIpAddressConfigurationFragmentData?, forKey: .sharedPublicIpAddressConfiguration)}
    if self.virtualNetworkPoolName != nil {try container.encode(self.virtualNetworkPoolName, forKey: .virtualNetworkPoolName)}
  }
}

extension DataFactory {
  public static func createSubnetOverrideFragmentProtocol() -> SubnetOverrideFragmentProtocol {
    return SubnetOverrideFragmentData()
  }
}


// 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 SubnetSharedPublicIpAddressConfigurationData : SubnetSharedPublicIpAddressConfigurationProtocol {
    public var allowedPorts: [PortProtocol?]?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.allowedPorts) {
        self.allowedPorts = try container.decode([PortData?]?.self, forKey: .allowedPorts)
    }
    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.allowedPorts != nil {try container.encode(self.allowedPorts as! [PortData?]?, forKey: .allowedPorts)}
  }
}

extension DataFactory {
  public static func createSubnetSharedPublicIpAddressConfigurationProtocol() -> SubnetSharedPublicIpAddressConfigurationProtocol {
    return SubnetSharedPublicIpAddressConfigurationData()
  }
}


// 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 SubnetSharedPublicIpAddressConfigurationFragmentData : SubnetSharedPublicIpAddressConfigurationFragmentProtocol {
    public var allowedPorts: [PortFragmentProtocol?]?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.allowedPorts) {
        self.allowedPorts = try container.decode([PortFragmentData?]?.self, forKey: .allowedPorts)
    }
    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.allowedPorts != nil {try container.encode(self.allowedPorts as! [PortFragmentData?]?, forKey: .allowedPorts)}
  }
}

extension DataFactory {
  public static func createSubnetSharedPublicIpAddressConfigurationFragmentProtocol() -> SubnetSharedPublicIpAddressConfigurationFragmentProtocol {
    return SubnetSharedPublicIpAddressConfigurationFragmentData()
  }
}


// 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 TargetCostPropertiesData : TargetCostPropertiesProtocol {
    public var status: TargetCostStatusEnum?
    public var target: Int32?
    public var costThresholds: [CostThresholdPropertiesProtocol?]?
    public var cycleStartDateTime: Date?
    public var cycleEndDateTime: Date?
    public var cycleType: ReportingCycleTypeEnum?

        enum CodingKeys: String, CodingKey {case status = "status"
        case target = "target"
        case costThresholds = "costThresholds"
        case cycleStartDateTime = "cycleStartDateTime"
        case cycleEndDateTime = "cycleEndDateTime"
        case cycleType = "cycleType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.status) {
        self.status = try container.decode(TargetCostStatusEnum?.self, forKey: .status)
    }
    if container.contains(.target) {
        self.target = try container.decode(Int32?.self, forKey: .target)
    }
    if container.contains(.costThresholds) {
        self.costThresholds = try container.decode([CostThresholdPropertiesData?]?.self, forKey: .costThresholds)
    }
    if container.contains(.cycleStartDateTime) {
        self.cycleStartDateTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .cycleStartDateTime)), format: .dateTime)
    }
    if container.contains(.cycleEndDateTime) {
        self.cycleEndDateTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .cycleEndDateTime)), format: .dateTime)
    }
    if container.contains(.cycleType) {
        self.cycleType = try container.decode(ReportingCycleTypeEnum?.self, forKey: .cycleType)
    }
    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.status != nil {try container.encode(self.status, forKey: .status)}
    if self.target != nil {try container.encode(self.target, forKey: .target)}
    if self.costThresholds != nil {try container.encode(self.costThresholds as! [CostThresholdPropertiesData?]?, forKey: .costThresholds)}
    if self.cycleStartDateTime != nil {
        try container.encode(DateConverter.toString(date: self.cycleStartDateTime!, format: .dateTime), forKey: .cycleStartDateTime)
    }
    if self.cycleEndDateTime != nil {
        try container.encode(DateConverter.toString(date: self.cycleEndDateTime!, format: .dateTime), forKey: .cycleEndDateTime)
    }
    if self.cycleType != nil {try container.encode(self.cycleType, forKey: .cycleType)}
  }
}

extension DataFactory {
  public static func createTargetCostPropertiesProtocol() -> TargetCostPropertiesProtocol {
    return TargetCostPropertiesData()
  }
}


// TargetCostStatus enumerates the values for target cost status.

// 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 TargetCostStatusEnum: String, Codable
{
// TargetCostStatusDisabled specifies the target cost status disabled state for target cost status.
    case TargetCostStatusDisabled = "Disabled"
// TargetCostStatusEnabled specifies the target cost status enabled state for target cost status.
    case TargetCostStatusEnabled = "Enabled"
}


// TransportProtocol enumerates the values for transport protocol.

// 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 TransportProtocolEnum: String, Codable
{
// Tcp specifies the tcp state for transport protocol.
    case Tcp = "Tcp"
// Udp specifies the udp state for transport protocol.
    case Udp = "Udp"
}


// UsagePermissionType enumerates the values for usage permission 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 UsagePermissionTypeEnum: String, Codable
{
// Allow specifies the allow state for usage permission type.
    case Allow = "Allow"
// Default specifies the default state for usage permission type.
    case Default = "Default"
// Deny specifies the deny state for usage permission type.
    case Deny = "Deny"
}


// 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 UserData : UserProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var properties: UserPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.location) {
        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(.properties) {
        self.properties = try container.decode(UserPropertiesData?.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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.properties != nil {try container.encode(self.properties as! UserPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createUserProtocol() -> UserProtocol {
    return UserData()
  }
}


// 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 UserFragmentData : UserFragmentProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var properties: UserPropertiesFragmentProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.location) {
        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(.properties) {
        self.properties = try container.decode(UserPropertiesFragmentData?.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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.properties != nil {try container.encode(self.properties as! UserPropertiesFragmentData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createUserFragmentProtocol() -> UserFragmentProtocol {
    return UserFragmentData()
  }
}


// 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 UserIdentityData : UserIdentityProtocol {
    public var principalName: String?
    public var principalId: String?
    public var tenantId: String?
    public var objectId: String?
    public var appId: String?

        enum CodingKeys: String, CodingKey {case principalName = "principalName"
        case principalId = "principalId"
        case tenantId = "tenantId"
        case objectId = "objectId"
        case appId = "appId"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.principalName) {
        self.principalName = try container.decode(String?.self, forKey: .principalName)
    }
    if container.contains(.principalId) {
        self.principalId = try container.decode(String?.self, forKey: .principalId)
    }
    if container.contains(.tenantId) {
        self.tenantId = try container.decode(String?.self, forKey: .tenantId)
    }
    if container.contains(.objectId) {
        self.objectId = try container.decode(String?.self, forKey: .objectId)
    }
    if container.contains(.appId) {
        self.appId = try container.decode(String?.self, forKey: .appId)
    }
    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.principalName != nil {try container.encode(self.principalName, forKey: .principalName)}
    if self.principalId != nil {try container.encode(self.principalId, forKey: .principalId)}
    if self.tenantId != nil {try container.encode(self.tenantId, forKey: .tenantId)}
    if self.objectId != nil {try container.encode(self.objectId, forKey: .objectId)}
    if self.appId != nil {try container.encode(self.appId, forKey: .appId)}
  }
}

extension DataFactory {
  public static func createUserIdentityProtocol() -> UserIdentityProtocol {
    return UserIdentityData()
  }
}


// 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 UserIdentityFragmentData : UserIdentityFragmentProtocol {
    public var principalName: String?
    public var principalId: String?
    public var tenantId: String?
    public var objectId: String?
    public var appId: String?

        enum CodingKeys: String, CodingKey {case principalName = "principalName"
        case principalId = "principalId"
        case tenantId = "tenantId"
        case objectId = "objectId"
        case appId = "appId"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.principalName) {
        self.principalName = try container.decode(String?.self, forKey: .principalName)
    }
    if container.contains(.principalId) {
        self.principalId = try container.decode(String?.self, forKey: .principalId)
    }
    if container.contains(.tenantId) {
        self.tenantId = try container.decode(String?.self, forKey: .tenantId)
    }
    if container.contains(.objectId) {
        self.objectId = try container.decode(String?.self, forKey: .objectId)
    }
    if container.contains(.appId) {
        self.appId = try container.decode(String?.self, forKey: .appId)
    }
    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.principalName != nil {try container.encode(self.principalName, forKey: .principalName)}
    if self.principalId != nil {try container.encode(self.principalId, forKey: .principalId)}
    if self.tenantId != nil {try container.encode(self.tenantId, forKey: .tenantId)}
    if self.objectId != nil {try container.encode(self.objectId, forKey: .objectId)}
    if self.appId != nil {try container.encode(self.appId, forKey: .appId)}
  }
}

extension DataFactory {
  public static func createUserIdentityFragmentProtocol() -> UserIdentityFragmentProtocol {
    return UserIdentityFragmentData()
  }
}


// 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 UserPropertiesData : UserPropertiesProtocol {
    public var identity: UserIdentityProtocol?
    public var secretStore: UserSecretStoreProtocol?
    public var createdDate: Date?
    public var provisioningState: String?
    public var uniqueIdentifier: String?

        enum CodingKeys: String, CodingKey {case identity = "identity"
        case secretStore = "secretStore"
        case createdDate = "createdDate"
        case provisioningState = "provisioningState"
        case uniqueIdentifier = "uniqueIdentifier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.identity) {
        self.identity = try container.decode(UserIdentityData?.self, forKey: .identity)
    }
    if container.contains(.secretStore) {
        self.secretStore = try container.decode(UserSecretStoreData?.self, forKey: .secretStore)
    }
    if container.contains(.createdDate) {
        self.createdDate = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .createdDate)), format: .dateTime)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.uniqueIdentifier) {
        self.uniqueIdentifier = try container.decode(String?.self, forKey: .uniqueIdentifier)
    }
    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.identity != nil {try container.encode(self.identity as! UserIdentityData?, forKey: .identity)}
    if self.secretStore != nil {try container.encode(self.secretStore as! UserSecretStoreData?, forKey: .secretStore)}
    if self.createdDate != nil {
        try container.encode(DateConverter.toString(date: self.createdDate!, format: .dateTime), forKey: .createdDate)
    }
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.uniqueIdentifier != nil {try container.encode(self.uniqueIdentifier, forKey: .uniqueIdentifier)}
  }
}

extension DataFactory {
  public static func createUserPropertiesProtocol() -> UserPropertiesProtocol {
    return UserPropertiesData()
  }
}


// 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 UserPropertiesFragmentData : UserPropertiesFragmentProtocol {
    public var identity: UserIdentityFragmentProtocol?
    public var secretStore: UserSecretStoreFragmentProtocol?
    public var provisioningState: String?
    public var uniqueIdentifier: String?

        enum CodingKeys: String, CodingKey {case identity = "identity"
        case secretStore = "secretStore"
        case provisioningState = "provisioningState"
        case uniqueIdentifier = "uniqueIdentifier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.identity) {
        self.identity = try container.decode(UserIdentityFragmentData?.self, forKey: .identity)
    }
    if container.contains(.secretStore) {
        self.secretStore = try container.decode(UserSecretStoreFragmentData?.self, forKey: .secretStore)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.uniqueIdentifier) {
        self.uniqueIdentifier = try container.decode(String?.self, forKey: .uniqueIdentifier)
    }
    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.identity != nil {try container.encode(self.identity as! UserIdentityFragmentData?, forKey: .identity)}
    if self.secretStore != nil {try container.encode(self.secretStore as! UserSecretStoreFragmentData?, forKey: .secretStore)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.uniqueIdentifier != nil {try container.encode(self.uniqueIdentifier, forKey: .uniqueIdentifier)}
  }
}

extension DataFactory {
  public static func createUserPropertiesFragmentProtocol() -> UserPropertiesFragmentProtocol {
    return UserPropertiesFragmentData()
  }
}


// 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 UserSecretStoreData : UserSecretStoreProtocol {
    public var keyVaultUri: String?
    public var keyVaultId: String?

        enum CodingKeys: String, CodingKey {case keyVaultUri = "keyVaultUri"
        case keyVaultId = "keyVaultId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUserSecretStoreProtocol() -> UserSecretStoreProtocol {
    return UserSecretStoreData()
  }
}


// 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 UserSecretStoreFragmentData : UserSecretStoreFragmentProtocol {
    public var keyVaultUri: String?
    public var keyVaultId: String?

        enum CodingKeys: String, CodingKey {case keyVaultUri = "keyVaultUri"
        case keyVaultId = "keyVaultId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUserSecretStoreFragmentProtocol() -> UserSecretStoreFragmentProtocol {
    return UserSecretStoreFragmentData()
  }
}


// VirtualMachineCreationSource enumerates the values for virtual machine creation source.

// 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 VirtualMachineCreationSourceEnum: String, Codable
{
// FromCustomImage specifies the from custom image state for virtual machine creation source.
    case FromCustomImage = "FromCustomImage"
// FromGalleryImage specifies the from gallery image state for virtual machine creation source.
    case FromGalleryImage = "FromGalleryImage"
}


// 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 VirtualNetworkData : VirtualNetworkProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var properties: VirtualNetworkPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.location) {
        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(.properties) {
        self.properties = try container.decode(VirtualNetworkPropertiesData?.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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.properties != nil {try container.encode(self.properties as! VirtualNetworkPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createVirtualNetworkProtocol() -> VirtualNetworkProtocol {
    return VirtualNetworkData()
  }
}


// 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 VirtualNetworkFragmentData : VirtualNetworkFragmentProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var properties: VirtualNetworkPropertiesFragmentProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.location) {
        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(.properties) {
        self.properties = try container.decode(VirtualNetworkPropertiesFragmentData?.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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.properties != nil {try container.encode(self.properties as! VirtualNetworkPropertiesFragmentData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createVirtualNetworkFragmentProtocol() -> VirtualNetworkFragmentProtocol {
    return VirtualNetworkFragmentData()
  }
}


// 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 VirtualNetworkPropertiesData : VirtualNetworkPropertiesProtocol {
    public var allowedSubnets: [SubnetProtocol?]?
    public var description: String?
    public var externalProviderResourceId: String?
    public var externalSubnets: [ExternalSubnetProtocol?]?
    public var subnetOverrides: [SubnetOverrideProtocol?]?
    public var createdDate: Date?
    public var provisioningState: String?
    public var uniqueIdentifier: String?

        enum CodingKeys: String, CodingKey {case allowedSubnets = "allowedSubnets"
        case description = "description"
        case externalProviderResourceId = "externalProviderResourceId"
        case externalSubnets = "externalSubnets"
        case subnetOverrides = "subnetOverrides"
        case createdDate = "createdDate"
        case provisioningState = "provisioningState"
        case uniqueIdentifier = "uniqueIdentifier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.allowedSubnets) {
        self.allowedSubnets = try container.decode([SubnetData?]?.self, forKey: .allowedSubnets)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.externalProviderResourceId) {
        self.externalProviderResourceId = try container.decode(String?.self, forKey: .externalProviderResourceId)
    }
    if container.contains(.externalSubnets) {
        self.externalSubnets = try container.decode([ExternalSubnetData?]?.self, forKey: .externalSubnets)
    }
    if container.contains(.subnetOverrides) {
        self.subnetOverrides = try container.decode([SubnetOverrideData?]?.self, forKey: .subnetOverrides)
    }
    if container.contains(.createdDate) {
        self.createdDate = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .createdDate)), format: .dateTime)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.uniqueIdentifier) {
        self.uniqueIdentifier = try container.decode(String?.self, forKey: .uniqueIdentifier)
    }
    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.allowedSubnets != nil {try container.encode(self.allowedSubnets as! [SubnetData?]?, forKey: .allowedSubnets)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.externalProviderResourceId != nil {try container.encode(self.externalProviderResourceId, forKey: .externalProviderResourceId)}
    if self.externalSubnets != nil {try container.encode(self.externalSubnets as! [ExternalSubnetData?]?, forKey: .externalSubnets)}
    if self.subnetOverrides != nil {try container.encode(self.subnetOverrides as! [SubnetOverrideData?]?, forKey: .subnetOverrides)}
    if self.createdDate != nil {
        try container.encode(DateConverter.toString(date: self.createdDate!, format: .dateTime), forKey: .createdDate)
    }
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.uniqueIdentifier != nil {try container.encode(self.uniqueIdentifier, forKey: .uniqueIdentifier)}
  }
}

extension DataFactory {
  public static func createVirtualNetworkPropertiesProtocol() -> VirtualNetworkPropertiesProtocol {
    return VirtualNetworkPropertiesData()
  }
}


// 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 VirtualNetworkPropertiesFragmentData : VirtualNetworkPropertiesFragmentProtocol {
    public var allowedSubnets: [SubnetFragmentProtocol?]?
    public var description: String?
    public var externalProviderResourceId: String?
    public var externalSubnets: [ExternalSubnetFragmentProtocol?]?
    public var subnetOverrides: [SubnetOverrideFragmentProtocol?]?
    public var provisioningState: String?
    public var uniqueIdentifier: String?

        enum CodingKeys: String, CodingKey {case allowedSubnets = "allowedSubnets"
        case description = "description"
        case externalProviderResourceId = "externalProviderResourceId"
        case externalSubnets = "externalSubnets"
        case subnetOverrides = "subnetOverrides"
        case provisioningState = "provisioningState"
        case uniqueIdentifier = "uniqueIdentifier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.allowedSubnets) {
        self.allowedSubnets = try container.decode([SubnetFragmentData?]?.self, forKey: .allowedSubnets)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.externalProviderResourceId) {
        self.externalProviderResourceId = try container.decode(String?.self, forKey: .externalProviderResourceId)
    }
    if container.contains(.externalSubnets) {
        self.externalSubnets = try container.decode([ExternalSubnetFragmentData?]?.self, forKey: .externalSubnets)
    }
    if container.contains(.subnetOverrides) {
        self.subnetOverrides = try container.decode([SubnetOverrideFragmentData?]?.self, forKey: .subnetOverrides)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.uniqueIdentifier) {
        self.uniqueIdentifier = try container.decode(String?.self, forKey: .uniqueIdentifier)
    }
    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.allowedSubnets != nil {try container.encode(self.allowedSubnets as! [SubnetFragmentData?]?, forKey: .allowedSubnets)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.externalProviderResourceId != nil {try container.encode(self.externalProviderResourceId, forKey: .externalProviderResourceId)}
    if self.externalSubnets != nil {try container.encode(self.externalSubnets as! [ExternalSubnetFragmentData?]?, forKey: .externalSubnets)}
    if self.subnetOverrides != nil {try container.encode(self.subnetOverrides as! [SubnetOverrideFragmentData?]?, forKey: .subnetOverrides)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.uniqueIdentifier != nil {try container.encode(self.uniqueIdentifier, forKey: .uniqueIdentifier)}
  }
}

extension DataFactory {
  public static func createVirtualNetworkPropertiesFragmentProtocol() -> VirtualNetworkPropertiesFragmentProtocol {
    return VirtualNetworkPropertiesFragmentData()
  }
}


// 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 WeekDetailsData : WeekDetailsProtocol {
    public var weekdays: [String]?
    public var time: String?

        enum CodingKeys: String, CodingKey {case weekdays = "weekdays"
        case time = "time"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createWeekDetailsProtocol() -> WeekDetailsProtocol {
    return WeekDetailsData()
  }
}


// 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 WeekDetailsFragmentData : WeekDetailsFragmentProtocol {
    public var weekdays: [String]?
    public var time: String?

        enum CodingKeys: String, CodingKey {case weekdays = "weekdays"
        case time = "time"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createWeekDetailsFragmentProtocol() -> WeekDetailsFragmentProtocol {
    return WeekDetailsFragmentData()
  }
}


// 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 WindowsOsInfoData : WindowsOsInfoProtocol {
    public var windowsOsState: WindowsOsStateEnum?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createWindowsOsInfoProtocol() -> WindowsOsInfoProtocol {
    return WindowsOsInfoData()
  }
}


// WindowsOsState enumerates the values for windows os state.

// 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 WindowsOsStateEnum: String, Codable
{
// NonSysprepped specifies the non sysprepped state for windows os state.
    case NonSysprepped = "NonSysprepped"
// SysprepApplied specifies the sysprep applied state for windows os state.
    case SysprepApplied = "SysprepApplied"
// SysprepRequested specifies the sysprep requested state for windows os state.
    case SysprepRequested = "SysprepRequested"
}


// 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
// ApplicableScheduleFragmentProtocol is schedules applicable to a virtual machine. The schedules may have been defined
// on a VM or on lab level.
public protocol ApplicableScheduleFragmentProtocol : ResourceProtocol {
     var properties: ApplicableSchedulePropertiesFragmentProtocol? { get set }
}


// 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
// ApplicableSchedulePropertiesFragmentProtocol is properties of a schedules applicable to a virtual machine.
public protocol ApplicableSchedulePropertiesFragmentProtocol : Codable {
     var labVmsShutdown: ScheduleFragmentProtocol? { get set }
     var labVmsStartup: ScheduleFragmentProtocol? { get set }
}


// 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
// ApplicableSchedulePropertiesProtocol is properties of a schedules applicable to a virtual machine.
public protocol ApplicableSchedulePropertiesProtocol : Codable {
     var labVmsShutdown: ScheduleProtocol? { get set }
     var labVmsStartup: ScheduleProtocol? { get set }
}


// 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
// ApplicableScheduleProtocol is schedules applicable to a virtual machine. The schedules may have been defined on a VM
// or on lab level.
public protocol ApplicableScheduleProtocol : ResourceProtocol {
     var properties: ApplicableSchedulePropertiesProtocol { get set }
}


// 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
// ApplyArtifactsRequestProtocol is request body for applying artifacts to a virtual machine.
public protocol ApplyArtifactsRequestProtocol : Codable {
     var artifacts: [ArtifactInstallPropertiesProtocol?]? { get set }
}


// 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
// ArmTemplateInfoProtocol is information about a generated ARM template.
public protocol ArmTemplateInfoProtocol : Codable {
     var template: [String: String?]? { get set }
     var parameters: [String: String?]? { get set }
}


// 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
// ArmTemplateParameterPropertiesProtocol is properties of an Azure Resource Manager template parameter.
public protocol ArmTemplateParameterPropertiesProtocol : Codable {
     var name: String? { get set }
     var value: String? { get set }
}


// 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
// ArmTemplatePropertiesProtocol is properties of an Azure Resource Manager template.
public protocol ArmTemplatePropertiesProtocol : Codable {
     var displayName: String? { get set }
     var description: String? { get set }
     var publisher: String? { get set }
     var icon: String? { get set }
     var contents: [String: String?]? { get set }
     var createdDate: Date? { get set }
     var parametersValueFilesInfo: [ParametersValueFileInfoProtocol?]? { get set }
}


// 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
// ArmTemplateProtocol is an Azure Resource Manager template.
public protocol ArmTemplateProtocol : ResourceProtocol {
     var properties: ArmTemplatePropertiesProtocol { get set }
}


// 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
// ArtifactDeploymentStatusPropertiesFragmentProtocol is properties of an artifact deployment.
public protocol ArtifactDeploymentStatusPropertiesFragmentProtocol : Codable {
     var deploymentStatus: String? { get set }
     var artifactsApplied: Int32? { get set }
     var totalArtifacts: Int32? { get set }
}


// 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
// ArtifactDeploymentStatusPropertiesProtocol is properties of an artifact deployment.
public protocol ArtifactDeploymentStatusPropertiesProtocol : Codable {
     var deploymentStatus: String? { get set }
     var artifactsApplied: Int32? { get set }
     var totalArtifacts: Int32? { get set }
}


// 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
// ArtifactInstallPropertiesFragmentProtocol is properties of an artifact.
public protocol ArtifactInstallPropertiesFragmentProtocol : Codable {
     var artifactId: String? { get set }
     var parameters: [ArtifactParameterPropertiesFragmentProtocol?]? { get set }
     var status: String? { get set }
     var deploymentStatusMessage: String? { get set }
     var vmExtensionStatusMessage: String? { get set }
     var installTime: Date? { get set }
}


// 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
// ArtifactInstallPropertiesProtocol is properties of an artifact.
public protocol ArtifactInstallPropertiesProtocol : Codable {
     var artifactId: String? { get set }
     var parameters: [ArtifactParameterPropertiesProtocol?]? { get set }
     var status: String? { get set }
     var deploymentStatusMessage: String? { get set }
     var vmExtensionStatusMessage: String? { get set }
     var installTime: Date? { get set }
}


// 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
// ArtifactParameterPropertiesFragmentProtocol is properties of an artifact parameter.
public protocol ArtifactParameterPropertiesFragmentProtocol : Codable {
     var name: String? { get set }
     var value: String? { get set }
}


// 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
// ArtifactParameterPropertiesProtocol is properties of an artifact parameter.
public protocol ArtifactParameterPropertiesProtocol : Codable {
     var name: String? { get set }
     var value: String? { get set }
}


// 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
// ArtifactPropertiesProtocol is properties of an artifact.
public protocol ArtifactPropertiesProtocol : Codable {
     var title: String? { get set }
     var description: String? { get set }
     var publisher: String? { get set }
     var filePath: String? { get set }
     var icon: String? { get set }
     var targetOsType: String? { get set }
     var parameters: [String: String?]? { get set }
     var createdDate: Date? { get set }
}


// 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
// ArtifactProtocol is an artifact.
public protocol ArtifactProtocol : ResourceProtocol {
     var properties: ArtifactPropertiesProtocol { get set }
}


// 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
// ArtifactSourceFragmentProtocol is properties of an artifact source.
public protocol ArtifactSourceFragmentProtocol : ResourceProtocol {
     var properties: ArtifactSourcePropertiesFragmentProtocol? { get set }
}


// 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
// ArtifactSourcePropertiesFragmentProtocol is properties of an artifact source.
public protocol ArtifactSourcePropertiesFragmentProtocol : Codable {
     var displayName: String? { get set }
     var uri: String? { get set }
     var sourceType: SourceControlTypeEnum? { get set }
     var folderPath: String? { get set }
     var armTemplateFolderPath: String? { get set }
     var branchRef: String? { get set }
     var securityToken: String? { get set }
     var status: EnableStatusEnum? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// ArtifactSourcePropertiesProtocol is properties of an artifact source.
public protocol ArtifactSourcePropertiesProtocol : Codable {
     var displayName: String? { get set }
     var uri: String? { get set }
     var sourceType: SourceControlTypeEnum? { get set }
     var folderPath: String? { get set }
     var armTemplateFolderPath: String? { get set }
     var branchRef: String? { get set }
     var securityToken: String? { get set }
     var status: EnableStatusEnum? { get set }
     var createdDate: Date? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// ArtifactSourceProtocol is properties of an artifact source.
public protocol ArtifactSourceProtocol : ResourceProtocol {
     var properties: ArtifactSourcePropertiesProtocol { get set }
}


// 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
// AttachDiskPropertiesProtocol is properties of the disk to attach.
public protocol AttachDiskPropertiesProtocol : Codable {
     var leasedByLabVmId: String? { get set }
}


// 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
// AttachNewDataDiskOptionsProtocol is properties to attach new disk to the Virtual Machine.
public protocol AttachNewDataDiskOptionsProtocol : Codable {
     var diskSizeGiB: Int32? { get set }
     var diskName: String? { get set }
     var diskType: StorageTypeEnum? { get set }
}


// 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
// BulkCreationParametersProtocol is parameters for creating multiple virtual machines as a single action.
public protocol BulkCreationParametersProtocol : Codable {
     var instanceCount: Int32? { get set }
}


// 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
// CloudErrorBodyProtocol is body of an error from a REST request.
public protocol CloudErrorBodyProtocol : Codable {
     var code: String? { get set }
     var message: String? { get set }
     var target: String? { get set }
     var details: [CloudErrorBodyProtocol?]? { get set }
}


// 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
// CloudErrorProtocol is error from a REST request.
public protocol CloudErrorProtocol : Codable {
     var error: CloudErrorBodyProtocol? { get set }
}


// 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
// ComputeDataDiskFragmentProtocol is a data disks attached to a virtual machine.
public protocol ComputeDataDiskFragmentProtocol : Codable {
     var name: String? { get set }
     var diskUri: String? { get set }
     var managedDiskId: String? { get set }
     var diskSizeGiB: Int32? { get set }
}


// 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
// ComputeDataDiskProtocol is a data disks attached to a virtual machine.
public protocol ComputeDataDiskProtocol : Codable {
     var name: String? { get set }
     var diskUri: String? { get set }
     var managedDiskId: String? { get set }
     var diskSizeGiB: Int32? { get set }
}


// 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
// ComputeVmInstanceViewStatusFragmentProtocol is status information about a virtual machine.
public protocol ComputeVmInstanceViewStatusFragmentProtocol : Codable {
     var code: String? { get set }
     var displayStatus: String? { get set }
     var message: String? { get set }
}


// 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
// ComputeVmInstanceViewStatusProtocol is status information about a virtual machine.
public protocol ComputeVmInstanceViewStatusProtocol : Codable {
     var code: String? { get set }
     var displayStatus: String? { get set }
     var message: String? { get set }
}


// 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
// ComputeVmPropertiesFragmentProtocol is properties of a virtual machine returned by the Microsoft.Compute API.
public protocol ComputeVmPropertiesFragmentProtocol : Codable {
     var statuses: [ComputeVmInstanceViewStatusFragmentProtocol?]? { get set }
     var osType: String? { get set }
     var vmSize: String? { get set }
     var networkInterfaceId: String? { get set }
     var osDiskId: String? { get set }
     var dataDiskIds: [String]? { get set }
     var dataDisks: [ComputeDataDiskFragmentProtocol?]? { get set }
}


// 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
// ComputeVmPropertiesProtocol is properties of a virtual machine returned by the Microsoft.Compute API.
public protocol ComputeVmPropertiesProtocol : Codable {
     var statuses: [ComputeVmInstanceViewStatusProtocol?]? { get set }
     var osType: String? { get set }
     var vmSize: String? { get set }
     var networkInterfaceId: String? { get set }
     var osDiskId: String? { get set }
     var dataDiskIds: [String]? { get set }
     var dataDisks: [ComputeDataDiskProtocol?]? { get set }
}


// 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
// CostThresholdPropertiesProtocol is properties of a cost threshold item.
public protocol CostThresholdPropertiesProtocol : Codable {
     var thresholdId: String? { get set }
     var percentageThreshold: PercentageCostThresholdPropertiesProtocol? { get set }
     var displayOnChart: CostThresholdStatusEnum? { get set }
     var sendNotificationWhenExceeded: CostThresholdStatusEnum? { get set }
     var notificationSent: String? { get set }
}


// 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
// CustomImagePropertiesCustomProtocol is properties for creating a custom image from a VHD.
public protocol CustomImagePropertiesCustomProtocol : Codable {
     var imageName: String? { get set }
     var sysPrep: Bool? { get set }
     var osType: CustomImageOsTypeEnum { get set }
}


// 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
// CustomImagePropertiesFromVmProtocol is properties for creating a custom image from a virtual machine.
public protocol CustomImagePropertiesFromVmProtocol : Codable {
     var sourceVmId: String? { get set }
     var windowsOsInfo: WindowsOsInfoProtocol? { get set }
     var linuxOsInfo: LinuxOsInfoProtocol? { get set }
}


// 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
// CustomImagePropertiesProtocol is properties of a custom image.
public protocol CustomImagePropertiesProtocol : Codable {
     var vm: CustomImagePropertiesFromVmProtocol? { get set }
     var vhd: CustomImagePropertiesCustomProtocol? { get set }
     var description: String? { get set }
     var author: String? { get set }
     var creationDate: Date? { get set }
     var managedImageId: String? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// CustomImageProtocol is a custom image.
public protocol CustomImageProtocol : ResourceProtocol {
     var properties: CustomImagePropertiesProtocol { get set }
}


// 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
// DataDiskPropertiesProtocol is request body for adding a new or existing data disk to a virtual machine.
public protocol DataDiskPropertiesProtocol : Codable {
     var attachNewDataDiskOptions: AttachNewDataDiskOptionsProtocol? { get set }
     var existingLabDiskId: String? { get set }
     var hostCaching: HostCachingOptionsEnum? { get set }
}


// 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
// DayDetailsFragmentProtocol is properties of a daily schedule.
public protocol DayDetailsFragmentProtocol : Codable {
     var time: String? { get set }
}


// 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
// DayDetailsProtocol is properties of a daily schedule.
public protocol DayDetailsProtocol : Codable {
     var time: String? { get set }
}


// 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
// DetachDataDiskPropertiesProtocol is request body for detaching data disk from a virtual machine.
public protocol DetachDataDiskPropertiesProtocol : Codable {
     var existingLabDiskId: String? { get set }
}


// 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
// DetachDiskPropertiesProtocol is properties of the disk to detach.
public protocol DetachDiskPropertiesProtocol : Codable {
     var leasedByLabVmId: String? { get set }
}


// 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
// DiskPropertiesProtocol is properties of a disk.
public protocol DiskPropertiesProtocol : Codable {
     var diskType: StorageTypeEnum? { get set }
     var diskSizeGiB: Int32? { get set }
     var leasedByLabVmId: String? { get set }
     var diskBlobName: String? { get set }
     var diskUri: String? { get set }
     var createdDate: Date? { get set }
     var hostCaching: String? { get set }
     var managedDiskId: String? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// DiskProtocol is a Disk.
public protocol DiskProtocol : ResourceProtocol {
     var properties: DiskPropertiesProtocol { get set }
}


// 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
// DtlEnvironmentProtocol is an environment, which is essentially an ARM template deployment.
public protocol DtlEnvironmentProtocol : ResourceProtocol {
     var properties: EnvironmentPropertiesProtocol { get set }
}


// 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
// EnvironmentDeploymentPropertiesProtocol is properties of an environment deployment.
public protocol EnvironmentDeploymentPropertiesProtocol : Codable {
     var armTemplateId: String? { get set }
     var parameters: [ArmTemplateParameterPropertiesProtocol?]? { get set }
}


// 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
// EnvironmentPropertiesProtocol is properties of an environment.
public protocol EnvironmentPropertiesProtocol : Codable {
     var deploymentProperties: EnvironmentDeploymentPropertiesProtocol? { get set }
     var armTemplateDisplayName: String? { get set }
     var resourceGroupId: String? { get set }
     var createdByUser: String? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// EvaluatePoliciesPropertiesProtocol is properties for evaluating a policy set.
public protocol EvaluatePoliciesPropertiesProtocol : Codable {
     var factName: String? { get set }
     var factData: String? { get set }
     var valueOffset: String? { get set }
}


// 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
// EvaluatePoliciesRequestProtocol is request body for evaluating a policy set.
public protocol EvaluatePoliciesRequestProtocol : Codable {
     var policies: [EvaluatePoliciesPropertiesProtocol?]? { get set }
}


// 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
// EvaluatePoliciesResponseProtocol is response body for evaluating a policy set.
public protocol EvaluatePoliciesResponseProtocol : Codable {
     var results: [PolicySetResultProtocol?]? { get set }
}


// 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
// EventFragmentProtocol is an event to be notified for.
public protocol EventFragmentProtocol : Codable {
     var eventName: NotificationChannelEventTypeEnum? { get set }
}


// 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
// EventProtocol is an event to be notified for.
public protocol EventProtocol : Codable {
     var eventName: NotificationChannelEventTypeEnum? { get set }
}


// 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
// ExportResourceUsageParametersProtocol is the parameters of the export operation.
public protocol ExportResourceUsageParametersProtocol : Codable {
     var blobStorageAbsoluteSasUri: String? { get set }
     var usageStartDate: Date? { get set }
}


// 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
// ExternalSubnetFragmentProtocol is subnet information as returned by the Microsoft.Network API.
public protocol ExternalSubnetFragmentProtocol : Codable {
     var id: String? { get set }
     var name: String? { get set }
}


// 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
// ExternalSubnetProtocol is subnet information as returned by the Microsoft.Network API.
public protocol ExternalSubnetProtocol : Codable {
     var id: String? { get set }
     var name: String? { get set }
}


// 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
// FormulaPropertiesFromVmProtocol is information about a VM from which a formula is to be created.
public protocol FormulaPropertiesFromVmProtocol : Codable {
     var labVmId: String? { get set }
}


// 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
// FormulaPropertiesProtocol is properties of a formula.
public protocol FormulaPropertiesProtocol : Codable {
     var description: String? { get set }
     var author: String? { get set }
     var osType: String? { get set }
     var creationDate: Date? { get set }
     var formulaContent: LabVirtualMachineCreationParameterProtocol? { get set }
     var vm: FormulaPropertiesFromVmProtocol? { get set }
     var provisioningState: String? { get set }
     var uniqueIdentifier: String? { get set }
}


// 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
// FormulaProtocol is a formula for creating a VM, specifying an image base and other parameters
public protocol FormulaProtocol : ResourceProtocol {
     var properties: FormulaPropertiesProtocol { get set }
}


// 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
// GalleryImagePropertiesProtocol is properties of a gallery image.
public protocol GalleryImagePropertiesProtocol : Codable {
     var author: String? { get set }
     var createdDate: Date? { get set }
     var description: String? { get set }
     var imageReference: GalleryImageReferenceProtocol? { get set }
     var icon: String? { get set }
     var enabled: Bool? { get set }
}


// 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
// GalleryImageProtocol is a gallery image.
public protocol GalleryImageProtocol : ResourceProtocol {
     var properties: GalleryImagePropertiesProtocol { get set }
}


// 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
// GalleryImageReferenceFragmentProtocol is the reference information for an Azure Marketplace image.
public protocol GalleryImageReferenceFragmentProtocol : Codable {
     var offer: String? { get set }
     var publisher: String? { get set }
     var sku: String? { get set }
     var osType: String? { get set }
     var version: String? { get set }
}


// 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
// GalleryImageReferenceProtocol is the reference information for an Azure Marketplace image.
public protocol GalleryImageReferenceProtocol : Codable {
     var offer: String? { get set }
     var publisher: String? { get set }
     var sku: String? { get set }
     var osType: String? { get set }
     var version: String? { get set }
}


// 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
// GenerateArmTemplateRequestProtocol is parameters for generating an ARM template for deploying artifacts.
public protocol GenerateArmTemplateRequestProtocol : Codable {
     var virtualMachineName: String? { get set }
     var parameters: [ParameterInfoProtocol?]? { get set }
     var location: String? { get set }
     var fileUploadOptions: FileUploadOptionsEnum? { get set }
}


// 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
// GenerateUploadUriParameterProtocol is properties for generating an upload URI.
public protocol GenerateUploadUriParameterProtocol : Codable {
     var blobName: String? { get set }
}


// 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
// GenerateUploadUriResponseProtocol is reponse body for generating an upload URI.
public protocol GenerateUploadUriResponseProtocol : Codable {
     var uploadUri: String? { get set }
}


// 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
// HourDetailsFragmentProtocol is properties of an hourly schedule.
public protocol HourDetailsFragmentProtocol : Codable {
     var minute: Int32? { get set }
}


// 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
// HourDetailsProtocol is properties of an hourly schedule.
public protocol HourDetailsProtocol : Codable {
     var minute: Int32? { get set }
}


// 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
// IdentityPropertiesProtocol is properties of a managed identity
public protocol IdentityPropertiesProtocol : Codable {
     var type: String? { get set }
     var principalId: String? { get set }
     var tenantId: String? { get set }
     var clientSecretUrl: String? { get set }
}


// 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
// InboundNatRuleFragmentProtocol is a rule for NAT - exposing a VM's port (backendPort) on the public IP address using
// a load balancer.
public protocol InboundNatRuleFragmentProtocol : Codable {
     var transportProtocol: TransportProtocolEnum? { get set }
     var frontendPort: Int32? { get set }
     var backendPort: Int32? { get set }
}