// 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 LoadBalancerPropertiesFormatData : LoadBalancerPropertiesFormatProtocol {
    public var frontendIPConfigurations: [FrontendIPConfigurationProtocol?]?
    public var backendAddressPools: [BackendAddressPoolProtocol?]?
    public var loadBalancingRules: [LoadBalancingRuleProtocol?]?
    public var probes: [ProbeProtocol?]?
    public var inboundNatRules: [InboundNatRuleProtocol?]?
    public var inboundNatPools: [InboundNatPoolProtocol?]?
    public var outboundNatRules: [OutboundNatRuleProtocol?]?
    public var resourceGuid: String?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case frontendIPConfigurations = "frontendIPConfigurations"
        case backendAddressPools = "backendAddressPools"
        case loadBalancingRules = "loadBalancingRules"
        case probes = "probes"
        case inboundNatRules = "inboundNatRules"
        case inboundNatPools = "inboundNatPools"
        case outboundNatRules = "outboundNatRules"
        case resourceGuid = "resourceGuid"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.frontendIPConfigurations) {
        self.frontendIPConfigurations = try container.decode([FrontendIPConfigurationData?]?.self, forKey: .frontendIPConfigurations)
    }
    if container.contains(.backendAddressPools) {
        self.backendAddressPools = try container.decode([BackendAddressPoolData?]?.self, forKey: .backendAddressPools)
    }
    if container.contains(.loadBalancingRules) {
        self.loadBalancingRules = try container.decode([LoadBalancingRuleData?]?.self, forKey: .loadBalancingRules)
    }
    if container.contains(.probes) {
        self.probes = try container.decode([ProbeData?]?.self, forKey: .probes)
    }
    if container.contains(.inboundNatRules) {
        self.inboundNatRules = try container.decode([InboundNatRuleData?]?.self, forKey: .inboundNatRules)
    }
    if container.contains(.inboundNatPools) {
        self.inboundNatPools = try container.decode([InboundNatPoolData?]?.self, forKey: .inboundNatPools)
    }
    if container.contains(.outboundNatRules) {
        self.outboundNatRules = try container.decode([OutboundNatRuleData?]?.self, forKey: .outboundNatRules)
    }
    if container.contains(.resourceGuid) {
        self.resourceGuid = try container.decode(String?.self, forKey: .resourceGuid)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.frontendIPConfigurations != nil {try container.encode(self.frontendIPConfigurations as! [FrontendIPConfigurationData?]?, forKey: .frontendIPConfigurations)}
    if self.backendAddressPools != nil {try container.encode(self.backendAddressPools as! [BackendAddressPoolData?]?, forKey: .backendAddressPools)}
    if self.loadBalancingRules != nil {try container.encode(self.loadBalancingRules as! [LoadBalancingRuleData?]?, forKey: .loadBalancingRules)}
    if self.probes != nil {try container.encode(self.probes as! [ProbeData?]?, forKey: .probes)}
    if self.inboundNatRules != nil {try container.encode(self.inboundNatRules as! [InboundNatRuleData?]?, forKey: .inboundNatRules)}
    if self.inboundNatPools != nil {try container.encode(self.inboundNatPools as! [InboundNatPoolData?]?, forKey: .inboundNatPools)}
    if self.outboundNatRules != nil {try container.encode(self.outboundNatRules as! [OutboundNatRuleData?]?, forKey: .outboundNatRules)}
    if self.resourceGuid != nil {try container.encode(self.resourceGuid, forKey: .resourceGuid)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createLoadBalancerPropertiesFormatProtocol() -> LoadBalancerPropertiesFormatProtocol {
    return LoadBalancerPropertiesFormatData()
  }
}


// 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 LoadBalancerSkuData : LoadBalancerSkuProtocol {
    public var name: LoadBalancerSkuNameEnum?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createLoadBalancerSkuProtocol() -> LoadBalancerSkuProtocol {
    return LoadBalancerSkuData()
  }
}


// LoadBalancerSkuName enumerates the values for load balancer sku name.

