// 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 SwitchProtectionInputPropertiesData : SwitchProtectionInputPropertiesProtocol {
    public var replicationProtectedItemName: String?
    public var providerSpecificDetails: SwitchProtectionProviderSpecificInputProtocol?

        enum CodingKeys: String, CodingKey {case replicationProtectedItemName = "replicationProtectedItemName"
        case providerSpecificDetails = "providerSpecificDetails"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSwitchProtectionInputPropertiesProtocol() -> SwitchProtectionInputPropertiesProtocol {
    return SwitchProtectionInputPropertiesData()
  }
}


// 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 SwitchProtectionJobDetailsData : SwitchProtectionJobDetailsProtocol, JobDetailsProtocol {
    public var affectedObjectDetails: [String:String]?
    public var newReplicationProtectedItemId: String?

        enum CodingKeys: String, CodingKey {case affectedObjectDetails = "affectedObjectDetails"
        case newReplicationProtectedItemId = "newReplicationProtectedItemId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSwitchProtectionJobDetailsProtocol() -> SwitchProtectionJobDetailsProtocol {
    return SwitchProtectionJobDetailsData()
  }
}


// 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 SwitchProtectionProviderSpecificInputData : SwitchProtectionProviderSpecificInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createSwitchProtectionProviderSpecificInputProtocol() -> SwitchProtectionProviderSpecificInputProtocol {
    return SwitchProtectionProviderSpecificInputData()
  }
}


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

extension DataFactory {
  public static func createTargetComputeSizeCollectionProtocol() -> TargetComputeSizeCollectionProtocol {
    return TargetComputeSizeCollectionData()
  }
}


// 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 TargetComputeSizeData : TargetComputeSizeProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: TargetComputeSizePropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createTargetComputeSizeProtocol() -> TargetComputeSizeProtocol {
    return TargetComputeSizeData()
  }
}


// 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 TargetComputeSizePropertiesData : TargetComputeSizePropertiesProtocol {
    public var name: String?
    public var friendlyName: String?
    public var cpuCoresCount: Int32?
    public var memoryInGB: Double?
    public var maxDataDiskCount: Int32?
    public var maxNicsCount: Int32?
    public var errors: [ComputeSizeErrorDetailsProtocol?]?
    public var highIopsSupported: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case friendlyName = "friendlyName"
        case cpuCoresCount = "cpuCoresCount"
        case memoryInGB = "memoryInGB"
        case maxDataDiskCount = "maxDataDiskCount"
        case maxNicsCount = "maxNicsCount"
        case errors = "errors"
        case highIopsSupported = "highIopsSupported"
        }

  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(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.cpuCoresCount) {
        self.cpuCoresCount = try container.decode(Int32?.self, forKey: .cpuCoresCount)
    }
    if container.contains(.memoryInGB) {
        self.memoryInGB = try container.decode(Double?.self, forKey: .memoryInGB)
    }
    if container.contains(.maxDataDiskCount) {
        self.maxDataDiskCount = try container.decode(Int32?.self, forKey: .maxDataDiskCount)
    }
    if container.contains(.maxNicsCount) {
        self.maxNicsCount = try container.decode(Int32?.self, forKey: .maxNicsCount)
    }
    if container.contains(.errors) {
        self.errors = try container.decode([ComputeSizeErrorDetailsData?]?.self, forKey: .errors)
    }
    if container.contains(.highIopsSupported) {
        self.highIopsSupported = try container.decode(String?.self, forKey: .highIopsSupported)
    }
    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.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.cpuCoresCount != nil {try container.encode(self.cpuCoresCount, forKey: .cpuCoresCount)}
    if self.memoryInGB != nil {try container.encode(self.memoryInGB, forKey: .memoryInGB)}
    if self.maxDataDiskCount != nil {try container.encode(self.maxDataDiskCount, forKey: .maxDataDiskCount)}
    if self.maxNicsCount != nil {try container.encode(self.maxNicsCount, forKey: .maxNicsCount)}
    if self.errors != nil {try container.encode(self.errors as! [ComputeSizeErrorDetailsData?]?, forKey: .errors)}
    if self.highIopsSupported != nil {try container.encode(self.highIopsSupported, forKey: .highIopsSupported)}
  }
}

extension DataFactory {
  public static func createTargetComputeSizePropertiesProtocol() -> TargetComputeSizePropertiesProtocol {
    return TargetComputeSizePropertiesData()
  }
}


// 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 TaskTypeDetailsData : TaskTypeDetailsProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createTaskTypeDetailsProtocol() -> TaskTypeDetailsProtocol {
    return TaskTypeDetailsData()
  }
}


