// Copyright (c) Microsoft Corporation. All rights 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 A2AReplicationDetailsData : A2AReplicationDetailsProtocol, ReplicationProviderSpecificSettingsProtocol {
    public var fabricObjectId: String?
    public var multiVmGroupId: String?
    public var multiVmGroupName: String?
    public var multiVmGroupCreateOption: MultiVmGroupCreateOptionEnum?
    public var managementId: String?
    public var protectedDisks: [A2AProtectedDiskDetailsProtocol?]?
    public var protectedManagedDisks: [A2AProtectedManagedDiskDetailsProtocol?]?
    public var recoveryBootDiagStorageAccountId: String?
    public var primaryFabricLocation: String?
    public var recoveryFabricLocation: String?
    public var osType: String?
    public var recoveryAzureVMSize: String?
    public var recoveryAzureVMName: String?
    public var recoveryAzureResourceGroupId: String?
    public var recoveryCloudService: String?
    public var recoveryAvailabilitySet: String?
    public var selectedRecoveryAzureNetworkId: String?
    public var vmNics: [VMNicDetailsProtocol?]?
    public var vmSyncedConfigDetails: AzureToAzureVmSyncedConfigDetailsProtocol?
    public var monitoringPercentageCompletion: Int32?
    public var monitoringJobType: String?
    public var lastHeartbeat: Date?
    public var agentVersion: String?
    public var isReplicationAgentUpdateRequired: Bool?
    public var recoveryFabricObjectId: String?
    public var vmProtectionState: String?
    public var vmProtectionStateDescription: String?
    public var lifecycleId: String?
    public var testFailoverRecoveryFabricObjectId: String?
    public var rpoInSeconds: Int64?
    public var lastRpoCalculatedTime: Date?

        enum CodingKeys: String, CodingKey {case fabricObjectId = "fabricObjectId"
        case multiVmGroupId = "multiVmGroupId"
        case multiVmGroupName = "multiVmGroupName"
        case multiVmGroupCreateOption = "multiVmGroupCreateOption"
        case managementId = "managementId"
        case protectedDisks = "protectedDisks"
        case protectedManagedDisks = "protectedManagedDisks"
        case recoveryBootDiagStorageAccountId = "recoveryBootDiagStorageAccountId"
        case primaryFabricLocation = "primaryFabricLocation"
        case recoveryFabricLocation = "recoveryFabricLocation"
        case osType = "osType"
        case recoveryAzureVMSize = "recoveryAzureVMSize"
        case recoveryAzureVMName = "recoveryAzureVMName"
        case recoveryAzureResourceGroupId = "recoveryAzureResourceGroupId"
        case recoveryCloudService = "recoveryCloudService"
        case recoveryAvailabilitySet = "recoveryAvailabilitySet"
        case selectedRecoveryAzureNetworkId = "selectedRecoveryAzureNetworkId"
        case vmNics = "vmNics"
        case vmSyncedConfigDetails = "vmSyncedConfigDetails"
        case monitoringPercentageCompletion = "monitoringPercentageCompletion"
        case monitoringJobType = "monitoringJobType"
        case lastHeartbeat = "lastHeartbeat"
        case agentVersion = "agentVersion"
        case isReplicationAgentUpdateRequired = "isReplicationAgentUpdateRequired"
        case recoveryFabricObjectId = "recoveryFabricObjectId"
        case vmProtectionState = "vmProtectionState"
        case vmProtectionStateDescription = "vmProtectionStateDescription"
        case lifecycleId = "lifecycleId"
        case testFailoverRecoveryFabricObjectId = "testFailoverRecoveryFabricObjectId"
        case rpoInSeconds = "rpoInSeconds"
        case lastRpoCalculatedTime = "lastRpoCalculatedTime"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.fabricObjectId) {
        self.fabricObjectId = try container.decode(String?.self, forKey: .fabricObjectId)
    }
    if container.contains(.multiVmGroupId) {
        self.multiVmGroupId = try container.decode(String?.self, forKey: .multiVmGroupId)
    }
    if container.contains(.multiVmGroupName) {
        self.multiVmGroupName = try container.decode(String?.self, forKey: .multiVmGroupName)
    }
    if container.contains(.multiVmGroupCreateOption) {
        self.multiVmGroupCreateOption = try container.decode(MultiVmGroupCreateOptionEnum?.self, forKey: .multiVmGroupCreateOption)
    }
    if container.contains(.managementId) {
        self.managementId = try container.decode(String?.self, forKey: .managementId)
    }
    if container.contains(.protectedDisks) {
        self.protectedDisks = try container.decode([A2AProtectedDiskDetailsData?]?.self, forKey: .protectedDisks)
    }
    if container.contains(.protectedManagedDisks) {
        self.protectedManagedDisks = try container.decode([A2AProtectedManagedDiskDetailsData?]?.self, forKey: .protectedManagedDisks)
    }
    if container.contains(.recoveryBootDiagStorageAccountId) {
        self.recoveryBootDiagStorageAccountId = try container.decode(String?.self, forKey: .recoveryBootDiagStorageAccountId)
    }
    if container.contains(.primaryFabricLocation) {
        self.primaryFabricLocation = try container.decode(String?.self, forKey: .primaryFabricLocation)
    }
    if container.contains(.recoveryFabricLocation) {
        self.recoveryFabricLocation = try container.decode(String?.self, forKey: .recoveryFabricLocation)
    }
    if container.contains(.osType) {
        self.osType = try container.decode(String?.self, forKey: .osType)
    }
    if container.contains(.recoveryAzureVMSize) {
        self.recoveryAzureVMSize = try container.decode(String?.self, forKey: .recoveryAzureVMSize)
    }
    if container.contains(.recoveryAzureVMName) {
        self.recoveryAzureVMName = try container.decode(String?.self, forKey: .recoveryAzureVMName)
    }
    if container.contains(.recoveryAzureResourceGroupId) {
        self.recoveryAzureResourceGroupId = try container.decode(String?.self, forKey: .recoveryAzureResourceGroupId)
    }
    if container.contains(.recoveryCloudService) {
        self.recoveryCloudService = try container.decode(String?.self, forKey: .recoveryCloudService)
    }
    if container.contains(.recoveryAvailabilitySet) {
        self.recoveryAvailabilitySet = try container.decode(String?.self, forKey: .recoveryAvailabilitySet)
    }
    if container.contains(.selectedRecoveryAzureNetworkId) {
        self.selectedRecoveryAzureNetworkId = try container.decode(String?.self, forKey: .selectedRecoveryAzureNetworkId)
    }
    if container.contains(.vmNics) {
        self.vmNics = try container.decode([VMNicDetailsData?]?.self, forKey: .vmNics)
    }
    if container.contains(.vmSyncedConfigDetails) {
        self.vmSyncedConfigDetails = try container.decode(AzureToAzureVmSyncedConfigDetailsData?.self, forKey: .vmSyncedConfigDetails)
    }
    if container.contains(.monitoringPercentageCompletion) {
        self.monitoringPercentageCompletion = try container.decode(Int32?.self, forKey: .monitoringPercentageCompletion)
    }
    if container.contains(.monitoringJobType) {
        self.monitoringJobType = try container.decode(String?.self, forKey: .monitoringJobType)
    }
    if container.contains(.lastHeartbeat) {
        self.lastHeartbeat = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastHeartbeat)), format: .dateTime)
    }
    if container.contains(.agentVersion) {
        self.agentVersion = try container.decode(String?.self, forKey: .agentVersion)
    }
    if container.contains(.isReplicationAgentUpdateRequired) {
        self.isReplicationAgentUpdateRequired = try container.decode(Bool?.self, forKey: .isReplicationAgentUpdateRequired)
    }
    if container.contains(.recoveryFabricObjectId) {
        self.recoveryFabricObjectId = try container.decode(String?.self, forKey: .recoveryFabricObjectId)
    }
    if container.contains(.vmProtectionState) {
        self.vmProtectionState = try container.decode(String?.self, forKey: .vmProtectionState)
    }
    if container.contains(.vmProtectionStateDescription) {
        self.vmProtectionStateDescription = try container.decode(String?.self, forKey: .vmProtectionStateDescription)
    }
    if container.contains(.lifecycleId) {
        self.lifecycleId = try container.decode(String?.self, forKey: .lifecycleId)
    }
    if container.contains(.testFailoverRecoveryFabricObjectId) {
        self.testFailoverRecoveryFabricObjectId = try container.decode(String?.self, forKey: .testFailoverRecoveryFabricObjectId)
    }
    if container.contains(.rpoInSeconds) {
        self.rpoInSeconds = try container.decode(Int64?.self, forKey: .rpoInSeconds)
    }
    if container.contains(.lastRpoCalculatedTime) {
        self.lastRpoCalculatedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastRpoCalculatedTime)), format: .dateTime)
    }
    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.fabricObjectId != nil {try container.encode(self.fabricObjectId, forKey: .fabricObjectId)}
    if self.multiVmGroupId != nil {try container.encode(self.multiVmGroupId, forKey: .multiVmGroupId)}
    if self.multiVmGroupName != nil {try container.encode(self.multiVmGroupName, forKey: .multiVmGroupName)}
    if self.multiVmGroupCreateOption != nil {try container.encode(self.multiVmGroupCreateOption, forKey: .multiVmGroupCreateOption)}
    if self.managementId != nil {try container.encode(self.managementId, forKey: .managementId)}
    if self.protectedDisks != nil {try container.encode(self.protectedDisks as! [A2AProtectedDiskDetailsData?]?, forKey: .protectedDisks)}
    if self.protectedManagedDisks != nil {try container.encode(self.protectedManagedDisks as! [A2AProtectedManagedDiskDetailsData?]?, forKey: .protectedManagedDisks)}
    if self.recoveryBootDiagStorageAccountId != nil {try container.encode(self.recoveryBootDiagStorageAccountId, forKey: .recoveryBootDiagStorageAccountId)}
    if self.primaryFabricLocation != nil {try container.encode(self.primaryFabricLocation, forKey: .primaryFabricLocation)}
    if self.recoveryFabricLocation != nil {try container.encode(self.recoveryFabricLocation, forKey: .recoveryFabricLocation)}
    if self.osType != nil {try container.encode(self.osType, forKey: .osType)}
    if self.recoveryAzureVMSize != nil {try container.encode(self.recoveryAzureVMSize, forKey: .recoveryAzureVMSize)}
    if self.recoveryAzureVMName != nil {try container.encode(self.recoveryAzureVMName, forKey: .recoveryAzureVMName)}
    if self.recoveryAzureResourceGroupId != nil {try container.encode(self.recoveryAzureResourceGroupId, forKey: .recoveryAzureResourceGroupId)}
    if self.recoveryCloudService != nil {try container.encode(self.recoveryCloudService, forKey: .recoveryCloudService)}
    if self.recoveryAvailabilitySet != nil {try container.encode(self.recoveryAvailabilitySet, forKey: .recoveryAvailabilitySet)}
    if self.selectedRecoveryAzureNetworkId != nil {try container.encode(self.selectedRecoveryAzureNetworkId, forKey: .selectedRecoveryAzureNetworkId)}
    if self.vmNics != nil {try container.encode(self.vmNics as! [VMNicDetailsData?]?, forKey: .vmNics)}
    if self.vmSyncedConfigDetails != nil {try container.encode(self.vmSyncedConfigDetails as! AzureToAzureVmSyncedConfigDetailsData?, forKey: .vmSyncedConfigDetails)}
    if self.monitoringPercentageCompletion != nil {try container.encode(self.monitoringPercentageCompletion, forKey: .monitoringPercentageCompletion)}
    if self.monitoringJobType != nil {try container.encode(self.monitoringJobType, forKey: .monitoringJobType)}
    if self.lastHeartbeat != nil {
        try container.encode(DateConverter.toString(date: self.lastHeartbeat!, format: .dateTime), forKey: .lastHeartbeat)
    }
    if self.agentVersion != nil {try container.encode(self.agentVersion, forKey: .agentVersion)}
    if self.isReplicationAgentUpdateRequired != nil {try container.encode(self.isReplicationAgentUpdateRequired, forKey: .isReplicationAgentUpdateRequired)}
    if self.recoveryFabricObjectId != nil {try container.encode(self.recoveryFabricObjectId, forKey: .recoveryFabricObjectId)}
    if self.vmProtectionState != nil {try container.encode(self.vmProtectionState, forKey: .vmProtectionState)}
    if self.vmProtectionStateDescription != nil {try container.encode(self.vmProtectionStateDescription, forKey: .vmProtectionStateDescription)}
    if self.lifecycleId != nil {try container.encode(self.lifecycleId, forKey: .lifecycleId)}
    if self.testFailoverRecoveryFabricObjectId != nil {try container.encode(self.testFailoverRecoveryFabricObjectId, forKey: .testFailoverRecoveryFabricObjectId)}
    if self.rpoInSeconds != nil {try container.encode(self.rpoInSeconds, forKey: .rpoInSeconds)}
    if self.lastRpoCalculatedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastRpoCalculatedTime!, format: .dateTime), forKey: .lastRpoCalculatedTime)
    }
  }
}

