// 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 ProtectionContainerData : ProtectionContainerProtocol {
    public var friendlyName: String?
    public var backupManagementType: BackupManagementTypeEnum?
    public var registrationStatus: String?
    public var healthStatus: String?

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

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

extension DataFactory {
  public static func createProtectionContainerProtocol() -> ProtectionContainerProtocol {
    return ProtectionContainerData()
  }
}


// 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 ProtectionContainerResourceData : ProtectionContainerResourceProtocol, 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: ProtectionContainerProtocol?

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

extension DataFactory {
  public static func createProtectionContainerResourceProtocol() -> ProtectionContainerResourceProtocol {
    return ProtectionContainerResourceData()
  }
}


// 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 ProtectionContainerResourceListData : ProtectionContainerResourceListProtocol, ResourceListProtocol {
    public var _nextLink: String?
    public var value: [ProtectionContainerResourceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createProtectionContainerResourceListProtocol() -> ProtectionContainerResourceListProtocol {
    return ProtectionContainerResourceListData()
  }
}


// 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 ProtectionIntentData : ProtectionIntentProtocol {
    public var backupManagementType: BackupManagementTypeEnum?
    public var sourceResourceId: String?
    public var itemId: String?
    public var policyId: String?
    public var protectionState: ProtectionStatusEnum?

        enum CodingKeys: String, CodingKey {case backupManagementType = "backupManagementType"
        case sourceResourceId = "sourceResourceId"
        case itemId = "itemId"
        case policyId = "policyId"
        case protectionState = "protectionState"
        }

  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(.sourceResourceId) {
        self.sourceResourceId = try container.decode(String?.self, forKey: .sourceResourceId)
    }
    if container.contains(.itemId) {
        self.itemId = try container.decode(String?.self, forKey: .itemId)
    }
    if container.contains(.policyId) {
        self.policyId = try container.decode(String?.self, forKey: .policyId)
    }
    if container.contains(.protectionState) {
        self.protectionState = try container.decode(ProtectionStatusEnum?.self, forKey: .protectionState)
    }
    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.sourceResourceId != nil {try container.encode(self.sourceResourceId, forKey: .sourceResourceId)}
    if self.itemId != nil {try container.encode(self.itemId, forKey: .itemId)}
    if self.policyId != nil {try container.encode(self.policyId, forKey: .policyId)}
    if self.protectionState != nil {try container.encode(self.protectionState, forKey: .protectionState)}
  }
}

extension DataFactory {
  public static func createProtectionIntentProtocol() -> ProtectionIntentProtocol {
    return ProtectionIntentData()
  }
}


// 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 ProtectionIntentResourceData : ProtectionIntentResourceProtocol, 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: ProtectionIntentProtocol?

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

extension DataFactory {
  public static func createProtectionIntentResourceProtocol() -> ProtectionIntentResourceProtocol {
    return ProtectionIntentResourceData()
  }
}


// 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 ProtectionPolicyData : ProtectionPolicyProtocol {
    public var protectedItemsCount: Int32?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createProtectionPolicyProtocol() -> ProtectionPolicyProtocol {
    return ProtectionPolicyData()
  }
}


// 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 ProtectionPolicyQueryObjectData : ProtectionPolicyQueryObjectProtocol {
    public var backupManagementType: BackupManagementTypeEnum?
    public var fabricName: String?

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

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

extension DataFactory {
  public static func createProtectionPolicyQueryObjectProtocol() -> ProtectionPolicyQueryObjectProtocol {
    return ProtectionPolicyQueryObjectData()
  }
}


// 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 ProtectionPolicyResourceData : ProtectionPolicyResourceProtocol, 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: ProtectionPolicyProtocol?

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

extension DataFactory {
  public static func createProtectionPolicyResourceProtocol() -> ProtectionPolicyResourceProtocol {
    return ProtectionPolicyResourceData()
  }
}


// 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 ProtectionPolicyResourceListData : ProtectionPolicyResourceListProtocol, ResourceListProtocol {
    public var _nextLink: String?
    public var value: [ProtectionPolicyResourceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createProtectionPolicyResourceListProtocol() -> ProtectionPolicyResourceListProtocol {
    return ProtectionPolicyResourceListData()
  }
}