// 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 LoadBalancerSkuNameEnum: String, Codable
{
// LoadBalancerSkuNameBasic specifies the load balancer sku name basic state for load balancer sku name.
    case LoadBalancerSkuNameBasic = "Basic"
// LoadBalancerSkuNameStandard specifies the load balancer sku name standard state for load balancer sku name.
    case LoadBalancerSkuNameStandard = "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 LoadBalancingRuleData : LoadBalancingRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: LoadBalancingRulePropertiesFormatProtocol?
    public var name: String?
    public var etag: String?

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

  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(.properties) {
        self.properties = try container.decode(LoadBalancingRulePropertiesFormatData?.self, forKey: .properties)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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.properties != nil {try container.encode(self.properties as! LoadBalancingRulePropertiesFormatData?, forKey: .properties)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createLoadBalancingRuleProtocol() -> LoadBalancingRuleProtocol {
    return LoadBalancingRuleData()
  }
}


// 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 LoadBalancingRulePropertiesFormatData : LoadBalancingRulePropertiesFormatProtocol {
    public var frontendIPConfiguration: SubResourceProtocol?
    public var backendAddressPool: SubResourceProtocol?
    public var probe: SubResourceProtocol?
    public var _protocol: TransportProtocolEnum
    public var loadDistribution: LoadDistributionEnum?
    public var frontendPort: Int32
    public var backendPort: Int32?
    public var idleTimeoutInMinutes: Int32?
    public var enableFloatingIP: Bool?
    public var disableOutboundSnat: Bool?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case frontendIPConfiguration = "frontendIPConfiguration"
        case backendAddressPool = "backendAddressPool"
        case probe = "probe"
        case _protocol = "protocol"
        case loadDistribution = "loadDistribution"
        case frontendPort = "frontendPort"
        case backendPort = "backendPort"
        case idleTimeoutInMinutes = "idleTimeoutInMinutes"
        case enableFloatingIP = "enableFloatingIP"
        case disableOutboundSnat = "disableOutboundSnat"
        case provisioningState = "provisioningState"
        }

  public init(_protocol: TransportProtocolEnum, frontendPort: Int32)  {
    self._protocol = _protocol
    self.frontendPort = frontendPort
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.frontendIPConfiguration) {
        self.frontendIPConfiguration = try container.decode(SubResourceData?.self, forKey: .frontendIPConfiguration)
    }
    if container.contains(.backendAddressPool) {
        self.backendAddressPool = try container.decode(SubResourceData?.self, forKey: .backendAddressPool)
    }
    if container.contains(.probe) {
        self.probe = try container.decode(SubResourceData?.self, forKey: .probe)
    }
    self._protocol = try container.decode(TransportProtocolEnum.self, forKey: ._protocol)
    if container.contains(.loadDistribution) {
        self.loadDistribution = try container.decode(LoadDistributionEnum?.self, forKey: .loadDistribution)
    }
    self.frontendPort = try container.decode(Int32.self, forKey: .frontendPort)
    if container.contains(.backendPort) {
        self.backendPort = try container.decode(Int32?.self, forKey: .backendPort)
    }
    if container.contains(.idleTimeoutInMinutes) {
        self.idleTimeoutInMinutes = try container.decode(Int32?.self, forKey: .idleTimeoutInMinutes)
    }
    if container.contains(.enableFloatingIP) {
        self.enableFloatingIP = try container.decode(Bool?.self, forKey: .enableFloatingIP)
    }
    if container.contains(.disableOutboundSnat) {
        self.disableOutboundSnat = try container.decode(Bool?.self, forKey: .disableOutboundSnat)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.frontendIPConfiguration != nil {try container.encode(self.frontendIPConfiguration as! SubResourceData?, forKey: .frontendIPConfiguration)}
    if self.backendAddressPool != nil {try container.encode(self.backendAddressPool as! SubResourceData?, forKey: .backendAddressPool)}
    if self.probe != nil {try container.encode(self.probe as! SubResourceData?, forKey: .probe)}
    try container.encode(self._protocol, forKey: ._protocol)
    if self.loadDistribution != nil {try container.encode(self.loadDistribution, forKey: .loadDistribution)}
    try container.encode(self.frontendPort, forKey: .frontendPort)
    if self.backendPort != nil {try container.encode(self.backendPort, forKey: .backendPort)}
    if self.idleTimeoutInMinutes != nil {try container.encode(self.idleTimeoutInMinutes, forKey: .idleTimeoutInMinutes)}
    if self.enableFloatingIP != nil {try container.encode(self.enableFloatingIP, forKey: .enableFloatingIP)}
    if self.disableOutboundSnat != nil {try container.encode(self.disableOutboundSnat, forKey: .disableOutboundSnat)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createLoadBalancingRulePropertiesFormatProtocol(_protocol: TransportProtocolEnum, frontendPort: Int32) -> LoadBalancingRulePropertiesFormatProtocol {
    return LoadBalancingRulePropertiesFormatData(_protocol: _protocol, frontendPort: frontendPort)
  }
}


// LoadDistribution enumerates the values for load distribution.

// 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 LoadDistributionEnum: String, Codable
{
// Default specifies the default state for load distribution.
    case Default = "Default"
// SourceIP specifies the source ip state for load distribution.
    case SourceIP = "SourceIP"
// SourceIPProtocol specifies the source ip protocol state for load distribution.
    case SourceIPProtocol = "SourceIPProtocol"
}


// 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 LocalNetworkGatewayData : LocalNetworkGatewayProtocol, 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: LocalNetworkGatewayPropertiesFormatProtocol
    public var etag: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        case properties = "properties"
        case etag = "etag"
        }

  public init(properties: LocalNetworkGatewayPropertiesFormatProtocol)  {
    self.properties = properties
  }

  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)
    }
    self.properties = try container.decode(LocalNetworkGatewayPropertiesFormatData.self, forKey: .properties)
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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)}
    try container.encode(self.properties as! LocalNetworkGatewayPropertiesFormatData, forKey: .properties)
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createLocalNetworkGatewayProtocol(properties: LocalNetworkGatewayPropertiesFormatProtocol) -> LocalNetworkGatewayProtocol {
    return LocalNetworkGatewayData(properties: properties)
  }
}


// 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 LocalNetworkGatewayListResultData : LocalNetworkGatewayListResultProtocol {
    public var value: [LocalNetworkGatewayProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createLocalNetworkGatewayListResultProtocol() -> LocalNetworkGatewayListResultProtocol {
    return LocalNetworkGatewayListResultData()
  }
}


