// 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 PacketCaptureParametersData : PacketCaptureParametersProtocol {
    public var target: String
    public var bytesToCapturePerPacket: Int32?
    public var totalBytesPerSession: Int32?
    public var timeLimitInSeconds: Int32?
    public var storageLocation: PacketCaptureStorageLocationProtocol
    public var filters: [PacketCaptureFilterProtocol?]?

        enum CodingKeys: String, CodingKey {case target = "target"
        case bytesToCapturePerPacket = "bytesToCapturePerPacket"
        case totalBytesPerSession = "totalBytesPerSession"
        case timeLimitInSeconds = "timeLimitInSeconds"
        case storageLocation = "storageLocation"
        case filters = "filters"
        }

  public init(target: String, storageLocation: PacketCaptureStorageLocationProtocol)  {
    self.target = target
    self.storageLocation = storageLocation
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.target = try container.decode(String.self, forKey: .target)
    if container.contains(.bytesToCapturePerPacket) {
        self.bytesToCapturePerPacket = try container.decode(Int32?.self, forKey: .bytesToCapturePerPacket)
    }
    if container.contains(.totalBytesPerSession) {
        self.totalBytesPerSession = try container.decode(Int32?.self, forKey: .totalBytesPerSession)
    }
    if container.contains(.timeLimitInSeconds) {
        self.timeLimitInSeconds = try container.decode(Int32?.self, forKey: .timeLimitInSeconds)
    }
    self.storageLocation = try container.decode(PacketCaptureStorageLocationData.self, forKey: .storageLocation)
    if container.contains(.filters) {
        self.filters = try container.decode([PacketCaptureFilterData?]?.self, forKey: .filters)
    }
    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.target, forKey: .target)
    if self.bytesToCapturePerPacket != nil {try container.encode(self.bytesToCapturePerPacket, forKey: .bytesToCapturePerPacket)}
    if self.totalBytesPerSession != nil {try container.encode(self.totalBytesPerSession, forKey: .totalBytesPerSession)}
    if self.timeLimitInSeconds != nil {try container.encode(self.timeLimitInSeconds, forKey: .timeLimitInSeconds)}
    try container.encode(self.storageLocation as! PacketCaptureStorageLocationData, forKey: .storageLocation)
    if self.filters != nil {try container.encode(self.filters as! [PacketCaptureFilterData?]?, forKey: .filters)}
  }
}

extension DataFactory {
  public static func createPacketCaptureParametersProtocol(target: String, storageLocation: PacketCaptureStorageLocationProtocol) -> PacketCaptureParametersProtocol {
    return PacketCaptureParametersData(target: target, storageLocation: storageLocation)
  }
}


// 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 PacketCaptureQueryStatusResultData : PacketCaptureQueryStatusResultProtocol {
    public var name: String?
    public var id: String?
    public var captureStartTime: Date?
    public var packetCaptureStatus: PcStatusEnum?
    public var stopReason: String?
    public var packetCaptureError: [PcErrorEnum?]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case id = "id"
        case captureStartTime = "captureStartTime"
        case packetCaptureStatus = "packetCaptureStatus"
        case stopReason = "stopReason"
        case packetCaptureError = "packetCaptureError"
        }

  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(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.captureStartTime) {
        self.captureStartTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .captureStartTime)), format: .dateTime)
    }
    if container.contains(.packetCaptureStatus) {
        self.packetCaptureStatus = try container.decode(PcStatusEnum?.self, forKey: .packetCaptureStatus)
    }
    if container.contains(.stopReason) {
        self.stopReason = try container.decode(String?.self, forKey: .stopReason)
    }
    if container.contains(.packetCaptureError) {
        self.packetCaptureError = try container.decode([PcErrorEnum?]?.self, forKey: .packetCaptureError)
    }
    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.captureStartTime != nil {
        try container.encode(DateConverter.toString(date: self.captureStartTime!, format: .dateTime), forKey: .captureStartTime)
    }
    if self.packetCaptureStatus != nil {try container.encode(self.packetCaptureStatus, forKey: .packetCaptureStatus)}
    if self.stopReason != nil {try container.encode(self.stopReason, forKey: .stopReason)}
    if self.packetCaptureError != nil {try container.encode(self.packetCaptureError as! [PcErrorEnum?]?, forKey: .packetCaptureError)}
  }
}