// 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 TestFailoverCleanupInputData : TestFailoverCleanupInputProtocol {
    public var properties: TestFailoverCleanupInputPropertiesProtocol

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

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

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

extension DataFactory {
  public static func createTestFailoverCleanupInputProtocol(properties: TestFailoverCleanupInputPropertiesProtocol) -> TestFailoverCleanupInputProtocol {
    return TestFailoverCleanupInputData(properties: properties)
  }
}


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

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

  public init()  {
  }

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

extension DataFactory {
  public static func createTestFailoverCleanupInputPropertiesProtocol() -> TestFailoverCleanupInputPropertiesProtocol {
    return TestFailoverCleanupInputPropertiesData()
  }
}


// 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 TestFailoverInputData : TestFailoverInputProtocol {
    public var properties: TestFailoverInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createTestFailoverInputProtocol() -> TestFailoverInputProtocol {
    return TestFailoverInputData()
  }
}


// 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 TestFailoverInputPropertiesData : TestFailoverInputPropertiesProtocol {
    public var failoverDirection: String?
    public var networkType: String?
    public var networkId: String?
    public var skipTestFailoverCleanup: String?
    public var providerSpecificDetails: ProviderSpecificFailoverInputProtocol?

        enum CodingKeys: String, CodingKey {case failoverDirection = "failoverDirection"
        case networkType = "networkType"
        case networkId = "networkId"
        case skipTestFailoverCleanup = "skipTestFailoverCleanup"
        case providerSpecificDetails = "providerSpecificDetails"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createTestFailoverInputPropertiesProtocol() -> TestFailoverInputPropertiesProtocol {
    return TestFailoverInputPropertiesData()
  }
}


// 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 TestFailoverJobDetailsData : TestFailoverJobDetailsProtocol, JobDetailsProtocol {
    public var affectedObjectDetails: [String:String]?
    public var testFailoverStatus: String?
    public var comments: String?
    public var networkName: String?
    public var networkFriendlyName: String?
    public var networkType: String?
    public var protectedItemDetails: [FailoverReplicationProtectedItemDetailsProtocol?]?

        enum CodingKeys: String, CodingKey {case affectedObjectDetails = "affectedObjectDetails"
        case testFailoverStatus = "testFailoverStatus"
        case comments = "comments"
        case networkName = "networkName"
        case networkFriendlyName = "networkFriendlyName"
        case networkType = "networkType"
        case protectedItemDetails = "protectedItemDetails"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createTestFailoverJobDetailsProtocol() -> TestFailoverJobDetailsProtocol {
    return TestFailoverJobDetailsData()
  }
}


// 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 UnplannedFailoverInputData : UnplannedFailoverInputProtocol {
    public var properties: UnplannedFailoverInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUnplannedFailoverInputProtocol() -> UnplannedFailoverInputProtocol {
    return UnplannedFailoverInputData()
  }
}


// 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 UnplannedFailoverInputPropertiesData : UnplannedFailoverInputPropertiesProtocol {
    public var failoverDirection: String?
    public var sourceSiteOperations: String?
    public var providerSpecificDetails: ProviderSpecificFailoverInputProtocol?

        enum CodingKeys: String, CodingKey {case failoverDirection = "failoverDirection"
        case sourceSiteOperations = "sourceSiteOperations"
        case providerSpecificDetails = "providerSpecificDetails"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUnplannedFailoverInputPropertiesProtocol() -> UnplannedFailoverInputPropertiesProtocol {
    return UnplannedFailoverInputPropertiesData()
  }
}


// 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 UpdateMobilityServiceRequestData : UpdateMobilityServiceRequestProtocol {
    public var properties: UpdateMobilityServiceRequestPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateMobilityServiceRequestProtocol() -> UpdateMobilityServiceRequestProtocol {
    return UpdateMobilityServiceRequestData()
  }
}


// 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 UpdateMobilityServiceRequestPropertiesData : UpdateMobilityServiceRequestPropertiesProtocol {
    public var runAsAccountId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateMobilityServiceRequestPropertiesProtocol() -> UpdateMobilityServiceRequestPropertiesProtocol {
    return UpdateMobilityServiceRequestPropertiesData()
  }
}


// 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 UpdateNetworkMappingInputData : UpdateNetworkMappingInputProtocol {
    public var properties: UpdateNetworkMappingInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateNetworkMappingInputProtocol() -> UpdateNetworkMappingInputProtocol {
    return UpdateNetworkMappingInputData()
  }
}