// 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 LocalNetworkGatewayPropertiesFormatData : LocalNetworkGatewayPropertiesFormatProtocol {
    public var localNetworkAddressSpace: AddressSpaceProtocol?
    public var gatewayIpAddress: String?
    public var bgpSettings: BgpSettingsProtocol?
    public var resourceGuid: String?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case localNetworkAddressSpace = "localNetworkAddressSpace"
        case gatewayIpAddress = "gatewayIpAddress"
        case bgpSettings = "bgpSettings"
        case resourceGuid = "resourceGuid"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.localNetworkAddressSpace) {
        self.localNetworkAddressSpace = try container.decode(AddressSpaceData?.self, forKey: .localNetworkAddressSpace)
    }
    if container.contains(.gatewayIpAddress) {
        self.gatewayIpAddress = try container.decode(String?.self, forKey: .gatewayIpAddress)
    }
    if container.contains(.bgpSettings) {
        self.bgpSettings = try container.decode(BgpSettingsData?.self, forKey: .bgpSettings)
    }
    if container.contains(.resourceGuid) {
        self.resourceGuid = try container.decode(String?.self, forKey: .resourceGuid)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.localNetworkAddressSpace != nil {try container.encode(self.localNetworkAddressSpace as! AddressSpaceData?, forKey: .localNetworkAddressSpace)}
    if self.gatewayIpAddress != nil {try container.encode(self.gatewayIpAddress, forKey: .gatewayIpAddress)}
    if self.bgpSettings != nil {try container.encode(self.bgpSettings as! BgpSettingsData?, forKey: .bgpSettings)}
    if self.resourceGuid != nil {try container.encode(self.resourceGuid, forKey: .resourceGuid)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createLocalNetworkGatewayPropertiesFormatProtocol() -> LocalNetworkGatewayPropertiesFormatProtocol {
    return LocalNetworkGatewayPropertiesFormatData()
  }
}


// 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 LogSpecificationData : LogSpecificationProtocol {
    public var name: String?
    public var displayName: String?
    public var blobDuration: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createLogSpecificationProtocol() -> LogSpecificationProtocol {
    return LogSpecificationData()
  }
}


// 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 MetricSpecificationData : MetricSpecificationProtocol {
    public var name: String?
    public var displayName: String?
    public var displayDescription: String?
    public var unit: String?
    public var aggregationType: String?
    public var availabilities: [AvailabilityProtocol?]?
    public var enableRegionalMdmAccount: Bool?
    public var fillGapWithZero: Bool?
    public var metricFilterPattern: String?
    public var dimensions: [DimensionProtocol?]?
    public var isInternal: Bool?
    public var sourceMdmAccount: String?
    public var sourceMdmNamespace: String?
    public var resourceIdDimensionNameOverride: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case displayName = "displayName"
        case displayDescription = "displayDescription"
        case unit = "unit"
        case aggregationType = "aggregationType"
        case availabilities = "availabilities"
        case enableRegionalMdmAccount = "enableRegionalMdmAccount"
        case fillGapWithZero = "fillGapWithZero"
        case metricFilterPattern = "metricFilterPattern"
        case dimensions = "dimensions"
        case isInternal = "isInternal"
        case sourceMdmAccount = "sourceMdmAccount"
        case sourceMdmNamespace = "sourceMdmNamespace"
        case resourceIdDimensionNameOverride = "resourceIdDimensionNameOverride"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.displayName) {
        self.displayName = try container.decode(String?.self, forKey: .displayName)
    }
    if container.contains(.displayDescription) {
        self.displayDescription = try container.decode(String?.self, forKey: .displayDescription)
    }
    if container.contains(.unit) {
        self.unit = try container.decode(String?.self, forKey: .unit)
    }
    if container.contains(.aggregationType) {
        self.aggregationType = try container.decode(String?.self, forKey: .aggregationType)
    }
    if container.contains(.availabilities) {
        self.availabilities = try container.decode([AvailabilityData?]?.self, forKey: .availabilities)
    }
    if container.contains(.enableRegionalMdmAccount) {
        self.enableRegionalMdmAccount = try container.decode(Bool?.self, forKey: .enableRegionalMdmAccount)
    }
    if container.contains(.fillGapWithZero) {
        self.fillGapWithZero = try container.decode(Bool?.self, forKey: .fillGapWithZero)
    }
    if container.contains(.metricFilterPattern) {
        self.metricFilterPattern = try container.decode(String?.self, forKey: .metricFilterPattern)
    }
    if container.contains(.dimensions) {
        self.dimensions = try container.decode([DimensionData?]?.self, forKey: .dimensions)
    }
    if container.contains(.isInternal) {
        self.isInternal = try container.decode(Bool?.self, forKey: .isInternal)
    }
    if container.contains(.sourceMdmAccount) {
        self.sourceMdmAccount = try container.decode(String?.self, forKey: .sourceMdmAccount)
    }
    if container.contains(.sourceMdmNamespace) {
        self.sourceMdmNamespace = try container.decode(String?.self, forKey: .sourceMdmNamespace)
    }
    if container.contains(.resourceIdDimensionNameOverride) {
        self.resourceIdDimensionNameOverride = try container.decode(String?.self, forKey: .resourceIdDimensionNameOverride)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.displayName != nil {try container.encode(self.displayName, forKey: .displayName)}
    if self.displayDescription != nil {try container.encode(self.displayDescription, forKey: .displayDescription)}
    if self.unit != nil {try container.encode(self.unit, forKey: .unit)}
    if self.aggregationType != nil {try container.encode(self.aggregationType, forKey: .aggregationType)}
    if self.availabilities != nil {try container.encode(self.availabilities as! [AvailabilityData?]?, forKey: .availabilities)}
    if self.enableRegionalMdmAccount != nil {try container.encode(self.enableRegionalMdmAccount, forKey: .enableRegionalMdmAccount)}
    if self.fillGapWithZero != nil {try container.encode(self.fillGapWithZero, forKey: .fillGapWithZero)}
    if self.metricFilterPattern != nil {try container.encode(self.metricFilterPattern, forKey: .metricFilterPattern)}
    if self.dimensions != nil {try container.encode(self.dimensions as! [DimensionData?]?, forKey: .dimensions)}
    if self.isInternal != nil {try container.encode(self.isInternal, forKey: .isInternal)}
    if self.sourceMdmAccount != nil {try container.encode(self.sourceMdmAccount, forKey: .sourceMdmAccount)}
    if self.sourceMdmNamespace != nil {try container.encode(self.sourceMdmNamespace, forKey: .sourceMdmNamespace)}
    if self.resourceIdDimensionNameOverride != nil {try container.encode(self.resourceIdDimensionNameOverride, forKey: .resourceIdDimensionNameOverride)}
  }
}

