// BackupManagementType enumerates the values for backup management 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 BackupManagementTypeEnum: String, Codable
{
// BackupManagementTypeAzureBackupServer specifies the backup management type azure backup server state for backup
// management type.
    case BackupManagementTypeAzureBackupServer = "AzureBackupServer"
// BackupManagementTypeAzureIaasVM specifies the backup management type azure iaas vm state for backup management type.
    case BackupManagementTypeAzureIaasVM = "AzureIaasVM"
// BackupManagementTypeAzureSql specifies the backup management type azure sql state for backup management type.
    case BackupManagementTypeAzureSql = "AzureSql"
// BackupManagementTypeAzureStorage specifies the backup management type azure storage state for backup management
// type.
    case BackupManagementTypeAzureStorage = "AzureStorage"
// BackupManagementTypeAzureWorkload specifies the backup management type azure workload state for backup management
// type.
    case BackupManagementTypeAzureWorkload = "AzureWorkload"
// BackupManagementTypeDefaultBackup specifies the backup management type default backup state for backup management
// type.
    case BackupManagementTypeDefaultBackup = "DefaultBackup"
// BackupManagementTypeDPM specifies the backup management type dpm state for backup management type.
    case BackupManagementTypeDPM = "DPM"
// BackupManagementTypeInvalid specifies the backup management type invalid state for backup management type.
    case BackupManagementTypeInvalid = "Invalid"
// BackupManagementTypeMAB specifies the backup management type mab state for backup management type.
    case BackupManagementTypeMAB = "MAB"
}


// 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 BackupManagementUsageData : BackupManagementUsageProtocol {
    public var unit: UsagesUnitEnum?
    public var quotaPeriod: String?
    public var nextResetTime: Date?
    public var currentValue: Int64?
    public var limit: Int64?
    public var name: NameInfoProtocol?

        enum CodingKeys: String, CodingKey {case unit = "unit"
        case quotaPeriod = "quotaPeriod"
        case nextResetTime = "nextResetTime"
        case currentValue = "currentValue"
        case limit = "limit"
        case name = "name"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.unit) {
        self.unit = try container.decode(UsagesUnitEnum?.self, forKey: .unit)
    }
    if container.contains(.quotaPeriod) {
        self.quotaPeriod = try container.decode(String?.self, forKey: .quotaPeriod)
    }
    if container.contains(.nextResetTime) {
        self.nextResetTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .nextResetTime)), format: .dateTime)
    }
    if container.contains(.currentValue) {
        self.currentValue = try container.decode(Int64?.self, forKey: .currentValue)
    }
    if container.contains(.limit) {
        self.limit = try container.decode(Int64?.self, forKey: .limit)
    }
    if container.contains(.name) {
        self.name = try container.decode(NameInfoData?.self, forKey: .name)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.unit != nil {try container.encode(self.unit, forKey: .unit)}
    if self.quotaPeriod != nil {try container.encode(self.quotaPeriod, forKey: .quotaPeriod)}
    if self.nextResetTime != nil {
        try container.encode(DateConverter.toString(date: self.nextResetTime!, format: .dateTime), forKey: .nextResetTime)
    }
    if self.currentValue != nil {try container.encode(self.currentValue, forKey: .currentValue)}
    if self.limit != nil {try container.encode(self.limit, forKey: .limit)}
    if self.name != nil {try container.encode(self.name as! NameInfoData?, forKey: .name)}
  }
}

extension DataFactory {
  public static func createBackupManagementUsageProtocol() -> BackupManagementUsageProtocol {
    return BackupManagementUsageData()
  }
}


// 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 BackupManagementUsageListData : BackupManagementUsageListProtocol {
    public var value: [BackupManagementUsageProtocol?]?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createBackupManagementUsageListProtocol() -> BackupManagementUsageListProtocol {
    return BackupManagementUsageListData()
  }
}


// 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 BackupRequestData : BackupRequestProtocol {

  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 createBackupRequestProtocol() -> BackupRequestProtocol {
    return BackupRequestData()
  }
}


// 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 BackupRequestResourceData : BackupRequestResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var eTag: String?
    public var properties: BackupRequestProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createBackupRequestResourceProtocol() -> BackupRequestResourceProtocol {
    return BackupRequestResourceData()
  }
}


// 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 BackupResourceConfigData : BackupResourceConfigProtocol {
    public var storageModelType: StorageTypeEnum?
    public var storageType: StorageTypeEnum?
    public var storageTypeState: StorageTypeStateEnum?

        enum CodingKeys: String, CodingKey {case storageModelType = "storageModelType"
        case storageType = "storageType"
        case storageTypeState = "storageTypeState"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBackupResourceConfigProtocol() -> BackupResourceConfigProtocol {
    return BackupResourceConfigData()
  }
}


// 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 BackupResourceConfigResourceData : BackupResourceConfigResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var eTag: String?
    public var properties: BackupResourceConfigProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createBackupResourceConfigResourceProtocol() -> BackupResourceConfigResourceProtocol {
    return BackupResourceConfigResourceData()
  }
}