extension DataFactory {
  public static func createPacketCaptureQueryStatusResultProtocol() -> PacketCaptureQueryStatusResultProtocol {
    return PacketCaptureQueryStatusResultData()
  }
}


// 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 PacketCaptureResultData : PacketCaptureResultProtocol {
    public var name: String?
    public var id: String?
    public var type: String?
    public var etag: String?
    public var properties: PacketCaptureResultPropertiesProtocol?

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

extension DataFactory {
  public static func createPacketCaptureResultProtocol() -> PacketCaptureResultProtocol {
    return PacketCaptureResultData()
  }
}


// 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 PacketCaptureResultPropertiesData : PacketCaptureResultPropertiesProtocol, PacketCaptureParametersProtocol {
    public var target: String
    public var bytesToCapturePerPacket: Int32?
    public var totalBytesPerSession: Int32?
    public var timeLimitInSeconds: Int32?
    public var storageLocation: PacketCaptureStorageLocationProtocol
    public var filters: [PacketCaptureFilterProtocol?]?
    public var provisioningState: ProvisioningStateEnum?

        enum CodingKeys: String, CodingKey {case target = "target"
        case bytesToCapturePerPacket = "bytesToCapturePerPacket"
        case totalBytesPerSession = "totalBytesPerSession"
        case timeLimitInSeconds = "timeLimitInSeconds"
        case storageLocation = "storageLocation"
        case filters = "filters"
        case provisioningState = "provisioningState"
        }

  public init(target: String, storageLocation: PacketCaptureStorageLocationProtocol)  {
    self.target = target
    self.storageLocation = storageLocation
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.target = try container.decode(String.self, forKey: .target)
    if container.contains(.bytesToCapturePerPacket) {
        self.bytesToCapturePerPacket = try container.decode(Int32?.self, forKey: .bytesToCapturePerPacket)
    }
    if container.contains(.totalBytesPerSession) {
        self.totalBytesPerSession = try container.decode(Int32?.self, forKey: .totalBytesPerSession)
    }
    if container.contains(.timeLimitInSeconds) {
        self.timeLimitInSeconds = try container.decode(Int32?.self, forKey: .timeLimitInSeconds)
    }
    self.storageLocation = try container.decode(PacketCaptureStorageLocationData.self, forKey: .storageLocation)
    if container.contains(.filters) {
        self.filters = try container.decode([PacketCaptureFilterData?]?.self, forKey: .filters)
    }
    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)
    try container.encode(self.target, forKey: .target)
    if self.bytesToCapturePerPacket != nil {try container.encode(self.bytesToCapturePerPacket, forKey: .bytesToCapturePerPacket)}
    if self.totalBytesPerSession != nil {try container.encode(self.totalBytesPerSession, forKey: .totalBytesPerSession)}
    if self.timeLimitInSeconds != nil {try container.encode(self.timeLimitInSeconds, forKey: .timeLimitInSeconds)}
    try container.encode(self.storageLocation as! PacketCaptureStorageLocationData, forKey: .storageLocation)
    if self.filters != nil {try container.encode(self.filters as! [PacketCaptureFilterData?]?, forKey: .filters)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createPacketCaptureResultPropertiesProtocol(target: String, storageLocation: PacketCaptureStorageLocationProtocol) -> PacketCaptureResultPropertiesProtocol {
    return PacketCaptureResultPropertiesData(target: target, storageLocation: storageLocation)
  }
}


// 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 PacketCaptureStorageLocationData : PacketCaptureStorageLocationProtocol {
    public var storageId: String?
    public var storagePath: String?
    public var filePath: String?

        enum CodingKeys: String, CodingKey {case storageId = "storageId"
        case storagePath = "storagePath"
        case filePath = "filePath"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createPacketCaptureStorageLocationProtocol() -> PacketCaptureStorageLocationProtocol {
    return PacketCaptureStorageLocationData()
  }
}