extension DataFactory {
  public static func createMetricSpecificationProtocol() -> MetricSpecificationProtocol {
    return MetricSpecificationData()
  }
}


// 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 NetworkInterfaceAssociationData : NetworkInterfaceAssociationProtocol {
    public var id: String?
    public var securityRules: [SecurityRuleProtocol?]?

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

  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(.securityRules) {
        self.securityRules = try container.decode([SecurityRuleData?]?.self, forKey: .securityRules)
    }
    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.securityRules != nil {try container.encode(self.securityRules as! [SecurityRuleData?]?, forKey: .securityRules)}
  }
}

extension DataFactory {
  public static func createNetworkInterfaceAssociationProtocol() -> NetworkInterfaceAssociationProtocol {
    return NetworkInterfaceAssociationData()
  }
}


// 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 NetworkInterfaceData : NetworkInterfaceProtocol, 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: NetworkInterfacePropertiesFormatProtocol?
    public var etag: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        case properties = "properties"
        case etag = "etag"
        }

  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(NetworkInterfacePropertiesFormatData?.self, forKey: .properties)
    }
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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! NetworkInterfacePropertiesFormatData?, forKey: .properties)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createNetworkInterfaceProtocol() -> NetworkInterfaceProtocol {
    return NetworkInterfaceData()
  }
}


// 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 NetworkInterfaceDnsSettingsData : NetworkInterfaceDnsSettingsProtocol {
    public var dnsServers: [String]?
    public var appliedDnsServers: [String]?
    public var internalDnsNameLabel: String?
    public var internalFqdn: String?
    public var internalDomainNameSuffix: String?

        enum CodingKeys: String, CodingKey {case dnsServers = "dnsServers"
        case appliedDnsServers = "appliedDnsServers"
        case internalDnsNameLabel = "internalDnsNameLabel"
        case internalFqdn = "internalFqdn"
        case internalDomainNameSuffix = "internalDomainNameSuffix"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createNetworkInterfaceDnsSettingsProtocol() -> NetworkInterfaceDnsSettingsProtocol {
    return NetworkInterfaceDnsSettingsData()
  }
}