// ProtectionState enumerates the values for protection state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ProtectionStateEnum: String, Codable
{
// ProtectionStateInvalid specifies the protection state invalid state for protection state.
    case ProtectionStateInvalid = "Invalid"
// ProtectionStateIRPending specifies the protection state ir pending state for protection state.
    case ProtectionStateIRPending = "IRPending"
// ProtectionStateProtected specifies the protection state protected state for protection state.
    case ProtectionStateProtected = "Protected"
// ProtectionStateProtectionError specifies the protection state protection error state for protection state.
    case ProtectionStateProtectionError = "ProtectionError"
// ProtectionStateProtectionPaused specifies the protection state protection paused state for protection state.
    case ProtectionStateProtectionPaused = "ProtectionPaused"
// ProtectionStateProtectionStopped specifies the protection state protection stopped state for protection state.
    case ProtectionStateProtectionStopped = "ProtectionStopped"
}


// ProtectionStatus enumerates the values for protection status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ProtectionStatusEnum: String, Codable
{
// ProtectionStatusInvalid specifies the protection status invalid state for protection status.
    case ProtectionStatusInvalid = "Invalid"
// ProtectionStatusNotProtected specifies the protection status not protected state for protection status.
    case ProtectionStatusNotProtected = "NotProtected"
// ProtectionStatusProtected specifies the protection status protected state for protection status.
    case ProtectionStatusProtected = "Protected"
// ProtectionStatusProtecting specifies the protection status protecting state for protection status.
    case ProtectionStatusProtecting = "Protecting"
// ProtectionStatusProtectionFailed specifies the protection status protection failed state for protection status.
    case ProtectionStatusProtectionFailed = "ProtectionFailed"
}


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

  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 createRecoveryPointProtocol() -> RecoveryPointProtocol {
    return RecoveryPointData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct RecoveryPointResourceData : RecoveryPointResourceProtocol, 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: RecoveryPointProtocol?

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

extension DataFactory {
  public static func createRecoveryPointResourceProtocol() -> RecoveryPointResourceProtocol {
    return RecoveryPointResourceData()
  }
}


// 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 RecoveryPointResourceListData : RecoveryPointResourceListProtocol, ResourceListProtocol {
    public var _nextLink: String?
    public var value: [RecoveryPointResourceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRecoveryPointResourceListProtocol() -> RecoveryPointResourceListProtocol {
    return RecoveryPointResourceListData()
  }
}


// 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 RecoveryPointTierInformationData : RecoveryPointTierInformationProtocol {
    public var type: RecoveryPointTierTypeEnum?
    public var status: RecoveryPointTierStatusEnum?

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

  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(RecoveryPointTierTypeEnum?.self, forKey: .type)
    }
    if container.contains(.status) {
        self.status = try container.decode(RecoveryPointTierStatusEnum?.self, forKey: .status)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

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

extension DataFactory {
  public static func createRecoveryPointTierInformationProtocol() -> RecoveryPointTierInformationProtocol {
    return RecoveryPointTierInformationData()
  }
}


// RecoveryPointTierStatus enumerates the values for recovery point tier status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum RecoveryPointTierStatusEnum: String, Codable
{
// RecoveryPointTierStatusDeleted specifies the recovery point tier status deleted state for recovery point tier
// status.
    case RecoveryPointTierStatusDeleted = "Deleted"
// RecoveryPointTierStatusDisabled specifies the recovery point tier status disabled state for recovery point tier
// status.
    case RecoveryPointTierStatusDisabled = "Disabled"
// RecoveryPointTierStatusInvalid specifies the recovery point tier status invalid state for recovery point tier
// status.
    case RecoveryPointTierStatusInvalid = "Invalid"
// RecoveryPointTierStatusValid specifies the recovery point tier status valid state for recovery point tier status.
    case RecoveryPointTierStatusValid = "Valid"
}


// RecoveryPointTierType enumerates the values for recovery point tier 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 RecoveryPointTierTypeEnum: String, Codable
{
// RecoveryPointTierTypeHardenedRP specifies the recovery point tier type hardened rp state for recovery point tier
// type.
    case RecoveryPointTierTypeHardenedRP = "HardenedRP"
// RecoveryPointTierTypeInstantRP specifies the recovery point tier type instant rp state for recovery point tier type.
    case RecoveryPointTierTypeInstantRP = "InstantRP"
// RecoveryPointTierTypeInvalid specifies the recovery point tier type invalid state for recovery point tier type.
    case RecoveryPointTierTypeInvalid = "Invalid"
}


// RecoveryType enumerates the values for recovery 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 RecoveryTypeEnum: String, Codable
{
// RecoveryTypeAlternateLocation specifies the recovery type alternate location state for recovery type.
    case RecoveryTypeAlternateLocation = "AlternateLocation"
// RecoveryTypeInvalid specifies the recovery type invalid state for recovery type.
    case RecoveryTypeInvalid = "Invalid"
// RecoveryTypeOriginalLocation specifies the recovery type original location state for recovery type.
    case RecoveryTypeOriginalLocation = "OriginalLocation"
// RecoveryTypeRestoreDisks specifies the recovery type restore disks state for recovery type.
    case RecoveryTypeRestoreDisks = "RestoreDisks"
}


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

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

  public init()  {
  }

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

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

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


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

        enum CodingKeys: String, CodingKey {case _nextLink = "nextLink"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createResourceListProtocol() -> ResourceListProtocol {
    return ResourceListData()
  }
}


// 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 RestoreFileSpecsData : RestoreFileSpecsProtocol {
    public var path: String?
    public var fileSpecType: String?
    public var targetFolderPath: String?

        enum CodingKeys: String, CodingKey {case path = "path"
        case fileSpecType = "fileSpecType"
        case targetFolderPath = "targetFolderPath"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRestoreFileSpecsProtocol() -> RestoreFileSpecsProtocol {
    return RestoreFileSpecsData()
  }
}


// RestorePointQueryType enumerates the values for restore point query 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 RestorePointQueryTypeEnum: String, Codable
{
// RestorePointQueryTypeAll specifies the restore point query type all state for restore point query type.
    case RestorePointQueryTypeAll = "All"
// RestorePointQueryTypeDifferential specifies the restore point query type differential state for restore point query
// type.
    case RestorePointQueryTypeDifferential = "Differential"
// RestorePointQueryTypeFull specifies the restore point query type full state for restore point query type.
    case RestorePointQueryTypeFull = "Full"
// RestorePointQueryTypeFullAndDifferential specifies the restore point query type full and differential state for
// restore point query type.
    case RestorePointQueryTypeFullAndDifferential = "FullAndDifferential"
// RestorePointQueryTypeInvalid specifies the restore point query type invalid state for restore point query type.
    case RestorePointQueryTypeInvalid = "Invalid"
// RestorePointQueryTypeLog specifies the restore point query type log state for restore point query type.
    case RestorePointQueryTypeLog = "Log"
}


// RestorePointType enumerates the values for restore point type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum RestorePointTypeEnum: String, Codable
{
// RestorePointTypeDifferential specifies the restore point type differential state for restore point type.
    case RestorePointTypeDifferential = "Differential"
// RestorePointTypeFull specifies the restore point type full state for restore point type.
    case RestorePointTypeFull = "Full"
// RestorePointTypeInvalid specifies the restore point type invalid state for restore point type.
    case RestorePointTypeInvalid = "Invalid"
// RestorePointTypeLog specifies the restore point type log state for restore point type.
    case RestorePointTypeLog = "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 RestoreRequestData : RestoreRequestProtocol {

  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 createRestoreRequestProtocol() -> RestoreRequestProtocol {
    return RestoreRequestData()
  }
}


// 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 RestoreRequestResourceData : RestoreRequestResourceProtocol, 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: RestoreRequestProtocol?

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

extension DataFactory {
  public static func createRestoreRequestResourceProtocol() -> RestoreRequestResourceProtocol {
    return RestoreRequestResourceData()
  }
}


// RestoreRequestType enumerates the values for restore request 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 RestoreRequestTypeEnum: String, Codable
{
// RestoreRequestTypeFullShareRestore specifies the restore request type full share restore state for restore request
// type.
    case RestoreRequestTypeFullShareRestore = "FullShareRestore"
// RestoreRequestTypeInvalid specifies the restore request type invalid state for restore request type.
    case RestoreRequestTypeInvalid = "Invalid"
// RestoreRequestTypeItemLevelRestore specifies the restore request type item level restore state for restore request
// type.
    case RestoreRequestTypeItemLevelRestore = "ItemLevelRestore"
}


// 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 RetentionDurationData : RetentionDurationProtocol {
    public var count: Int32?
    public var durationType: RetentionDurationTypeEnum?

        enum CodingKeys: String, CodingKey {case count = "count"
        case durationType = "durationType"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRetentionDurationProtocol() -> RetentionDurationProtocol {
    return RetentionDurationData()
  }
}


// RetentionDurationType enumerates the values for retention duration 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 RetentionDurationTypeEnum: String, Codable
{
// RetentionDurationTypeDays specifies the retention duration type days state for retention duration type.
    case RetentionDurationTypeDays = "Days"
// RetentionDurationTypeInvalid specifies the retention duration type invalid state for retention duration type.
    case RetentionDurationTypeInvalid = "Invalid"
// RetentionDurationTypeMonths specifies the retention duration type months state for retention duration type.
    case RetentionDurationTypeMonths = "Months"
// RetentionDurationTypeWeeks specifies the retention duration type weeks state for retention duration type.
    case RetentionDurationTypeWeeks = "Weeks"
// RetentionDurationTypeYears specifies the retention duration type years state for retention duration type.
    case RetentionDurationTypeYears = "Years"
}


// 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 RetentionPolicyData : RetentionPolicyProtocol {

  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 createRetentionPolicyProtocol() -> RetentionPolicyProtocol {
    return RetentionPolicyData()
  }
}