// 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 PatchRouteFilterData : PatchRouteFilterProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: RouteFilterPropertiesFormatProtocol?
    public var name: String?
    public var etag: String?
    public var type: String?
    public var tags: [String:String]?

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

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

extension DataFactory {
  public static func createPatchRouteFilterProtocol() -> PatchRouteFilterProtocol {
    return PatchRouteFilterData()
  }
}


// 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 PatchRouteFilterRuleData : PatchRouteFilterRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: RouteFilterRulePropertiesFormatProtocol?
    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(RouteFilterRulePropertiesFormatData?.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! RouteFilterRulePropertiesFormatData?, 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 createPatchRouteFilterRuleProtocol() -> PatchRouteFilterRuleProtocol {
    return PatchRouteFilterRuleData()
  }
}


// PcError enumerates the values for pc error.

// 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 PcErrorEnum: String, Codable
{
// AgentStopped specifies the agent stopped state for pc error.
    case AgentStopped = "AgentStopped"
// CaptureFailed specifies the capture failed state for pc error.
    case CaptureFailed = "CaptureFailed"
// InternalError specifies the internal error state for pc error.
    case InternalError = "InternalError"
// LocalFileFailed specifies the local file failed state for pc error.
    case LocalFileFailed = "LocalFileFailed"
// StorageFailed specifies the storage failed state for pc error.
    case StorageFailed = "StorageFailed"
}


// PcProtocol enumerates the values for pc protocol.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum PcProtocolEnum: String, Codable
{
// _any specifies the _ any state for pc protocol.
    case _any = "Any"
// TCP specifies the tcp state for pc protocol.
    case TCP = "TCP"
// UDP specifies the udp state for pc protocol.
    case UDP = "UDP"
}


// PcStatus enumerates the values for pc 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 PcStatusEnum: String, Codable
{
// PcStatusError specifies the pc status error state for pc status.
    case PcStatusError = "Error"
// PcStatusNotStarted specifies the pc status not started state for pc status.
    case PcStatusNotStarted = "NotStarted"
// PcStatusRunning specifies the pc status running state for pc status.
    case PcStatusRunning = "Running"
// PcStatusStopped specifies the pc status stopped state for pc status.
    case PcStatusStopped = "Stopped"
// PcStatusUnknown specifies the pc status unknown state for pc status.
    case PcStatusUnknown = "Unknown"
}


// PfsGroup enumerates the values for pfs group.

// 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 PfsGroupEnum: String, Codable
{
// PfsGroupECP256 specifies the pfs group ecp256 state for pfs group.
    case PfsGroupECP256 = "ECP256"
// PfsGroupECP384 specifies the pfs group ecp384 state for pfs group.
    case PfsGroupECP384 = "ECP384"
// PfsGroupNone specifies the pfs group none state for pfs group.
    case PfsGroupNone = "None"
// PfsGroupPFS1 specifies the pfs group pfs1 state for pfs group.
    case PfsGroupPFS1 = "PFS1"
// PfsGroupPFS2 specifies the pfs group pfs2 state for pfs group.
    case PfsGroupPFS2 = "PFS2"
// PfsGroupPFS2048 specifies the pfs group pfs2048 state for pfs group.
    case PfsGroupPFS2048 = "PFS2048"
// PfsGroupPFS24 specifies the pfs group pfs24 state for pfs group.
    case PfsGroupPFS24 = "PFS24"
}


// 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 ProbeData : ProbeProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: ProbePropertiesFormatProtocol?
    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(ProbePropertiesFormatData?.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! ProbePropertiesFormatData?, 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 createProbeProtocol() -> ProbeProtocol {
    return ProbeData()
  }
}


