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

extension Commands.DataLakeStoreAccounts {
// Add updates the specified Data Lake Analytics account to include the additional Data Lake Store account.
    internal class AddCommand : BaseCommand, DataLakeStoreAccountsAdd {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var dataLakeStoreAccountName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  AddDataLakeStoreParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, dataLakeStoreAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.dataLakeStoreAccountName = dataLakeStoreAccountName
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{dataLakeStoreAccountName}"] = String(describing: self.dataLakeStoreAccountName)
            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? AddDataLakeStoreParametersData?)
                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 DataLakeStoreAccountsDelete  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var dataLakeStoreAccountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.DataLakeStoreAccounts {
// Delete updates the Data Lake Analytics account specified to remove the specified Data Lake Store account.
    internal class DeleteCommand : BaseCommand, DataLakeStoreAccountsDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var dataLakeStoreAccountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, dataLakeStoreAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.dataLakeStoreAccountName = dataLakeStoreAccountName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{dataLakeStoreAccountName}"] = String(describing: self.dataLakeStoreAccountName)
            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 DataLakeStoreAccountsGet  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var dataLakeStoreAccountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DataLakeStoreAccountInformationProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.DataLakeStoreAccounts {
// Get gets the specified Data Lake Store account details in the specified Data Lake Analytics account.
    internal class GetCommand : BaseCommand, DataLakeStoreAccountsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var dataLakeStoreAccountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, dataLakeStoreAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.dataLakeStoreAccountName = dataLakeStoreAccountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts/{dataLakeStoreAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{dataLakeStoreAccountName}"] = String(describing: self.dataLakeStoreAccountName)
            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(DataLakeStoreAccountInformationData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (DataLakeStoreAccountInformationProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: DataLakeStoreAccountInformationData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol DataLakeStoreAccountsListByAccount  {
    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 accountName : String { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var skip : Int32? { get set }
    var select : String? { get set }
    var orderby : String? { get set }
    var count : Bool? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DataLakeStoreAccountInformationListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.DataLakeStoreAccounts {
// ListByAccount gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account.
// The response includes a link to the next page, if any.
    internal class ListByAccountCommand : BaseCommand, DataLakeStoreAccountsListByAccount {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var filter : String?
        public var top : Int32?
        public var skip : Int32?
        public var select : String?
        public var orderby : String?
        public var count : Bool?
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/dataLakeStoreAccounts"
            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["{accountName}"] = String(describing: self.accountName)
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.skip != nil { queryParameters["$skip"] = String(describing: self.skip!) }
            if self.select != nil { queryParameters["$select"] = String(describing: self.select!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            if self.count != nil { queryParameters["$count"] = String(describing: self.count!) }
            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(DataLakeStoreAccountInformationListResultData?.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 (DataLakeStoreAccountInformationListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DataLakeStoreAccountInformationListResultData?, 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.

// FirewallRules is the creates an Azure Data Lake Analytics account management client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct FirewallRules {
    public static func CreateOrUpdate(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String, parameters: CreateOrUpdateFirewallRuleParametersProtocol) -> FirewallRulesCreateOrUpdate {
        return CreateOrUpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, firewallRuleName: firewallRuleName, parameters: parameters)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) -> FirewallRulesDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, firewallRuleName: firewallRuleName)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) -> FirewallRulesGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, firewallRuleName: firewallRuleName)
    }
    public static func ListByAccount(subscriptionId: String, resourceGroupName: String, accountName: String) -> FirewallRulesListByAccount {
        return ListByAccountCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) -> FirewallRulesUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, firewallRuleName: firewallRuleName)
    }
}
}


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

extension Commands.FirewallRules {
// CreateOrUpdate creates or updates the specified firewall rule. During update, the firewall rule with the specified
// name will be replaced with this new firewall rule.
    internal class CreateOrUpdateCommand : BaseCommand, FirewallRulesCreateOrUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var firewallRuleName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  CreateOrUpdateFirewallRuleParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String, parameters: CreateOrUpdateFirewallRuleParametersProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.firewallRuleName = firewallRuleName
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{firewallRuleName}"] = String(describing: self.firewallRuleName)
            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? CreateOrUpdateFirewallRuleParametersData)
                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(FirewallRuleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (FirewallRuleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: FirewallRuleData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.FirewallRules {
// Delete deletes the specified firewall rule from the specified Data Lake Analytics account
    internal class DeleteCommand : BaseCommand, FirewallRulesDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var firewallRuleName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.firewallRuleName = firewallRuleName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{firewallRuleName}"] = String(describing: self.firewallRuleName)
            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 subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var firewallRuleName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (FirewallRuleProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.FirewallRules {
// Get gets the specified Data Lake Analytics firewall rule.
    internal class GetCommand : BaseCommand, FirewallRulesGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var firewallRuleName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.firewallRuleName = firewallRuleName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{firewallRuleName}"] = String(describing: self.firewallRuleName)
            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(FirewallRuleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (FirewallRuleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: FirewallRuleData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol FirewallRulesListByAccount  {
    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 accountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (FirewallRuleListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.FirewallRules {
// ListByAccount lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account.
    internal class ListByAccountCommand : BaseCommand, FirewallRulesListByAccount {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/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["{accountName}"] = String(describing: self.accountName)
            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(FirewallRuleListResultData?.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 (FirewallRuleListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: FirewallRuleListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.FirewallRules {
// Update updates the specified firewall rule.
    internal class UpdateCommand : BaseCommand, FirewallRulesUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var firewallRuleName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  UpdateFirewallRuleParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, firewallRuleName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.firewallRuleName = firewallRuleName
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/firewallRules/{firewallRuleName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{firewallRuleName}"] = String(describing: self.firewallRuleName)
            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? UpdateFirewallRuleParametersData?)
                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(FirewallRuleData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (FirewallRuleProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: FirewallRuleData?, 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.

// Locations is the creates an Azure Data Lake Analytics account management client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Locations {
    public static func GetCapability(subscriptionId: String, location: String) -> LocationsGetCapability {
        return GetCapabilityCommand(subscriptionId: subscriptionId, location: location)
    }
}
}


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

extension Commands.Locations {
// GetCapability gets subscription-level properties and limits for Data Lake Analytics specified by resource location.
    internal class GetCapabilityCommand : BaseCommand, LocationsGetCapability {
        public var subscriptionId : String
        public var location : String
        public var apiVersion = "2016-11-01"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{location}"] = String(describing: self.location)
            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(CapabilityInformationData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (CapabilityInformationProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: CapabilityInformationData?, 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 creates an Azure Data Lake Analytics account management client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Operations {
    public static func List() -> OperationsList {
        return ListCommand()
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol OperationsList  {
    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 Data Lake Analytics REST API operations.
    internal class ListCommand : BaseCommand, OperationsList {
        public var apiVersion = "2016-11-01"

    public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/providers/Microsoft.DataLakeAnalytics/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)
                let result = try decoder.decode(OperationListResultData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (OperationListResultProtocol?, Error?) -> Void) -> Void {
            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.

// StorageAccounts is the creates an Azure Data Lake Analytics account management client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct StorageAccounts {
    public static func Add(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, parameters: AddStorageAccountParametersProtocol) -> StorageAccountsAdd {
        return AddCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName, parameters: parameters)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) -> StorageAccountsDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) -> StorageAccountsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName)
    }
    public static func GetStorageContainer(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, containerName: String) -> StorageAccountsGetStorageContainer {
        return GetStorageContainerCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName, containerName: containerName)
    }
    public static func ListByAccount(subscriptionId: String, resourceGroupName: String, accountName: String) -> StorageAccountsListByAccount {
        return ListByAccountCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName)
    }
    public static func ListSasTokens(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, containerName: String) -> StorageAccountsListSasTokens {
        return ListSasTokensCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName, containerName: containerName)
    }
    public static func ListStorageContainers(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) -> StorageAccountsListStorageContainers {
        return ListStorageContainersCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) -> StorageAccountsUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, accountName: accountName, storageAccountName: storageAccountName)
    }
}
}


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

extension Commands.StorageAccounts {
// Add updates the specified Data Lake Analytics account to add an Azure Storage account.
    internal class AddCommand : BaseCommand, StorageAccountsAdd {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  AddStorageAccountParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, parameters: AddStorageAccountParametersProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            self.parameters = parameters
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            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? AddStorageAccountParametersData)
                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 StorageAccountsDelete  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var storageAccountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.StorageAccounts {
// Delete updates the specified Data Lake Analytics account to remove an Azure Storage account.
    internal class DeleteCommand : BaseCommand, StorageAccountsDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            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 StorageAccountsGet  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var storageAccountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageAccountInformationProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.StorageAccounts {
// Get gets the specified Azure Storage account linked to the given Data Lake Analytics account.
    internal class GetCommand : BaseCommand, StorageAccountsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            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(StorageAccountInformationData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageAccountInformationProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: StorageAccountInformationData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.StorageAccounts {
// GetStorageContainer gets the specified Azure Storage container associated with the given Data Lake Analytics and
// Azure Storage accounts.
    internal class GetStorageContainerCommand : BaseCommand, StorageAccountsGetStorageContainer {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var containerName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, containerName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            self.containerName = containerName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            self.pathParameters["{containerName}"] = String(describing: self.containerName)
            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(StorageContainerData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (StorageContainerProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: StorageContainerData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol StorageAccountsListByAccount  {
    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 accountName : String { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var skip : Int32? { get set }
    var select : String? { get set }
    var orderby : String? { get set }
    var count : Bool? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageAccountInformationListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.StorageAccounts {
// ListByAccount gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics
// account. The response includes a link to the next page, if any.
    internal class ListByAccountCommand : BaseCommand, StorageAccountsListByAccount {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var filter : String?
        public var top : Int32?
        public var skip : Int32?
        public var select : String?
        public var orderby : String?
        public var count : Bool?
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts"
            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["{accountName}"] = String(describing: self.accountName)
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.skip != nil { queryParameters["$skip"] = String(describing: self.skip!) }
            if self.select != nil { queryParameters["$select"] = String(describing: self.select!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            if self.count != nil { queryParameters["$count"] = String(describing: self.count!) }
            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(StorageAccountInformationListResultData?.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 (StorageAccountInformationListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageAccountInformationListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol StorageAccountsListSasTokens  {
    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 accountName : String { get set }
    var storageAccountName : String { get set }
    var containerName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (SasTokenInformationListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.StorageAccounts {
// ListSasTokens gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and
// container combination.
    internal class ListSasTokensCommand : BaseCommand, StorageAccountsListSasTokens {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var containerName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String, containerName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            self.containerName = containerName
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers/{containerName}/listSasTokens"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            self.pathParameters["{containerName}"] = String(describing: self.containerName)
            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(SasTokenInformationListResultData?.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 (SasTokenInformationListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: SasTokenInformationListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol StorageAccountsListStorageContainers  {
    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 accountName : String { get set }
    var storageAccountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (StorageContainerListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.StorageAccounts {
// ListStorageContainers lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics
// and Azure Storage account combination. The response includes a link to the next page of results, if any.
    internal class ListStorageContainersCommand : BaseCommand, StorageAccountsListStorageContainers {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}/containers"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            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(StorageContainerListResultData?.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 (StorageContainerListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: StorageContainerListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.StorageAccounts {
// Update updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key
// and/or suffix.
    internal class UpdateCommand : BaseCommand, StorageAccountsUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var storageAccountName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  UpdateStorageAccountParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, storageAccountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.storageAccountName = storageAccountName
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/storageAccounts/{storageAccountName}"
            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["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{storageAccountName}"] = String(describing: self.storageAccountName)
            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? UpdateStorageAccountParametersData?)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

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


// AADObjectType enumerates the values for aad object type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum AADObjectTypeEnum: String, Codable
{
// Group specifies the group state for aad object type.
    case Group = "Group"
// ServicePrincipal specifies the service principal state for aad object type.
    case ServicePrincipal = "ServicePrincipal"
// User specifies the user state for aad object type.
    case User = "User"
}


// 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 AddDataLakeStoreParametersData : AddDataLakeStoreParametersProtocol {
    public var properties: AddDataLakeStorePropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createAddDataLakeStoreParametersProtocol() -> AddDataLakeStoreParametersProtocol {
    return AddDataLakeStoreParametersData()
  }
}


// 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 AddDataLakeStorePropertiesData : AddDataLakeStorePropertiesProtocol {
    public var suffix: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createAddDataLakeStorePropertiesProtocol() -> AddDataLakeStorePropertiesProtocol {
    return AddDataLakeStorePropertiesData()
  }
}


// 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 AddDataLakeStoreWithAccountParametersData : AddDataLakeStoreWithAccountParametersProtocol {
    public var name: String
    public var properties: AddDataLakeStorePropertiesProtocol?

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

  public init(name: String)  {
    self.name = name
  }

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

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

extension DataFactory {
  public static func createAddDataLakeStoreWithAccountParametersProtocol(name: String) -> AddDataLakeStoreWithAccountParametersProtocol {
    return AddDataLakeStoreWithAccountParametersData(name: name)
  }
}


// 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 AddStorageAccountParametersData : AddStorageAccountParametersProtocol {
    public var properties: AddStorageAccountPropertiesProtocol

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

  public init(properties: AddStorageAccountPropertiesProtocol)  {
    self.properties = properties
  }

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

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.properties as! AddStorageAccountPropertiesData, forKey: .properties)
  }
}

extension DataFactory {
  public static func createAddStorageAccountParametersProtocol(properties: AddStorageAccountPropertiesProtocol) -> AddStorageAccountParametersProtocol {
    return AddStorageAccountParametersData(properties: properties)
  }
}


// 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 AddStorageAccountPropertiesData : AddStorageAccountPropertiesProtocol {
    public var accessKey: String
    public var suffix: String?

        enum CodingKeys: String, CodingKey {case accessKey = "accessKey"
        case suffix = "suffix"
        }

  public init(accessKey: String)  {
    self.accessKey = accessKey
  }

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

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

extension DataFactory {
  public static func createAddStorageAccountPropertiesProtocol(accessKey: String) -> AddStorageAccountPropertiesProtocol {
    return AddStorageAccountPropertiesData(accessKey: accessKey)
  }
}


// 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 AddStorageAccountWithAccountParametersData : AddStorageAccountWithAccountParametersProtocol {
    public var name: String
    public var properties: AddStorageAccountPropertiesProtocol

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

  public init(name: String, properties: AddStorageAccountPropertiesProtocol)  {
    self.name = name
    self.properties = properties
  }

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

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

extension DataFactory {
  public static func createAddStorageAccountWithAccountParametersProtocol(name: String, properties: AddStorageAccountPropertiesProtocol) -> AddStorageAccountWithAccountParametersProtocol {
    return AddStorageAccountWithAccountParametersData(name: name, properties: properties)
  }
}


// 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 CapabilityInformationData : CapabilityInformationProtocol {
    public var subscriptionId: String?
    public var state: SubscriptionStateEnum?
    public var maxAccountCount: Int32?
    public var accountCount: Int32?
    public var migrationState: Bool?

        enum CodingKeys: String, CodingKey {case subscriptionId = "subscriptionId"
        case state = "state"
        case maxAccountCount = "maxAccountCount"
        case accountCount = "accountCount"
        case migrationState = "migrationState"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createCapabilityInformationProtocol() -> CapabilityInformationProtocol {
    return CapabilityInformationData()
  }
}


// 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(name: String, type: String)  {
    self.name = name
    self.type = type
  }

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

extension DataFactory {
  public static func createCheckNameAvailabilityParametersProtocol(name: String, type: String) -> CheckNameAvailabilityParametersProtocol {
    return CheckNameAvailabilityParametersData(name: name, type: type)
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createComputePolicyProtocol() -> ComputePolicyProtocol {
    return ComputePolicyData()
  }
}


// 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 ComputePolicyListResultData : ComputePolicyListResultProtocol {
    public var value: [ComputePolicyProtocol?]?
    public var _nextLink: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createComputePolicyListResultProtocol() -> ComputePolicyListResultProtocol {
    return ComputePolicyListResultData()
  }
}


// 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 ComputePolicyPropertiesData : ComputePolicyPropertiesProtocol {
    public var objectId: String?
    public var objectType: AADObjectTypeEnum?
    public var maxDegreeOfParallelismPerJob: Int32?
    public var minPriorityPerJob: Int32?

        enum CodingKeys: String, CodingKey {case objectId = "objectId"
        case objectType = "objectType"
        case maxDegreeOfParallelismPerJob = "maxDegreeOfParallelismPerJob"
        case minPriorityPerJob = "minPriorityPerJob"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createComputePolicyPropertiesProtocol() -> ComputePolicyPropertiesProtocol {
    return ComputePolicyPropertiesData()
  }
}


// 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 CreateComputePolicyWithAccountParametersData : CreateComputePolicyWithAccountParametersProtocol {
    public var name: String
    public var properties: CreateOrUpdateComputePolicyPropertiesProtocol

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

  public init(name: String, properties: CreateOrUpdateComputePolicyPropertiesProtocol)  {
    self.name = name
    self.properties = properties
  }

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

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

extension DataFactory {
  public static func createCreateComputePolicyWithAccountParametersProtocol(name: String, properties: CreateOrUpdateComputePolicyPropertiesProtocol) -> CreateComputePolicyWithAccountParametersProtocol {
    return CreateComputePolicyWithAccountParametersData(name: name, properties: properties)
  }
}


// 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 CreateDataLakeAnalyticsAccountParametersData : CreateDataLakeAnalyticsAccountParametersProtocol {
    public var location: String
    public var tags: [String:String]?
    public var properties: CreateDataLakeAnalyticsAccountPropertiesProtocol

        enum CodingKeys: String, CodingKey {case location = "location"
        case tags = "tags"
        case properties = "properties"
        }

  public init(location: String, properties: CreateDataLakeAnalyticsAccountPropertiesProtocol)  {
    self.location = location
    self.properties = properties
  }

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

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

extension DataFactory {
  public static func createCreateDataLakeAnalyticsAccountParametersProtocol(location: String, properties: CreateDataLakeAnalyticsAccountPropertiesProtocol) -> CreateDataLakeAnalyticsAccountParametersProtocol {
    return CreateDataLakeAnalyticsAccountParametersData(location: location, properties: properties)
  }
}


// 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 CreateDataLakeAnalyticsAccountPropertiesData : CreateDataLakeAnalyticsAccountPropertiesProtocol {
    public var defaultDataLakeStoreAccount: String
    public var dataLakeStoreAccounts: [AddDataLakeStoreWithAccountParametersProtocol]
    public var storageAccounts: [AddStorageAccountWithAccountParametersProtocol?]?
    public var computePolicies: [CreateComputePolicyWithAccountParametersProtocol?]?
    public var firewallRules: [CreateFirewallRuleWithAccountParametersProtocol?]?
    public var firewallState: FirewallStateEnum?
    public var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum?
    public var newTier: TierTypeEnum?
    public var maxJobCount: Int32?
    public var maxDegreeOfParallelism: Int32?
    public var maxDegreeOfParallelismPerJob: Int32?
    public var minPriorityPerJob: Int32?
    public var queryStoreRetention: Int32?

        enum CodingKeys: String, CodingKey {case defaultDataLakeStoreAccount = "defaultDataLakeStoreAccount"
        case dataLakeStoreAccounts = "dataLakeStoreAccounts"
        case storageAccounts = "storageAccounts"
        case computePolicies = "computePolicies"
        case firewallRules = "firewallRules"
        case firewallState = "firewallState"
        case firewallAllowAzureIps = "firewallAllowAzureIps"
        case newTier = "newTier"
        case maxJobCount = "maxJobCount"
        case maxDegreeOfParallelism = "maxDegreeOfParallelism"
        case maxDegreeOfParallelismPerJob = "maxDegreeOfParallelismPerJob"
        case minPriorityPerJob = "minPriorityPerJob"
        case queryStoreRetention = "queryStoreRetention"
        }

  public init(defaultDataLakeStoreAccount: String, dataLakeStoreAccounts: [AddDataLakeStoreWithAccountParametersProtocol])  {
    self.defaultDataLakeStoreAccount = defaultDataLakeStoreAccount
    self.dataLakeStoreAccounts = dataLakeStoreAccounts
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.defaultDataLakeStoreAccount = try container.decode(String.self, forKey: .defaultDataLakeStoreAccount)
    self.dataLakeStoreAccounts = try container.decode([AddDataLakeStoreWithAccountParametersData].self, forKey: .dataLakeStoreAccounts)
    if container.contains(.storageAccounts) {
        self.storageAccounts = try container.decode([AddStorageAccountWithAccountParametersData?]?.self, forKey: .storageAccounts)
    }
    if container.contains(.computePolicies) {
        self.computePolicies = try container.decode([CreateComputePolicyWithAccountParametersData?]?.self, forKey: .computePolicies)
    }
    if container.contains(.firewallRules) {
        self.firewallRules = try container.decode([CreateFirewallRuleWithAccountParametersData?]?.self, forKey: .firewallRules)
    }
    if container.contains(.firewallState) {
        self.firewallState = try container.decode(FirewallStateEnum?.self, forKey: .firewallState)
    }
    if container.contains(.firewallAllowAzureIps) {
        self.firewallAllowAzureIps = try container.decode(FirewallAllowAzureIpsStateEnum?.self, forKey: .firewallAllowAzureIps)
    }
    if container.contains(.newTier) {
        self.newTier = try container.decode(TierTypeEnum?.self, forKey: .newTier)
    }
    if container.contains(.maxJobCount) {
        self.maxJobCount = try container.decode(Int32?.self, forKey: .maxJobCount)
    }
    if container.contains(.maxDegreeOfParallelism) {
        self.maxDegreeOfParallelism = try container.decode(Int32?.self, forKey: .maxDegreeOfParallelism)
    }
    if container.contains(.maxDegreeOfParallelismPerJob) {
        self.maxDegreeOfParallelismPerJob = try container.decode(Int32?.self, forKey: .maxDegreeOfParallelismPerJob)
    }
    if container.contains(.minPriorityPerJob) {
        self.minPriorityPerJob = try container.decode(Int32?.self, forKey: .minPriorityPerJob)
    }
    if container.contains(.queryStoreRetention) {
        self.queryStoreRetention = try container.decode(Int32?.self, forKey: .queryStoreRetention)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.defaultDataLakeStoreAccount, forKey: .defaultDataLakeStoreAccount)
    try container.encode(self.dataLakeStoreAccounts as! [AddDataLakeStoreWithAccountParametersData], forKey: .dataLakeStoreAccounts)
    if self.storageAccounts != nil {try container.encode(self.storageAccounts as! [AddStorageAccountWithAccountParametersData?]?, forKey: .storageAccounts)}
    if self.computePolicies != nil {try container.encode(self.computePolicies as! [CreateComputePolicyWithAccountParametersData?]?, forKey: .computePolicies)}
    if self.firewallRules != nil {try container.encode(self.firewallRules as! [CreateFirewallRuleWithAccountParametersData?]?, forKey: .firewallRules)}
    if self.firewallState != nil {try container.encode(self.firewallState, forKey: .firewallState)}
    if self.firewallAllowAzureIps != nil {try container.encode(self.firewallAllowAzureIps, forKey: .firewallAllowAzureIps)}
    if self.newTier != nil {try container.encode(self.newTier, forKey: .newTier)}
    if self.maxJobCount != nil {try container.encode(self.maxJobCount, forKey: .maxJobCount)}
    if self.maxDegreeOfParallelism != nil {try container.encode(self.maxDegreeOfParallelism, forKey: .maxDegreeOfParallelism)}
    if self.maxDegreeOfParallelismPerJob != nil {try container.encode(self.maxDegreeOfParallelismPerJob, forKey: .maxDegreeOfParallelismPerJob)}
    if self.minPriorityPerJob != nil {try container.encode(self.minPriorityPerJob, forKey: .minPriorityPerJob)}
    if self.queryStoreRetention != nil {try container.encode(self.queryStoreRetention, forKey: .queryStoreRetention)}
  }
}

extension DataFactory {
  public static func createCreateDataLakeAnalyticsAccountPropertiesProtocol(defaultDataLakeStoreAccount: String, dataLakeStoreAccounts: [AddDataLakeStoreWithAccountParametersProtocol]) -> CreateDataLakeAnalyticsAccountPropertiesProtocol {
    return CreateDataLakeAnalyticsAccountPropertiesData(defaultDataLakeStoreAccount: defaultDataLakeStoreAccount, dataLakeStoreAccounts: dataLakeStoreAccounts)
  }
}