// RetentionScheduleFormat enumerates the values for retention schedule format.

// 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 RetentionScheduleFormatEnum: String, Codable
{
// RetentionScheduleFormatDaily specifies the retention schedule format daily state for retention schedule format.
    case RetentionScheduleFormatDaily = "Daily"
// RetentionScheduleFormatInvalid specifies the retention schedule format invalid state for retention schedule format.
    case RetentionScheduleFormatInvalid = "Invalid"
// RetentionScheduleFormatWeekly specifies the retention schedule format weekly state for retention schedule format.
    case RetentionScheduleFormatWeekly = "Weekly"
}


// 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 SchedulePolicyData : SchedulePolicyProtocol {

  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 createSchedulePolicyProtocol() -> SchedulePolicyProtocol {
    return SchedulePolicyData()
  }
}


// ScheduleRunType enumerates the values for schedule run 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 ScheduleRunTypeEnum: String, Codable
{
// ScheduleRunTypeDaily specifies the schedule run type daily state for schedule run type.
    case ScheduleRunTypeDaily = "Daily"
// ScheduleRunTypeInvalid specifies the schedule run type invalid state for schedule run type.
    case ScheduleRunTypeInvalid = "Invalid"
// ScheduleRunTypeWeekly specifies the schedule run type weekly state for schedule run type.
    case ScheduleRunTypeWeekly = "Weekly"
}