// 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 BackupResourceVaultConfigData : BackupResourceVaultConfigProtocol {
    public var storageModelType: StorageTypeEnum?
    public var storageType: StorageTypeEnum?
    public var storageTypeState: StorageTypeStateEnum?
    public var enhancedSecurityState: EnhancedSecurityStateEnum?

        enum CodingKeys: String, CodingKey {case storageModelType = "storageModelType"
        case storageType = "storageType"
        case storageTypeState = "storageTypeState"
        case enhancedSecurityState = "enhancedSecurityState"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBackupResourceVaultConfigProtocol() -> BackupResourceVaultConfigProtocol {
    return BackupResourceVaultConfigData()
  }
}


// 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 BackupResourceVaultConfigResourceData : BackupResourceVaultConfigResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var eTag: String?
    public var properties: BackupResourceVaultConfigProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createBackupResourceVaultConfigResourceProtocol() -> BackupResourceVaultConfigResourceProtocol {
    return BackupResourceVaultConfigResourceData()
  }
}


// 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 BackupStatusRequestData : BackupStatusRequestProtocol {
    public var resourceType: DataSourceTypeEnum?
    public var resourceId: String?
    public var poLogicalName: String?

        enum CodingKeys: String, CodingKey {case resourceType = "resourceType"
        case resourceId = "resourceId"
        case poLogicalName = "poLogicalName"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBackupStatusRequestProtocol() -> BackupStatusRequestProtocol {
    return BackupStatusRequestData()
  }
}


// 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 BackupStatusResponseData : BackupStatusResponseProtocol {
    public var protectionStatus: ProtectionStatusEnum?
    public var vaultId: String?
    public var fabricName: FabricNameEnum?
    public var containerName: String?
    public var protectedItemName: String?
    public var errorCode: String?
    public var errorMessage: String?
    public var policyName: String?
    public var registrationStatus: String?

        enum CodingKeys: String, CodingKey {case protectionStatus = "protectionStatus"
        case vaultId = "vaultId"
        case fabricName = "fabricName"
        case containerName = "containerName"
        case protectedItemName = "protectedItemName"
        case errorCode = "errorCode"
        case errorMessage = "errorMessage"
        case policyName = "policyName"
        case registrationStatus = "registrationStatus"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.protectionStatus) {
        self.protectionStatus = try container.decode(ProtectionStatusEnum?.self, forKey: .protectionStatus)
    }
    if container.contains(.vaultId) {
        self.vaultId = try container.decode(String?.self, forKey: .vaultId)
    }
    if container.contains(.fabricName) {
        self.fabricName = try container.decode(FabricNameEnum?.self, forKey: .fabricName)
    }
    if container.contains(.containerName) {
        self.containerName = try container.decode(String?.self, forKey: .containerName)
    }
    if container.contains(.protectedItemName) {
        self.protectedItemName = try container.decode(String?.self, forKey: .protectedItemName)
    }
    if container.contains(.errorCode) {
        self.errorCode = try container.decode(String?.self, forKey: .errorCode)
    }
    if container.contains(.errorMessage) {
        self.errorMessage = try container.decode(String?.self, forKey: .errorMessage)
    }
    if container.contains(.policyName) {
        self.policyName = try container.decode(String?.self, forKey: .policyName)
    }
    if container.contains(.registrationStatus) {
        self.registrationStatus = try container.decode(String?.self, forKey: .registrationStatus)
    }
    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.protectionStatus != nil {try container.encode(self.protectionStatus, forKey: .protectionStatus)}
    if self.vaultId != nil {try container.encode(self.vaultId, forKey: .vaultId)}
    if self.fabricName != nil {try container.encode(self.fabricName, forKey: .fabricName)}
    if self.containerName != nil {try container.encode(self.containerName, forKey: .containerName)}
    if self.protectedItemName != nil {try container.encode(self.protectedItemName, forKey: .protectedItemName)}
    if self.errorCode != nil {try container.encode(self.errorCode, forKey: .errorCode)}
    if self.errorMessage != nil {try container.encode(self.errorMessage, forKey: .errorMessage)}
    if self.policyName != nil {try container.encode(self.policyName, forKey: .policyName)}
    if self.registrationStatus != nil {try container.encode(self.registrationStatus, forKey: .registrationStatus)}
  }
}

extension DataFactory {
  public static func createBackupStatusResponseProtocol() -> BackupStatusResponseProtocol {
    return BackupStatusResponseData()
  }
}


// BackupType enumerates the values for backup 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 BackupTypeEnum: String, Codable
{
// BackupTypeCopyOnlyFull specifies the backup type copy only full state for backup type.
    case BackupTypeCopyOnlyFull = "CopyOnlyFull"
// BackupTypeDifferential specifies the backup type differential state for backup type.
    case BackupTypeDifferential = "Differential"
// BackupTypeFull specifies the backup type full state for backup type.
    case BackupTypeFull = "Full"
// BackupTypeInvalid specifies the backup type invalid state for backup type.
    case BackupTypeInvalid = "Invalid"
// BackupTypeLog specifies the backup type log state for backup type.
    case BackupTypeLog = "Log"
}