// 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 ProbePropertiesFormatData : ProbePropertiesFormatProtocol {
    public var loadBalancingRules: [SubResourceProtocol?]?
    public var _protocol: ProbeProtocolEnum
    public var port: Int32
    public var intervalInSeconds: Int32?
    public var numberOfProbes: Int32?
    public var requestPath: String?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case loadBalancingRules = "loadBalancingRules"
        case _protocol = "protocol"
        case port = "port"
        case intervalInSeconds = "intervalInSeconds"
        case numberOfProbes = "numberOfProbes"
        case requestPath = "requestPath"
        case provisioningState = "provisioningState"
        }

  public init(_protocol: ProbeProtocolEnum, port: Int32)  {
    self._protocol = _protocol
    self.port = port
  }

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

extension DataFactory {
  public static func createProbePropertiesFormatProtocol(_protocol: ProbeProtocolEnum, port: Int32) -> ProbePropertiesFormatProtocol {
    return ProbePropertiesFormatData(_protocol: _protocol, port: port)
  }
}


// ProbeProtocol enumerates the values for probe protocol.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ProbeProtocolEnum: String, Codable
{
// ProbeProtocolHttp specifies the probe protocol http state for probe protocol.
    case ProbeProtocolHttp = "Http"
// ProbeProtocolTcp specifies the probe protocol tcp state for probe protocol.
    case ProbeProtocolTcp = "Tcp"
}


// ProcessorArchitecture enumerates the values for processor architecture.

// 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 ProcessorArchitectureEnum: String, Codable
{
// Amd64 specifies the amd 64 state for processor architecture.
    case Amd64 = "Amd64"
// X86 specifies the x86 state for processor architecture.
    case X86 = "X86"
}


// Protocol enumerates the values for protocol.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ProtocolEnum: String, Codable
{
// ProtocolTCP specifies the protocol tcp state for protocol.
    case ProtocolTCP = "TCP"
// ProtocolUDP specifies the protocol udp state for protocol.
    case ProtocolUDP = "UDP"
}


// ProvisioningState enumerates the values for provisioning state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ProvisioningStateEnum: String, Codable
{
// Deleting specifies the deleting state for provisioning state.
    case Deleting = "Deleting"
// Failed specifies the failed state for provisioning state.
    case Failed = "Failed"
// Succeeded specifies the succeeded state for provisioning state.
    case Succeeded = "Succeeded"
// Updating specifies the updating state for provisioning state.
    case Updating = "Updating"
}


// 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 PublicIPAddressData : PublicIPAddressProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var sku: PublicIPAddressSkuProtocol?
    public var properties: PublicIPAddressPropertiesFormatProtocol?
    public var etag: String?
    public var zones: [String]?

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

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

extension DataFactory {
  public static func createPublicIPAddressProtocol() -> PublicIPAddressProtocol {
    return PublicIPAddressData()
  }
}


// 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 PublicIPAddressDnsSettingsData : PublicIPAddressDnsSettingsProtocol {
    public var domainNameLabel: String?
    public var fqdn: String?
    public var reverseFqdn: String?

        enum CodingKeys: String, CodingKey {case domainNameLabel = "domainNameLabel"
        case fqdn = "fqdn"
        case reverseFqdn = "reverseFqdn"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createPublicIPAddressDnsSettingsProtocol() -> PublicIPAddressDnsSettingsProtocol {
    return PublicIPAddressDnsSettingsData()
  }
}