// 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 SettingsData : SettingsProtocol {
    public var timeZone: String?
    public var issqlcompression: Bool?

        enum CodingKeys: String, CodingKey {case timeZone = "timeZone"
        case issqlcompression = "issqlcompression"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSettingsProtocol() -> SettingsProtocol {
    return SettingsData()
  }
}


// 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 SimpleRetentionPolicyData : SimpleRetentionPolicyProtocol, RetentionPolicyProtocol {
    public var retentionDuration: RetentionDurationProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createSimpleRetentionPolicyProtocol() -> SimpleRetentionPolicyProtocol {
    return SimpleRetentionPolicyData()
  }
}


// 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 SimpleSchedulePolicyData : SimpleSchedulePolicyProtocol, SchedulePolicyProtocol {
    public var scheduleRunFrequency: ScheduleRunTypeEnum?
    public var scheduleRunDays: [DayOfWeekEnum?]?
    public var scheduleRunTimes: [Date]?
    public var scheduleWeeklyFrequency: Int32?

        enum CodingKeys: String, CodingKey {case scheduleRunFrequency = "scheduleRunFrequency"
        case scheduleRunDays = "scheduleRunDays"
        case scheduleRunTimes = "scheduleRunTimes"
        case scheduleWeeklyFrequency = "scheduleWeeklyFrequency"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSimpleSchedulePolicyProtocol() -> SimpleSchedulePolicyProtocol {
    return SimpleSchedulePolicyData()
  }
}


// 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 SQLDataDirectoryData : SQLDataDirectoryProtocol {
    public var type: SQLDataDirectoryTypeEnum?
    public var path: String?
    public var logicalName: String?

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

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

extension DataFactory {
  public static func createSQLDataDirectoryProtocol() -> SQLDataDirectoryProtocol {
    return SQLDataDirectoryData()
  }
}


