// Copyright (c) Microsoft Corporation. All rights 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 RecoveryPlanUnplannedFailoverInputPropertiesData : RecoveryPlanUnplannedFailoverInputPropertiesProtocol {
    public var failoverDirection: PossibleOperationsDirectionsEnum
    public var sourceSiteOperations: SourceSiteOperationsEnum
    public var providerSpecificDetails: [RecoveryPlanProviderSpecificFailoverInputProtocol?]?

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

  public init(failoverDirection: PossibleOperationsDirectionsEnum, sourceSiteOperations: SourceSiteOperationsEnum)  {
    self.failoverDirection = failoverDirection
    self.sourceSiteOperations = sourceSiteOperations
  }

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

extension DataFactory {
  public static func createRecoveryPlanUnplannedFailoverInputPropertiesProtocol(failoverDirection: PossibleOperationsDirectionsEnum, sourceSiteOperations: SourceSiteOperationsEnum) -> RecoveryPlanUnplannedFailoverInputPropertiesProtocol {
    return RecoveryPlanUnplannedFailoverInputPropertiesData(failoverDirection: failoverDirection, sourceSiteOperations: sourceSiteOperations)
  }
}


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

extension DataFactory {
  public static func createRecoveryPointCollectionProtocol() -> RecoveryPointCollectionProtocol {
    return RecoveryPointCollectionData()
  }
}


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

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

