// 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
// VmmToAzureCreateNetworkMappingInputProtocol is create network mappings input properties/behaviour specific to Vmm to
// Azure Network mapping.
public protocol VmmToAzureCreateNetworkMappingInputProtocol : FabricSpecificCreateNetworkMappingInputProtocol {
}


// 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
// VmmToAzureNetworkMappingSettingsProtocol is e2A Network Mapping fabric specific settings.
public protocol VmmToAzureNetworkMappingSettingsProtocol : NetworkMappingFabricSpecificSettingsProtocol {
}


// 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
// VmmToAzureUpdateNetworkMappingInputProtocol is update network mappings input properties/behaviour specific to vmm to
// azure.
public protocol VmmToAzureUpdateNetworkMappingInputProtocol : FabricSpecificUpdateNetworkMappingInputProtocol {
}


// 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
// VmmToVmmCreateNetworkMappingInputProtocol is create network mappings input properties/behaviour specific to vmm to
// vmm Network mapping.
public protocol VmmToVmmCreateNetworkMappingInputProtocol : FabricSpecificCreateNetworkMappingInputProtocol {
}


// 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
// VmmToVmmNetworkMappingSettingsProtocol is e2E Network Mapping fabric specific settings.
public protocol VmmToVmmNetworkMappingSettingsProtocol : NetworkMappingFabricSpecificSettingsProtocol {
}


// 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
// VmmToVmmUpdateNetworkMappingInputProtocol is update network mappings input properties/behaviour specific to vmm to
// vmm.
public protocol VmmToVmmUpdateNetworkMappingInputProtocol : FabricSpecificUpdateNetworkMappingInputProtocol {
}


// 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
// VmmVirtualMachineDetailsProtocol is VMM fabric provider specific VM settings.
public protocol VmmVirtualMachineDetailsProtocol : ConfigurationSettingsProtocol {
     var sourceItemId: String? { get set }
     var generation: String? { get set }
     var osDetails: OSDetailsProtocol? { get set }
     var diskDetails: [DiskDetailsProtocol?]? { get set }
     var hasPhysicalDisk: Bool? { get set }
     var hasFibreChannelAdapter: Bool? { get set }
     var hasSharedVhd: Bool? { get set }
}


// 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
// VMNicDetailsProtocol is hyper V VM network details.
public protocol VMNicDetailsProtocol : Codable {
     var nicId: String? { get set }
     var replicaNicId: String? { get set }
     var sourceNicArmId: String? { get set }
     var vMSubnetName: String? { get set }
     var vMNetworkName: String? { get set }
     var recoveryVMNetworkId: String? { get set }
     var recoveryVMSubnetName: String? { get set }
     var ipAddressType: String? { get set }
     var primaryNicStaticIPAddress: String? { get set }
     var replicaNicStaticIPAddress: String? { get set }
     var selectionType: String? { get set }
     var recoveryNicIpAddressType: String? { get set }
}


// 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
// VMNicInputDetailsProtocol is hyper V VM network input details.
public protocol VMNicInputDetailsProtocol : Codable {
     var nicId: String? { get set }
     var recoveryVMSubnetName: String? { get set }
     var replicaNicStaticIPAddress: String? { get set }
     var selectionType: String? { get set }
}


// 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
// VmNicUpdatesTaskDetailsProtocol is this class represents the vm NicUpdates task details.
public protocol VmNicUpdatesTaskDetailsProtocol : TaskTypeDetailsProtocol {
     var vmId: String? { get set }
     var nicId: String? { get set }
     var name: String? { get set }
}


// 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
// VMwareCbtPolicyCreationInputProtocol is vMware Cbt Policy creation input.
public protocol VMwareCbtPolicyCreationInputProtocol : PolicyProviderSpecificInputProtocol {
     var recoveryPointHistory: Int32? { get set }
     var crashConsistentFrequencyInMinutes: Int32? { get set }
     var appConsistentFrequencyInMinutes: Int32? { get set }
}