// 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 SQLDataDirectoryMappingData : SQLDataDirectoryMappingProtocol {
    public var mappingType: SQLDataDirectoryTypeEnum?
    public var sourceLogicalName: String?
    public var sourcePath: String?
    public var targetPath: String?

        enum CodingKeys: String, CodingKey {case mappingType = "mappingType"
        case sourceLogicalName = "sourceLogicalName"
        case sourcePath = "sourcePath"
        case targetPath = "targetPath"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSQLDataDirectoryMappingProtocol() -> SQLDataDirectoryMappingProtocol {
    return SQLDataDirectoryMappingData()
  }
}


// SQLDataDirectoryType enumerates the values for sql data directory 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 SQLDataDirectoryTypeEnum: String, Codable
{
// SQLDataDirectoryTypeData specifies the sql data directory type data state for sql data directory type.
    case SQLDataDirectoryTypeData = "Data"
// SQLDataDirectoryTypeInvalid specifies the sql data directory type invalid state for sql data directory type.
    case SQLDataDirectoryTypeInvalid = "Invalid"
// SQLDataDirectoryTypeLog specifies the sql data directory type log state for sql data directory type.
    case SQLDataDirectoryTypeLog = "Log"
}


// StorageType enumerates the values for storage 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 StorageTypeEnum: String, Codable
{
// StorageTypeGeoRedundant specifies the storage type geo redundant state for storage type.
    case StorageTypeGeoRedundant = "GeoRedundant"
// StorageTypeInvalid specifies the storage type invalid state for storage type.
    case StorageTypeInvalid = "Invalid"
// StorageTypeLocallyRedundant specifies the storage type locally redundant state for storage type.
    case StorageTypeLocallyRedundant = "LocallyRedundant"
}


// StorageTypeState enumerates the values for storage type state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum StorageTypeStateEnum: String, Codable
{
// StorageTypeStateInvalid specifies the storage type state invalid state for storage type state.
    case StorageTypeStateInvalid = "Invalid"
// StorageTypeStateLocked specifies the storage type state locked state for storage type state.
    case StorageTypeStateLocked = "Locked"
// StorageTypeStateUnlocked specifies the storage type state unlocked state for storage type state.
    case StorageTypeStateUnlocked = "Unlocked"
}


// 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 SubProtectionPolicyData : SubProtectionPolicyProtocol {
    public var policyType: String?
    public var schedulePolicy: SchedulePolicyProtocol?
    public var retentionPolicy: RetentionPolicyProtocol?

        enum CodingKeys: String, CodingKey {case policyType = "policyType"
        case schedulePolicy = "schedulePolicy"
        case retentionPolicy = "retentionPolicy"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSubProtectionPolicyProtocol() -> SubProtectionPolicyProtocol {
    return SubProtectionPolicyData()
  }
}


// SupportStatus enumerates the values for support status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum SupportStatusEnum: String, Codable
{
// SupportStatusDefaultOFF specifies the support status default off state for support status.
    case SupportStatusDefaultOFF = "DefaultOFF"
// SupportStatusDefaultON specifies the support status default on state for support status.
    case SupportStatusDefaultON = "DefaultON"
// SupportStatusInvalid specifies the support status invalid state for support status.
    case SupportStatusInvalid = "Invalid"
// SupportStatusNotSupported specifies the support status not supported state for support status.
    case SupportStatusNotSupported = "NotSupported"
// SupportStatusSupported specifies the support status supported state for support status.
    case SupportStatusSupported = "Supported"
}