// 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 NetworkInterfaceIPConfigurationData : NetworkInterfaceIPConfigurationProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: NetworkInterfaceIPConfigurationPropertiesFormatProtocol?
    public var name: String?
    public var etag: String?

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

  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(.properties) {
        self.properties = try container.decode(NetworkInterfaceIPConfigurationPropertiesFormatData?.self, forKey: .properties)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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.properties != nil {try container.encode(self.properties as! NetworkInterfaceIPConfigurationPropertiesFormatData?, forKey: .properties)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createNetworkInterfaceIPConfigurationProtocol() -> NetworkInterfaceIPConfigurationProtocol {
    return NetworkInterfaceIPConfigurationData()
  }
}


// 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 NetworkInterfaceIPConfigurationListResultData : NetworkInterfaceIPConfigurationListResultProtocol {
    public var value: [NetworkInterfaceIPConfigurationProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNetworkInterfaceIPConfigurationListResultProtocol() -> NetworkInterfaceIPConfigurationListResultProtocol {
    return NetworkInterfaceIPConfigurationListResultData()
  }
}


// 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 NetworkInterfaceIPConfigurationPropertiesFormatData : NetworkInterfaceIPConfigurationPropertiesFormatProtocol {
    public var applicationGatewayBackendAddressPools: [ApplicationGatewayBackendAddressPoolProtocol?]?
    public var loadBalancerBackendAddressPools: [BackendAddressPoolProtocol?]?
    public var loadBalancerInboundNatRules: [InboundNatRuleProtocol?]?
    public var privateIPAddress: String?
    public var privateIPAllocationMethod: IPAllocationMethodEnum?
    public var privateIPAddressVersion: IPVersionEnum?
    public var subnet: SubnetProtocol?
    public var primary: Bool?
    public var publicIPAddress: PublicIPAddressProtocol?
    public var applicationSecurityGroups: [ApplicationSecurityGroupProtocol?]?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case applicationGatewayBackendAddressPools = "applicationGatewayBackendAddressPools"
        case loadBalancerBackendAddressPools = "loadBalancerBackendAddressPools"
        case loadBalancerInboundNatRules = "loadBalancerInboundNatRules"
        case privateIPAddress = "privateIPAddress"
        case privateIPAllocationMethod = "privateIPAllocationMethod"
        case privateIPAddressVersion = "privateIPAddressVersion"
        case subnet = "subnet"
        case primary = "primary"
        case publicIPAddress = "publicIPAddress"
        case applicationSecurityGroups = "applicationSecurityGroups"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.applicationGatewayBackendAddressPools) {
        self.applicationGatewayBackendAddressPools = try container.decode([ApplicationGatewayBackendAddressPoolData?]?.self, forKey: .applicationGatewayBackendAddressPools)
    }
    if container.contains(.loadBalancerBackendAddressPools) {
        self.loadBalancerBackendAddressPools = try container.decode([BackendAddressPoolData?]?.self, forKey: .loadBalancerBackendAddressPools)
    }
    if container.contains(.loadBalancerInboundNatRules) {
        self.loadBalancerInboundNatRules = try container.decode([InboundNatRuleData?]?.self, forKey: .loadBalancerInboundNatRules)
    }
    if container.contains(.privateIPAddress) {
        self.privateIPAddress = try container.decode(String?.self, forKey: .privateIPAddress)
    }
    if container.contains(.privateIPAllocationMethod) {
        self.privateIPAllocationMethod = try container.decode(IPAllocationMethodEnum?.self, forKey: .privateIPAllocationMethod)
    }
    if container.contains(.privateIPAddressVersion) {
        self.privateIPAddressVersion = try container.decode(IPVersionEnum?.self, forKey: .privateIPAddressVersion)
    }
    if container.contains(.subnet) {
        self.subnet = try container.decode(SubnetData?.self, forKey: .subnet)
    }
    if container.contains(.primary) {
        self.primary = try container.decode(Bool?.self, forKey: .primary)
    }
    if container.contains(.publicIPAddress) {
        self.publicIPAddress = try container.decode(PublicIPAddressData?.self, forKey: .publicIPAddress)
    }
    if container.contains(.applicationSecurityGroups) {
        self.applicationSecurityGroups = try container.decode([ApplicationSecurityGroupData?]?.self, forKey: .applicationSecurityGroups)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.applicationGatewayBackendAddressPools != nil {try container.encode(self.applicationGatewayBackendAddressPools as! [ApplicationGatewayBackendAddressPoolData?]?, forKey: .applicationGatewayBackendAddressPools)}
    if self.loadBalancerBackendAddressPools != nil {try container.encode(self.loadBalancerBackendAddressPools as! [BackendAddressPoolData?]?, forKey: .loadBalancerBackendAddressPools)}
    if self.loadBalancerInboundNatRules != nil {try container.encode(self.loadBalancerInboundNatRules as! [InboundNatRuleData?]?, forKey: .loadBalancerInboundNatRules)}
    if self.privateIPAddress != nil {try container.encode(self.privateIPAddress, forKey: .privateIPAddress)}
    if self.privateIPAllocationMethod != nil {try container.encode(self.privateIPAllocationMethod, forKey: .privateIPAllocationMethod)}
    if self.privateIPAddressVersion != nil {try container.encode(self.privateIPAddressVersion, forKey: .privateIPAddressVersion)}
    if self.subnet != nil {try container.encode(self.subnet as! SubnetData?, forKey: .subnet)}
    if self.primary != nil {try container.encode(self.primary, forKey: .primary)}
    if self.publicIPAddress != nil {try container.encode(self.publicIPAddress as! PublicIPAddressData?, forKey: .publicIPAddress)}
    if self.applicationSecurityGroups != nil {try container.encode(self.applicationSecurityGroups as! [ApplicationSecurityGroupData?]?, forKey: .applicationSecurityGroups)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createNetworkInterfaceIPConfigurationPropertiesFormatProtocol() -> NetworkInterfaceIPConfigurationPropertiesFormatProtocol {
    return NetworkInterfaceIPConfigurationPropertiesFormatData()
  }
}


// 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 NetworkInterfaceListResultData : NetworkInterfaceListResultProtocol {
    public var value: [NetworkInterfaceProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNetworkInterfaceListResultProtocol() -> NetworkInterfaceListResultProtocol {
    return NetworkInterfaceListResultData()
  }
}


// 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 NetworkInterfaceLoadBalancerListResultData : NetworkInterfaceLoadBalancerListResultProtocol {
    public var value: [LoadBalancerProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNetworkInterfaceLoadBalancerListResultProtocol() -> NetworkInterfaceLoadBalancerListResultProtocol {
    return NetworkInterfaceLoadBalancerListResultData()
  }
}


// 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 NetworkInterfacePropertiesFormatData : NetworkInterfacePropertiesFormatProtocol {
    public var virtualMachine: SubResourceProtocol?
    public var networkSecurityGroup: NetworkSecurityGroupProtocol?
    public var ipConfigurations: [NetworkInterfaceIPConfigurationProtocol?]?
    public var dnsSettings: NetworkInterfaceDnsSettingsProtocol?
    public var macAddress: String?
    public var primary: Bool?
    public var enableAcceleratedNetworking: Bool?
    public var enableIPForwarding: Bool?
    public var resourceGuid: String?
    public var provisioningState: String?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.virtualMachine) {
        self.virtualMachine = try container.decode(SubResourceData?.self, forKey: .virtualMachine)
    }
    if container.contains(.networkSecurityGroup) {
        self.networkSecurityGroup = try container.decode(NetworkSecurityGroupData?.self, forKey: .networkSecurityGroup)
    }
    if container.contains(.ipConfigurations) {
        self.ipConfigurations = try container.decode([NetworkInterfaceIPConfigurationData?]?.self, forKey: .ipConfigurations)
    }
    if container.contains(.dnsSettings) {
        self.dnsSettings = try container.decode(NetworkInterfaceDnsSettingsData?.self, forKey: .dnsSettings)
    }
    if container.contains(.macAddress) {
        self.macAddress = try container.decode(String?.self, forKey: .macAddress)
    }
    if container.contains(.primary) {
        self.primary = try container.decode(Bool?.self, forKey: .primary)
    }
    if container.contains(.enableAcceleratedNetworking) {
        self.enableAcceleratedNetworking = try container.decode(Bool?.self, forKey: .enableAcceleratedNetworking)
    }
    if container.contains(.enableIPForwarding) {
        self.enableIPForwarding = try container.decode(Bool?.self, forKey: .enableIPForwarding)
    }
    if container.contains(.resourceGuid) {
        self.resourceGuid = try container.decode(String?.self, forKey: .resourceGuid)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.virtualMachine != nil {try container.encode(self.virtualMachine as! SubResourceData?, forKey: .virtualMachine)}
    if self.networkSecurityGroup != nil {try container.encode(self.networkSecurityGroup as! NetworkSecurityGroupData?, forKey: .networkSecurityGroup)}
    if self.ipConfigurations != nil {try container.encode(self.ipConfigurations as! [NetworkInterfaceIPConfigurationData?]?, forKey: .ipConfigurations)}
    if self.dnsSettings != nil {try container.encode(self.dnsSettings as! NetworkInterfaceDnsSettingsData?, forKey: .dnsSettings)}
    if self.macAddress != nil {try container.encode(self.macAddress, forKey: .macAddress)}
    if self.primary != nil {try container.encode(self.primary, forKey: .primary)}
    if self.enableAcceleratedNetworking != nil {try container.encode(self.enableAcceleratedNetworking, forKey: .enableAcceleratedNetworking)}
    if self.enableIPForwarding != nil {try container.encode(self.enableIPForwarding, forKey: .enableIPForwarding)}
    if self.resourceGuid != nil {try container.encode(self.resourceGuid, forKey: .resourceGuid)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createNetworkInterfacePropertiesFormatProtocol() -> NetworkInterfacePropertiesFormatProtocol {
    return NetworkInterfacePropertiesFormatData()
  }
}


// NetworkOperationStatus enumerates the values for network operation 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 NetworkOperationStatusEnum: String, Codable
{
// NetworkOperationStatusFailed specifies the network operation status failed state for network operation status.
    case NetworkOperationStatusFailed = "Failed"
// NetworkOperationStatusInProgress specifies the network operation status in progress state for network operation
// status.
    case NetworkOperationStatusInProgress = "InProgress"
// NetworkOperationStatusSucceeded specifies the network operation status succeeded state for network operation status.
    case NetworkOperationStatusSucceeded = "Succeeded"
}


// 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 NetworkSecurityGroupData : NetworkSecurityGroupProtocol, 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: NetworkSecurityGroupPropertiesFormatProtocol?
    public var etag: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        case location = "location"
        case tags = "tags"
        case properties = "properties"
        case etag = "etag"
        }

  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(NetworkSecurityGroupPropertiesFormatData?.self, forKey: .properties)
    }
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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! NetworkSecurityGroupPropertiesFormatData?, forKey: .properties)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createNetworkSecurityGroupProtocol() -> NetworkSecurityGroupProtocol {
    return NetworkSecurityGroupData()
  }
}