// 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 BEKDetailsData : BEKDetailsProtocol {
    public var secretUrl: String?
    public var secretVaultId: String?
    public var secretData: String?

        enum CodingKeys: String, CodingKey {case secretUrl = "secretUrl"
        case secretVaultId = "secretVaultId"
        case secretData = "secretData"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBEKDetailsProtocol() -> BEKDetailsProtocol {
    return BEKDetailsData()
  }
}


// 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 BMSBackupEngineQueryObjectData : BMSBackupEngineQueryObjectProtocol {
    public var expand: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSBackupEngineQueryObjectProtocol() -> BMSBackupEngineQueryObjectProtocol {
    return BMSBackupEngineQueryObjectData()
  }
}


// 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 BMSBackupEnginesQueryObjectData : BMSBackupEnginesQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum?
    public var friendlyName: String?
    public var expand: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSBackupEnginesQueryObjectProtocol() -> BMSBackupEnginesQueryObjectProtocol {
    return BMSBackupEnginesQueryObjectData()
  }
}


// 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 BMSBackupSummariesQueryObjectData : BMSBackupSummariesQueryObjectProtocol {
    public var type: TypeEnumEnum?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSBackupSummariesQueryObjectProtocol() -> BMSBackupSummariesQueryObjectProtocol {
    return BMSBackupSummariesQueryObjectData()
  }
}


// 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 BMSContainerQueryObjectData : BMSContainerQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum
    public var containerType: ContainerTypeEnum?
    public var backupEngineName: String?
    public var fabricName: String?
    public var status: String?
    public var friendlyName: String?

        enum CodingKeys: String, CodingKey {case backupManagementType = "backupManagementType"
        case containerType = "containerType"
        case backupEngineName = "backupEngineName"
        case fabricName = "fabricName"
        case status = "status"
        case friendlyName = "friendlyName"
        }

  public init(backupManagementType: BackupManagementTypeEnum)  {
    self.backupManagementType = backupManagementType
  }

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

extension DataFactory {
  public static func createBMSContainerQueryObjectProtocol(backupManagementType: BackupManagementTypeEnum) -> BMSContainerQueryObjectProtocol {
    return BMSContainerQueryObjectData(backupManagementType: backupManagementType)
  }
}


// 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 BMSPOQueryObjectData : BMSPOQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum?
    public var workloadType: WorkloadTypeEnum?
    public var containerName: String?
    public var status: String?
    public var friendlyName: String?

        enum CodingKeys: String, CodingKey {case backupManagementType = "backupManagementType"
        case workloadType = "workloadType"
        case containerName = "containerName"
        case status = "status"
        case friendlyName = "friendlyName"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSPOQueryObjectProtocol() -> BMSPOQueryObjectProtocol {
    return BMSPOQueryObjectData()
  }
}


// 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 BMSRefreshContainersQueryObjectData : BMSRefreshContainersQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSRefreshContainersQueryObjectProtocol() -> BMSRefreshContainersQueryObjectProtocol {
    return BMSRefreshContainersQueryObjectData()
  }
}


// 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 BMSRPQueryObjectData : BMSRPQueryObjectProtocol {
    public var startDate: Date?
    public var endDate: Date?
    public var restorePointQueryType: RestorePointQueryTypeEnum?
    public var extendedInfo: Bool?

        enum CodingKeys: String, CodingKey {case startDate = "startDate"
        case endDate = "endDate"
        case restorePointQueryType = "restorePointQueryType"
        case extendedInfo = "extendedInfo"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createBMSRPQueryObjectProtocol() -> BMSRPQueryObjectProtocol {
    return BMSRPQueryObjectData()
  }
}


// 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 BMSWorkloadItemQueryObjectData : BMSWorkloadItemQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum?
    public var workloadItemType: WorkloadItemTypeEnum?
    public var workloadType: WorkloadTypeEnum?
    public var protectionStatus: ProtectionStatusEnum?

        enum CodingKeys: String, CodingKey {case backupManagementType = "backupManagementType"
        case workloadItemType = "workloadItemType"
        case workloadType = "workloadType"
        case protectionStatus = "protectionStatus"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.backupManagementType) {
        self.backupManagementType = try container.decode(BackupManagementTypeEnum?.self, forKey: .backupManagementType)
    }
    if container.contains(.workloadItemType) {
        self.workloadItemType = try container.decode(WorkloadItemTypeEnum?.self, forKey: .workloadItemType)
    }
    if container.contains(.workloadType) {
        self.workloadType = try container.decode(WorkloadTypeEnum?.self, forKey: .workloadType)
    }
    if container.contains(.protectionStatus) {
        self.protectionStatus = try container.decode(ProtectionStatusEnum?.self, forKey: .protectionStatus)
    }
    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.backupManagementType != nil {try container.encode(self.backupManagementType, forKey: .backupManagementType)}
    if self.workloadItemType != nil {try container.encode(self.workloadItemType, forKey: .workloadItemType)}
    if self.workloadType != nil {try container.encode(self.workloadType, forKey: .workloadType)}
    if self.protectionStatus != nil {try container.encode(self.protectionStatus, forKey: .protectionStatus)}
  }
}