// 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 UpdateNetworkMappingInputPropertiesData : UpdateNetworkMappingInputPropertiesProtocol {
    public var recoveryFabricName: String?
    public var recoveryNetworkId: String?
    public var fabricSpecificDetails: FabricSpecificUpdateNetworkMappingInputProtocol?

        enum CodingKeys: String, CodingKey {case recoveryFabricName = "recoveryFabricName"
        case recoveryNetworkId = "recoveryNetworkId"
        case fabricSpecificDetails = "fabricSpecificDetails"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateNetworkMappingInputPropertiesProtocol() -> UpdateNetworkMappingInputPropertiesProtocol {
    return UpdateNetworkMappingInputPropertiesData()
  }
}


// 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 UpdatePolicyInputData : UpdatePolicyInputProtocol {
    public var properties: UpdatePolicyInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdatePolicyInputProtocol() -> UpdatePolicyInputProtocol {
    return UpdatePolicyInputData()
  }
}


// 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 UpdatePolicyInputPropertiesData : UpdatePolicyInputPropertiesProtocol {
    public var replicationProviderSettings: PolicyProviderSpecificInputProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdatePolicyInputPropertiesProtocol() -> UpdatePolicyInputPropertiesProtocol {
    return UpdatePolicyInputPropertiesData()
  }
}


// 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 UpdateRecoveryPlanInputData : UpdateRecoveryPlanInputProtocol {
    public var properties: UpdateRecoveryPlanInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateRecoveryPlanInputProtocol() -> UpdateRecoveryPlanInputProtocol {
    return UpdateRecoveryPlanInputData()
  }
}


// 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 UpdateRecoveryPlanInputPropertiesData : UpdateRecoveryPlanInputPropertiesProtocol {
    public var groups: [RecoveryPlanGroupProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateRecoveryPlanInputPropertiesProtocol() -> UpdateRecoveryPlanInputPropertiesProtocol {
    return UpdateRecoveryPlanInputPropertiesData()
  }
}


// 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 UpdateReplicationProtectedItemInputData : UpdateReplicationProtectedItemInputProtocol {
    public var properties: UpdateReplicationProtectedItemInputPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateReplicationProtectedItemInputProtocol() -> UpdateReplicationProtectedItemInputProtocol {
    return UpdateReplicationProtectedItemInputData()
  }
}


// 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 UpdateReplicationProtectedItemInputPropertiesData : UpdateReplicationProtectedItemInputPropertiesProtocol {
    public var recoveryAzureVMName: String?
    public var recoveryAzureVMSize: String?
    public var selectedRecoveryAzureNetworkId: String?
    public var selectedSourceNicId: String?
    public var enableRdpOnTargetOption: String?
    public var vmNics: [VMNicInputDetailsProtocol?]?
    public var licenseType: LicenseTypeEnum?
    public var recoveryAvailabilitySetId: String?
    public var providerSpecificDetails: UpdateReplicationProtectedItemProviderInputProtocol?

        enum CodingKeys: String, CodingKey {case recoveryAzureVMName = "recoveryAzureVMName"
        case recoveryAzureVMSize = "recoveryAzureVMSize"
        case selectedRecoveryAzureNetworkId = "selectedRecoveryAzureNetworkId"
        case selectedSourceNicId = "selectedSourceNicId"
        case enableRdpOnTargetOption = "enableRdpOnTargetOption"
        case vmNics = "vmNics"
        case licenseType = "licenseType"
        case recoveryAvailabilitySetId = "recoveryAvailabilitySetId"
        case providerSpecificDetails = "providerSpecificDetails"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.recoveryAzureVMName) {
        self.recoveryAzureVMName = try container.decode(String?.self, forKey: .recoveryAzureVMName)
    }
    if container.contains(.recoveryAzureVMSize) {
        self.recoveryAzureVMSize = try container.decode(String?.self, forKey: .recoveryAzureVMSize)
    }
    if container.contains(.selectedRecoveryAzureNetworkId) {
        self.selectedRecoveryAzureNetworkId = try container.decode(String?.self, forKey: .selectedRecoveryAzureNetworkId)
    }
    if container.contains(.selectedSourceNicId) {
        self.selectedSourceNicId = try container.decode(String?.self, forKey: .selectedSourceNicId)
    }
    if container.contains(.enableRdpOnTargetOption) {
        self.enableRdpOnTargetOption = try container.decode(String?.self, forKey: .enableRdpOnTargetOption)
    }
    if container.contains(.vmNics) {
        self.vmNics = try container.decode([VMNicInputDetailsData?]?.self, forKey: .vmNics)
    }
    if container.contains(.licenseType) {
        self.licenseType = try container.decode(LicenseTypeEnum?.self, forKey: .licenseType)
    }
    if container.contains(.recoveryAvailabilitySetId) {
        self.recoveryAvailabilitySetId = try container.decode(String?.self, forKey: .recoveryAvailabilitySetId)
    }
    if container.contains(.providerSpecificDetails) {
        self.providerSpecificDetails = try container.decode(UpdateReplicationProtectedItemProviderInputData?.self, forKey: .providerSpecificDetails)
    }
    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.recoveryAzureVMName != nil {try container.encode(self.recoveryAzureVMName, forKey: .recoveryAzureVMName)}
    if self.recoveryAzureVMSize != nil {try container.encode(self.recoveryAzureVMSize, forKey: .recoveryAzureVMSize)}
    if self.selectedRecoveryAzureNetworkId != nil {try container.encode(self.selectedRecoveryAzureNetworkId, forKey: .selectedRecoveryAzureNetworkId)}
    if self.selectedSourceNicId != nil {try container.encode(self.selectedSourceNicId, forKey: .selectedSourceNicId)}
    if self.enableRdpOnTargetOption != nil {try container.encode(self.enableRdpOnTargetOption, forKey: .enableRdpOnTargetOption)}
    if self.vmNics != nil {try container.encode(self.vmNics as! [VMNicInputDetailsData?]?, forKey: .vmNics)}
    if self.licenseType != nil {try container.encode(self.licenseType, forKey: .licenseType)}
    if self.recoveryAvailabilitySetId != nil {try container.encode(self.recoveryAvailabilitySetId, forKey: .recoveryAvailabilitySetId)}
    if self.providerSpecificDetails != nil {try container.encode(self.providerSpecificDetails as! UpdateReplicationProtectedItemProviderInputData?, forKey: .providerSpecificDetails)}
  }
}