extension DataFactory {
  public static func createA2AReplicationDetailsProtocol() -> A2AReplicationDetailsProtocol {
    return A2AReplicationDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 A2AReprotectInputData : A2AReprotectInputProtocol, ReverseReplicationProviderSpecificInputProtocol {
    public var recoveryContainerId: String?
    public var vmDisks: [A2AVmDiskInputDetailsProtocol?]?
    public var recoveryResourceGroupId: String?
    public var recoveryCloudServiceId: String?
    public var recoveryAvailabilitySetId: String?
    public var policyId: String?

        enum CodingKeys: String, CodingKey {case recoveryContainerId = "recoveryContainerId"
        case vmDisks = "vmDisks"
        case recoveryResourceGroupId = "recoveryResourceGroupId"
        case recoveryCloudServiceId = "recoveryCloudServiceId"
        case recoveryAvailabilitySetId = "recoveryAvailabilitySetId"
        case policyId = "policyId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AReprotectInputProtocol() -> A2AReprotectInputProtocol {
    return A2AReprotectInputData()
  }
}


// A2ARpRecoveryPointType enumerates the values for a2a rp recovery point type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum A2ARpRecoveryPointTypeEnum: String, Codable
{
// Latest specifies the latest state for a2a rp recovery point type.
    case Latest = "Latest"
// LatestApplicationConsistent specifies the latest application consistent state for a2a rp recovery point type.
    case LatestApplicationConsistent = "LatestApplicationConsistent"
// LatestCrashConsistent specifies the latest crash consistent state for a2a rp recovery point type.
    case LatestCrashConsistent = "LatestCrashConsistent"
// LatestProcessed specifies the latest processed state for a2a rp recovery point type.
    case LatestProcessed = "LatestProcessed"
}


// Copyright (c) Microsoft Corporation. All rights 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 A2ASwitchProtectionInputData : A2ASwitchProtectionInputProtocol, SwitchProtectionProviderSpecificInputProtocol {
    public var recoveryContainerId: String?
    public var vmDisks: [A2AVmDiskInputDetailsProtocol?]?
    public var vmManagedDisks: [A2AVmManagedDiskInputDetailsProtocol?]?
    public var recoveryResourceGroupId: String?
    public var recoveryCloudServiceId: String?
    public var recoveryAvailabilitySetId: String?
    public var policyId: String?
    public var recoveryBootDiagStorageAccountId: String?

        enum CodingKeys: String, CodingKey {case recoveryContainerId = "recoveryContainerId"
        case vmDisks = "vmDisks"
        case vmManagedDisks = "vmManagedDisks"
        case recoveryResourceGroupId = "recoveryResourceGroupId"
        case recoveryCloudServiceId = "recoveryCloudServiceId"
        case recoveryAvailabilitySetId = "recoveryAvailabilitySetId"
        case policyId = "policyId"
        case recoveryBootDiagStorageAccountId = "recoveryBootDiagStorageAccountId"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.recoveryContainerId) {
        self.recoveryContainerId = try container.decode(String?.self, forKey: .recoveryContainerId)
    }
    if container.contains(.vmDisks) {
        self.vmDisks = try container.decode([A2AVmDiskInputDetailsData?]?.self, forKey: .vmDisks)
    }
    if container.contains(.vmManagedDisks) {
        self.vmManagedDisks = try container.decode([A2AVmManagedDiskInputDetailsData?]?.self, forKey: .vmManagedDisks)
    }
    if container.contains(.recoveryResourceGroupId) {
        self.recoveryResourceGroupId = try container.decode(String?.self, forKey: .recoveryResourceGroupId)
    }
    if container.contains(.recoveryCloudServiceId) {
        self.recoveryCloudServiceId = try container.decode(String?.self, forKey: .recoveryCloudServiceId)
    }
    if container.contains(.recoveryAvailabilitySetId) {
        self.recoveryAvailabilitySetId = try container.decode(String?.self, forKey: .recoveryAvailabilitySetId)
    }
    if container.contains(.policyId) {
        self.policyId = try container.decode(String?.self, forKey: .policyId)
    }
    if container.contains(.recoveryBootDiagStorageAccountId) {
        self.recoveryBootDiagStorageAccountId = try container.decode(String?.self, forKey: .recoveryBootDiagStorageAccountId)
    }
    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.recoveryContainerId != nil {try container.encode(self.recoveryContainerId, forKey: .recoveryContainerId)}
    if self.vmDisks != nil {try container.encode(self.vmDisks as! [A2AVmDiskInputDetailsData?]?, forKey: .vmDisks)}
    if self.vmManagedDisks != nil {try container.encode(self.vmManagedDisks as! [A2AVmManagedDiskInputDetailsData?]?, forKey: .vmManagedDisks)}
    if self.recoveryResourceGroupId != nil {try container.encode(self.recoveryResourceGroupId, forKey: .recoveryResourceGroupId)}
    if self.recoveryCloudServiceId != nil {try container.encode(self.recoveryCloudServiceId, forKey: .recoveryCloudServiceId)}
    if self.recoveryAvailabilitySetId != nil {try container.encode(self.recoveryAvailabilitySetId, forKey: .recoveryAvailabilitySetId)}
    if self.policyId != nil {try container.encode(self.policyId, forKey: .policyId)}
    if self.recoveryBootDiagStorageAccountId != nil {try container.encode(self.recoveryBootDiagStorageAccountId, forKey: .recoveryBootDiagStorageAccountId)}
  }
}