// 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 PublicIPAddressListResultData : PublicIPAddressListResultProtocol {
    public var value: [PublicIPAddressProtocol?]?
    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([PublicIPAddressData?]?.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! [PublicIPAddressData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createPublicIPAddressListResultProtocol() -> PublicIPAddressListResultProtocol {
    return PublicIPAddressListResultData()
  }
}


// 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 PublicIPAddressPropertiesFormatData : PublicIPAddressPropertiesFormatProtocol {
    public var publicIPAllocationMethod: IPAllocationMethodEnum?
    public var publicIPAddressVersion: IPVersionEnum?
    public var ipConfiguration: IPConfigurationProtocol?
    public var dnsSettings: PublicIPAddressDnsSettingsProtocol?
    public var ipTags: [IpTagProtocol?]?
    public var ipAddress: String?
    public var idleTimeoutInMinutes: Int32?
    public var resourceGuid: String?
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case publicIPAllocationMethod = "publicIPAllocationMethod"
        case publicIPAddressVersion = "publicIPAddressVersion"
        case ipConfiguration = "ipConfiguration"
        case dnsSettings = "dnsSettings"
        case ipTags = "ipTags"
        case ipAddress = "ipAddress"
        case idleTimeoutInMinutes = "idleTimeoutInMinutes"
        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(.publicIPAllocationMethod) {
        self.publicIPAllocationMethod = try container.decode(IPAllocationMethodEnum?.self, forKey: .publicIPAllocationMethod)
    }
    if container.contains(.publicIPAddressVersion) {
        self.publicIPAddressVersion = try container.decode(IPVersionEnum?.self, forKey: .publicIPAddressVersion)
    }
    if container.contains(.ipConfiguration) {
        self.ipConfiguration = try container.decode(IPConfigurationData?.self, forKey: .ipConfiguration)
    }
    if container.contains(.dnsSettings) {
        self.dnsSettings = try container.decode(PublicIPAddressDnsSettingsData?.self, forKey: .dnsSettings)
    }
    if container.contains(.ipTags) {
        self.ipTags = try container.decode([IpTagData?]?.self, forKey: .ipTags)
    }
    if container.contains(.ipAddress) {
        self.ipAddress = try container.decode(String?.self, forKey: .ipAddress)
    }
    if container.contains(.idleTimeoutInMinutes) {
        self.idleTimeoutInMinutes = try container.decode(Int32?.self, forKey: .idleTimeoutInMinutes)
    }
    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.publicIPAllocationMethod != nil {try container.encode(self.publicIPAllocationMethod, forKey: .publicIPAllocationMethod)}
    if self.publicIPAddressVersion != nil {try container.encode(self.publicIPAddressVersion, forKey: .publicIPAddressVersion)}
    if self.ipConfiguration != nil {try container.encode(self.ipConfiguration as! IPConfigurationData?, forKey: .ipConfiguration)}
    if self.dnsSettings != nil {try container.encode(self.dnsSettings as! PublicIPAddressDnsSettingsData?, forKey: .dnsSettings)}
    if self.ipTags != nil {try container.encode(self.ipTags as! [IpTagData?]?, forKey: .ipTags)}
    if self.ipAddress != nil {try container.encode(self.ipAddress, forKey: .ipAddress)}
    if self.idleTimeoutInMinutes != nil {try container.encode(self.idleTimeoutInMinutes, forKey: .idleTimeoutInMinutes)}
    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 createPublicIPAddressPropertiesFormatProtocol() -> PublicIPAddressPropertiesFormatProtocol {
    return PublicIPAddressPropertiesFormatData()
  }
}


// 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 PublicIPAddressSkuData : PublicIPAddressSkuProtocol {
    public var name: PublicIPAddressSkuNameEnum?

        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(PublicIPAddressSkuNameEnum?.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 createPublicIPAddressSkuProtocol() -> PublicIPAddressSkuProtocol {
    return PublicIPAddressSkuData()
  }
}


// PublicIPAddressSkuName enumerates the values for public ip address 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 PublicIPAddressSkuNameEnum: String, Codable
{
// PublicIPAddressSkuNameBasic specifies the public ip address sku name basic state for public ip address sku name.
    case PublicIPAddressSkuNameBasic = "Basic"
// PublicIPAddressSkuNameStandard specifies the public ip address sku name standard state for public ip address sku
// name.
    case PublicIPAddressSkuNameStandard = "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 QueryTroubleshootingParametersData : QueryTroubleshootingParametersProtocol {
    public var targetResourceId: String

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.targetResourceId = try container.decode(String.self, forKey: .targetResourceId)
    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)
  }
}

extension DataFactory {
  public static func createQueryTroubleshootingParametersProtocol(targetResourceId: String) -> QueryTroubleshootingParametersProtocol {
    return QueryTroubleshootingParametersData(targetResourceId: targetResourceId)
  }
}