extension DataFactory {
  public static func createUpdateReplicationProtectedItemInputPropertiesProtocol() -> UpdateReplicationProtectedItemInputPropertiesProtocol {
    return UpdateReplicationProtectedItemInputPropertiesData()
  }
}


// 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 UpdateReplicationProtectedItemProviderInputData : UpdateReplicationProtectedItemProviderInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createUpdateReplicationProtectedItemProviderInputProtocol() -> UpdateReplicationProtectedItemProviderInputProtocol {
    return UpdateReplicationProtectedItemProviderInputData()
  }
}


// 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 UpdateVCenterRequestData : UpdateVCenterRequestProtocol {
    public var properties: UpdateVCenterRequestPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateVCenterRequestProtocol() -> UpdateVCenterRequestProtocol {
    return UpdateVCenterRequestData()
  }
}


// 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 UpdateVCenterRequestPropertiesData : UpdateVCenterRequestPropertiesProtocol {
    public var friendlyName: String?
    public var ipAddress: String?
    public var processServerId: String?
    public var port: String?
    public var runAsAccountId: String?

        enum CodingKeys: String, CodingKey {case friendlyName = "friendlyName"
        case ipAddress = "ipAddress"
        case processServerId = "processServerId"
        case port = "port"
        case runAsAccountId = "runAsAccountId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateVCenterRequestPropertiesProtocol() -> UpdateVCenterRequestPropertiesProtocol {
    return UpdateVCenterRequestPropertiesData()
  }
}


// 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 VaultHealthDetailsData : VaultHealthDetailsProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var properties: VaultHealthPropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createVaultHealthDetailsProtocol() -> VaultHealthDetailsProtocol {
    return VaultHealthDetailsData()
  }
}


// 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 VaultHealthPropertiesData : VaultHealthPropertiesProtocol {
    public var vaultErrors: [HealthErrorProtocol?]?
    public var protectedItemsHealth: ResourceHealthSummaryProtocol?
    public var fabricsHealth: ResourceHealthSummaryProtocol?

        enum CodingKeys: String, CodingKey {case vaultErrors = "vaultErrors"
        case protectedItemsHealth = "protectedItemsHealth"
        case fabricsHealth = "fabricsHealth"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createVaultHealthPropertiesProtocol() -> VaultHealthPropertiesProtocol {
    return VaultHealthPropertiesData()
  }
}


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

extension DataFactory {
  public static func createVCenterCollectionProtocol() -> VCenterCollectionProtocol {
    return VCenterCollectionData()
  }
}


// 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 VCenterData : VCenterProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var properties: VCenterPropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createVCenterProtocol() -> VCenterProtocol {
    return VCenterData()
  }
}