extension DataFactory {
  public static func createRecoveryPointProtocol() -> RecoveryPointProtocol {
    return RecoveryPointData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 RecoveryPointPropertiesData : RecoveryPointPropertiesProtocol {
    public var recoveryPointTime: Date?
    public var recoveryPointType: String?
    public var providerSpecificDetails: ProviderSpecificRecoveryPointDetailsProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRecoveryPointPropertiesProtocol() -> RecoveryPointPropertiesProtocol {
    return RecoveryPointPropertiesData()
  }
}


// RecoveryPointSyncType enumerates the values for recovery point sync 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 RecoveryPointSyncTypeEnum: String, Codable
{
// MultiVmSyncRecoveryPoint specifies the multi vm sync recovery point state for recovery point sync type.
    case MultiVmSyncRecoveryPoint = "MultiVmSyncRecoveryPoint"
// PerVmRecoveryPoint specifies the per vm recovery point state for recovery point sync type.
    case PerVmRecoveryPoint = "PerVmRecoveryPoint"
}


// RecoveryPointType enumerates the values for 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 RecoveryPointTypeEnum: String, Codable
{
// Custom specifies the custom state for recovery point type.
    case Custom = "Custom"
// LatestTag specifies the latest tag state for recovery point type.
    case LatestTag = "LatestTag"
// LatestTime specifies the latest time state for recovery point type.
    case LatestTime = "LatestTime"
}


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

extension DataFactory {
  public static func createRecoveryServicesProviderCollectionProtocol() -> RecoveryServicesProviderCollectionProtocol {
    return RecoveryServicesProviderCollectionData()
  }
}


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

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

extension DataFactory {
  public static func createRecoveryServicesProviderProtocol() -> RecoveryServicesProviderProtocol {
    return RecoveryServicesProviderData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 RecoveryServicesProviderPropertiesData : RecoveryServicesProviderPropertiesProtocol {
    public var fabricType: String?
    public var friendlyName: String?
    public var providerVersion: String?
    public var serverVersion: String?
    public var providerVersionState: String?
    public var providerVersionExpiryDate: Date?
    public var fabricFriendlyName: String?
    public var lastHeartBeat: Date?
    public var connectionStatus: String?
    public var protectedItemCount: Int32?
    public var allowedScenarios: [String]?
    public var healthErrorDetails: [HealthErrorProtocol?]?
    public var draIdentifier: String?
    public var identityDetails: IdentityInformationProtocol?
    public var providerVersionDetails: VersionDetailsProtocol?

        enum CodingKeys: String, CodingKey {case fabricType = "fabricType"
        case friendlyName = "friendlyName"
        case providerVersion = "providerVersion"
        case serverVersion = "serverVersion"
        case providerVersionState = "providerVersionState"
        case providerVersionExpiryDate = "providerVersionExpiryDate"
        case fabricFriendlyName = "fabricFriendlyName"
        case lastHeartBeat = "lastHeartBeat"
        case connectionStatus = "connectionStatus"
        case protectedItemCount = "protectedItemCount"
        case allowedScenarios = "allowedScenarios"
        case healthErrorDetails = "healthErrorDetails"
        case draIdentifier = "draIdentifier"
        case identityDetails = "identityDetails"
        case providerVersionDetails = "providerVersionDetails"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.fabricType) {
        self.fabricType = try container.decode(String?.self, forKey: .fabricType)
    }
    if container.contains(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.providerVersion) {
        self.providerVersion = try container.decode(String?.self, forKey: .providerVersion)
    }
    if container.contains(.serverVersion) {
        self.serverVersion = try container.decode(String?.self, forKey: .serverVersion)
    }
    if container.contains(.providerVersionState) {
        self.providerVersionState = try container.decode(String?.self, forKey: .providerVersionState)
    }
    if container.contains(.providerVersionExpiryDate) {
        self.providerVersionExpiryDate = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .providerVersionExpiryDate)), format: .dateTime)
    }
    if container.contains(.fabricFriendlyName) {
        self.fabricFriendlyName = try container.decode(String?.self, forKey: .fabricFriendlyName)
    }
    if container.contains(.lastHeartBeat) {
        self.lastHeartBeat = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastHeartBeat)), format: .dateTime)
    }
    if container.contains(.connectionStatus) {
        self.connectionStatus = try container.decode(String?.self, forKey: .connectionStatus)
    }
    if container.contains(.protectedItemCount) {
        self.protectedItemCount = try container.decode(Int32?.self, forKey: .protectedItemCount)
    }
    if container.contains(.allowedScenarios) {
        self.allowedScenarios = try container.decode([String]?.self, forKey: .allowedScenarios)
    }
    if container.contains(.healthErrorDetails) {
        self.healthErrorDetails = try container.decode([HealthErrorData?]?.self, forKey: .healthErrorDetails)
    }
    if container.contains(.draIdentifier) {
        self.draIdentifier = try container.decode(String?.self, forKey: .draIdentifier)
    }
    if container.contains(.identityDetails) {
        self.identityDetails = try container.decode(IdentityInformationData?.self, forKey: .identityDetails)
    }
    if container.contains(.providerVersionDetails) {
        self.providerVersionDetails = try container.decode(VersionDetailsData?.self, forKey: .providerVersionDetails)
    }
    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.fabricType != nil {try container.encode(self.fabricType, forKey: .fabricType)}
    if self.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.providerVersion != nil {try container.encode(self.providerVersion, forKey: .providerVersion)}
    if self.serverVersion != nil {try container.encode(self.serverVersion, forKey: .serverVersion)}
    if self.providerVersionState != nil {try container.encode(self.providerVersionState, forKey: .providerVersionState)}
    if self.providerVersionExpiryDate != nil {
        try container.encode(DateConverter.toString(date: self.providerVersionExpiryDate!, format: .dateTime), forKey: .providerVersionExpiryDate)
    }
    if self.fabricFriendlyName != nil {try container.encode(self.fabricFriendlyName, forKey: .fabricFriendlyName)}
    if self.lastHeartBeat != nil {
        try container.encode(DateConverter.toString(date: self.lastHeartBeat!, format: .dateTime), forKey: .lastHeartBeat)
    }
    if self.connectionStatus != nil {try container.encode(self.connectionStatus, forKey: .connectionStatus)}
    if self.protectedItemCount != nil {try container.encode(self.protectedItemCount, forKey: .protectedItemCount)}
    if self.allowedScenarios != nil {try container.encode(self.allowedScenarios as! [String]?, forKey: .allowedScenarios)}
    if self.healthErrorDetails != nil {try container.encode(self.healthErrorDetails as! [HealthErrorData?]?, forKey: .healthErrorDetails)}
    if self.draIdentifier != nil {try container.encode(self.draIdentifier, forKey: .draIdentifier)}
    if self.identityDetails != nil {try container.encode(self.identityDetails as! IdentityInformationData?, forKey: .identityDetails)}
    if self.providerVersionDetails != nil {try container.encode(self.providerVersionDetails as! VersionDetailsData?, forKey: .providerVersionDetails)}
  }
}