extension DataFactory {
  public static func createBMSWorkloadItemQueryObjectProtocol() -> BMSWorkloadItemQueryObjectProtocol {
    return BMSWorkloadItemQueryObjectData()
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createClientDiscoveryDisplayProtocol() -> ClientDiscoveryDisplayProtocol {
    return ClientDiscoveryDisplayData()
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createClientDiscoveryForLogSpecificationProtocol() -> ClientDiscoveryForLogSpecificationProtocol {
    return ClientDiscoveryForLogSpecificationData()
  }
}


// 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 ClientDiscoveryForPropertiesData : ClientDiscoveryForPropertiesProtocol {
    public var serviceSpecification: ClientDiscoveryForServiceSpecificationProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createClientDiscoveryForPropertiesProtocol() -> ClientDiscoveryForPropertiesProtocol {
    return ClientDiscoveryForPropertiesData()
  }
}


// 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 ClientDiscoveryForServiceSpecificationData : ClientDiscoveryForServiceSpecificationProtocol {
    public var logSpecifications: [ClientDiscoveryForLogSpecificationProtocol?]?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createClientDiscoveryForServiceSpecificationProtocol() -> ClientDiscoveryForServiceSpecificationProtocol {
    return ClientDiscoveryForServiceSpecificationData()
  }
}


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

extension DataFactory {
  public static func createClientDiscoveryResponseProtocol() -> ClientDiscoveryResponseProtocol {
    return ClientDiscoveryResponseData()
  }
}


// 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 ClientDiscoveryValueForSingleApiData : ClientDiscoveryValueForSingleApiProtocol {
    public var name: String?
    public var display: ClientDiscoveryDisplayProtocol?
    public var origin: String?
    public var properties: ClientDiscoveryForPropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createClientDiscoveryValueForSingleApiProtocol() -> ClientDiscoveryValueForSingleApiProtocol {
    return ClientDiscoveryValueForSingleApiData()
  }
}


// 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 ClientScriptForConnectData : ClientScriptForConnectProtocol {
    public var scriptContent: String?
    public var scriptExtension: String?
    public var osType: String?
    public var url: String?
    public var scriptNameSuffix: String?

        enum CodingKeys: String, CodingKey {case scriptContent = "scriptContent"
        case scriptExtension = "scriptExtension"
        case osType = "osType"
        case url = "url"
        case scriptNameSuffix = "scriptNameSuffix"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createClientScriptForConnectProtocol() -> ClientScriptForConnectProtocol {
    return ClientScriptForConnectData()
  }
}


// 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 ContainerIdentityInfoData : ContainerIdentityInfoProtocol {
    public var uniqueName: String?
    public var aadTenantId: String?
    public var servicePrincipalClientId: String?
    public var audience: String?

        enum CodingKeys: String, CodingKey {case uniqueName = "uniqueName"
        case aadTenantId = "aadTenantId"
        case servicePrincipalClientId = "servicePrincipalClientId"
        case audience = "audience"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createContainerIdentityInfoProtocol() -> ContainerIdentityInfoProtocol {
    return ContainerIdentityInfoData()
  }
}


// ContainerType enumerates the values for container 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 ContainerTypeEnum: String, Codable
{
// ContainerTypeAzureBackupServerContainer specifies the container type azure backup server container state for
// container type.
    case ContainerTypeAzureBackupServerContainer = "AzureBackupServerContainer"
// ContainerTypeAzureSqlContainer specifies the container type azure sql container state for container type.
    case ContainerTypeAzureSqlContainer = "AzureSqlContainer"
// ContainerTypeCluster specifies the container type cluster state for container type.
    case ContainerTypeCluster = "Cluster"
// ContainerTypeDPMContainer specifies the container type dpm container state for container type.
    case ContainerTypeDPMContainer = "DPMContainer"
// ContainerTypeGenericContainer specifies the container type generic container state for container type.
    case ContainerTypeGenericContainer = "GenericContainer"
// ContainerTypeIaasVMContainer specifies the container type iaas vm container state for container type.
    case ContainerTypeIaasVMContainer = "IaasVMContainer"
// ContainerTypeIaasVMServiceContainer specifies the container type iaas vm service container state for container type.
    case ContainerTypeIaasVMServiceContainer = "IaasVMServiceContainer"
// ContainerTypeInvalid specifies the container type invalid state for container type.
    case ContainerTypeInvalid = "Invalid"
// ContainerTypeMABContainer specifies the container type mab container state for container type.
    case ContainerTypeMABContainer = "MABContainer"
// ContainerTypeSQLAGWorkLoadContainer specifies the container type sqlag work load container state for container type.
    case ContainerTypeSQLAGWorkLoadContainer = "SQLAGWorkLoadContainer"
// ContainerTypeStorageContainer specifies the container type storage container state for container type.
    case ContainerTypeStorageContainer = "StorageContainer"
// ContainerTypeUnknown specifies the container type unknown state for container type.
    case ContainerTypeUnknown = "Unknown"
// ContainerTypeVCenter specifies the container type v center state for container type.
    case ContainerTypeVCenter = "VCenter"
// ContainerTypeVMAppContainer specifies the container type vm app container state for container type.
    case ContainerTypeVMAppContainer = "VMAppContainer"
// ContainerTypeWindows specifies the container type windows state for container type.
    case ContainerTypeWindows = "Windows"
}