// 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 VCenterPropertiesData : VCenterPropertiesProtocol {
    public var friendlyName: String?
    public var internalId: String?
    public var lastHeartbeat: Date?
    public var discoveryStatus: String?
    public var processServerId: String?
    public var ipAddress: String?
    public var infrastructureId: String?
    public var port: String?
    public var runAsAccountId: String?
    public var fabricArmResourceName: String?
    public var healthErrors: [HealthErrorProtocol?]?

        enum CodingKeys: String, CodingKey {case friendlyName = "friendlyName"
        case internalId = "internalId"
        case lastHeartbeat = "lastHeartbeat"
        case discoveryStatus = "discoveryStatus"
        case processServerId = "processServerId"
        case ipAddress = "ipAddress"
        case infrastructureId = "infrastructureId"
        case port = "port"
        case runAsAccountId = "runAsAccountId"
        case fabricArmResourceName = "fabricArmResourceName"
        case healthErrors = "healthErrors"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.internalId) {
        self.internalId = try container.decode(String?.self, forKey: .internalId)
    }
    if container.contains(.lastHeartbeat) {
        self.lastHeartbeat = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastHeartbeat)), format: .dateTime)
    }
    if container.contains(.discoveryStatus) {
        self.discoveryStatus = try container.decode(String?.self, forKey: .discoveryStatus)
    }
    if container.contains(.processServerId) {
        self.processServerId = try container.decode(String?.self, forKey: .processServerId)
    }
    if container.contains(.ipAddress) {
        self.ipAddress = try container.decode(String?.self, forKey: .ipAddress)
    }
    if container.contains(.infrastructureId) {
        self.infrastructureId = try container.decode(String?.self, forKey: .infrastructureId)
    }
    if container.contains(.port) {
        self.port = try container.decode(String?.self, forKey: .port)
    }
    if container.contains(.runAsAccountId) {
        self.runAsAccountId = try container.decode(String?.self, forKey: .runAsAccountId)
    }
    if container.contains(.fabricArmResourceName) {
        self.fabricArmResourceName = try container.decode(String?.self, forKey: .fabricArmResourceName)
    }
    if container.contains(.healthErrors) {
        self.healthErrors = try container.decode([HealthErrorData?]?.self, forKey: .healthErrors)
    }
    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.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.internalId != nil {try container.encode(self.internalId, forKey: .internalId)}
    if self.lastHeartbeat != nil {
        try container.encode(DateConverter.toString(date: self.lastHeartbeat!, format: .dateTime), forKey: .lastHeartbeat)
    }
    if self.discoveryStatus != nil {try container.encode(self.discoveryStatus, forKey: .discoveryStatus)}
    if self.processServerId != nil {try container.encode(self.processServerId, forKey: .processServerId)}
    if self.ipAddress != nil {try container.encode(self.ipAddress, forKey: .ipAddress)}
    if self.infrastructureId != nil {try container.encode(self.infrastructureId, forKey: .infrastructureId)}
    if self.port != nil {try container.encode(self.port, forKey: .port)}
    if self.runAsAccountId != nil {try container.encode(self.runAsAccountId, forKey: .runAsAccountId)}
    if self.fabricArmResourceName != nil {try container.encode(self.fabricArmResourceName, forKey: .fabricArmResourceName)}
    if self.healthErrors != nil {try container.encode(self.healthErrors as! [HealthErrorData?]?, forKey: .healthErrors)}
  }
}

extension DataFactory {
  public static func createVCenterPropertiesProtocol() -> VCenterPropertiesProtocol {
    return VCenterPropertiesData()
  }
}


// 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 VersionDetailsData : VersionDetailsProtocol {
    public var version: String?
    public var expiryDate: Date?
    public var status: AgentVersionStatusEnum?

        enum CodingKeys: String, CodingKey {case version = "version"
        case expiryDate = "expiryDate"
        case status = "status"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.version) {
        self.version = try container.decode(String?.self, forKey: .version)
    }
    if container.contains(.expiryDate) {
        self.expiryDate = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .expiryDate)), format: .dateTime)
    }
    if container.contains(.status) {
        self.status = try container.decode(AgentVersionStatusEnum?.self, forKey: .status)
    }
    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.version != nil {try container.encode(self.version, forKey: .version)}
    if self.expiryDate != nil {
        try container.encode(DateConverter.toString(date: self.expiryDate!, format: .dateTime), forKey: .expiryDate)
    }
    if self.status != nil {try container.encode(self.status, forKey: .status)}
  }
}