// 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 TargetAFSRestoreInfoData : TargetAFSRestoreInfoProtocol {
    public var name: String?
    public var targetResourceId: String?

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

  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(.targetResourceId) {
        self.targetResourceId = try container.decode(String?.self, forKey: .targetResourceId)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

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

extension DataFactory {
  public static func createTargetAFSRestoreInfoProtocol() -> TargetAFSRestoreInfoProtocol {
    return TargetAFSRestoreInfoData()
  }
}


// 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 TargetRestoreInfoData : TargetRestoreInfoProtocol {
    public var overwriteOption: OverwriteOptionsEnum?
    public var containerId: String?
    public var databaseName: String?

        enum CodingKeys: String, CodingKey {case overwriteOption = "overwriteOption"
        case containerId = "containerId"
        case databaseName = "databaseName"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createTargetRestoreInfoProtocol() -> TargetRestoreInfoProtocol {
    return TargetRestoreInfoData()
  }
}


// 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 TokenInformationData : TokenInformationProtocol {
    public var token: String?
    public var expiryTimeInUtcTicks: Int64?
    public var securityPIN: String?

        enum CodingKeys: String, CodingKey {case token = "token"
        case expiryTimeInUtcTicks = "expiryTimeInUtcTicks"
        case securityPIN = "securityPIN"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createTokenInformationProtocol() -> TokenInformationProtocol {
    return TokenInformationData()
  }
}


// Type enumerates the values for 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 TypeEnumEnum: String, Codable
{
// TypeEnumBackupProtectedItemCountSummary specifies the type enum backup protected item count summary state for type
// enum.
    case TypeEnumBackupProtectedItemCountSummary = "BackupProtectedItemCountSummary"
// TypeEnumBackupProtectionContainerCountSummary specifies the type enum backup protection container count summary
// state for type enum.
    case TypeEnumBackupProtectionContainerCountSummary = "BackupProtectionContainerCountSummary"
// TypeEnumInvalid specifies the type enum invalid state for type enum.
    case TypeEnumInvalid = "Invalid"
}


// UsagesUnit enumerates the values for usages unit.

// 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 UsagesUnitEnum: String, Codable
{
// Bytes specifies the bytes state for usages unit.
    case Bytes = "Bytes"
// BytesPerSecond specifies the bytes per second state for usages unit.
    case BytesPerSecond = "BytesPerSecond"
// Count specifies the count state for usages unit.
    case Count = "Count"
// CountPerSecond specifies the count per second state for usages unit.
    case CountPerSecond = "CountPerSecond"
// Percent specifies the percent state for usages unit.
    case Percent = "Percent"
// Seconds specifies the seconds state for usages unit.
    case Seconds = "Seconds"
}


// ValidationStatus enumerates the values for validation status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ValidationStatusEnum: String, Codable
{
// ValidationStatusFailed specifies the validation status failed state for validation status.
    case ValidationStatusFailed = "Failed"
// ValidationStatusInvalid specifies the validation status invalid state for validation status.
    case ValidationStatusInvalid = "Invalid"
// ValidationStatusSucceeded specifies the validation status succeeded state for validation status.
    case ValidationStatusSucceeded = "Succeeded"
}


// 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 WeeklyRetentionFormatData : WeeklyRetentionFormatProtocol {
    public var daysOfTheWeek: [DayOfWeekEnum?]?
    public var weeksOfTheMonth: [WeekOfMonthEnum?]?

        enum CodingKeys: String, CodingKey {case daysOfTheWeek = "daysOfTheWeek"
        case weeksOfTheMonth = "weeksOfTheMonth"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createWeeklyRetentionFormatProtocol() -> WeeklyRetentionFormatProtocol {
    return WeeklyRetentionFormatData()
  }
}


// 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 WeeklyRetentionScheduleData : WeeklyRetentionScheduleProtocol {
    public var daysOfTheWeek: [DayOfWeekEnum?]?
    public var retentionTimes: [Date]?
    public var retentionDuration: RetentionDurationProtocol?

        enum CodingKeys: String, CodingKey {case daysOfTheWeek = "daysOfTheWeek"
        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(.daysOfTheWeek) {
        self.daysOfTheWeek = try container.decode([DayOfWeekEnum?]?.self, forKey: .daysOfTheWeek)
    }
    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.daysOfTheWeek != nil {try container.encode(self.daysOfTheWeek as! [DayOfWeekEnum?]?, forKey: .daysOfTheWeek)}
    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 createWeeklyRetentionScheduleProtocol() -> WeeklyRetentionScheduleProtocol {
    return WeeklyRetentionScheduleData()
  }
}


// WeekOfMonth enumerates the values for week of month.

// 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 WeekOfMonthEnum: String, Codable
{
// First specifies the first state for week of month.
    case First = "First"
// Fourth specifies the fourth state for week of month.
    case Fourth = "Fourth"
// Last specifies the last state for week of month.
    case Last = "Last"
// Second specifies the second state for week of month.
    case Second = "Second"
// Third specifies the third state for week of month.
    case Third = "Third"
}


// 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 WorkloadInquiryDetailsData : WorkloadInquiryDetailsProtocol {
    public var type: String?
    public var itemCount: Int64?
    public var inquiryValidation: InquiryValidationProtocol?

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

  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(String?.self, forKey: .type)
    }
    if container.contains(.itemCount) {
        self.itemCount = try container.decode(Int64?.self, forKey: .itemCount)
    }
    if container.contains(.inquiryValidation) {
        self.inquiryValidation = try container.decode(InquiryValidationData?.self, forKey: .inquiryValidation)
    }
    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)}
    if self.itemCount != nil {try container.encode(self.itemCount, forKey: .itemCount)}
    if self.inquiryValidation != nil {try container.encode(self.inquiryValidation as! InquiryValidationData?, forKey: .inquiryValidation)}
  }
}