// CopyOptions enumerates the values for copy options.

// 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 CopyOptionsEnum: String, Codable
{
// CopyOptionsCreateCopy specifies the copy options create copy state for copy options.
    case CopyOptionsCreateCopy = "CreateCopy"
// CopyOptionsFailOnConflict specifies the copy options fail on conflict state for copy options.
    case CopyOptionsFailOnConflict = "FailOnConflict"
// CopyOptionsInvalid specifies the copy options invalid state for copy options.
    case CopyOptionsInvalid = "Invalid"
// CopyOptionsOverwrite specifies the copy options overwrite state for copy options.
    case CopyOptionsOverwrite = "Overwrite"
// CopyOptionsSkip specifies the copy options skip state for copy options.
    case CopyOptionsSkip = "Skip"
}


// 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 DailyRetentionFormatData : DailyRetentionFormatProtocol {
    public var daysOfTheMonth: [DayProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createDailyRetentionFormatProtocol() -> DailyRetentionFormatProtocol {
    return DailyRetentionFormatData()
  }
}


// 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 DailyRetentionScheduleData : DailyRetentionScheduleProtocol {
    public var retentionTimes: [Date]?
    public var retentionDuration: RetentionDurationProtocol?

        enum CodingKeys: String, CodingKey {case retentionTimes = "retentionTimes"
        case retentionDuration = "retentionDuration"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDailyRetentionScheduleProtocol() -> DailyRetentionScheduleProtocol {
    return DailyRetentionScheduleData()
  }
}


// DataSourceType enumerates the values for data source 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 DataSourceTypeEnum: String, Codable
{
// DataSourceTypeAzureFileShare specifies the data source type azure file share state for data source type.
    case DataSourceTypeAzureFileShare = "AzureFileShare"
// DataSourceTypeAzureSqlDb specifies the data source type azure sql db state for data source type.
    case DataSourceTypeAzureSqlDb = "AzureSqlDb"
// DataSourceTypeClient specifies the data source type client state for data source type.
    case DataSourceTypeClient = "Client"
// DataSourceTypeExchange specifies the data source type exchange state for data source type.
    case DataSourceTypeExchange = "Exchange"
// DataSourceTypeFileFolder specifies the data source type file folder state for data source type.
    case DataSourceTypeFileFolder = "FileFolder"
// DataSourceTypeGenericDataSource specifies the data source type generic data source state for data source type.
    case DataSourceTypeGenericDataSource = "GenericDataSource"
// DataSourceTypeInvalid specifies the data source type invalid state for data source type.
    case DataSourceTypeInvalid = "Invalid"
// DataSourceTypeSharepoint specifies the data source type sharepoint state for data source type.
    case DataSourceTypeSharepoint = "Sharepoint"
// DataSourceTypeSQLDataBase specifies the data source type sql data base state for data source type.
    case DataSourceTypeSQLDataBase = "SQLDataBase"
// DataSourceTypeSQLDB specifies the data source type sqldb state for data source type.
    case DataSourceTypeSQLDB = "SQLDB"
// DataSourceTypeSystemState specifies the data source type system state state for data source type.
    case DataSourceTypeSystemState = "SystemState"
// DataSourceTypeVM specifies the data source type vm state for data source type.
    case DataSourceTypeVM = "VM"
// DataSourceTypeVMwareVM specifies the data source type v mware vm state for data source type.
    case DataSourceTypeVMwareVM = "VMwareVM"
}


// 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 DayData : DayProtocol {
    public var date: Int32?
    public var isLast: Bool?

        enum CodingKeys: String, CodingKey {case date = "date"
        case isLast = "isLast"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDayProtocol() -> DayProtocol {
    return DayData()
  }
}


// DayOfWeek enumerates the values for day of week.

// 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 DayOfWeekEnum: String, Codable
{
// Friday specifies the friday state for day of week.
    case Friday = "Friday"
// Monday specifies the monday state for day of week.
    case Monday = "Monday"
// Saturday specifies the saturday state for day of week.
    case Saturday = "Saturday"
// Sunday specifies the sunday state for day of week.
    case Sunday = "Sunday"
// Thursday specifies the thursday state for day of week.
    case Thursday = "Thursday"
// Tuesday specifies the tuesday state for day of week.
    case Tuesday = "Tuesday"
// Wednesday specifies the wednesday state for day of week.
    case Wednesday = "Wednesday"
}