extension DataFactory {
  public static func createVersionDetailsProtocol() -> VersionDetailsProtocol {
    return VersionDetailsData()
  }
}


// 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 VirtualMachineTaskDetailsData : VirtualMachineTaskDetailsProtocol, TaskTypeDetailsProtocol {
    public var skippedReason: String?
    public var skippedReasonString: String?
    public var jobTask: JobEntityProtocol?

        enum CodingKeys: String, CodingKey {case skippedReason = "skippedReason"
        case skippedReasonString = "skippedReasonString"
        case jobTask = "jobTask"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createVirtualMachineTaskDetailsProtocol() -> VirtualMachineTaskDetailsProtocol {
    return VirtualMachineTaskDetailsData()
  }
}


// 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 VmmDetailsData : VmmDetailsProtocol, FabricSpecificDetailsProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmDetailsProtocol() -> VmmDetailsProtocol {
    return VmmDetailsData()
  }
}


// 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 VmmToAzureCreateNetworkMappingInputData : VmmToAzureCreateNetworkMappingInputProtocol, FabricSpecificCreateNetworkMappingInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToAzureCreateNetworkMappingInputProtocol() -> VmmToAzureCreateNetworkMappingInputProtocol {
    return VmmToAzureCreateNetworkMappingInputData()
  }
}


// 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 VmmToAzureNetworkMappingSettingsData : VmmToAzureNetworkMappingSettingsProtocol, NetworkMappingFabricSpecificSettingsProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToAzureNetworkMappingSettingsProtocol() -> VmmToAzureNetworkMappingSettingsProtocol {
    return VmmToAzureNetworkMappingSettingsData()
  }
}


// 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 VmmToAzureUpdateNetworkMappingInputData : VmmToAzureUpdateNetworkMappingInputProtocol, FabricSpecificUpdateNetworkMappingInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToAzureUpdateNetworkMappingInputProtocol() -> VmmToAzureUpdateNetworkMappingInputProtocol {
    return VmmToAzureUpdateNetworkMappingInputData()
  }
}


// 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 VmmToVmmCreateNetworkMappingInputData : VmmToVmmCreateNetworkMappingInputProtocol, FabricSpecificCreateNetworkMappingInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToVmmCreateNetworkMappingInputProtocol() -> VmmToVmmCreateNetworkMappingInputProtocol {
    return VmmToVmmCreateNetworkMappingInputData()
  }
}


// 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 VmmToVmmNetworkMappingSettingsData : VmmToVmmNetworkMappingSettingsProtocol, NetworkMappingFabricSpecificSettingsProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToVmmNetworkMappingSettingsProtocol() -> VmmToVmmNetworkMappingSettingsProtocol {
    return VmmToVmmNetworkMappingSettingsData()
  }
}


// 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 VmmToVmmUpdateNetworkMappingInputData : VmmToVmmUpdateNetworkMappingInputProtocol, FabricSpecificUpdateNetworkMappingInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    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 {
  }
}

extension DataFactory {
  public static func createVmmToVmmUpdateNetworkMappingInputProtocol() -> VmmToVmmUpdateNetworkMappingInputProtocol {
    return VmmToVmmUpdateNetworkMappingInputData()
  }
}