// 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 ResourceData : ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?

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

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

extension DataFactory {
  public static func createResourceProtocol() -> ResourceProtocol {
    return ResourceData()
  }
}


// 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 ResourceNavigationLinkData : ResourceNavigationLinkProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: ResourceNavigationLinkFormatProtocol?
    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(ResourceNavigationLinkFormatData?.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! ResourceNavigationLinkFormatData?, 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 createResourceNavigationLinkProtocol() -> ResourceNavigationLinkProtocol {
    return ResourceNavigationLinkData()
  }
}


// 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 ResourceNavigationLinkFormatData : ResourceNavigationLinkFormatProtocol {
    public var linkedResourceType: String?
    public var link: String?
    public var provisioningState: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createResourceNavigationLinkFormatProtocol() -> ResourceNavigationLinkFormatProtocol {
    return ResourceNavigationLinkFormatData()
  }
}


// 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 RetentionPolicyParametersData : RetentionPolicyParametersProtocol {
    public var days: Int32?
    public var enabled: Bool?

        enum CodingKeys: String, CodingKey {case days = "days"
        case enabled = "enabled"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRetentionPolicyParametersProtocol() -> RetentionPolicyParametersProtocol {
    return RetentionPolicyParametersData()
  }
}


// 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 RouteData : RouteProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: RoutePropertiesFormatProtocol?
    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(RoutePropertiesFormatData?.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! RoutePropertiesFormatData?, 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 createRouteProtocol() -> RouteProtocol {
    return RouteData()
  }
}


// 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 RouteFilterData : RouteFilterProtocol, 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: RouteFilterPropertiesFormatProtocol?
    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(RouteFilterPropertiesFormatData?.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! RouteFilterPropertiesFormatData?, forKey: .properties)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createRouteFilterProtocol() -> RouteFilterProtocol {
    return RouteFilterData()
  }
}


// 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 RouteFilterListResultData : RouteFilterListResultProtocol {
    public var value: [RouteFilterProtocol?]?
    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([RouteFilterData?]?.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! [RouteFilterData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRouteFilterListResultProtocol() -> RouteFilterListResultProtocol {
    return RouteFilterListResultData()
  }
}


// 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 RouteFilterPropertiesFormatData : RouteFilterPropertiesFormatProtocol {
    public var rules: [RouteFilterRuleProtocol?]?
    public var peerings: [ExpressRouteCircuitPeeringProtocol?]?
    public var provisioningState: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRouteFilterPropertiesFormatProtocol() -> RouteFilterPropertiesFormatProtocol {
    return RouteFilterPropertiesFormatData()
  }
}


// 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 RouteFilterRuleData : RouteFilterRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: RouteFilterRulePropertiesFormatProtocol?
    public var name: String?
    public var location: String?
    public var etag: String?

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

extension DataFactory {
  public static func createRouteFilterRuleProtocol() -> RouteFilterRuleProtocol {
    return RouteFilterRuleData()
  }
}