// 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 NetworkSecurityGroupListResultData : NetworkSecurityGroupListResultProtocol {
    public var value: [NetworkSecurityGroupProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNetworkSecurityGroupListResultProtocol() -> NetworkSecurityGroupListResultProtocol {
    return NetworkSecurityGroupListResultData()
  }
}


// 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 NetworkSecurityGroupPropertiesFormatData : NetworkSecurityGroupPropertiesFormatProtocol {
    public var securityRules: [SecurityRuleProtocol?]?
    public var defaultSecurityRules: [SecurityRuleProtocol?]?
    public var networkInterfaces: [NetworkInterfaceProtocol?]?
    public var subnets: [SubnetProtocol?]?
    public var resourceGuid: String?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case securityRules = "securityRules"
        case defaultSecurityRules = "defaultSecurityRules"
        case networkInterfaces = "networkInterfaces"
        case subnets = "subnets"
        case resourceGuid = "resourceGuid"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.securityRules) {
        self.securityRules = try container.decode([SecurityRuleData?]?.self, forKey: .securityRules)
    }
    if container.contains(.defaultSecurityRules) {
        self.defaultSecurityRules = try container.decode([SecurityRuleData?]?.self, forKey: .defaultSecurityRules)
    }
    if container.contains(.networkInterfaces) {
        self.networkInterfaces = try container.decode([NetworkInterfaceData?]?.self, forKey: .networkInterfaces)
    }
    if container.contains(.subnets) {
        self.subnets = try container.decode([SubnetData?]?.self, forKey: .subnets)
    }
    if container.contains(.resourceGuid) {
        self.resourceGuid = try container.decode(String?.self, forKey: .resourceGuid)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    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.securityRules != nil {try container.encode(self.securityRules as! [SecurityRuleData?]?, forKey: .securityRules)}
    if self.defaultSecurityRules != nil {try container.encode(self.defaultSecurityRules as! [SecurityRuleData?]?, forKey: .defaultSecurityRules)}
    if self.networkInterfaces != nil {try container.encode(self.networkInterfaces as! [NetworkInterfaceData?]?, forKey: .networkInterfaces)}
    if self.subnets != nil {try container.encode(self.subnets as! [SubnetData?]?, forKey: .subnets)}
    if self.resourceGuid != nil {try container.encode(self.resourceGuid, forKey: .resourceGuid)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createNetworkSecurityGroupPropertiesFormatProtocol() -> NetworkSecurityGroupPropertiesFormatProtocol {
    return NetworkSecurityGroupPropertiesFormatData()
  }
}


// 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 NetworkWatcherData : NetworkWatcherProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var etag: String?
    public var properties: NetworkWatcherPropertiesFormatProtocol?

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

extension DataFactory {
  public static func createNetworkWatcherProtocol() -> NetworkWatcherProtocol {
    return NetworkWatcherData()
  }
}


// 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 NetworkWatcherListResultData : NetworkWatcherListResultProtocol {
    public var value: [NetworkWatcherProtocol?]?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNetworkWatcherListResultProtocol() -> NetworkWatcherListResultProtocol {
    return NetworkWatcherListResultData()
  }
}