// 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
// VmwareCbtPolicyDetailsProtocol is vMware Cbt specific policy details.
public protocol VmwareCbtPolicyDetailsProtocol : PolicyProviderSpecificDetailsProtocol {
     var recoveryPointThresholdInMinutes: Int32? { get set }
     var recoveryPointHistory: Int32? { get set }
     var appConsistentFrequencyInMinutes: Int32? { get set }
     var crashConsistentFrequencyInMinutes: Int32? { get set }
}


// 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
// VMwareDetailsProtocol is store the fabric details specific to the VMware fabric.
public protocol VMwareDetailsProtocol : FabricSpecificDetailsProtocol {
     var processServers: [ProcessServerProtocol?]? { get set }
     var masterTargetServers: [MasterTargetServerProtocol?]? { get set }
     var runAsAccounts: [RunAsAccountProtocol?]? { get set }
     var replicationPairCount: String? { get set }
     var processServerCount: String? { get set }
     var agentCount: String? { get set }
     var protectedServers: String? { get set }
     var systemLoad: String? { get set }
     var systemLoadStatus: String? { get set }
     var cpuLoad: String? { get set }
     var cpuLoadStatus: String? { get set }
     var totalMemoryInBytes: Int64? { get set }
     var availableMemoryInBytes: Int64? { get set }
     var memoryUsageStatus: String? { get set }
     var totalSpaceInBytes: Int64? { get set }
     var availableSpaceInBytes: Int64? { get set }
     var spaceUsageStatus: String? { get set }
     var webLoad: String? { get set }
     var webLoadStatus: String? { get set }
     var databaseServerLoad: String? { get set }
     var databaseServerLoadStatus: String? { get set }
     var csServiceStatus: String? { get set }
     var ipAddress: String? { get set }
     var agentVersion: String? { get set }
     var hostName: String? { get set }
     var lastHeartbeat: Date? { get set }
     var versionStatus: String? { get set }
     var sslCertExpiryDate: Date? { get set }
     var sslCertExpiryRemainingDays: Int32? { get set }
     var psTemplateVersion: String? { get set }
     var agentExpiryDate: Date? { get set }
     var agentVersionDetails: VersionDetailsProtocol? { get set }
}


// 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
// VMwareV2FabricCreationInputProtocol is fabric provider specific settings.
public protocol VMwareV2FabricCreationInputProtocol : FabricSpecificCreationInputProtocol {
     var keyVaultUrl: String? { get set }
     var keyVaultResourceArmId: String? { get set }
}


// 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
// VMwareV2FabricSpecificDetailsProtocol is vMwareV2 fabric Specific Details.
public protocol VMwareV2FabricSpecificDetailsProtocol : FabricSpecificDetailsProtocol {
     var srsServiceEndpoint: String? { get set }
     var rcmServiceEndpoint: String? { get set }
     var keyVaultUrl: String? { get set }
     var keyVaultResourceArmId: String? { get set }
}


// 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
// VMwareVirtualMachineDetailsProtocol is vMware provider specific settings
public protocol VMwareVirtualMachineDetailsProtocol : ConfigurationSettingsProtocol {
     var agentGeneratedId: String? { get set }
     var agentInstalled: String? { get set }
     var osType: String? { get set }
     var agentVersion: String? { get set }
     var ipAddress: String? { get set }
     var poweredOn: String? { get set }
     var vCenterInfrastructureId: String? { get set }
     var discoveryType: String? { get set }
     var diskDetails: [InMageDiskDetailsProtocol?]? { get set }
     var validationErrors: [HealthErrorProtocol?]? { get set }
}


// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
    name: "redis",
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "redis",
            targets: ["redis"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.0.10"),
        .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "3.4.2"),
        .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "3.1.4"),
        .package(url: "git@github.com:alvadb/autorest-clientruntime-for-swift.git", .branch("master"))
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "redis",
            dependencies: ["Alamofire", "RxSwift", "SwiftyJSON", "azureSwiftRuntime"])
    ]
)


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public class DataFactory {
}
public class Commands {
}


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