// 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 RouteFilterRuleListResultData : RouteFilterRuleListResultProtocol {
    public var value: [RouteFilterRuleProtocol?]?
    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([RouteFilterRuleData?]?.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! [RouteFilterRuleData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRouteFilterRuleListResultProtocol() -> RouteFilterRuleListResultProtocol {
    return RouteFilterRuleListResultData()
  }
}


// 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 RouteFilterRulePropertiesFormatData : RouteFilterRulePropertiesFormatProtocol {
    public var access: AccessEnum
    public var routeFilterRuleType: String
    public var communities: [String]
    public var provisioningState: String?

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

  public init(access: AccessEnum, routeFilterRuleType: String, communities: [String])  {
    self.access = access
    self.routeFilterRuleType = routeFilterRuleType
    self.communities = communities
  }

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

extension DataFactory {
  public static func createRouteFilterRulePropertiesFormatProtocol(access: AccessEnum, routeFilterRuleType: String, communities: [String]) -> RouteFilterRulePropertiesFormatProtocol {
    return RouteFilterRulePropertiesFormatData(access: access, routeFilterRuleType: routeFilterRuleType, communities: communities)
  }
}


// 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 RouteListResultData : RouteListResultProtocol {
    public var value: [RouteProtocol?]?
    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([RouteData?]?.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! [RouteData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRouteListResultProtocol() -> RouteListResultProtocol {
    return RouteListResultData()
  }
}


// RouteNextHopType enumerates the values for route 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 RouteNextHopTypeEnum: String, Codable
{
// RouteNextHopTypeInternet specifies the route next hop type internet state for route next hop type.
    case RouteNextHopTypeInternet = "Internet"
// RouteNextHopTypeNone specifies the route next hop type none state for route next hop type.
    case RouteNextHopTypeNone = "None"
// RouteNextHopTypeVirtualAppliance specifies the route next hop type virtual appliance state for route next hop type.
    case RouteNextHopTypeVirtualAppliance = "VirtualAppliance"
// RouteNextHopTypeVirtualNetworkGateway specifies the route next hop type virtual network gateway state for route next
// hop type.
    case RouteNextHopTypeVirtualNetworkGateway = "VirtualNetworkGateway"
// RouteNextHopTypeVnetLocal specifies the route next hop type vnet local state for route next hop type.
    case RouteNextHopTypeVnetLocal = "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 RoutePropertiesFormatData : RoutePropertiesFormatProtocol {
    public var addressPrefix: String?
    public var nextHopType: RouteNextHopTypeEnum
    public var nextHopIpAddress: String?
    public var provisioningState: String?

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

  public init(nextHopType: RouteNextHopTypeEnum)  {
    self.nextHopType = nextHopType
  }

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

extension DataFactory {
  public static func createRoutePropertiesFormatProtocol(nextHopType: RouteNextHopTypeEnum) -> RoutePropertiesFormatProtocol {
    return RoutePropertiesFormatData(nextHopType: nextHopType)
  }
}


// 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 RouteTableData : RouteTableProtocol, 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: RouteTablePropertiesFormatProtocol?
    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(RouteTablePropertiesFormatData?.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! RouteTablePropertiesFormatData?, forKey: .properties)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createRouteTableProtocol() -> RouteTableProtocol {
    return RouteTableData()
  }
}


// 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 RouteTableListResultData : RouteTableListResultProtocol {
    public var value: [RouteTableProtocol?]?
    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([RouteTableData?]?.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! [RouteTableData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRouteTableListResultProtocol() -> RouteTableListResultProtocol {
    return RouteTableListResultData()
  }
}


// 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 RouteTablePropertiesFormatData : RouteTablePropertiesFormatProtocol {
    public var routes: [RouteProtocol?]?
    public var subnets: [SubnetProtocol?]?
    public var disableBgpRoutePropagation: Bool?
    public var provisioningState: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRouteTablePropertiesFormatProtocol() -> RouteTablePropertiesFormatProtocol {
    return RouteTablePropertiesFormatData()
  }
}


// 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 SecurityGroupNetworkInterfaceData : SecurityGroupNetworkInterfaceProtocol {
    public var id: String?
    public var securityRuleAssociations: SecurityRuleAssociationsProtocol?

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

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

extension DataFactory {
  public static func createSecurityGroupNetworkInterfaceProtocol() -> SecurityGroupNetworkInterfaceProtocol {
    return SecurityGroupNetworkInterfaceData()
  }
}


// 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 SecurityGroupViewParametersData : SecurityGroupViewParametersProtocol {
    public var targetResourceId: String

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.targetResourceId = try container.decode(String.self, forKey: .targetResourceId)
    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)
  }
}

extension DataFactory {
  public static func createSecurityGroupViewParametersProtocol(targetResourceId: String) -> SecurityGroupViewParametersProtocol {
    return SecurityGroupViewParametersData(targetResourceId: targetResourceId)
  }
}