// 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 VmmVirtualMachineDetailsData : VmmVirtualMachineDetailsProtocol, ConfigurationSettingsProtocol {
    public var sourceItemId: String?
    public var generation: String?
    public var osDetails: OSDetailsProtocol?
    public var diskDetails: [DiskDetailsProtocol?]?
    public var hasPhysicalDisk: Bool?
    public var hasFibreChannelAdapter: Bool?
    public var hasSharedVhd: Bool?

        enum CodingKeys: String, CodingKey {case sourceItemId = "sourceItemId"
        case generation = "generation"
        case osDetails = "osDetails"
        case diskDetails = "diskDetails"
        case hasPhysicalDisk = "hasPhysicalDisk"
        case hasFibreChannelAdapter = "hasFibreChannelAdapter"
        case hasSharedVhd = "hasSharedVhd"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.sourceItemId) {
        self.sourceItemId = try container.decode(String?.self, forKey: .sourceItemId)
    }
    if container.contains(.generation) {
        self.generation = try container.decode(String?.self, forKey: .generation)
    }
    if container.contains(.osDetails) {
        self.osDetails = try container.decode(OSDetailsData?.self, forKey: .osDetails)
    }
    if container.contains(.diskDetails) {
        self.diskDetails = try container.decode([DiskDetailsData?]?.self, forKey: .diskDetails)
    }
    if container.contains(.hasPhysicalDisk) {
        self.hasPhysicalDisk = try container.decode(Bool?.self, forKey: .hasPhysicalDisk)
    }
    if container.contains(.hasFibreChannelAdapter) {
        self.hasFibreChannelAdapter = try container.decode(Bool?.self, forKey: .hasFibreChannelAdapter)
    }
    if container.contains(.hasSharedVhd) {
        self.hasSharedVhd = try container.decode(Bool?.self, forKey: .hasSharedVhd)
    }
    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.sourceItemId != nil {try container.encode(self.sourceItemId, forKey: .sourceItemId)}
    if self.generation != nil {try container.encode(self.generation, forKey: .generation)}
    if self.osDetails != nil {try container.encode(self.osDetails as! OSDetailsData?, forKey: .osDetails)}
    if self.diskDetails != nil {try container.encode(self.diskDetails as! [DiskDetailsData?]?, forKey: .diskDetails)}
    if self.hasPhysicalDisk != nil {try container.encode(self.hasPhysicalDisk, forKey: .hasPhysicalDisk)}
    if self.hasFibreChannelAdapter != nil {try container.encode(self.hasFibreChannelAdapter, forKey: .hasFibreChannelAdapter)}
    if self.hasSharedVhd != nil {try container.encode(self.hasSharedVhd, forKey: .hasSharedVhd)}
  }
}

extension DataFactory {
  public static func createVmmVirtualMachineDetailsProtocol() -> VmmVirtualMachineDetailsProtocol {
    return VmmVirtualMachineDetailsData()
  }
}


// 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 VMNicDetailsData : VMNicDetailsProtocol {
    public var nicId: String?
    public var replicaNicId: String?
    public var sourceNicArmId: String?
    public var vMSubnetName: String?
    public var vMNetworkName: String?
    public var recoveryVMNetworkId: String?
    public var recoveryVMSubnetName: String?
    public var ipAddressType: String?
    public var primaryNicStaticIPAddress: String?
    public var replicaNicStaticIPAddress: String?
    public var selectionType: String?
    public var recoveryNicIpAddressType: String?

        enum CodingKeys: String, CodingKey {case nicId = "nicId"
        case replicaNicId = "replicaNicId"
        case sourceNicArmId = "sourceNicArmId"
        case vMSubnetName = "vMSubnetName"
        case vMNetworkName = "vMNetworkName"
        case recoveryVMNetworkId = "recoveryVMNetworkId"
        case recoveryVMSubnetName = "recoveryVMSubnetName"
        case ipAddressType = "ipAddressType"
        case primaryNicStaticIPAddress = "primaryNicStaticIPAddress"
        case replicaNicStaticIPAddress = "replicaNicStaticIPAddress"
        case selectionType = "selectionType"
        case recoveryNicIpAddressType = "recoveryNicIpAddressType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.nicId) {
        self.nicId = try container.decode(String?.self, forKey: .nicId)
    }
    if container.contains(.replicaNicId) {
        self.replicaNicId = try container.decode(String?.self, forKey: .replicaNicId)
    }
    if container.contains(.sourceNicArmId) {
        self.sourceNicArmId = try container.decode(String?.self, forKey: .sourceNicArmId)
    }
    if container.contains(.vMSubnetName) {
        self.vMSubnetName = try container.decode(String?.self, forKey: .vMSubnetName)
    }
    if container.contains(.vMNetworkName) {
        self.vMNetworkName = try container.decode(String?.self, forKey: .vMNetworkName)
    }
    if container.contains(.recoveryVMNetworkId) {
        self.recoveryVMNetworkId = try container.decode(String?.self, forKey: .recoveryVMNetworkId)
    }
    if container.contains(.recoveryVMSubnetName) {
        self.recoveryVMSubnetName = try container.decode(String?.self, forKey: .recoveryVMSubnetName)
    }
    if container.contains(.ipAddressType) {
        self.ipAddressType = try container.decode(String?.self, forKey: .ipAddressType)
    }
    if container.contains(.primaryNicStaticIPAddress) {
        self.primaryNicStaticIPAddress = try container.decode(String?.self, forKey: .primaryNicStaticIPAddress)
    }
    if container.contains(.replicaNicStaticIPAddress) {
        self.replicaNicStaticIPAddress = try container.decode(String?.self, forKey: .replicaNicStaticIPAddress)
    }
    if container.contains(.selectionType) {
        self.selectionType = try container.decode(String?.self, forKey: .selectionType)
    }
    if container.contains(.recoveryNicIpAddressType) {
        self.recoveryNicIpAddressType = try container.decode(String?.self, forKey: .recoveryNicIpAddressType)
    }
    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.nicId != nil {try container.encode(self.nicId, forKey: .nicId)}
    if self.replicaNicId != nil {try container.encode(self.replicaNicId, forKey: .replicaNicId)}
    if self.sourceNicArmId != nil {try container.encode(self.sourceNicArmId, forKey: .sourceNicArmId)}
    if self.vMSubnetName != nil {try container.encode(self.vMSubnetName, forKey: .vMSubnetName)}
    if self.vMNetworkName != nil {try container.encode(self.vMNetworkName, forKey: .vMNetworkName)}
    if self.recoveryVMNetworkId != nil {try container.encode(self.recoveryVMNetworkId, forKey: .recoveryVMNetworkId)}
    if self.recoveryVMSubnetName != nil {try container.encode(self.recoveryVMSubnetName, forKey: .recoveryVMSubnetName)}
    if self.ipAddressType != nil {try container.encode(self.ipAddressType, forKey: .ipAddressType)}
    if self.primaryNicStaticIPAddress != nil {try container.encode(self.primaryNicStaticIPAddress, forKey: .primaryNicStaticIPAddress)}
    if self.replicaNicStaticIPAddress != nil {try container.encode(self.replicaNicStaticIPAddress, forKey: .replicaNicStaticIPAddress)}
    if self.selectionType != nil {try container.encode(self.selectionType, forKey: .selectionType)}
    if self.recoveryNicIpAddressType != nil {try container.encode(self.recoveryNicIpAddressType, forKey: .recoveryNicIpAddressType)}
  }
}