extension DataFactory {
  public static func createA2ASwitchProtectionInputProtocol() -> A2ASwitchProtectionInputProtocol {
    return A2ASwitchProtectionInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 A2AUpdateReplicationProtectedItemInputData : A2AUpdateReplicationProtectedItemInputProtocol, UpdateReplicationProtectedItemProviderInputProtocol {
    public var recoveryCloudServiceId: String?
    public var recoveryResourceGroupId: String?
    public var managedDiskUpdateDetails: [A2AVmManagedDiskUpdateDetailsProtocol?]?
    public var recoveryBootDiagStorageAccountId: String?

        enum CodingKeys: String, CodingKey {case recoveryCloudServiceId = "recoveryCloudServiceId"
        case recoveryResourceGroupId = "recoveryResourceGroupId"
        case managedDiskUpdateDetails = "managedDiskUpdateDetails"
        case recoveryBootDiagStorageAccountId = "recoveryBootDiagStorageAccountId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AUpdateReplicationProtectedItemInputProtocol() -> A2AUpdateReplicationProtectedItemInputProtocol {
    return A2AUpdateReplicationProtectedItemInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 A2AVmDiskInputDetailsData : A2AVmDiskInputDetailsProtocol {
    public var diskUri: String?
    public var recoveryAzureStorageAccountId: String?
    public var primaryStagingAzureStorageAccountId: String?

        enum CodingKeys: String, CodingKey {case diskUri = "diskUri"
        case recoveryAzureStorageAccountId = "recoveryAzureStorageAccountId"
        case primaryStagingAzureStorageAccountId = "primaryStagingAzureStorageAccountId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AVmDiskInputDetailsProtocol() -> A2AVmDiskInputDetailsProtocol {
    return A2AVmDiskInputDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 A2AVmManagedDiskInputDetailsData : A2AVmManagedDiskInputDetailsProtocol {
    public var diskId: String?
    public var primaryStagingAzureStorageAccountId: String?
    public var recoveryResourceGroupId: String?
    public var recoveryReplicaDiskAccountType: String?
    public var recoveryTargetDiskAccountType: String?

        enum CodingKeys: String, CodingKey {case diskId = "diskId"
        case primaryStagingAzureStorageAccountId = "primaryStagingAzureStorageAccountId"
        case recoveryResourceGroupId = "recoveryResourceGroupId"
        case recoveryReplicaDiskAccountType = "recoveryReplicaDiskAccountType"
        case recoveryTargetDiskAccountType = "recoveryTargetDiskAccountType"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AVmManagedDiskInputDetailsProtocol() -> A2AVmManagedDiskInputDetailsProtocol {
    return A2AVmManagedDiskInputDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 A2AVmManagedDiskUpdateDetailsData : A2AVmManagedDiskUpdateDetailsProtocol {
    public var diskId: String?
    public var recoveryTargetDiskAccountType: String?
    public var recoveryReplicaDiskAccountType: String?

        enum CodingKeys: String, CodingKey {case diskId = "diskId"
        case recoveryTargetDiskAccountType = "recoveryTargetDiskAccountType"
        case recoveryReplicaDiskAccountType = "recoveryReplicaDiskAccountType"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AVmManagedDiskUpdateDetailsProtocol() -> A2AVmManagedDiskUpdateDetailsProtocol {
    return A2AVmManagedDiskUpdateDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AddVCenterRequestData : AddVCenterRequestProtocol {
    public var properties: AddVCenterRequestPropertiesProtocol?

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

extension DataFactory {
  public static func createAddVCenterRequestProtocol() -> AddVCenterRequestProtocol {
    return AddVCenterRequestData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AddVCenterRequestPropertiesData : AddVCenterRequestPropertiesProtocol {
    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 createAddVCenterRequestPropertiesProtocol() -> AddVCenterRequestPropertiesProtocol {
    return AddVCenterRequestPropertiesData()
  }
}


// AgentVersionStatus enumerates the values for agent version status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum AgentVersionStatusEnum: String, Codable
{
// Deprecated specifies the deprecated state for agent version status.
    case Deprecated = "Deprecated"
// NotSupported specifies the not supported state for agent version status.
    case NotSupported = "NotSupported"
// SecurityUpdateRequired specifies the security update required state for agent version status.
    case SecurityUpdateRequired = "SecurityUpdateRequired"
// Supported specifies the supported state for agent version status.
    case Supported = "Supported"
// UpdateRequired specifies the update required state for agent version status.
    case UpdateRequired = "UpdateRequired"
}


// Copyright (c) Microsoft Corporation. All rights 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 AlertCollectionData : AlertCollectionProtocol {
    public var value: [AlertProtocol?]?
    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([AlertData?]?.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! [AlertData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createAlertCollectionProtocol() -> AlertCollectionProtocol {
    return AlertCollectionData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AlertData : AlertProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var properties: AlertPropertiesProtocol?

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

extension DataFactory {
  public static func createAlertProtocol() -> AlertProtocol {
    return AlertData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AlertPropertiesData : AlertPropertiesProtocol {
    public var sendToOwners: String?
    public var customEmailAddresses: [String]?
    public var locale: String?

        enum CodingKeys: String, CodingKey {case sendToOwners = "sendToOwners"
        case customEmailAddresses = "customEmailAddresses"
        case locale = "locale"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createAlertPropertiesProtocol() -> AlertPropertiesProtocol {
    return AlertPropertiesData()
  }
}


// AlternateLocationRecoveryOption enumerates the values for alternate location recovery option.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum AlternateLocationRecoveryOptionEnum: String, Codable
{
// CreateVmIfNotFound specifies the create vm if not found state for alternate location recovery option.
    case CreateVmIfNotFound = "CreateVmIfNotFound"
// NoAction specifies the no action state for alternate location recovery option.
    case NoAction = "NoAction"
}


// Copyright (c) Microsoft Corporation. All rights 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 ApplyRecoveryPointInputData : ApplyRecoveryPointInputProtocol {
    public var properties: ApplyRecoveryPointInputPropertiesProtocol?

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

extension DataFactory {
  public static func createApplyRecoveryPointInputProtocol() -> ApplyRecoveryPointInputProtocol {
    return ApplyRecoveryPointInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ApplyRecoveryPointInputPropertiesData : ApplyRecoveryPointInputPropertiesProtocol {
    public var recoveryPointId: String?
    public var providerSpecificDetails: ApplyRecoveryPointProviderSpecificInputProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createApplyRecoveryPointInputPropertiesProtocol() -> ApplyRecoveryPointInputPropertiesProtocol {
    return ApplyRecoveryPointInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ApplyRecoveryPointProviderSpecificInputData : ApplyRecoveryPointProviderSpecificInputProtocol {

  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 createApplyRecoveryPointProviderSpecificInputProtocol() -> ApplyRecoveryPointProviderSpecificInputProtocol {
    return ApplyRecoveryPointProviderSpecificInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AsrJobDetailsData : AsrJobDetailsProtocol, JobDetailsProtocol {
    public var affectedObjectDetails: [String:String]?

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

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

extension DataFactory {
  public static func createAsrJobDetailsProtocol() -> AsrJobDetailsProtocol {
    return AsrJobDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ASRTaskData : ASRTaskProtocol {
    public var taskId: String?
    public var name: String?
    public var startTime: Date?
    public var endTime: Date?
    public var allowedActions: [String]?
    public var friendlyName: String?
    public var state: String?
    public var stateDescription: String?
    public var taskType: String?
    public var customDetails: TaskTypeDetailsProtocol?
    public var groupTaskCustomDetails: GroupTaskDetailsProtocol?
    public var errors: [JobErrorDetailsProtocol?]?

        enum CodingKeys: String, CodingKey {case taskId = "taskId"
        case name = "name"
        case startTime = "startTime"
        case endTime = "endTime"
        case allowedActions = "allowedActions"
        case friendlyName = "friendlyName"
        case state = "state"
        case stateDescription = "stateDescription"
        case taskType = "taskType"
        case customDetails = "customDetails"
        case groupTaskCustomDetails = "groupTaskCustomDetails"
        case errors = "errors"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.taskId) {
        self.taskId = try container.decode(String?.self, forKey: .taskId)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.endTime) {
        self.endTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .endTime)), format: .dateTime)
    }
    if container.contains(.allowedActions) {
        self.allowedActions = try container.decode([String]?.self, forKey: .allowedActions)
    }
    if container.contains(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.state) {
        self.state = try container.decode(String?.self, forKey: .state)
    }
    if container.contains(.stateDescription) {
        self.stateDescription = try container.decode(String?.self, forKey: .stateDescription)
    }
    if container.contains(.taskType) {
        self.taskType = try container.decode(String?.self, forKey: .taskType)
    }
    if container.contains(.customDetails) {
        self.customDetails = try container.decode(TaskTypeDetailsData?.self, forKey: .customDetails)
    }
    if container.contains(.groupTaskCustomDetails) {
        self.groupTaskCustomDetails = try container.decode(GroupTaskDetailsData?.self, forKey: .groupTaskCustomDetails)
    }
    if container.contains(.errors) {
        self.errors = try container.decode([JobErrorDetailsData?]?.self, forKey: .errors)
    }
    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.taskId != nil {try container.encode(self.taskId, forKey: .taskId)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.endTime != nil {
        try container.encode(DateConverter.toString(date: self.endTime!, format: .dateTime), forKey: .endTime)
    }
    if self.allowedActions != nil {try container.encode(self.allowedActions as! [String]?, forKey: .allowedActions)}
    if self.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.state != nil {try container.encode(self.state, forKey: .state)}
    if self.stateDescription != nil {try container.encode(self.stateDescription, forKey: .stateDescription)}
    if self.taskType != nil {try container.encode(self.taskType, forKey: .taskType)}
    if self.customDetails != nil {try container.encode(self.customDetails as! TaskTypeDetailsData?, forKey: .customDetails)}
    if self.groupTaskCustomDetails != nil {try container.encode(self.groupTaskCustomDetails as! GroupTaskDetailsData?, forKey: .groupTaskCustomDetails)}
    if self.errors != nil {try container.encode(self.errors as! [JobErrorDetailsData?]?, forKey: .errors)}
  }
}

extension DataFactory {
  public static func createASRTaskProtocol() -> ASRTaskProtocol {
    return ASRTaskData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AutomationRunbookTaskDetailsData : AutomationRunbookTaskDetailsProtocol, TaskTypeDetailsProtocol {
    public var name: String?
    public var cloudServiceName: String?
    public var subscriptionId: String?
    public var accountName: String?
    public var runbookId: String?
    public var runbookName: String?
    public var jobId: String?
    public var jobOutput: String?
    public var isPrimarySideScript: Bool?

        enum CodingKeys: String, CodingKey {case name = "name"
        case cloudServiceName = "cloudServiceName"
        case subscriptionId = "subscriptionId"
        case accountName = "accountName"
        case runbookId = "runbookId"
        case runbookName = "runbookName"
        case jobId = "jobId"
        case jobOutput = "jobOutput"
        case isPrimarySideScript = "isPrimarySideScript"
        }

  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(.cloudServiceName) {
        self.cloudServiceName = try container.decode(String?.self, forKey: .cloudServiceName)
    }
    if container.contains(.subscriptionId) {
        self.subscriptionId = try container.decode(String?.self, forKey: .subscriptionId)
    }
    if container.contains(.accountName) {
        self.accountName = try container.decode(String?.self, forKey: .accountName)
    }
    if container.contains(.runbookId) {
        self.runbookId = try container.decode(String?.self, forKey: .runbookId)
    }
    if container.contains(.runbookName) {
        self.runbookName = try container.decode(String?.self, forKey: .runbookName)
    }
    if container.contains(.jobId) {
        self.jobId = try container.decode(String?.self, forKey: .jobId)
    }
    if container.contains(.jobOutput) {
        self.jobOutput = try container.decode(String?.self, forKey: .jobOutput)
    }
    if container.contains(.isPrimarySideScript) {
        self.isPrimarySideScript = try container.decode(Bool?.self, forKey: .isPrimarySideScript)
    }
    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.cloudServiceName != nil {try container.encode(self.cloudServiceName, forKey: .cloudServiceName)}
    if self.subscriptionId != nil {try container.encode(self.subscriptionId, forKey: .subscriptionId)}
    if self.accountName != nil {try container.encode(self.accountName, forKey: .accountName)}
    if self.runbookId != nil {try container.encode(self.runbookId, forKey: .runbookId)}
    if self.runbookName != nil {try container.encode(self.runbookName, forKey: .runbookName)}
    if self.jobId != nil {try container.encode(self.jobId, forKey: .jobId)}
    if self.jobOutput != nil {try container.encode(self.jobOutput, forKey: .jobOutput)}
    if self.isPrimarySideScript != nil {try container.encode(self.isPrimarySideScript, forKey: .isPrimarySideScript)}
  }
}

extension DataFactory {
  public static func createAutomationRunbookTaskDetailsProtocol() -> AutomationRunbookTaskDetailsProtocol {
    return AutomationRunbookTaskDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureFabricCreationInputData : AzureFabricCreationInputProtocol, FabricSpecificCreationInputProtocol {
    public var location: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureFabricCreationInputProtocol() -> AzureFabricCreationInputProtocol {
    return AzureFabricCreationInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureFabricSpecificDetailsData : AzureFabricSpecificDetailsProtocol, FabricSpecificDetailsProtocol {
    public var location: String?
    public var containerIds: [String]?

        enum CodingKeys: String, CodingKey {case location = "location"
        case containerIds = "containerIds"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureFabricSpecificDetailsProtocol() -> AzureFabricSpecificDetailsProtocol {
    return AzureFabricSpecificDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureToAzureCreateNetworkMappingInputData : AzureToAzureCreateNetworkMappingInputProtocol, FabricSpecificCreateNetworkMappingInputProtocol {
    public var primaryNetworkId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureToAzureCreateNetworkMappingInputProtocol() -> AzureToAzureCreateNetworkMappingInputProtocol {
    return AzureToAzureCreateNetworkMappingInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureToAzureNetworkMappingSettingsData : AzureToAzureNetworkMappingSettingsProtocol, NetworkMappingFabricSpecificSettingsProtocol {
    public var primaryFabricLocation: String?
    public var recoveryFabricLocation: String?

        enum CodingKeys: String, CodingKey {case primaryFabricLocation = "primaryFabricLocation"
        case recoveryFabricLocation = "recoveryFabricLocation"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureToAzureNetworkMappingSettingsProtocol() -> AzureToAzureNetworkMappingSettingsProtocol {
    return AzureToAzureNetworkMappingSettingsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureToAzureUpdateNetworkMappingInputData : AzureToAzureUpdateNetworkMappingInputProtocol, FabricSpecificUpdateNetworkMappingInputProtocol {
    public var primaryNetworkId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureToAzureUpdateNetworkMappingInputProtocol() -> AzureToAzureUpdateNetworkMappingInputProtocol {
    return AzureToAzureUpdateNetworkMappingInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureToAzureVmSyncedConfigDetailsData : AzureToAzureVmSyncedConfigDetailsProtocol {
    public var tags: [String:String]?
    public var roleAssignments: [RoleAssignmentProtocol?]?
    public var inputEndpoints: [InputEndpointProtocol?]?

        enum CodingKeys: String, CodingKey {case tags = "tags"
        case roleAssignments = "roleAssignments"
        case inputEndpoints = "inputEndpoints"
        }

  public init()  {
  }

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

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

extension DataFactory {
  public static func createAzureToAzureVmSyncedConfigDetailsProtocol() -> AzureToAzureVmSyncedConfigDetailsProtocol {
    return AzureToAzureVmSyncedConfigDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 AzureVmDiskDetailsData : AzureVmDiskDetailsProtocol {
    public var vhdType: String?
    public var vhdId: String?
    public var vhdName: String?
    public var maxSizeMB: String?
    public var targetDiskLocation: String?
    public var targetDiskName: String?
    public var lunId: String?

        enum CodingKeys: String, CodingKey {case vhdType = "vhdType"
        case vhdId = "vhdId"
        case vhdName = "vhdName"
        case maxSizeMB = "maxSizeMB"
        case targetDiskLocation = "targetDiskLocation"
        case targetDiskName = "targetDiskName"
        case lunId = "lunId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createAzureVmDiskDetailsProtocol() -> AzureVmDiskDetailsProtocol {
    return AzureVmDiskDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ComputeSizeErrorDetailsData : ComputeSizeErrorDetailsProtocol {
    public var message: String?
    public var severity: String?

        enum CodingKeys: String, CodingKey {case message = "message"
        case severity = "severity"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createComputeSizeErrorDetailsProtocol() -> ComputeSizeErrorDetailsProtocol {
    return ComputeSizeErrorDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ConfigurationSettingsData : ConfigurationSettingsProtocol {

  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 createConfigurationSettingsProtocol() -> ConfigurationSettingsProtocol {
    return ConfigurationSettingsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ConfigureAlertRequestData : ConfigureAlertRequestProtocol {
    public var properties: ConfigureAlertRequestPropertiesProtocol?

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

extension DataFactory {
  public static func createConfigureAlertRequestProtocol() -> ConfigureAlertRequestProtocol {
    return ConfigureAlertRequestData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ConfigureAlertRequestPropertiesData : ConfigureAlertRequestPropertiesProtocol {
    public var sendToOwners: String?
    public var customEmailAddresses: [String]?
    public var locale: String?

        enum CodingKeys: String, CodingKey {case sendToOwners = "sendToOwners"
        case customEmailAddresses = "customEmailAddresses"
        case locale = "locale"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createConfigureAlertRequestPropertiesProtocol() -> ConfigureAlertRequestPropertiesProtocol {
    return ConfigureAlertRequestPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ConsistencyCheckTaskDetailsData : ConsistencyCheckTaskDetailsProtocol, TaskTypeDetailsProtocol {
    public var vmDetails: [InconsistentVmDetailsProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createConsistencyCheckTaskDetailsProtocol() -> ConsistencyCheckTaskDetailsProtocol {
    return ConsistencyCheckTaskDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateNetworkMappingInputData : CreateNetworkMappingInputProtocol {
    public var properties: CreateNetworkMappingInputPropertiesProtocol?

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

extension DataFactory {
  public static func createCreateNetworkMappingInputProtocol() -> CreateNetworkMappingInputProtocol {
    return CreateNetworkMappingInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateNetworkMappingInputPropertiesData : CreateNetworkMappingInputPropertiesProtocol {
    public var recoveryFabricName: String?
    public var recoveryNetworkId: String?
    public var fabricSpecificDetails: FabricSpecificCreateNetworkMappingInputProtocol?

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

extension DataFactory {
  public static func createCreateNetworkMappingInputPropertiesProtocol() -> CreateNetworkMappingInputPropertiesProtocol {
    return CreateNetworkMappingInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreatePolicyInputData : CreatePolicyInputProtocol {
    public var properties: CreatePolicyInputPropertiesProtocol?

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

extension DataFactory {
  public static func createCreatePolicyInputProtocol() -> CreatePolicyInputProtocol {
    return CreatePolicyInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreatePolicyInputPropertiesData : CreatePolicyInputPropertiesProtocol {
    public var providerSpecificInput: PolicyProviderSpecificInputProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createCreatePolicyInputPropertiesProtocol() -> CreatePolicyInputPropertiesProtocol {
    return CreatePolicyInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateProtectionContainerInputData : CreateProtectionContainerInputProtocol {
    public var properties: CreateProtectionContainerInputPropertiesProtocol?

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

extension DataFactory {
  public static func createCreateProtectionContainerInputProtocol() -> CreateProtectionContainerInputProtocol {
    return CreateProtectionContainerInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateProtectionContainerInputPropertiesData : CreateProtectionContainerInputPropertiesProtocol {
    public var providerSpecificInput: [ReplicationProviderSpecificContainerCreationInputProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createCreateProtectionContainerInputPropertiesProtocol() -> CreateProtectionContainerInputPropertiesProtocol {
    return CreateProtectionContainerInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateProtectionContainerMappingInputData : CreateProtectionContainerMappingInputProtocol {
    public var properties: CreateProtectionContainerMappingInputPropertiesProtocol?

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

extension DataFactory {
  public static func createCreateProtectionContainerMappingInputProtocol() -> CreateProtectionContainerMappingInputProtocol {
    return CreateProtectionContainerMappingInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateProtectionContainerMappingInputPropertiesData : CreateProtectionContainerMappingInputPropertiesProtocol {
    public var targetProtectionContainerId: String?
    public var policyId: String?
    public var providerSpecificInput: ReplicationProviderSpecificContainerMappingInputProtocol?

        enum CodingKeys: String, CodingKey {case targetProtectionContainerId = "targetProtectionContainerId"
        case policyId = "policyId"
        case providerSpecificInput = "providerSpecificInput"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createCreateProtectionContainerMappingInputPropertiesProtocol() -> CreateProtectionContainerMappingInputPropertiesProtocol {
    return CreateProtectionContainerMappingInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 CreateRecoveryPlanInputData : CreateRecoveryPlanInputProtocol {
    public var properties: CreateRecoveryPlanInputPropertiesProtocol

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

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

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

extension DataFactory {
  public static func createCreateRecoveryPlanInputProtocol(properties: CreateRecoveryPlanInputPropertiesProtocol) -> CreateRecoveryPlanInputProtocol {
    return CreateRecoveryPlanInputData(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 CreateRecoveryPlanInputPropertiesData : CreateRecoveryPlanInputPropertiesProtocol {
    public var primaryFabricId: String
    public var recoveryFabricId: String
    public var failoverDeploymentModel: FailoverDeploymentModelEnum?
    public var groups: [RecoveryPlanGroupProtocol]

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

  public init(primaryFabricId: String, recoveryFabricId: String, groups: [RecoveryPlanGroupProtocol])  {
    self.primaryFabricId = primaryFabricId
    self.recoveryFabricId = recoveryFabricId
    self.groups = groups
  }

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

extension DataFactory {
  public static func createCreateRecoveryPlanInputPropertiesProtocol(primaryFabricId: String, recoveryFabricId: String, groups: [RecoveryPlanGroupProtocol]) -> CreateRecoveryPlanInputPropertiesProtocol {
    return CreateRecoveryPlanInputPropertiesData(primaryFabricId: primaryFabricId, recoveryFabricId: recoveryFabricId, groups: groups)
  }
}