// 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 SecurityGroupViewResultData : SecurityGroupViewResultProtocol {
    public var networkInterfaces: [SecurityGroupNetworkInterfaceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createSecurityGroupViewResultProtocol() -> SecurityGroupViewResultProtocol {
    return SecurityGroupViewResultData()
  }
}


// SecurityRuleAccess enumerates the values for security rule access.

// 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 SecurityRuleAccessEnum: String, Codable
{
// SecurityRuleAccessAllow specifies the security rule access allow state for security rule access.
    case SecurityRuleAccessAllow = "Allow"
// SecurityRuleAccessDeny specifies the security rule access deny state for security rule access.
    case SecurityRuleAccessDeny = "Deny"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct SecurityRuleAssociationsData : SecurityRuleAssociationsProtocol {
    public var networkInterfaceAssociation: NetworkInterfaceAssociationProtocol?
    public var subnetAssociation: SubnetAssociationProtocol?
    public var defaultSecurityRules: [SecurityRuleProtocol?]?
    public var effectiveSecurityRules: [EffectiveNetworkSecurityRuleProtocol?]?

        enum CodingKeys: String, CodingKey {case networkInterfaceAssociation = "networkInterfaceAssociation"
        case subnetAssociation = "subnetAssociation"
        case defaultSecurityRules = "defaultSecurityRules"
        case effectiveSecurityRules = "effectiveSecurityRules"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.networkInterfaceAssociation) {
        self.networkInterfaceAssociation = try container.decode(NetworkInterfaceAssociationData?.self, forKey: .networkInterfaceAssociation)
    }
    if container.contains(.subnetAssociation) {
        self.subnetAssociation = try container.decode(SubnetAssociationData?.self, forKey: .subnetAssociation)
    }
    if container.contains(.defaultSecurityRules) {
        self.defaultSecurityRules = try container.decode([SecurityRuleData?]?.self, forKey: .defaultSecurityRules)
    }
    if container.contains(.effectiveSecurityRules) {
        self.effectiveSecurityRules = try container.decode([EffectiveNetworkSecurityRuleData?]?.self, forKey: .effectiveSecurityRules)
    }
    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.networkInterfaceAssociation != nil {try container.encode(self.networkInterfaceAssociation as! NetworkInterfaceAssociationData?, forKey: .networkInterfaceAssociation)}
    if self.subnetAssociation != nil {try container.encode(self.subnetAssociation as! SubnetAssociationData?, forKey: .subnetAssociation)}
    if self.defaultSecurityRules != nil {try container.encode(self.defaultSecurityRules as! [SecurityRuleData?]?, forKey: .defaultSecurityRules)}
    if self.effectiveSecurityRules != nil {try container.encode(self.effectiveSecurityRules as! [EffectiveNetworkSecurityRuleData?]?, forKey: .effectiveSecurityRules)}
  }
}

extension DataFactory {
  public static func createSecurityRuleAssociationsProtocol() -> SecurityRuleAssociationsProtocol {
    return SecurityRuleAssociationsData()
  }
}


// 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 SecurityRuleData : SecurityRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var properties: SecurityRulePropertiesFormatProtocol?
    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(SecurityRulePropertiesFormatData?.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! SecurityRulePropertiesFormatData?, 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 createSecurityRuleProtocol() -> SecurityRuleProtocol {
    return SecurityRuleData()
  }
}


// SecurityRuleDirection enumerates the values for security rule direction.

// 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 SecurityRuleDirectionEnum: String, Codable
{
// SecurityRuleDirectionInbound specifies the security rule direction inbound state for security rule direction.
    case SecurityRuleDirectionInbound = "Inbound"
// SecurityRuleDirectionOutbound specifies the security rule direction outbound state for security rule direction.
    case SecurityRuleDirectionOutbound = "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 SecurityRuleListResultData : SecurityRuleListResultProtocol {
    public var value: [SecurityRuleProtocol?]?
    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([SecurityRuleData?]?.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! [SecurityRuleData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createSecurityRuleListResultProtocol() -> SecurityRuleListResultProtocol {
    return SecurityRuleListResultData()
  }
}