import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationMappingsGet  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var storageClassificationName : String { get set }
    var storageClassificationMappingName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationMappingProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassificationMappings {
// Get gets the details of the specified storage classification mapping.
    internal class GetCommand : BaseCommand, ReplicationStorageClassificationMappingsGet {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var storageClassificationName : String
        public var storageClassificationMappingName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, storageClassificationName: String, storageClassificationMappingName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.storageClassificationName = storageClassificationName
            self.storageClassificationMappingName = storageClassificationMappingName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{storageClassificationName}"] = String(describing: self.storageClassificationName)
            self.pathParameters["{storageClassificationMappingName}"] = String(describing: self.storageClassificationMappingName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(StorageClassificationMappingData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationMappingProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: StorageClassificationMappingData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationMappingsList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationMappingCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassificationMappings {
// List lists the storage classification mappings in the vault.
    internal class ListCommand : BaseCommand, ReplicationStorageClassificationMappingsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(StorageClassificationMappingCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationMappingCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageClassificationMappingCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationMappingsListByReplicationStorageClassifications  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var storageClassificationName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationMappingCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassificationMappings {
// ListByReplicationStorageClassifications lists the storage classification mappings for the fabric.
    internal class ListByReplicationStorageClassificationsCommand : BaseCommand, ReplicationStorageClassificationMappingsListByReplicationStorageClassifications {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var storageClassificationName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, storageClassificationName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.storageClassificationName = storageClassificationName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{storageClassificationName}"] = String(describing: self.storageClassificationName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(StorageClassificationMappingCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationMappingCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageClassificationMappingCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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.

// ReplicationStorageClassifications is the client for the ReplicationStorageClassifications methods of the
// SiteRecoveryManagementClient service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct ReplicationStorageClassifications {
    public static func Get(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, storageClassificationName: String) -> ReplicationStorageClassificationsGet {
        return GetCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, storageClassificationName: storageClassificationName)
    }
    public static func List(resourceName: String, resourceGroupName: String, subscriptionId: String) -> ReplicationStorageClassificationsList {
        return ListCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
    public static func ListByReplicationFabrics(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String) -> ReplicationStorageClassificationsListByReplicationFabrics {
        return ListByReplicationFabricsCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationsGet  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var storageClassificationName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassifications {
// Get gets the details of the specified storage classification.
    internal class GetCommand : BaseCommand, ReplicationStorageClassificationsGet {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var storageClassificationName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, storageClassificationName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.storageClassificationName = storageClassificationName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{storageClassificationName}"] = String(describing: self.storageClassificationName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(StorageClassificationData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: StorageClassificationData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationsList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassifications {
// List lists the storage classifications in the vault.
    internal class ListCommand : BaseCommand, ReplicationStorageClassificationsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(StorageClassificationCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageClassificationCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationStorageClassificationsListByReplicationFabrics  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageClassificationCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationStorageClassifications {
// ListByReplicationFabrics lists the storage classifications available in the specified fabric.
    internal class ListByReplicationFabricsCommand : BaseCommand, ReplicationStorageClassificationsListByReplicationFabrics {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(StorageClassificationCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageClassificationCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageClassificationCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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.

// ReplicationVaultHealth is the client for the ReplicationVaultHealth methods of the SiteRecoveryManagementClient
// service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct ReplicationVaultHealth {
    public static func Get(resourceName: String, resourceGroupName: String, subscriptionId: String) -> ReplicationVaultHealthGet {
        return GetCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
    public static func Refresh(resourceName: String, resourceGroupName: String, subscriptionId: String) -> ReplicationVaultHealthRefresh {
        return RefreshCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationVaultHealthGet  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VaultHealthDetailsProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationVaultHealth {
// Get gets the health details of the vault.
    internal class GetCommand : BaseCommand, ReplicationVaultHealthGet {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(VaultHealthDetailsData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VaultHealthDetailsProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: VaultHealthDetailsData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationVaultHealthRefresh  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VaultHealthDetailsProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationVaultHealth {
// Refresh sends the refresh request. This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
    internal class RefreshCommand : BaseCommand, ReplicationVaultHealthRefresh {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(VaultHealthDetailsData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VaultHealthDetailsProtocol?, Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (result: VaultHealthDetailsData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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.

// ReplicationvCenters is the client for the ReplicationvCenters methods of the SiteRecoveryManagementClient service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct ReplicationvCenters {
    public static func Create(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String, addVCenterRequest: AddVCenterRequestProtocol) -> ReplicationvCentersCreate {
        return CreateCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, vCenterName: vCenterName, addVCenterRequest: addVCenterRequest)
    }
    public static func Delete(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String) -> ReplicationvCentersDelete {
        return DeleteCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, vCenterName: vCenterName)
    }
    public static func Get(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String) -> ReplicationvCentersGet {
        return GetCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, vCenterName: vCenterName)
    }
    public static func List(resourceName: String, resourceGroupName: String, subscriptionId: String) -> ReplicationvCentersList {
        return ListCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
    public static func ListByReplicationFabrics(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String) -> ReplicationvCentersListByReplicationFabrics {
        return ListByReplicationFabricsCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName)
    }
    public static func Update(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String, updateVCenterRequest: UpdateVCenterRequestProtocol) -> ReplicationvCentersUpdate {
        return UpdateCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, vCenterName: vCenterName, updateVCenterRequest: updateVCenterRequest)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersCreate  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var vCenterName : String { get set }
    var apiVersion : String { get set }
    var addVCenterRequest :  AddVCenterRequestProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationvCenters {
// Create the operation to create a vCenter object.. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
    internal class CreateCommand : BaseCommand, ReplicationvCentersCreate {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var vCenterName : String
        public var apiVersion = "2018-01-10"
    public var addVCenterRequest :  AddVCenterRequestProtocol?

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String, addVCenterRequest: AddVCenterRequestProtocol) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.vCenterName = vCenterName
            self.addVCenterRequest = addVCenterRequest
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{vCenterName}"] = String(describing: self.vCenterName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = addVCenterRequest

        }
        public override func encodeBody() throws -> Data? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let encoder = try CoderFactory.encoder(for: mimeType)
                let encodedValue = try encoder.encode(addVCenterRequest as? AddVCenterRequestData)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(VCenterData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (result: VCenterData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersDelete  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var vCenterName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.ReplicationvCenters {
// Delete the operation to remove(unregister) a registered vCenter server from the vault. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
    internal class DeleteCommand : BaseCommand, ReplicationvCentersDelete {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var vCenterName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.vCenterName = vCenterName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = true
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{vCenterName}"] = String(describing: self.vCenterName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public func execute(client: RuntimeClient,
            completionHandler: @escaping (Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (error) in
                completionHandler(error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersGet  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var vCenterName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationvCenters {
// Get gets the details of a registered vCenter server(Add vCenter server.)
    internal class GetCommand : BaseCommand, ReplicationvCentersGet {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var vCenterName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.vCenterName = vCenterName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{vCenterName}"] = String(describing: self.vCenterName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(VCenterData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: VCenterData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VCenterCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationvCenters {
// List lists the vCenter servers registered in the vault.
    internal class ListCommand : BaseCommand, ReplicationvCentersList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(VCenterCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VCenterCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: VCenterCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersListByReplicationFabrics  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VCenterCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationvCenters {
// ListByReplicationFabrics lists the vCenter servers registered in a fabric.
    internal class ListByReplicationFabricsCommand : BaseCommand, ReplicationvCentersListByReplicationFabrics {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(VCenterCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VCenterCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: VCenterCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ReplicationvCentersUpdate  {
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var vCenterName : String { get set }
    var apiVersion : String { get set }
    var updateVCenterRequest :  UpdateVCenterRequestProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ReplicationvCenters {
// Update the operation to update a registered vCenter. This method may poll for completion. Polling can be canceled by
// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
    internal class UpdateCommand : BaseCommand, ReplicationvCentersUpdate {
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var vCenterName : String
        public var apiVersion = "2018-01-10"
    public var updateVCenterRequest :  UpdateVCenterRequestProtocol?

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, vCenterName: String, updateVCenterRequest: UpdateVCenterRequestProtocol) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.vCenterName = vCenterName
            self.updateVCenterRequest = updateVCenterRequest
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = true
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{vCenterName}"] = String(describing: self.vCenterName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = updateVCenterRequest

        }
        public override func encodeBody() throws -> Data? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let encoder = try CoderFactory.encoder(for: mimeType)
                let encodedValue = try encoder.encode(updateVCenterRequest as? UpdateVCenterRequestData)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(VCenterData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (VCenterProtocol?, Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (result: VCenterData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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.

// TargetComputeSizes is the client for the TargetComputeSizes methods of the SiteRecoveryManagementClient service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct TargetComputeSizes {
    public static func ListByReplicationProtectedItems(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, protectionContainerName: String, replicatedProtectedItemName: String) -> TargetComputeSizesListByReplicationProtectedItems {
        return ListByReplicationProtectedItemsCommand(resourceName: resourceName, resourceGroupName: resourceGroupName, subscriptionId: subscriptionId, fabricName: fabricName, protectionContainerName: protectionContainerName, replicatedProtectedItemName: replicatedProtectedItemName)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol TargetComputeSizesListByReplicationProtectedItems  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var resourceName : String { get set }
    var resourceGroupName : String { get set }
    var subscriptionId : String { get set }
    var fabricName : String { get set }
    var protectionContainerName : String { get set }
    var replicatedProtectedItemName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (TargetComputeSizeCollectionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.TargetComputeSizes {
// ListByReplicationProtectedItems lists the available target compute sizes for a replication protected item.
    internal class ListByReplicationProtectedItemsCommand : BaseCommand, TargetComputeSizesListByReplicationProtectedItems {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceName : String
        public var resourceGroupName : String
        public var subscriptionId : String
        public var fabricName : String
        public var protectionContainerName : String
        public var replicatedProtectedItemName : String
        public var apiVersion = "2018-01-10"

        public init(resourceName: String, resourceGroupName: String, subscriptionId: String, fabricName: String, protectionContainerName: String, replicatedProtectedItemName: String) {
            self.resourceName = resourceName
            self.resourceGroupName = resourceGroupName
            self.subscriptionId = subscriptionId
            self.fabricName = fabricName
            self.protectionContainerName = protectionContainerName
            self.replicatedProtectedItemName = replicatedProtectedItemName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceName}"] = String(describing: self.resourceName)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{fabricName}"] = String(describing: self.fabricName)
            self.pathParameters["{protectionContainerName}"] = String(describing: self.protectionContainerName)
            self.pathParameters["{replicatedProtectedItemName}"] = String(describing: self.replicatedProtectedItemName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(TargetComputeSizeCollectionData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (TargetComputeSizeCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: TargetComputeSizeCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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 A2AApplyRecoveryPointInputData : A2AApplyRecoveryPointInputProtocol, ApplyRecoveryPointProviderSpecificInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
  }
}

extension DataFactory {
  public static func createA2AApplyRecoveryPointInputProtocol() -> A2AApplyRecoveryPointInputProtocol {
    return A2AApplyRecoveryPointInputData()
  }
}


// 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 A2AContainerCreationInputData : A2AContainerCreationInputProtocol, ReplicationProviderSpecificContainerCreationInputProtocol {

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
  }
}

extension DataFactory {
  public static func createA2AContainerCreationInputProtocol() -> A2AContainerCreationInputProtocol {
    return A2AContainerCreationInputData()
  }
}


// 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 A2AEnableProtectionInputData : A2AEnableProtectionInputProtocol, EnableProtectionProviderSpecificInputProtocol {
    public var fabricObjectId: String?
    public var recoveryContainerId: String?
    public var recoveryResourceGroupId: String?
    public var recoveryCloudServiceId: String?
    public var recoveryAvailabilitySetId: String?
    public var vmDisks: [A2AVmDiskInputDetailsProtocol?]?
    public var vmManagedDisks: [A2AVmManagedDiskInputDetailsProtocol?]?
    public var multiVmGroupName: String?
    public var recoveryBootDiagStorageAccountId: String?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.fabricObjectId) {
        self.fabricObjectId = try container.decode(String?.self, forKey: .fabricObjectId)
    }
    if container.contains(.recoveryContainerId) {
        self.recoveryContainerId = try container.decode(String?.self, forKey: .recoveryContainerId)
    }
    if container.contains(.recoveryResourceGroupId) {
        self.recoveryResourceGroupId = try container.decode(String?.self, forKey: .recoveryResourceGroupId)
    }
    if container.contains(.recoveryCloudServiceId) {
        self.recoveryCloudServiceId = try container.decode(String?.self, forKey: .recoveryCloudServiceId)
    }
    if container.contains(.recoveryAvailabilitySetId) {
        self.recoveryAvailabilitySetId = try container.decode(String?.self, forKey: .recoveryAvailabilitySetId)
    }
    if container.contains(.vmDisks) {
        self.vmDisks = try container.decode([A2AVmDiskInputDetailsData?]?.self, forKey: .vmDisks)
    }
    if container.contains(.vmManagedDisks) {
        self.vmManagedDisks = try container.decode([A2AVmManagedDiskInputDetailsData?]?.self, forKey: .vmManagedDisks)
    }
    if container.contains(.multiVmGroupName) {
        self.multiVmGroupName = try container.decode(String?.self, forKey: .multiVmGroupName)
    }
    if container.contains(.recoveryBootDiagStorageAccountId) {
        self.recoveryBootDiagStorageAccountId = try container.decode(String?.self, forKey: .recoveryBootDiagStorageAccountId)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.fabricObjectId != nil {try container.encode(self.fabricObjectId, forKey: .fabricObjectId)}
    if self.recoveryContainerId != nil {try container.encode(self.recoveryContainerId, forKey: .recoveryContainerId)}
    if self.recoveryResourceGroupId != nil {try container.encode(self.recoveryResourceGroupId, forKey: .recoveryResourceGroupId)}
    if self.recoveryCloudServiceId != nil {try container.encode(self.recoveryCloudServiceId, forKey: .recoveryCloudServiceId)}
    if self.recoveryAvailabilitySetId != nil {try container.encode(self.recoveryAvailabilitySetId, forKey: .recoveryAvailabilitySetId)}
    if self.vmDisks != nil {try container.encode(self.vmDisks as! [A2AVmDiskInputDetailsData?]?, forKey: .vmDisks)}
    if self.vmManagedDisks != nil {try container.encode(self.vmManagedDisks as! [A2AVmManagedDiskInputDetailsData?]?, forKey: .vmManagedDisks)}
    if self.multiVmGroupName != nil {try container.encode(self.multiVmGroupName, forKey: .multiVmGroupName)}
    if self.recoveryBootDiagStorageAccountId != nil {try container.encode(self.recoveryBootDiagStorageAccountId, forKey: .recoveryBootDiagStorageAccountId)}
  }
}

extension DataFactory {
  public static func createA2AEnableProtectionInputProtocol() -> A2AEnableProtectionInputProtocol {
    return A2AEnableProtectionInputData()
  }
}


// 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 A2AEventDetailsData : A2AEventDetailsProtocol, EventProviderSpecificDetailsProtocol {
    public var protectedItemName: String?
    public var fabricObjectId: String?
    public var fabricName: String?
    public var fabricLocation: String?
    public var remoteFabricName: String?
    public var remoteFabricLocation: String?

        enum CodingKeys: String, CodingKey {case protectedItemName = "protectedItemName"
        case fabricObjectId = "fabricObjectId"
        case fabricName = "fabricName"
        case fabricLocation = "fabricLocation"
        case remoteFabricName = "remoteFabricName"
        case remoteFabricLocation = "remoteFabricLocation"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createA2AEventDetailsProtocol() -> A2AEventDetailsProtocol {
    return A2AEventDetailsData()
  }
}


// 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 A2AFailoverProviderInputData : A2AFailoverProviderInputProtocol, ProviderSpecificFailoverInputProtocol {
    public var recoveryPointId: String?
    public var cloudServiceCreationOption: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createA2AFailoverProviderInputProtocol() -> A2AFailoverProviderInputProtocol {
    return A2AFailoverProviderInputData()
  }
}


// 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 A2APolicyCreationInputData : A2APolicyCreationInputProtocol, PolicyProviderSpecificInputProtocol {
    public var recoveryPointHistory: Int32?
    public var crashConsistentFrequencyInMinutes: Int32?
    public var appConsistentFrequencyInMinutes: Int32?
    public var multiVmSyncStatus: SetMultiVmSyncStatusEnum

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

  public init(multiVmSyncStatus: SetMultiVmSyncStatusEnum)  {
    self.multiVmSyncStatus = multiVmSyncStatus
  }

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

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

extension DataFactory {
  public static func createA2APolicyCreationInputProtocol(multiVmSyncStatus: SetMultiVmSyncStatusEnum) -> A2APolicyCreationInputProtocol {
    return A2APolicyCreationInputData(multiVmSyncStatus: multiVmSyncStatus)
  }
}


// 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 A2APolicyDetailsData : A2APolicyDetailsProtocol, PolicyProviderSpecificDetailsProtocol {
    public var recoveryPointThresholdInMinutes: Int32?
    public var recoveryPointHistory: Int32?
    public var appConsistentFrequencyInMinutes: Int32?
    public var multiVmSyncStatus: String?
    public var crashConsistentFrequencyInMinutes: Int32?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createA2APolicyDetailsProtocol() -> A2APolicyDetailsProtocol {
    return A2APolicyDetailsData()
  }
}


// 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 A2AProtectedDiskDetailsData : A2AProtectedDiskDetailsProtocol {
    public var diskUri: String?
    public var recoveryAzureStorageAccountId: String?
    public var primaryDiskAzureStorageAccountId: String?
    public var recoveryDiskUri: String?
    public var diskName: String?
    public var diskCapacityInBytes: Int64?
    public var primaryStagingAzureStorageAccountId: String?
    public var diskType: String?
    public var resyncRequired: Bool?
    public var monitoringPercentageCompletion: Int32?
    public var monitoringJobType: String?
    public var dataPendingInStagingStorageAccountInMB: Double?
    public var dataPendingAtSourceAgentInMB: Double?

        enum CodingKeys: String, CodingKey {case diskUri = "diskUri"
        case recoveryAzureStorageAccountId = "recoveryAzureStorageAccountId"
        case primaryDiskAzureStorageAccountId = "primaryDiskAzureStorageAccountId"
        case recoveryDiskUri = "recoveryDiskUri"
        case diskName = "diskName"
        case diskCapacityInBytes = "diskCapacityInBytes"
        case primaryStagingAzureStorageAccountId = "primaryStagingAzureStorageAccountId"
        case diskType = "diskType"
        case resyncRequired = "resyncRequired"
        case monitoringPercentageCompletion = "monitoringPercentageCompletion"
        case monitoringJobType = "monitoringJobType"
        case dataPendingInStagingStorageAccountInMB = "dataPendingInStagingStorageAccountInMB"
        case dataPendingAtSourceAgentInMB = "dataPendingAtSourceAgentInMB"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.diskUri) {
        self.diskUri = try container.decode(String?.self, forKey: .diskUri)
    }
    if container.contains(.recoveryAzureStorageAccountId) {
        self.recoveryAzureStorageAccountId = try container.decode(String?.self, forKey: .recoveryAzureStorageAccountId)
    }
    if container.contains(.primaryDiskAzureStorageAccountId) {
        self.primaryDiskAzureStorageAccountId = try container.decode(String?.self, forKey: .primaryDiskAzureStorageAccountId)
    }
    if container.contains(.recoveryDiskUri) {
        self.recoveryDiskUri = try container.decode(String?.self, forKey: .recoveryDiskUri)
    }
    if container.contains(.diskName) {
        self.diskName = try container.decode(String?.self, forKey: .diskName)
    }
    if container.contains(.diskCapacityInBytes) {
        self.diskCapacityInBytes = try container.decode(Int64?.self, forKey: .diskCapacityInBytes)
    }
    if container.contains(.primaryStagingAzureStorageAccountId) {
        self.primaryStagingAzureStorageAccountId = try container.decode(String?.self, forKey: .primaryStagingAzureStorageAccountId)
    }
    if container.contains(.diskType) {
        self.diskType = try container.decode(String?.self, forKey: .diskType)
    }
    if container.contains(.resyncRequired) {
        self.resyncRequired = try container.decode(Bool?.self, forKey: .resyncRequired)
    }
    if container.contains(.monitoringPercentageCompletion) {
        self.monitoringPercentageCompletion = try container.decode(Int32?.self, forKey: .monitoringPercentageCompletion)
    }
    if container.contains(.monitoringJobType) {
        self.monitoringJobType = try container.decode(String?.self, forKey: .monitoringJobType)
    }
    if container.contains(.dataPendingInStagingStorageAccountInMB) {
        self.dataPendingInStagingStorageAccountInMB = try container.decode(Double?.self, forKey: .dataPendingInStagingStorageAccountInMB)
    }
    if container.contains(.dataPendingAtSourceAgentInMB) {
        self.dataPendingAtSourceAgentInMB = try container.decode(Double?.self, forKey: .dataPendingAtSourceAgentInMB)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.diskUri != nil {try container.encode(self.diskUri, forKey: .diskUri)}
    if self.recoveryAzureStorageAccountId != nil {try container.encode(self.recoveryAzureStorageAccountId, forKey: .recoveryAzureStorageAccountId)}
    if self.primaryDiskAzureStorageAccountId != nil {try container.encode(self.primaryDiskAzureStorageAccountId, forKey: .primaryDiskAzureStorageAccountId)}
    if self.recoveryDiskUri != nil {try container.encode(self.recoveryDiskUri, forKey: .recoveryDiskUri)}
    if self.diskName != nil {try container.encode(self.diskName, forKey: .diskName)}
    if self.diskCapacityInBytes != nil {try container.encode(self.diskCapacityInBytes, forKey: .diskCapacityInBytes)}
    if self.primaryStagingAzureStorageAccountId != nil {try container.encode(self.primaryStagingAzureStorageAccountId, forKey: .primaryStagingAzureStorageAccountId)}
    if self.diskType != nil {try container.encode(self.diskType, forKey: .diskType)}
    if self.resyncRequired != nil {try container.encode(self.resyncRequired, forKey: .resyncRequired)}
    if self.monitoringPercentageCompletion != nil {try container.encode(self.monitoringPercentageCompletion, forKey: .monitoringPercentageCompletion)}
    if self.monitoringJobType != nil {try container.encode(self.monitoringJobType, forKey: .monitoringJobType)}
    if self.dataPendingInStagingStorageAccountInMB != nil {try container.encode(self.dataPendingInStagingStorageAccountInMB, forKey: .dataPendingInStagingStorageAccountInMB)}
    if self.dataPendingAtSourceAgentInMB != nil {try container.encode(self.dataPendingAtSourceAgentInMB, forKey: .dataPendingAtSourceAgentInMB)}
  }
}

extension DataFactory {
  public static func createA2AProtectedDiskDetailsProtocol() -> A2AProtectedDiskDetailsProtocol {
    return A2AProtectedDiskDetailsData()
  }
}


// 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 A2AProtectedManagedDiskDetailsData : A2AProtectedManagedDiskDetailsProtocol {
    public var diskId: String?
    public var recoveryResourceGroupId: String?
    public var recoveryTargetDiskId: String?
    public var recoveryReplicaDiskId: String?
    public var recoveryReplicaDiskAccountType: String?
    public var recoveryTargetDiskAccountType: String?
    public var diskName: String?
    public var diskCapacityInBytes: Int64?
    public var primaryStagingAzureStorageAccountId: String?
    public var diskType: String?
    public var resyncRequired: Bool?
    public var monitoringPercentageCompletion: Int32?
    public var monitoringJobType: String?
    public var dataPendingInStagingStorageAccountInMB: Double?
    public var dataPendingAtSourceAgentInMB: Double?

        enum CodingKeys: String, CodingKey {case diskId = "diskId"
        case recoveryResourceGroupId = "recoveryResourceGroupId"
        case recoveryTargetDiskId = "recoveryTargetDiskId"
        case recoveryReplicaDiskId = "recoveryReplicaDiskId"
        case recoveryReplicaDiskAccountType = "recoveryReplicaDiskAccountType"
        case recoveryTargetDiskAccountType = "recoveryTargetDiskAccountType"
        case diskName = "diskName"
        case diskCapacityInBytes = "diskCapacityInBytes"
        case primaryStagingAzureStorageAccountId = "primaryStagingAzureStorageAccountId"
        case diskType = "diskType"
        case resyncRequired = "resyncRequired"
        case monitoringPercentageCompletion = "monitoringPercentageCompletion"
        case monitoringJobType = "monitoringJobType"
        case dataPendingInStagingStorageAccountInMB = "dataPendingInStagingStorageAccountInMB"
        case dataPendingAtSourceAgentInMB = "dataPendingAtSourceAgentInMB"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.diskId) {
        self.diskId = try container.decode(String?.self, forKey: .diskId)
    }
    if container.contains(.recoveryResourceGroupId) {
        self.recoveryResourceGroupId = try container.decode(String?.self, forKey: .recoveryResourceGroupId)
    }
    if container.contains(.recoveryTargetDiskId) {
        self.recoveryTargetDiskId = try container.decode(String?.self, forKey: .recoveryTargetDiskId)
    }
    if container.contains(.recoveryReplicaDiskId) {
        self.recoveryReplicaDiskId = try container.decode(String?.self, forKey: .recoveryReplicaDiskId)
    }
    if container.contains(.recoveryReplicaDiskAccountType) {
        self.recoveryReplicaDiskAccountType = try container.decode(String?.self, forKey: .recoveryReplicaDiskAccountType)
    }
    if container.contains(.recoveryTargetDiskAccountType) {
        self.recoveryTargetDiskAccountType = try container.decode(String?.self, forKey: .recoveryTargetDiskAccountType)
    }
    if container.contains(.diskName) {
        self.diskName = try container.decode(String?.self, forKey: .diskName)
    }
    if container.contains(.diskCapacityInBytes) {
        self.diskCapacityInBytes = try container.decode(Int64?.self, forKey: .diskCapacityInBytes)
    }
    if container.contains(.primaryStagingAzureStorageAccountId) {
        self.primaryStagingAzureStorageAccountId = try container.decode(String?.self, forKey: .primaryStagingAzureStorageAccountId)
    }
    if container.contains(.diskType) {
        self.diskType = try container.decode(String?.self, forKey: .diskType)
    }
    if container.contains(.resyncRequired) {
        self.resyncRequired = try container.decode(Bool?.self, forKey: .resyncRequired)
    }
    if container.contains(.monitoringPercentageCompletion) {
        self.monitoringPercentageCompletion = try container.decode(Int32?.self, forKey: .monitoringPercentageCompletion)
    }
    if container.contains(.monitoringJobType) {
        self.monitoringJobType = try container.decode(String?.self, forKey: .monitoringJobType)
    }
    if container.contains(.dataPendingInStagingStorageAccountInMB) {
        self.dataPendingInStagingStorageAccountInMB = try container.decode(Double?.self, forKey: .dataPendingInStagingStorageAccountInMB)
    }
    if container.contains(.dataPendingAtSourceAgentInMB) {
        self.dataPendingAtSourceAgentInMB = try container.decode(Double?.self, forKey: .dataPendingAtSourceAgentInMB)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.diskId != nil {try container.encode(self.diskId, forKey: .diskId)}
    if self.recoveryResourceGroupId != nil {try container.encode(self.recoveryResourceGroupId, forKey: .recoveryResourceGroupId)}
    if self.recoveryTargetDiskId != nil {try container.encode(self.recoveryTargetDiskId, forKey: .recoveryTargetDiskId)}
    if self.recoveryReplicaDiskId != nil {try container.encode(self.recoveryReplicaDiskId, forKey: .recoveryReplicaDiskId)}
    if self.recoveryReplicaDiskAccountType != nil {try container.encode(self.recoveryReplicaDiskAccountType, forKey: .recoveryReplicaDiskAccountType)}
    if self.recoveryTargetDiskAccountType != nil {try container.encode(self.recoveryTargetDiskAccountType, forKey: .recoveryTargetDiskAccountType)}
    if self.diskName != nil {try container.encode(self.diskName, forKey: .diskName)}
    if self.diskCapacityInBytes != nil {try container.encode(self.diskCapacityInBytes, forKey: .diskCapacityInBytes)}
    if self.primaryStagingAzureStorageAccountId != nil {try container.encode(self.primaryStagingAzureStorageAccountId, forKey: .primaryStagingAzureStorageAccountId)}
    if self.diskType != nil {try container.encode(self.diskType, forKey: .diskType)}
    if self.resyncRequired != nil {try container.encode(self.resyncRequired, forKey: .resyncRequired)}
    if self.monitoringPercentageCompletion != nil {try container.encode(self.monitoringPercentageCompletion, forKey: .monitoringPercentageCompletion)}
    if self.monitoringJobType != nil {try container.encode(self.monitoringJobType, forKey: .monitoringJobType)}
    if self.dataPendingInStagingStorageAccountInMB != nil {try container.encode(self.dataPendingInStagingStorageAccountInMB, forKey: .dataPendingInStagingStorageAccountInMB)}
    if self.dataPendingAtSourceAgentInMB != nil {try container.encode(self.dataPendingAtSourceAgentInMB, forKey: .dataPendingAtSourceAgentInMB)}
  }
}

extension DataFactory {
  public static func createA2AProtectedManagedDiskDetailsProtocol() -> A2AProtectedManagedDiskDetailsProtocol {
    return A2AProtectedManagedDiskDetailsData()
  }
}


// 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 A2ARecoveryPointDetailsData : A2ARecoveryPointDetailsProtocol, ProviderSpecificRecoveryPointDetailsProtocol {
    public var recoveryPointSyncType: RecoveryPointSyncTypeEnum?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createA2ARecoveryPointDetailsProtocol() -> A2ARecoveryPointDetailsProtocol {
    return A2ARecoveryPointDetailsData()
  }
}