extension DataFactory {
  public static func createRecoveryServicesProviderPropertiesProtocol() -> RecoveryServicesProviderPropertiesProtocol {
    return RecoveryServicesProviderPropertiesData()
  }
}


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

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

extension DataFactory {
  public static func createRemoveProtectionContainerMappingInputProtocol() -> RemoveProtectionContainerMappingInputProtocol {
    return RemoveProtectionContainerMappingInputData()
  }
}


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

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

extension DataFactory {
  public static func createRemoveProtectionContainerMappingInputPropertiesProtocol() -> RemoveProtectionContainerMappingInputPropertiesProtocol {
    return RemoveProtectionContainerMappingInputPropertiesData()
  }
}


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

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

extension DataFactory {
  public static func createRenewCertificateInputProtocol() -> RenewCertificateInputProtocol {
    return RenewCertificateInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 RenewCertificateInputPropertiesData : RenewCertificateInputPropertiesProtocol {
    public var renewCertificateType: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRenewCertificateInputPropertiesProtocol() -> RenewCertificateInputPropertiesProtocol {
    return RenewCertificateInputPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ReplicationGroupDetailsData : ReplicationGroupDetailsProtocol, 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 createReplicationGroupDetailsProtocol() -> ReplicationGroupDetailsProtocol {
    return ReplicationGroupDetailsData()
  }
}


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

extension DataFactory {
  public static func createReplicationProtectedItemCollectionProtocol() -> ReplicationProtectedItemCollectionProtocol {
    return ReplicationProtectedItemCollectionData()
  }
}


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

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

extension DataFactory {
  public static func createReplicationProtectedItemProtocol() -> ReplicationProtectedItemProtocol {
    return ReplicationProtectedItemData()
  }
}


// ReplicationProtectedItemOperation enumerates the values for replication protected item operation.

// Copyright (c) Microsoft Corporation. All rights 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 ReplicationProtectedItemOperationEnum: String, Codable
{
// ReplicationProtectedItemOperationChangePit specifies the replication protected item operation change pit state for
// replication protected item operation.
    case ReplicationProtectedItemOperationChangePit = "ChangePit"
// ReplicationProtectedItemOperationCommit specifies the replication protected item operation commit state for
// replication protected item operation.
    case ReplicationProtectedItemOperationCommit = "Commit"
// ReplicationProtectedItemOperationCompleteMigration specifies the replication protected item operation complete
// migration state for replication protected item operation.
    case ReplicationProtectedItemOperationCompleteMigration = "CompleteMigration"
// ReplicationProtectedItemOperationDisableProtection specifies the replication protected item operation disable
// protection state for replication protected item operation.
    case ReplicationProtectedItemOperationDisableProtection = "DisableProtection"
// ReplicationProtectedItemOperationFailback specifies the replication protected item operation failback state for
// replication protected item operation.
    case ReplicationProtectedItemOperationFailback = "Failback"
// ReplicationProtectedItemOperationFinalizeFailback specifies the replication protected item operation finalize
// failback state for replication protected item operation.
    case ReplicationProtectedItemOperationFinalizeFailback = "FinalizeFailback"
// ReplicationProtectedItemOperationPlannedFailover specifies the replication protected item operation planned failover
// state for replication protected item operation.
    case ReplicationProtectedItemOperationPlannedFailover = "PlannedFailover"
// ReplicationProtectedItemOperationRepairReplication specifies the replication protected item operation repair
// replication state for replication protected item operation.
    case ReplicationProtectedItemOperationRepairReplication = "RepairReplication"
// ReplicationProtectedItemOperationReverseReplicate specifies the replication protected item operation reverse
// replicate state for replication protected item operation.
    case ReplicationProtectedItemOperationReverseReplicate = "ReverseReplicate"
// ReplicationProtectedItemOperationSwitchProtection specifies the replication protected item operation switch
// protection state for replication protected item operation.
    case ReplicationProtectedItemOperationSwitchProtection = "SwitchProtection"
// ReplicationProtectedItemOperationTestFailover specifies the replication protected item operation test failover state
// for replication protected item operation.
    case ReplicationProtectedItemOperationTestFailover = "TestFailover"
// ReplicationProtectedItemOperationTestFailoverCleanup specifies the replication protected item operation test
// failover cleanup state for replication protected item operation.
    case ReplicationProtectedItemOperationTestFailoverCleanup = "TestFailoverCleanup"
// ReplicationProtectedItemOperationUnplannedFailover specifies the replication protected item operation unplanned
// failover state for replication protected item operation.
    case ReplicationProtectedItemOperationUnplannedFailover = "UnplannedFailover"
}


// Copyright (c) Microsoft Corporation. All rights 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 ReplicationProtectedItemPropertiesData : ReplicationProtectedItemPropertiesProtocol {
    public var friendlyName: String?
    public var protectedItemType: String?
    public var protectableItemId: String?
    public var recoveryServicesProviderId: String?
    public var primaryFabricFriendlyName: String?
    public var primaryFabricProvider: String?
    public var recoveryFabricFriendlyName: String?
    public var recoveryFabricId: String?
    public var primaryProtectionContainerFriendlyName: String?
    public var recoveryProtectionContainerFriendlyName: String?
    public var protectionState: String?
    public var protectionStateDescription: String?
    public var activeLocation: String?
    public var testFailoverState: String?
    public var testFailoverStateDescription: String?
    public var allowedOperations: [String]?
    public var replicationHealth: String?
    public var failoverHealth: String?
    public var healthErrors: [HealthErrorProtocol?]?
    public var policyId: String?
    public var policyFriendlyName: String?
    public var lastSuccessfulFailoverTime: Date?
    public var lastSuccessfulTestFailoverTime: Date?
    public var currentScenario: CurrentScenarioDetailsProtocol?
    public var failoverRecoveryPointId: String?
    public var providerSpecificDetails: ReplicationProviderSpecificSettingsProtocol?
    public var recoveryContainerId: String?

        enum CodingKeys: String, CodingKey {case friendlyName = "friendlyName"
        case protectedItemType = "protectedItemType"
        case protectableItemId = "protectableItemId"
        case recoveryServicesProviderId = "recoveryServicesProviderId"
        case primaryFabricFriendlyName = "primaryFabricFriendlyName"
        case primaryFabricProvider = "primaryFabricProvider"
        case recoveryFabricFriendlyName = "recoveryFabricFriendlyName"
        case recoveryFabricId = "recoveryFabricId"
        case primaryProtectionContainerFriendlyName = "primaryProtectionContainerFriendlyName"
        case recoveryProtectionContainerFriendlyName = "recoveryProtectionContainerFriendlyName"
        case protectionState = "protectionState"
        case protectionStateDescription = "protectionStateDescription"
        case activeLocation = "activeLocation"
        case testFailoverState = "testFailoverState"
        case testFailoverStateDescription = "testFailoverStateDescription"
        case allowedOperations = "allowedOperations"
        case replicationHealth = "replicationHealth"
        case failoverHealth = "failoverHealth"
        case healthErrors = "healthErrors"
        case policyId = "policyId"
        case policyFriendlyName = "policyFriendlyName"
        case lastSuccessfulFailoverTime = "lastSuccessfulFailoverTime"
        case lastSuccessfulTestFailoverTime = "lastSuccessfulTestFailoverTime"
        case currentScenario = "currentScenario"
        case failoverRecoveryPointId = "failoverRecoveryPointId"
        case providerSpecificDetails = "providerSpecificDetails"
        case recoveryContainerId = "recoveryContainerId"
        }

  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(.protectedItemType) {
        self.protectedItemType = try container.decode(String?.self, forKey: .protectedItemType)
    }
    if container.contains(.protectableItemId) {
        self.protectableItemId = try container.decode(String?.self, forKey: .protectableItemId)
    }
    if container.contains(.recoveryServicesProviderId) {
        self.recoveryServicesProviderId = try container.decode(String?.self, forKey: .recoveryServicesProviderId)
    }
    if container.contains(.primaryFabricFriendlyName) {
        self.primaryFabricFriendlyName = try container.decode(String?.self, forKey: .primaryFabricFriendlyName)
    }
    if container.contains(.primaryFabricProvider) {
        self.primaryFabricProvider = try container.decode(String?.self, forKey: .primaryFabricProvider)
    }
    if container.contains(.recoveryFabricFriendlyName) {
        self.recoveryFabricFriendlyName = try container.decode(String?.self, forKey: .recoveryFabricFriendlyName)
    }
    if container.contains(.recoveryFabricId) {
        self.recoveryFabricId = try container.decode(String?.self, forKey: .recoveryFabricId)
    }
    if container.contains(.primaryProtectionContainerFriendlyName) {
        self.primaryProtectionContainerFriendlyName = try container.decode(String?.self, forKey: .primaryProtectionContainerFriendlyName)
    }
    if container.contains(.recoveryProtectionContainerFriendlyName) {
        self.recoveryProtectionContainerFriendlyName = try container.decode(String?.self, forKey: .recoveryProtectionContainerFriendlyName)
    }
    if container.contains(.protectionState) {
        self.protectionState = try container.decode(String?.self, forKey: .protectionState)
    }
    if container.contains(.protectionStateDescription) {
        self.protectionStateDescription = try container.decode(String?.self, forKey: .protectionStateDescription)
    }
    if container.contains(.activeLocation) {
        self.activeLocation = try container.decode(String?.self, forKey: .activeLocation)
    }
    if container.contains(.testFailoverState) {
        self.testFailoverState = try container.decode(String?.self, forKey: .testFailoverState)
    }
    if container.contains(.testFailoverStateDescription) {
        self.testFailoverStateDescription = try container.decode(String?.self, forKey: .testFailoverStateDescription)
    }
    if container.contains(.allowedOperations) {
        self.allowedOperations = try container.decode([String]?.self, forKey: .allowedOperations)
    }
    if container.contains(.replicationHealth) {
        self.replicationHealth = try container.decode(String?.self, forKey: .replicationHealth)
    }
    if container.contains(.failoverHealth) {
        self.failoverHealth = try container.decode(String?.self, forKey: .failoverHealth)
    }
    if container.contains(.healthErrors) {
        self.healthErrors = try container.decode([HealthErrorData?]?.self, forKey: .healthErrors)
    }
    if container.contains(.policyId) {
        self.policyId = try container.decode(String?.self, forKey: .policyId)
    }
    if container.contains(.policyFriendlyName) {
        self.policyFriendlyName = try container.decode(String?.self, forKey: .policyFriendlyName)
    }
    if container.contains(.lastSuccessfulFailoverTime) {
        self.lastSuccessfulFailoverTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastSuccessfulFailoverTime)), format: .dateTime)
    }
    if container.contains(.lastSuccessfulTestFailoverTime) {
        self.lastSuccessfulTestFailoverTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastSuccessfulTestFailoverTime)), format: .dateTime)
    }
    if container.contains(.currentScenario) {
        self.currentScenario = try container.decode(CurrentScenarioDetailsData?.self, forKey: .currentScenario)
    }
    if container.contains(.failoverRecoveryPointId) {
        self.failoverRecoveryPointId = try container.decode(String?.self, forKey: .failoverRecoveryPointId)
    }
    if container.contains(.providerSpecificDetails) {
        self.providerSpecificDetails = try container.decode(ReplicationProviderSpecificSettingsData?.self, forKey: .providerSpecificDetails)
    }
    if container.contains(.recoveryContainerId) {
        self.recoveryContainerId = try container.decode(String?.self, forKey: .recoveryContainerId)
    }
    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.protectedItemType != nil {try container.encode(self.protectedItemType, forKey: .protectedItemType)}
    if self.protectableItemId != nil {try container.encode(self.protectableItemId, forKey: .protectableItemId)}
    if self.recoveryServicesProviderId != nil {try container.encode(self.recoveryServicesProviderId, forKey: .recoveryServicesProviderId)}
    if self.primaryFabricFriendlyName != nil {try container.encode(self.primaryFabricFriendlyName, forKey: .primaryFabricFriendlyName)}
    if self.primaryFabricProvider != nil {try container.encode(self.primaryFabricProvider, forKey: .primaryFabricProvider)}
    if self.recoveryFabricFriendlyName != nil {try container.encode(self.recoveryFabricFriendlyName, forKey: .recoveryFabricFriendlyName)}
    if self.recoveryFabricId != nil {try container.encode(self.recoveryFabricId, forKey: .recoveryFabricId)}
    if self.primaryProtectionContainerFriendlyName != nil {try container.encode(self.primaryProtectionContainerFriendlyName, forKey: .primaryProtectionContainerFriendlyName)}
    if self.recoveryProtectionContainerFriendlyName != nil {try container.encode(self.recoveryProtectionContainerFriendlyName, forKey: .recoveryProtectionContainerFriendlyName)}
    if self.protectionState != nil {try container.encode(self.protectionState, forKey: .protectionState)}
    if self.protectionStateDescription != nil {try container.encode(self.protectionStateDescription, forKey: .protectionStateDescription)}
    if self.activeLocation != nil {try container.encode(self.activeLocation, forKey: .activeLocation)}
    if self.testFailoverState != nil {try container.encode(self.testFailoverState, forKey: .testFailoverState)}
    if self.testFailoverStateDescription != nil {try container.encode(self.testFailoverStateDescription, forKey: .testFailoverStateDescription)}
    if self.allowedOperations != nil {try container.encode(self.allowedOperations as! [String]?, forKey: .allowedOperations)}
    if self.replicationHealth != nil {try container.encode(self.replicationHealth, forKey: .replicationHealth)}
    if self.failoverHealth != nil {try container.encode(self.failoverHealth, forKey: .failoverHealth)}
    if self.healthErrors != nil {try container.encode(self.healthErrors as! [HealthErrorData?]?, forKey: .healthErrors)}
    if self.policyId != nil {try container.encode(self.policyId, forKey: .policyId)}
    if self.policyFriendlyName != nil {try container.encode(self.policyFriendlyName, forKey: .policyFriendlyName)}
    if self.lastSuccessfulFailoverTime != nil {
        try container.encode(DateConverter.toString(date: self.lastSuccessfulFailoverTime!, format: .dateTime), forKey: .lastSuccessfulFailoverTime)
    }
    if self.lastSuccessfulTestFailoverTime != nil {
        try container.encode(DateConverter.toString(date: self.lastSuccessfulTestFailoverTime!, format: .dateTime), forKey: .lastSuccessfulTestFailoverTime)
    }
    if self.currentScenario != nil {try container.encode(self.currentScenario as! CurrentScenarioDetailsData?, forKey: .currentScenario)}
    if self.failoverRecoveryPointId != nil {try container.encode(self.failoverRecoveryPointId, forKey: .failoverRecoveryPointId)}
    if self.providerSpecificDetails != nil {try container.encode(self.providerSpecificDetails as! ReplicationProviderSpecificSettingsData?, forKey: .providerSpecificDetails)}
    if self.recoveryContainerId != nil {try container.encode(self.recoveryContainerId, forKey: .recoveryContainerId)}
  }
}