// 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 NetworkWatcherPropertiesFormatData : NetworkWatcherPropertiesFormatProtocol {
    public var provisioningState: ProvisioningStateEnum?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createNetworkWatcherPropertiesFormatProtocol() -> NetworkWatcherPropertiesFormatProtocol {
    return NetworkWatcherPropertiesFormatData()
  }
}


// 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 NextHopParametersData : NextHopParametersProtocol {
    public var targetResourceId: String
    public var sourceIPAddress: String
    public var destinationIPAddress: String
    public var targetNicResourceId: String?

        enum CodingKeys: String, CodingKey {case targetResourceId = "targetResourceId"
        case sourceIPAddress = "sourceIPAddress"
        case destinationIPAddress = "destinationIPAddress"
        case targetNicResourceId = "targetNicResourceId"
        }

  public init(targetResourceId: String, sourceIPAddress: String, destinationIPAddress: String)  {
    self.targetResourceId = targetResourceId
    self.sourceIPAddress = sourceIPAddress
    self.destinationIPAddress = destinationIPAddress
  }

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

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

extension DataFactory {
  public static func createNextHopParametersProtocol(targetResourceId: String, sourceIPAddress: String, destinationIPAddress: String) -> NextHopParametersProtocol {
    return NextHopParametersData(targetResourceId: targetResourceId, sourceIPAddress: sourceIPAddress, destinationIPAddress: destinationIPAddress)
  }
}


// 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 NextHopResultData : NextHopResultProtocol {
    public var nextHopType: NextHopTypeEnum?
    public var nextHopIpAddress: String?
    public var routeTableId: String?

        enum CodingKeys: String, CodingKey {case nextHopType = "nextHopType"
        case nextHopIpAddress = "nextHopIpAddress"
        case routeTableId = "routeTableId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createNextHopResultProtocol() -> NextHopResultProtocol {
    return NextHopResultData()
  }
}


// NextHopType enumerates the values for next hop 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 NextHopTypeEnum: String, Codable
{
// NextHopTypeHyperNetGateway specifies the next hop type hyper net gateway state for next hop type.
    case NextHopTypeHyperNetGateway = "HyperNetGateway"
// NextHopTypeInternet specifies the next hop type internet state for next hop type.
    case NextHopTypeInternet = "Internet"
// NextHopTypeNone specifies the next hop type none state for next hop type.
    case NextHopTypeNone = "None"
// NextHopTypeVirtualAppliance specifies the next hop type virtual appliance state for next hop type.
    case NextHopTypeVirtualAppliance = "VirtualAppliance"
// NextHopTypeVirtualNetworkGateway specifies the next hop type virtual network gateway state for next hop type.
    case NextHopTypeVirtualNetworkGateway = "VirtualNetworkGateway"
// NextHopTypeVnetLocal specifies the next hop type vnet local state for next hop type.
    case NextHopTypeVnetLocal = "VnetLocal"
}