extension DataFactory {
  public static func createVMNicDetailsProtocol() -> VMNicDetailsProtocol {
    return VMNicDetailsData()
  }
}


// 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 VMNicInputDetailsData : VMNicInputDetailsProtocol {
    public var nicId: String?
    public var recoveryVMSubnetName: String?
    public var replicaNicStaticIPAddress: String?
    public var selectionType: String?

        enum CodingKeys: String, CodingKey {case nicId = "nicId"
        case recoveryVMSubnetName = "recoveryVMSubnetName"
        case replicaNicStaticIPAddress = "replicaNicStaticIPAddress"
        case selectionType = "selectionType"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createVMNicInputDetailsProtocol() -> VMNicInputDetailsProtocol {
    return VMNicInputDetailsData()
  }
}


// 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 VmNicUpdatesTaskDetailsData : VmNicUpdatesTaskDetailsProtocol, TaskTypeDetailsProtocol {
    public var vmId: String?
    public var nicId: String?
    public var name: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createVmNicUpdatesTaskDetailsProtocol() -> VmNicUpdatesTaskDetailsProtocol {
    return VmNicUpdatesTaskDetailsData()
  }
}


// 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 VMwareCbtPolicyCreationInputData : VMwareCbtPolicyCreationInputProtocol, PolicyProviderSpecificInputProtocol {
    public var recoveryPointHistory: Int32?
    public var crashConsistentFrequencyInMinutes: Int32?
    public var appConsistentFrequencyInMinutes: Int32?

        enum CodingKeys: String, CodingKey {case recoveryPointHistory = "recoveryPointHistory"
        case crashConsistentFrequencyInMinutes = "crashConsistentFrequencyInMinutes"
        case appConsistentFrequencyInMinutes = "appConsistentFrequencyInMinutes"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createVMwareCbtPolicyCreationInputProtocol() -> VMwareCbtPolicyCreationInputProtocol {
    return VMwareCbtPolicyCreationInputData()
  }
}


// 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 VmwareCbtPolicyDetailsData : VmwareCbtPolicyDetailsProtocol, PolicyProviderSpecificDetailsProtocol {
    public var recoveryPointThresholdInMinutes: Int32?
    public var recoveryPointHistory: Int32?
    public var appConsistentFrequencyInMinutes: Int32?
    public var crashConsistentFrequencyInMinutes: Int32?

        enum CodingKeys: String, CodingKey {case recoveryPointThresholdInMinutes = "recoveryPointThresholdInMinutes"
        case recoveryPointHistory = "recoveryPointHistory"
        case appConsistentFrequencyInMinutes = "appConsistentFrequencyInMinutes"
        case crashConsistentFrequencyInMinutes = "crashConsistentFrequencyInMinutes"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createVmwareCbtPolicyDetailsProtocol() -> VmwareCbtPolicyDetailsProtocol {
    return VmwareCbtPolicyDetailsData()
  }
}