// 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 DistributedNodesInfoData : DistributedNodesInfoProtocol {
    public var nodeName: String?
    public var status: String?
    public var errorDetail: ErrorDetailProtocol?

        enum CodingKeys: String, CodingKey {case nodeName = "nodeName"
        case status = "status"
        case errorDetail = "errorDetail"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDistributedNodesInfoProtocol() -> DistributedNodesInfoProtocol {
    return DistributedNodesInfoData()
  }
}


// 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 DpmBackupEngineData : DpmBackupEngineProtocol, BackupEngineBaseProtocol {
    public var friendlyName: String?
    public var backupManagementType: BackupManagementTypeEnum?
    public var registrationStatus: String?
    public var backupEngineState: String?
    public var healthStatus: String?
    public var canReRegister: Bool?
    public var backupEngineId: String?
    public var dpmVersion: String?
    public var azureBackupAgentVersion: String?
    public var isAzureBackupAgentUpgradeAvailable: Bool?
    public var isDpmUpgradeAvailable: Bool?
    public var extendedInfo: BackupEngineExtendedInfoProtocol?

        enum CodingKeys: String, CodingKey {case friendlyName = "friendlyName"
        case backupManagementType = "backupManagementType"
        case registrationStatus = "registrationStatus"
        case backupEngineState = "backupEngineState"
        case healthStatus = "healthStatus"
        case canReRegister = "canReRegister"
        case backupEngineId = "backupEngineId"
        case dpmVersion = "dpmVersion"
        case azureBackupAgentVersion = "azureBackupAgentVersion"
        case isAzureBackupAgentUpgradeAvailable = "isAzureBackupAgentUpgradeAvailable"
        case isDpmUpgradeAvailable = "isDpmUpgradeAvailable"
        case extendedInfo = "extendedInfo"
        }

  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(.backupManagementType) {
        self.backupManagementType = try container.decode(BackupManagementTypeEnum?.self, forKey: .backupManagementType)
    }
    if container.contains(.registrationStatus) {
        self.registrationStatus = try container.decode(String?.self, forKey: .registrationStatus)
    }
    if container.contains(.backupEngineState) {
        self.backupEngineState = try container.decode(String?.self, forKey: .backupEngineState)
    }
    if container.contains(.healthStatus) {
        self.healthStatus = try container.decode(String?.self, forKey: .healthStatus)
    }
    if container.contains(.canReRegister) {
        self.canReRegister = try container.decode(Bool?.self, forKey: .canReRegister)
    }
    if container.contains(.backupEngineId) {
        self.backupEngineId = try container.decode(String?.self, forKey: .backupEngineId)
    }
    if container.contains(.dpmVersion) {
        self.dpmVersion = try container.decode(String?.self, forKey: .dpmVersion)
    }
    if container.contains(.azureBackupAgentVersion) {
        self.azureBackupAgentVersion = try container.decode(String?.self, forKey: .azureBackupAgentVersion)
    }
    if container.contains(.isAzureBackupAgentUpgradeAvailable) {
        self.isAzureBackupAgentUpgradeAvailable = try container.decode(Bool?.self, forKey: .isAzureBackupAgentUpgradeAvailable)
    }
    if container.contains(.isDpmUpgradeAvailable) {
        self.isDpmUpgradeAvailable = try container.decode(Bool?.self, forKey: .isDpmUpgradeAvailable)
    }
    if container.contains(.extendedInfo) {
        self.extendedInfo = try container.decode(BackupEngineExtendedInfoData?.self, forKey: .extendedInfo)
    }
    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.backupManagementType != nil {try container.encode(self.backupManagementType, forKey: .backupManagementType)}
    if self.registrationStatus != nil {try container.encode(self.registrationStatus, forKey: .registrationStatus)}
    if self.backupEngineState != nil {try container.encode(self.backupEngineState, forKey: .backupEngineState)}
    if self.healthStatus != nil {try container.encode(self.healthStatus, forKey: .healthStatus)}
    if self.canReRegister != nil {try container.encode(self.canReRegister, forKey: .canReRegister)}
    if self.backupEngineId != nil {try container.encode(self.backupEngineId, forKey: .backupEngineId)}
    if self.dpmVersion != nil {try container.encode(self.dpmVersion, forKey: .dpmVersion)}
    if self.azureBackupAgentVersion != nil {try container.encode(self.azureBackupAgentVersion, forKey: .azureBackupAgentVersion)}
    if self.isAzureBackupAgentUpgradeAvailable != nil {try container.encode(self.isAzureBackupAgentUpgradeAvailable, forKey: .isAzureBackupAgentUpgradeAvailable)}
    if self.isDpmUpgradeAvailable != nil {try container.encode(self.isDpmUpgradeAvailable, forKey: .isDpmUpgradeAvailable)}
    if self.extendedInfo != nil {try container.encode(self.extendedInfo as! BackupEngineExtendedInfoData?, forKey: .extendedInfo)}
  }
}

extension DataFactory {
  public static func createDpmBackupEngineProtocol() -> DpmBackupEngineProtocol {
    return DpmBackupEngineData()
  }
}