extension DataFactory {
  public static func createReplicationProtectedItemPropertiesProtocol() -> ReplicationProtectedItemPropertiesProtocol {
    return ReplicationProtectedItemPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ReplicationProviderContainerUnmappingInputData : ReplicationProviderContainerUnmappingInputProtocol {
    public var instanceType: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createReplicationProviderContainerUnmappingInputProtocol() -> ReplicationProviderContainerUnmappingInputProtocol {
    return ReplicationProviderContainerUnmappingInputData()
  }
}


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

  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 createReplicationProviderSpecificContainerCreationInputProtocol() -> ReplicationProviderSpecificContainerCreationInputProtocol {
    return ReplicationProviderSpecificContainerCreationInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ReplicationProviderSpecificContainerMappingInputData : ReplicationProviderSpecificContainerMappingInputProtocol {
    public var instanceType: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createReplicationProviderSpecificContainerMappingInputProtocol() -> ReplicationProviderSpecificContainerMappingInputProtocol {
    return ReplicationProviderSpecificContainerMappingInputData()
  }
}


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

  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 createReplicationProviderSpecificSettingsProtocol() -> ReplicationProviderSpecificSettingsProtocol {
    return ReplicationProviderSpecificSettingsData()
  }
}


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

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

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

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


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct ResourceHealthSummaryData : ResourceHealthSummaryProtocol {
    public var resourceCount: Int32?
    public var issues: [HealthErrorSummaryProtocol?]?

        enum CodingKeys: String, CodingKey {case resourceCount = "resourceCount"
        case issues = "issues"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createResourceHealthSummaryProtocol() -> ResourceHealthSummaryProtocol {
    return ResourceHealthSummaryData()
  }
}


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

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

extension DataFactory {
  public static func createResumeJobParamsProtocol() -> ResumeJobParamsProtocol {
    return ResumeJobParamsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ResumeJobParamsPropertiesData : ResumeJobParamsPropertiesProtocol {
    public var comments: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createResumeJobParamsPropertiesProtocol() -> ResumeJobParamsPropertiesProtocol {
    return ResumeJobParamsPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 RetentionVolumeData : RetentionVolumeProtocol {
    public var volumeName: String?
    public var capacityInBytes: Int64?
    public var freeSpaceInBytes: Int64?
    public var thresholdPercentage: Int32?

        enum CodingKeys: String, CodingKey {case volumeName = "volumeName"
        case capacityInBytes = "capacityInBytes"
        case freeSpaceInBytes = "freeSpaceInBytes"
        case thresholdPercentage = "thresholdPercentage"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRetentionVolumeProtocol() -> RetentionVolumeProtocol {
    return RetentionVolumeData()
  }
}


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

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

extension DataFactory {
  public static func createReverseReplicationInputProtocol() -> ReverseReplicationInputProtocol {
    return ReverseReplicationInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ReverseReplicationInputPropertiesData : ReverseReplicationInputPropertiesProtocol {
    public var failoverDirection: String?
    public var providerSpecificDetails: ReverseReplicationProviderSpecificInputProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createReverseReplicationInputPropertiesProtocol() -> ReverseReplicationInputPropertiesProtocol {
    return ReverseReplicationInputPropertiesData()
  }
}


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

  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 createReverseReplicationProviderSpecificInputProtocol() -> ReverseReplicationProviderSpecificInputProtocol {
    return ReverseReplicationProviderSpecificInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 RoleAssignmentData : RoleAssignmentProtocol {
    public var id: String?
    public var name: String?
    public var scope: String?
    public var principalId: String?
    public var roleDefinitionId: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case scope = "scope"
        case principalId = "principalId"
        case roleDefinitionId = "roleDefinitionId"
        }

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

extension DataFactory {
  public static func createRoleAssignmentProtocol() -> RoleAssignmentProtocol {
    return RoleAssignmentData()
  }
}


// RpInMageRecoveryPointType enumerates the values for rp in mage 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 RpInMageRecoveryPointTypeEnum: String, Codable
{
// RpInMageRecoveryPointTypeCustom specifies the rp in mage recovery point type custom state for rp in mage recovery
// point type.
    case RpInMageRecoveryPointTypeCustom = "Custom"
// RpInMageRecoveryPointTypeLatestTag specifies the rp in mage recovery point type latest tag state for rp in mage
// recovery point type.
    case RpInMageRecoveryPointTypeLatestTag = "LatestTag"
// RpInMageRecoveryPointTypeLatestTime specifies the rp in mage recovery point type latest time state for rp in mage
// recovery point type.
    case RpInMageRecoveryPointTypeLatestTime = "LatestTime"
}


// Copyright (c) Microsoft Corporation. All rights 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 RunAsAccountData : RunAsAccountProtocol {
    public var accountId: String?
    public var accountName: String?

        enum CodingKeys: String, CodingKey {case accountId = "accountId"
        case accountName = "accountName"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRunAsAccountProtocol() -> RunAsAccountProtocol {
    return RunAsAccountData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 SanEnableProtectionInputData : SanEnableProtectionInputProtocol, EnableProtectionProviderSpecificInputProtocol {

  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 createSanEnableProtectionInputProtocol() -> SanEnableProtectionInputProtocol {
    return SanEnableProtectionInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ScriptActionTaskDetailsData : ScriptActionTaskDetailsProtocol, TaskTypeDetailsProtocol {
    public var name: String?
    public var path: String?
    public var output: String?
    public var isPrimarySideScript: Bool?

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

extension DataFactory {
  public static func createScriptActionTaskDetailsProtocol() -> ScriptActionTaskDetailsProtocol {
    return ScriptActionTaskDetailsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 ServiceErrorData : ServiceErrorProtocol {
    public var code: String?
    public var message: String?
    public var possibleCauses: String?
    public var recommendedAction: String?
    public var activityId: String?

        enum CodingKeys: String, CodingKey {case code = "code"
        case message = "message"
        case possibleCauses = "possibleCauses"
        case recommendedAction = "recommendedAction"
        case activityId = "activityId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createServiceErrorProtocol() -> ServiceErrorProtocol {
    return ServiceErrorData()
  }
}


// SetMultiVmSyncStatus enumerates the values for set multi vm sync 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 SetMultiVmSyncStatusEnum: String, Codable
{
// Disable specifies the disable state for set multi vm sync status.
    case Disable = "Disable"
// Enable specifies the enable state for set multi vm sync status.
    case Enable = "Enable"
}


// Severity enumerates the values for severity.

// Copyright (c) Microsoft Corporation. All rights 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 SeverityEnum: String, Codable
{
// Error specifies the error state for severity.
    case Error = "Error"
// Info specifies the info state for severity.
    case Info = "Info"
// NONE specifies the none state for severity.
    case NONE = "NONE"
// Warning specifies the warning state for severity.
    case Warning = "Warning"
}


// SourceSiteOperations enumerates the values for source site operations.

// Copyright (c) Microsoft Corporation. All rights 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 SourceSiteOperationsEnum: String, Codable
{
// NotRequired specifies the not required state for source site operations.
    case NotRequired = "NotRequired"
// Required specifies the required state for source site operations.
    case Required = "Required"
}


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

extension DataFactory {
  public static func createStorageClassificationCollectionProtocol() -> StorageClassificationCollectionProtocol {
    return StorageClassificationCollectionData()
  }
}


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

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

extension DataFactory {
  public static func createStorageClassificationProtocol() -> StorageClassificationProtocol {
    return StorageClassificationData()
  }
}


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

extension DataFactory {
  public static func createStorageClassificationMappingCollectionProtocol() -> StorageClassificationMappingCollectionProtocol {
    return StorageClassificationMappingCollectionData()
  }
}


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

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

extension DataFactory {
  public static func createStorageClassificationMappingProtocol() -> StorageClassificationMappingProtocol {
    return StorageClassificationMappingData()
  }
}


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

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

extension DataFactory {
  public static func createStorageClassificationMappingInputProtocol() -> StorageClassificationMappingInputProtocol {
    return StorageClassificationMappingInputData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 StorageClassificationMappingPropertiesData : StorageClassificationMappingPropertiesProtocol {
    public var targetStorageClassificationId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createStorageClassificationMappingPropertiesProtocol() -> StorageClassificationMappingPropertiesProtocol {
    return StorageClassificationMappingPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 StorageClassificationPropertiesData : StorageClassificationPropertiesProtocol {
    public var friendlyName: String?

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

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

extension DataFactory {
  public static func createStorageClassificationPropertiesProtocol() -> StorageClassificationPropertiesProtocol {
    return StorageClassificationPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights 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 StorageMappingInputPropertiesData : StorageMappingInputPropertiesProtocol {
    public var targetStorageClassificationId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createStorageMappingInputPropertiesProtocol() -> StorageMappingInputPropertiesProtocol {
    return StorageMappingInputPropertiesData()
  }
}


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

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

  public init()  {
  }

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

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

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


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

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

extension DataFactory {
  public static func createSwitchProtectionInputProtocol() -> SwitchProtectionInputProtocol {
    return SwitchProtectionInputData()
  }
}