// 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 OperationData : OperationProtocol {
    public var name: String?
    public var display: OperationDisplayProtocol?
    public var origin: String?
    public var properties: OperationPropertiesFormatProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createOperationProtocol() -> OperationProtocol {
    return OperationData()
  }
}


// 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 OperationDisplayData : OperationDisplayProtocol {
    public var provider: String?
    public var resource: String?
    public var operation: String?
    public var description: String?

        enum CodingKeys: String, CodingKey {case provider = "provider"
        case resource = "resource"
        case operation = "operation"
        case description = "description"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createOperationDisplayProtocol() -> OperationDisplayProtocol {
    return OperationDisplayData()
  }
}


// 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 OperationListResultData : OperationListResultProtocol {
    public var value: [OperationProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createOperationListResultProtocol() -> OperationListResultProtocol {
    return OperationListResultData()
  }
}


// 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 OperationPropertiesFormatData : OperationPropertiesFormatProtocol {
    public var serviceSpecification: OperationPropertiesFormatServiceSpecificationProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createOperationPropertiesFormatProtocol() -> OperationPropertiesFormatProtocol {
    return OperationPropertiesFormatData()
  }
}


// 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 OperationPropertiesFormatServiceSpecificationData : OperationPropertiesFormatServiceSpecificationProtocol {
    public var metricSpecifications: [MetricSpecificationProtocol?]?
    public var logSpecifications: [LogSpecificationProtocol?]?

        enum CodingKeys: String, CodingKey {case metricSpecifications = "metricSpecifications"
        case logSpecifications = "logSpecifications"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createOperationPropertiesFormatServiceSpecificationProtocol() -> OperationPropertiesFormatServiceSpecificationProtocol {
    return OperationPropertiesFormatServiceSpecificationData()
  }
}


// Origin enumerates the values for origin.

// 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 OriginEnum: String, Codable
{
// OriginInbound specifies the origin inbound state for origin.
    case OriginInbound = "Inbound"
// OriginLocal specifies the origin local state for origin.
    case OriginLocal = "Local"
// OriginOutbound specifies the origin outbound state for origin.
    case OriginOutbound = "Outbound"
}


// 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 OutboundNatRuleData : OutboundNatRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: OutboundNatRulePropertiesFormatProtocol?
    public var name: String?
    public var etag: String?

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

  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(.properties) {
        self.properties = try container.decode(OutboundNatRulePropertiesFormatData?.self, forKey: .properties)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.etag) {
        self.etag = try container.decode(String?.self, forKey: .etag)
    }
    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.properties != nil {try container.encode(self.properties as! OutboundNatRulePropertiesFormatData?, forKey: .properties)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createOutboundNatRuleProtocol() -> OutboundNatRuleProtocol {
    return OutboundNatRuleData()
  }
}


// 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 OutboundNatRulePropertiesFormatData : OutboundNatRulePropertiesFormatProtocol {
    public var allocatedOutboundPorts: Int32?
    public var frontendIPConfigurations: [SubResourceProtocol?]?
    public var backendAddressPool: SubResourceProtocol
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case allocatedOutboundPorts = "allocatedOutboundPorts"
        case frontendIPConfigurations = "frontendIPConfigurations"
        case backendAddressPool = "backendAddressPool"
        case provisioningState = "provisioningState"
        }

  public init(backendAddressPool: SubResourceProtocol)  {
    self.backendAddressPool = backendAddressPool
  }

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

extension DataFactory {
  public static func createOutboundNatRulePropertiesFormatProtocol(backendAddressPool: SubResourceProtocol) -> OutboundNatRulePropertiesFormatProtocol {
    return OutboundNatRulePropertiesFormatData(backendAddressPool: backendAddressPool)
  }
}


// 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 PacketCaptureData : PacketCaptureProtocol {
    public var name: String?
    public var id: String?
    public var type: String?
    public var properties: PacketCaptureParametersProtocol

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

  public init(properties: PacketCaptureParametersProtocol)  {
    self.properties = properties
  }

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

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

extension DataFactory {
  public static func createPacketCaptureProtocol(properties: PacketCaptureParametersProtocol) -> PacketCaptureProtocol {
    return PacketCaptureData(properties: properties)
  }
}


// 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 PacketCaptureFilterData : PacketCaptureFilterProtocol {
    public var _protocol: PcProtocolEnum?
    public var localIPAddress: String?
    public var remoteIPAddress: String?
    public var localPort: String?
    public var remotePort: String?

        enum CodingKeys: String, CodingKey {case _protocol = "protocol"
        case localIPAddress = "localIPAddress"
        case remoteIPAddress = "remoteIPAddress"
        case localPort = "localPort"
        case remotePort = "remotePort"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createPacketCaptureFilterProtocol() -> PacketCaptureFilterProtocol {
    return PacketCaptureFilterData()
  }
}


// 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 PacketCaptureListResultData : PacketCaptureListResultProtocol {
    public var value: [PacketCaptureResultProtocol?]?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createPacketCaptureListResultProtocol() -> PacketCaptureListResultProtocol {
    return PacketCaptureListResultData()
  }
}