// 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 DpmContainerData : DpmContainerProtocol, ProtectionContainerProtocol {
    public var friendlyName: String?
    public var backupManagementType: BackupManagementTypeEnum?
    public var registrationStatus: String?
    public var healthStatus: String?
    public var canReRegister: Bool?
    public var containerId: String?
    public var protectedItemCount: Int64?
    public var dpmAgentVersion: String?
    public var dpmServers: [String]?
    public var upgradeAvailable: Bool?
    public var protectionStatus: String?
    public var extendedInfo: DPMContainerExtendedInfoProtocol?

        enum CodingKeys: String, CodingKey {case friendlyName = "friendlyName"
        case backupManagementType = "backupManagementType"
        case registrationStatus = "registrationStatus"
        case healthStatus = "healthStatus"
        case canReRegister = "canReRegister"
        case containerId = "containerId"
        case protectedItemCount = "protectedItemCount"
        case dpmAgentVersion = "dpmAgentVersion"
        case dpmServers = "dpmServers"
        case upgradeAvailable = "upgradeAvailable"
        case protectionStatus = "protectionStatus"
        case extendedInfo = "extendedInfo"
        }

  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(.backupManagementType) {
        self.backupManagementType = try container.decode(BackupManagementTypeEnum?.self, forKey: .backupManagementType)
    }
    if container.contains(.registrationStatus) {
        self.registrationStatus = try container.decode(String?.self, forKey: .registrationStatus)
    }
    if container.contains(.healthStatus) {
        self.healthStatus = try container.decode(String?.self, forKey: .healthStatus)
    }
    if container.contains(.canReRegister) {
        self.canReRegister = try container.decode(Bool?.self, forKey: .canReRegister)
    }
    if container.contains(.containerId) {
        self.containerId = try container.decode(String?.self, forKey: .containerId)
    }
    if container.contains(.protectedItemCount) {
        self.protectedItemCount = try container.decode(Int64?.self, forKey: .protectedItemCount)
    }
    if container.contains(.dpmAgentVersion) {
        self.dpmAgentVersion = try container.decode(String?.self, forKey: .dpmAgentVersion)
    }
    if container.contains(.dpmServers) {
        self.dpmServers = try container.decode([String]?.self, forKey: .dpmServers)
    }
    if container.contains(.upgradeAvailable) {
        self.upgradeAvailable = try container.decode(Bool?.self, forKey: .upgradeAvailable)
    }
    if container.contains(.protectionStatus) {
        self.protectionStatus = try container.decode(String?.self, forKey: .protectionStatus)
    }
    if container.contains(.extendedInfo) {
        self.extendedInfo = try container.decode(DPMContainerExtendedInfoData?.self, forKey: .extendedInfo)
    }
    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.backupManagementType != nil {try container.encode(self.backupManagementType, forKey: .backupManagementType)}
    if self.registrationStatus != nil {try container.encode(self.registrationStatus, forKey: .registrationStatus)}
    if self.healthStatus != nil {try container.encode(self.healthStatus, forKey: .healthStatus)}
    if self.canReRegister != nil {try container.encode(self.canReRegister, forKey: .canReRegister)}
    if self.containerId != nil {try container.encode(self.containerId, forKey: .containerId)}
    if self.protectedItemCount != nil {try container.encode(self.protectedItemCount, forKey: .protectedItemCount)}
    if self.dpmAgentVersion != nil {try container.encode(self.dpmAgentVersion, forKey: .dpmAgentVersion)}
    if self.dpmServers != nil {try container.encode(self.dpmServers as! [String]?, forKey: .dpmServers)}
    if self.upgradeAvailable != nil {try container.encode(self.upgradeAvailable, forKey: .upgradeAvailable)}
    if self.protectionStatus != nil {try container.encode(self.protectionStatus, forKey: .protectionStatus)}
    if self.extendedInfo != nil {try container.encode(self.extendedInfo as! DPMContainerExtendedInfoData?, forKey: .extendedInfo)}
  }
}

extension DataFactory {
  public static func createDpmContainerProtocol() -> DpmContainerProtocol {
    return DpmContainerData()
  }
}


// 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 DPMContainerExtendedInfoData : DPMContainerExtendedInfoProtocol {
    public var lastRefreshedAt: Date?

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

  public init()  {
  }

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

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.lastRefreshedAt != nil {
        try container.encode(DateConverter.toString(date: self.lastRefreshedAt!, format: .dateTime), forKey: .lastRefreshedAt)
    }
  }
}

extension DataFactory {
  public static func createDPMContainerExtendedInfoProtocol() -> DPMContainerExtendedInfoProtocol {
    return DPMContainerExtendedInfoData()
  }
}


// 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 DpmErrorInfoData : DpmErrorInfoProtocol {
    public var errorString: String?
    public var recommendations: [String]?

        enum CodingKeys: String, CodingKey {case errorString = "errorString"
        case recommendations = "recommendations"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDpmErrorInfoProtocol() -> DpmErrorInfoProtocol {
    return DpmErrorInfoData()
  }
}