// FirewallRules is the REST API for Azure Redis Cache Service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct FirewallRules {
    public static func CreateOrUpdate(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String, parameters: RedisFirewallRuleCreateParametersProtocol) -> FirewallRulesCreateOrUpdate {
        return CreateOrUpdateCommand(resourceGroupName: resourceGroupName, cacheName: cacheName, ruleName: ruleName, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Delete(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String) -> FirewallRulesDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, cacheName: cacheName, ruleName: ruleName, subscriptionId: subscriptionId)
    }
    public static func Get(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String) -> FirewallRulesGet {
        return GetCommand(resourceGroupName: resourceGroupName, cacheName: cacheName, ruleName: ruleName, subscriptionId: subscriptionId)
    }
    public static func ListByRedisResource(subscriptionId: String, resourceGroupName: String, cacheName: String) -> FirewallRulesListByRedisResource {
        return ListByRedisResourceCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, cacheName: cacheName)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol FirewallRulesCreateOrUpdate  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var cacheName : String { get set }
    var ruleName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    var parameters :  RedisFirewallRuleCreateParametersProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (RedisFirewallRuleProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.FirewallRules {
// CreateOrUpdate create or update a redis cache firewall rule
    internal class CreateOrUpdateCommand : BaseCommand, FirewallRulesCreateOrUpdate {
        public var resourceGroupName : String
        public var cacheName : String
        public var ruleName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisFirewallRuleCreateParametersProtocol?

        public init(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String, parameters: RedisFirewallRuleCreateParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.cacheName = cacheName
            self.ruleName = ruleName
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisFirewallRuleCreateParametersData)
                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(RedisFirewallRuleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisFirewallRuleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisFirewallRuleData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.FirewallRules {
// Delete deletes a single firewall rule in a specified redis cache.
    internal class DeleteCommand : BaseCommand, FirewallRulesDelete {
        public var resourceGroupName : String
        public var cacheName : String
        public var ruleName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.cacheName = cacheName
            self.ruleName = ruleName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

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


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

extension Commands.FirewallRules {
// Get gets a single firewall rule in a specified redis cache.
    internal class GetCommand : BaseCommand, FirewallRulesGet {
        public var resourceGroupName : String
        public var cacheName : String
        public var ruleName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, cacheName: String, ruleName: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.cacheName = cacheName
            self.ruleName = ruleName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{cacheName}"] = String(describing: self.cacheName)
            self.pathParameters["{ruleName}"] = String(describing: self.ruleName)
            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(RedisFirewallRuleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisFirewallRuleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisFirewallRuleData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.FirewallRules {
// ListByRedisResource gets all firewall rules in the specified redis cache.
    internal class ListByRedisResourceCommand : BaseCommand, FirewallRulesListByRedisResource {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var cacheName : String
        public var apiVersion = "2017-10-01"

        public init(subscriptionId: String, resourceGroupName: String, cacheName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.cacheName = cacheName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{cacheName}"] = String(describing: self.cacheName)
            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(RedisFirewallRuleListResultData?.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 (RedisFirewallRuleListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: RedisFirewallRuleListResultData?, 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.

// LinkedServer is the REST API for Azure Redis Cache Service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct LinkedServer {
    public static func Create(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String, parameters: RedisLinkedServerCreateParametersProtocol) -> LinkedServerCreate {
        return CreateCommand(resourceGroupName: resourceGroupName, name: name, linkedServerName: linkedServerName, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Delete(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String) -> LinkedServerDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, name: name, linkedServerName: linkedServerName, subscriptionId: subscriptionId)
    }
    public static func Get(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String) -> LinkedServerGet {
        return GetCommand(resourceGroupName: resourceGroupName, name: name, linkedServerName: linkedServerName, subscriptionId: subscriptionId)
    }
    public static func List(resourceGroupName: String, name: String, subscriptionId: String) -> LinkedServerList {
        return ListCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol LinkedServerCreate  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var name : String { get set }
    var linkedServerName : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    var parameters :  RedisLinkedServerCreateParametersProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (RedisLinkedServerWithPropertiesProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.LinkedServer {
// Create adds a linked server to the Redis cache (requires Premium SKU). 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, LinkedServerCreate {
        public var resourceGroupName : String
        public var name : String
        public var linkedServerName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisLinkedServerCreateParametersProtocol?

        public init(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String, parameters: RedisLinkedServerCreateParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.linkedServerName = linkedServerName
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisLinkedServerCreateParametersData)
                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(RedisLinkedServerWithPropertiesData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisLinkedServerWithPropertiesProtocol?, Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (result: RedisLinkedServerWithPropertiesData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.LinkedServer {
// Delete deletes the linked server from a redis cache (requires Premium SKU).
    internal class DeleteCommand : BaseCommand, LinkedServerDelete {
        public var resourceGroupName : String
        public var name : String
        public var linkedServerName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.linkedServerName = linkedServerName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

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


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

extension Commands.LinkedServer {
// Get gets the detailed information about a linked server of a redis cache (requires Premium SKU).
    internal class GetCommand : BaseCommand, LinkedServerGet {
        public var resourceGroupName : String
        public var name : String
        public var linkedServerName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, linkedServerName: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.linkedServerName = linkedServerName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            self.pathParameters["{linkedServerName}"] = String(describing: self.linkedServerName)
            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(RedisLinkedServerWithPropertiesData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisLinkedServerWithPropertiesProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisLinkedServerWithPropertiesData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.LinkedServer {
// List gets the list of linked servers associated with this redis cache (requires Premium SKU).
    internal class ListCommand : BaseCommand, LinkedServerList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            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(RedisLinkedServerWithPropertiesListData?.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 (RedisLinkedServerWithPropertiesListProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: RedisLinkedServerWithPropertiesListData?, 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.

// Operations is the REST API for Azure Redis Cache Service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Operations {
    public static func List() -> OperationsList {
        return ListCommand()
    }
}
}


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

extension Commands.Operations {
// List lists all of the available REST API operations of the Microsoft.Cache provider.
    internal class ListCommand : BaseCommand, OperationsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var apiVersion = "2017-10-01"

    public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/providers/Microsoft.Cache/operations"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            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(OperationListResultData?.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 (OperationListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: OperationListResultData?, 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.

// PatchSchedules is the REST API for Azure Redis Cache Service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct PatchSchedules {
    public static func CreateOrUpdate(resourceGroupName: String, name: String, _default: String, subscriptionId: String, parameters: RedisPatchScheduleProtocol) -> PatchSchedulesCreateOrUpdate {
        return CreateOrUpdateCommand(resourceGroupName: resourceGroupName, name: name, _default: _default, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Delete(resourceGroupName: String, name: String, _default: String, subscriptionId: String) -> PatchSchedulesDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, name: name, _default: _default, subscriptionId: subscriptionId)
    }
    public static func Get(resourceGroupName: String, name: String, _default: String, subscriptionId: String) -> PatchSchedulesGet {
        return GetCommand(resourceGroupName: resourceGroupName, name: name, _default: _default, subscriptionId: subscriptionId)
    }
}
}


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

extension Commands.PatchSchedules {
// CreateOrUpdate create or replace the patching schedule for Redis cache (requires Premium SKU).
    internal class CreateOrUpdateCommand : BaseCommand, PatchSchedulesCreateOrUpdate {
        public var resourceGroupName : String
        public var name : String
        public var _default : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisPatchScheduleProtocol?

        public init(resourceGroupName: String, name: String, _default: String, subscriptionId: String, parameters: RedisPatchScheduleProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self._default = _default
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisPatchScheduleData)
                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(RedisPatchScheduleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisPatchScheduleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisPatchScheduleData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.PatchSchedules {
// Delete deletes the patching schedule of a redis cache (requires Premium SKU).
    internal class DeleteCommand : BaseCommand, PatchSchedulesDelete {
        public var resourceGroupName : String
        public var name : String
        public var _default : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, _default: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self._default = _default
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

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


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

extension Commands.PatchSchedules {
// Get gets the patching schedule of a redis cache (requires Premium SKU).
    internal class GetCommand : BaseCommand, PatchSchedulesGet {
        public var resourceGroupName : String
        public var name : String
        public var _default : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, _default: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self._default = _default
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            self.pathParameters["{default}"] = String(describing: self._default)
            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(RedisPatchScheduleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisPatchScheduleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisPatchScheduleData?, 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.

// Redis is the REST API for Azure Redis Cache Service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Redis {
    public static func CheckNameAvailability(subscriptionId: String, parameters: CheckNameAvailabilityParametersProtocol) -> RedisCheckNameAvailability {
        return CheckNameAvailabilityCommand(subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Create(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisCreateParametersProtocol) -> RedisCreate {
        return CreateCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Delete(resourceGroupName: String, name: String, subscriptionId: String) -> RedisDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId)
    }
    public static func ExportData(resourceGroupName: String, name: String, subscriptionId: String, parameters: ExportRDBParametersProtocol) -> RedisExportData {
        return ExportDataCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func ForceReboot(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisRebootParametersProtocol) -> RedisForceReboot {
        return ForceRebootCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Get(resourceGroupName: String, name: String, subscriptionId: String) -> RedisGet {
        return GetCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId)
    }
    public static func ImportData(resourceGroupName: String, name: String, subscriptionId: String, parameters: ImportRDBParametersProtocol) -> RedisImportData {
        return ImportDataCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func List(subscriptionId: String) -> RedisList {
        return ListCommand(subscriptionId: subscriptionId)
    }
    public static func ListByResourceGroup(resourceGroupName: String, subscriptionId: String) -> RedisListByResourceGroup {
        return ListByResourceGroupCommand(resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
    public static func ListKeys(resourceGroupName: String, name: String, subscriptionId: String) -> RedisListKeys {
        return ListKeysCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId)
    }
    public static func ListUpgradeNotifications(resourceGroupName: String, name: String, subscriptionId: String, history: Double) -> RedisListUpgradeNotifications {
        return ListUpgradeNotificationsCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, history: history)
    }
    public static func RegenerateKey(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisRegenerateKeyParametersProtocol) -> RedisRegenerateKey {
        return RegenerateKeyCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Update(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisUpdateParametersProtocol) -> RedisUpdate {
        return UpdateCommand(resourceGroupName: resourceGroupName, name: name, subscriptionId: subscriptionId, parameters: parameters)
    }
}
}


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

extension Commands.Redis {
// CheckNameAvailability checks that the redis cache name is valid and is not already in use.
    internal class CheckNameAvailabilityCommand : BaseCommand, RedisCheckNameAvailability {
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  CheckNameAvailabilityParametersProtocol?

        public init(subscriptionId: String, parameters: CheckNameAvailabilityParametersProtocol) {
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? CheckNameAvailabilityParametersData)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

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


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

extension Commands.Redis {
// Create create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. 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, RedisCreate {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisCreateParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisCreateParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisCreateParametersData)
                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(RedisResourceData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisResourceProtocol?, Error?) -> Void) -> Void {
            client.executeAsyncLRO(command: self) {
                (result: RedisResourceData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// Delete deletes a Redis cache. 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, RedisDelete {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            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 RedisExportData  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var name : String { get set }
    var subscriptionId : String { get set }
    var apiVersion : String { get set }
    var parameters :  ExportRDBParametersProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Redis {
// ExportData export data from the redis cache to blobs in a container. 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 ExportDataCommand : BaseCommand, RedisExportData {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  ExportRDBParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: ExportRDBParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? ExportRDBParametersData)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

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


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

extension Commands.Redis {
// ForceReboot reboot specified Redis node(s). This operation requires write permission to the cache resource. There
// can be potential data loss.
    internal class ForceRebootCommand : BaseCommand, RedisForceReboot {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisRebootParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisRebootParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisRebootParametersData)
                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(RedisForceRebootResponseData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisForceRebootResponseProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisForceRebootResponseData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// Get gets a Redis cache (resource description).
    internal class GetCommand : BaseCommand, RedisGet {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

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

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            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(RedisResourceData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisResourceProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisResourceData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// ImportData import data into Redis cache. 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 ImportDataCommand : BaseCommand, RedisImportData {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  ImportRDBParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: ImportRDBParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? ImportRDBParametersData)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

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


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

extension Commands.Redis {
// List gets all Redis caches in the specified subscription.
    internal class ListCommand : BaseCommand, RedisList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(subscriptionId: String) {
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            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(RedisListResultData?.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 (RedisListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: RedisListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// ListByResourceGroup lists all Redis caches in a resource group.
    internal class ListByResourceGroupCommand : BaseCommand, RedisListByResourceGroup {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

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

        public override func preCall()  {
            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(RedisListResultData?.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 (RedisListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: RedisListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// ListKeys retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
    internal class ListKeysCommand : BaseCommand, RedisListKeys {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"

        public init(resourceGroupName: String, name: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{name}"] = String(describing: self.name)
            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(RedisAccessKeysData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisAccessKeysProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisAccessKeysData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// ListUpgradeNotifications gets any upgrade notifications for a Redis cache.
    internal class ListUpgradeNotificationsCommand : BaseCommand, RedisListUpgradeNotifications {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
        public var history : Double

        public init(resourceGroupName: String, name: String, subscriptionId: String, history: Double) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.history = history
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listUpgradeNotifications"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

        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(NotificationListResponseData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (NotificationListResponseProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: NotificationListResponseData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// RegenerateKey regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
    internal class RegenerateKeyCommand : BaseCommand, RedisRegenerateKey {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisRegenerateKeyParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisRegenerateKeyParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisRegenerateKeyParametersData)
                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(RedisAccessKeysData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisAccessKeysProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisAccessKeysData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Redis {
// Update update an existing Redis cache.
    internal class UpdateCommand : BaseCommand, RedisUpdate {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2017-10-01"
    public var parameters :  RedisUpdateParametersProtocol?

        public init(resourceGroupName: String, name: String, subscriptionId: String, parameters: RedisUpdateParametersProtocol) {
            self.resourceGroupName = resourceGroupName
            self.name = name
            self.subscriptionId = subscriptionId
            self.parameters = parameters
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }
        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(parameters as? RedisUpdateParametersData)
                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(RedisResourceData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (RedisResourceProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: RedisResourceData?, 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 CheckNameAvailabilityParametersData : CheckNameAvailabilityParametersProtocol {
    public var name: String?
    public var type: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createCheckNameAvailabilityParametersProtocol() -> CheckNameAvailabilityParametersProtocol {
    return CheckNameAvailabilityParametersData()
  }
}


// DayOfWeek enumerates the values for day of week.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum DayOfWeekEnum: String, Codable
{
// Everyday specifies the everyday state for day of week.
    case Everyday = "Everyday"
// Friday specifies the friday state for day of week.
    case Friday = "Friday"
// Monday specifies the monday state for day of week.
    case Monday = "Monday"
// Saturday specifies the saturday state for day of week.
    case Saturday = "Saturday"
// Sunday specifies the sunday state for day of week.
    case Sunday = "Sunday"
// Thursday specifies the thursday state for day of week.
    case Thursday = "Thursday"
// Tuesday specifies the tuesday state for day of week.
    case Tuesday = "Tuesday"
// Wednesday specifies the wednesday state for day of week.
    case Wednesday = "Wednesday"
// Weekend specifies the weekend state for day of week.
    case Weekend = "Weekend"
}


// 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 ExportRDBParametersData : ExportRDBParametersProtocol {
    public var format: String?
    public var _prefix: String
    public var container: String

        enum CodingKeys: String, CodingKey {case format = "format"
        case _prefix = "prefix"
        case container = "container"
        }

  public init(_prefix: String, container: String)  {
    self._prefix = _prefix
    self.container = container
  }

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

extension DataFactory {
  public static func createExportRDBParametersProtocol(_prefix: String, container: String) -> ExportRDBParametersProtocol {
    return ExportRDBParametersData(_prefix: _prefix, container: container)
  }
}


// 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 ImportRDBParametersData : ImportRDBParametersProtocol {
    public var format: String?
    public var files: [String]

        enum CodingKeys: String, CodingKey {case format = "format"
        case files = "files"
        }

  public init(files: [String])  {
    self.files = files
  }

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

extension DataFactory {
  public static func createImportRDBParametersProtocol(files: [String]) -> ImportRDBParametersProtocol {
    return ImportRDBParametersData(files: files)
  }
}