extension DataFactory {
  public static func createWorkloadInquiryDetailsProtocol() -> WorkloadInquiryDetailsProtocol {
    return WorkloadInquiryDetailsData()
  }
}


// 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 WorkloadItemData : WorkloadItemProtocol {
    public var backupManagementType: String?
    public var workloadType: String?
    public var friendlyName: String?
    public var protectionState: ProtectionStatusEnum?

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

  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(String?.self, forKey: .backupManagementType)
    }
    if container.contains(.workloadType) {
        self.workloadType = try container.decode(String?.self, forKey: .workloadType)
    }
    if container.contains(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.protectionState) {
        self.protectionState = try container.decode(ProtectionStatusEnum?.self, forKey: .protectionState)
    }
    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.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.protectionState != nil {try container.encode(self.protectionState, forKey: .protectionState)}
  }
}

extension DataFactory {
  public static func createWorkloadItemProtocol() -> WorkloadItemProtocol {
    return WorkloadItemData()
  }
}


// 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 WorkloadItemResourceData : WorkloadItemResourceProtocol, 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: WorkloadItemProtocol?

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

extension DataFactory {
  public static func createWorkloadItemResourceProtocol() -> WorkloadItemResourceProtocol {
    return WorkloadItemResourceData()
  }
}


// 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 WorkloadItemResourceListData : WorkloadItemResourceListProtocol, ResourceListProtocol {
    public var _nextLink: String?
    public var value: [WorkloadItemResourceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createWorkloadItemResourceListProtocol() -> WorkloadItemResourceListProtocol {
    return WorkloadItemResourceListData()
  }
}


// WorkloadItemType enumerates the values for workload item 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 WorkloadItemTypeEnum: String, Codable
{
// WorkloadItemTypeInvalid specifies the workload item type invalid state for workload item type.
    case WorkloadItemTypeInvalid = "Invalid"
// WorkloadItemTypeSQLDataBase specifies the workload item type sql data base state for workload item type.
    case WorkloadItemTypeSQLDataBase = "SQLDataBase"
// WorkloadItemTypeSQLInstance specifies the workload item type sql instance state for workload item type.
    case WorkloadItemTypeSQLInstance = "SQLInstance"
}


// 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 WorkloadProtectableItemData : WorkloadProtectableItemProtocol {
    public var backupManagementType: String?
    public var workloadType: String?
    public var friendlyName: String?
    public var protectionState: ProtectionStatusEnum?

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

  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(String?.self, forKey: .backupManagementType)
    }
    if container.contains(.workloadType) {
        self.workloadType = try container.decode(String?.self, forKey: .workloadType)
    }
    if container.contains(.friendlyName) {
        self.friendlyName = try container.decode(String?.self, forKey: .friendlyName)
    }
    if container.contains(.protectionState) {
        self.protectionState = try container.decode(ProtectionStatusEnum?.self, forKey: .protectionState)
    }
    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.friendlyName != nil {try container.encode(self.friendlyName, forKey: .friendlyName)}
    if self.protectionState != nil {try container.encode(self.protectionState, forKey: .protectionState)}
  }
}

extension DataFactory {
  public static func createWorkloadProtectableItemProtocol() -> WorkloadProtectableItemProtocol {
    return WorkloadProtectableItemData()
  }
}


// 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 WorkloadProtectableItemResourceData : WorkloadProtectableItemResourceProtocol, 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: WorkloadProtectableItemProtocol?

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

extension DataFactory {
  public static func createWorkloadProtectableItemResourceProtocol() -> WorkloadProtectableItemResourceProtocol {
    return WorkloadProtectableItemResourceData()
  }
}


// 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 WorkloadProtectableItemResourceListData : WorkloadProtectableItemResourceListProtocol, ResourceListProtocol {
    public var _nextLink: String?
    public var value: [WorkloadProtectableItemResourceProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createWorkloadProtectableItemResourceListProtocol() -> WorkloadProtectableItemResourceListProtocol {
    return WorkloadProtectableItemResourceListData()
  }
}