// 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 DpmJobData : DpmJobProtocol, JobProtocol {
    public var entityFriendlyName: String?
    public var backupManagementType: BackupManagementTypeEnum?
    public var operation: String?
    public var status: String?
    public var startTime: Date?
    public var endTime: Date?
    public var activityId: String?
    public var duration: String?
    public var dpmServerName: String?
    public var containerName: String?
    public var containerType: String?
    public var workloadType: String?
    public var actionsInfo: [JobSupportedActionEnum?]?
    public var errorDetails: [DpmErrorInfoProtocol?]?
    public var extendedInfo: DpmJobExtendedInfoProtocol?

        enum CodingKeys: String, CodingKey {case entityFriendlyName = "entityFriendlyName"
        case backupManagementType = "backupManagementType"
        case operation = "operation"
        case status = "status"
        case startTime = "startTime"
        case endTime = "endTime"
        case activityId = "activityId"
        case duration = "duration"
        case dpmServerName = "dpmServerName"
        case containerName = "containerName"
        case containerType = "containerType"
        case workloadType = "workloadType"
        case actionsInfo = "actionsInfo"
        case errorDetails = "errorDetails"
        case extendedInfo = "extendedInfo"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.entityFriendlyName) {
        self.entityFriendlyName = try container.decode(String?.self, forKey: .entityFriendlyName)
    }
    if container.contains(.backupManagementType) {
        self.backupManagementType = try container.decode(BackupManagementTypeEnum?.self, forKey: .backupManagementType)
    }
    if container.contains(.operation) {
        self.operation = try container.decode(String?.self, forKey: .operation)
    }
    if container.contains(.status) {
        self.status = try container.decode(String?.self, forKey: .status)
    }
    if container.contains(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.endTime) {
        self.endTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .endTime)), format: .dateTime)
    }
    if container.contains(.activityId) {
        self.activityId = try container.decode(String?.self, forKey: .activityId)
    }
    if container.contains(.duration) {
        self.duration = try container.decode(String?.self, forKey: .duration)
    }
    if container.contains(.dpmServerName) {
        self.dpmServerName = try container.decode(String?.self, forKey: .dpmServerName)
    }
    if container.contains(.containerName) {
        self.containerName = try container.decode(String?.self, forKey: .containerName)
    }
    if container.contains(.containerType) {
        self.containerType = try container.decode(String?.self, forKey: .containerType)
    }
    if container.contains(.workloadType) {
        self.workloadType = try container.decode(String?.self, forKey: .workloadType)
    }
    if container.contains(.actionsInfo) {
        self.actionsInfo = try container.decode([JobSupportedActionEnum?]?.self, forKey: .actionsInfo)
    }
    if container.contains(.errorDetails) {
        self.errorDetails = try container.decode([DpmErrorInfoData?]?.self, forKey: .errorDetails)
    }
    if container.contains(.extendedInfo) {
        self.extendedInfo = try container.decode(DpmJobExtendedInfoData?.self, forKey: .extendedInfo)
    }
    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.entityFriendlyName != nil {try container.encode(self.entityFriendlyName, forKey: .entityFriendlyName)}
    if self.backupManagementType != nil {try container.encode(self.backupManagementType, forKey: .backupManagementType)}
    if self.operation != nil {try container.encode(self.operation, forKey: .operation)}
    if self.status != nil {try container.encode(self.status, forKey: .status)}
    if self.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.endTime != nil {
        try container.encode(DateConverter.toString(date: self.endTime!, format: .dateTime), forKey: .endTime)
    }
    if self.activityId != nil {try container.encode(self.activityId, forKey: .activityId)}
    if self.duration != nil {try container.encode(self.duration, forKey: .duration)}
    if self.dpmServerName != nil {try container.encode(self.dpmServerName, forKey: .dpmServerName)}
    if self.containerName != nil {try container.encode(self.containerName, forKey: .containerName)}
    if self.containerType != nil {try container.encode(self.containerType, forKey: .containerType)}
    if self.workloadType != nil {try container.encode(self.workloadType, forKey: .workloadType)}
    if self.actionsInfo != nil {try container.encode(self.actionsInfo as! [JobSupportedActionEnum?]?, forKey: .actionsInfo)}
    if self.errorDetails != nil {try container.encode(self.errorDetails as! [DpmErrorInfoData?]?, forKey: .errorDetails)}
    if self.extendedInfo != nil {try container.encode(self.extendedInfo as! DpmJobExtendedInfoData?, forKey: .extendedInfo)}
  }
}

extension DataFactory {
  public static func createDpmJobProtocol() -> DpmJobProtocol {
    return DpmJobData()
  }
}


// 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 DpmJobExtendedInfoData : DpmJobExtendedInfoProtocol {
    public var tasksList: [DpmJobTaskDetailsProtocol?]?
    public var propertyBag: [String:String]?
    public var dynamicErrorMessage: String?

        enum CodingKeys: String, CodingKey {case tasksList = "tasksList"
        case propertyBag = "propertyBag"
        case dynamicErrorMessage = "dynamicErrorMessage"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDpmJobExtendedInfoProtocol() -> DpmJobExtendedInfoProtocol {
    return DpmJobExtendedInfoData()
  }
}