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

extension Commands.Certificates {
// List get all certificates for a subscription.
    internal class ListCommand : BaseCommand, CertificatesList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(CertificateCollectionData?.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 (CertificateCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: CertificateCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Certificates {
// ListByResourceGroup get all certificates in a resource group.
    internal class ListByResourceGroupCommand : BaseCommand, CertificatesListByResourceGroup {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(CertificateCollectionData?.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 (CertificateCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: CertificateCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Certificates {
// Update create or update a certificate.
    internal class UpdateCommand : BaseCommand, CertificatesUpdate {
        public var resourceGroupName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"
    public var certificateEnvelope :  CertificatePatchResourceProtocol?

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

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

        }
        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(certificateEnvelope as? CertificatePatchResourceData)
                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(CertificateData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (CertificateProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: CertificateData?, 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.
public class DataFactory {
}
public class Commands {
}


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

// DeletedWebApps is the webSite Management Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct DeletedWebApps {
    public static func List(subscriptionId: String) -> DeletedWebAppsList {
        return ListCommand(subscriptionId: subscriptionId)
    }
}
}


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

extension Commands.DeletedWebApps {
// List get all deleted apps for a subscription.
    internal class ListCommand : BaseCommand, DeletedWebAppsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DeletedWebAppCollectionData?.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 (DeletedWebAppCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DeletedWebAppCollectionData?, 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.

// Diagnostics is the webSite Management Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Diagnostics {
    public static func ExecuteSiteAnalysis(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, subscriptionId: String) -> DiagnosticsExecuteSiteAnalysis {
        return ExecuteSiteAnalysisCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, analysisName: analysisName, subscriptionId: subscriptionId)
    }
    public static func ExecuteSiteAnalysisSlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, slot: String, subscriptionId: String) -> DiagnosticsExecuteSiteAnalysisSlot {
        return ExecuteSiteAnalysisSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, analysisName: analysisName, slot: slot, subscriptionId: subscriptionId)
    }
    public static func ExecuteSiteDetector(resourceGroupName: String, siteName: String, detectorName: String, diagnosticCategory: String, subscriptionId: String) -> DiagnosticsExecuteSiteDetector {
        return ExecuteSiteDetectorCommand(resourceGroupName: resourceGroupName, siteName: siteName, detectorName: detectorName, diagnosticCategory: diagnosticCategory, subscriptionId: subscriptionId)
    }
    public static func ExecuteSiteDetectorSlot(resourceGroupName: String, siteName: String, detectorName: String, diagnosticCategory: String, slot: String, subscriptionId: String) -> DiagnosticsExecuteSiteDetectorSlot {
        return ExecuteSiteDetectorSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, detectorName: detectorName, diagnosticCategory: diagnosticCategory, slot: slot, subscriptionId: subscriptionId)
    }
    public static func GetSiteAnalysis(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, subscriptionId: String) -> DiagnosticsGetSiteAnalysis {
        return GetSiteAnalysisCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, analysisName: analysisName, subscriptionId: subscriptionId)
    }
    public static func GetSiteAnalysisSlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, slot: String, subscriptionId: String) -> DiagnosticsGetSiteAnalysisSlot {
        return GetSiteAnalysisSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, analysisName: analysisName, slot: slot, subscriptionId: subscriptionId)
    }
    public static func GetSiteDetector(resourceGroupName: String, siteName: String, diagnosticCategory: String, detectorName: String, subscriptionId: String) -> DiagnosticsGetSiteDetector {
        return GetSiteDetectorCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, detectorName: detectorName, subscriptionId: subscriptionId)
    }
    public static func GetSiteDetectorSlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, detectorName: String, slot: String, subscriptionId: String) -> DiagnosticsGetSiteDetectorSlot {
        return GetSiteDetectorSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, detectorName: detectorName, slot: slot, subscriptionId: subscriptionId)
    }
    public static func GetSiteDiagnosticCategory(resourceGroupName: String, siteName: String, diagnosticCategory: String, subscriptionId: String) -> DiagnosticsGetSiteDiagnosticCategory {
        return GetSiteDiagnosticCategoryCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, subscriptionId: subscriptionId)
    }
    public static func GetSiteDiagnosticCategorySlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, slot: String, subscriptionId: String) -> DiagnosticsGetSiteDiagnosticCategorySlot {
        return GetSiteDiagnosticCategorySlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, slot: slot, subscriptionId: subscriptionId)
    }
    public static func ListSiteAnalyses(resourceGroupName: String, siteName: String, diagnosticCategory: String, subscriptionId: String) -> DiagnosticsListSiteAnalyses {
        return ListSiteAnalysesCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, subscriptionId: subscriptionId)
    }
    public static func ListSiteAnalysesSlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, slot: String, subscriptionId: String) -> DiagnosticsListSiteAnalysesSlot {
        return ListSiteAnalysesSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, slot: slot, subscriptionId: subscriptionId)
    }
    public static func ListSiteDetectors(resourceGroupName: String, siteName: String, diagnosticCategory: String, subscriptionId: String) -> DiagnosticsListSiteDetectors {
        return ListSiteDetectorsCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, subscriptionId: subscriptionId)
    }
    public static func ListSiteDetectorsSlot(resourceGroupName: String, siteName: String, diagnosticCategory: String, slot: String, subscriptionId: String) -> DiagnosticsListSiteDetectorsSlot {
        return ListSiteDetectorsSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, diagnosticCategory: diagnosticCategory, slot: slot, subscriptionId: subscriptionId)
    }
    public static func ListSiteDiagnosticCategories(resourceGroupName: String, siteName: String, subscriptionId: String) -> DiagnosticsListSiteDiagnosticCategories {
        return ListSiteDiagnosticCategoriesCommand(resourceGroupName: resourceGroupName, siteName: siteName, subscriptionId: subscriptionId)
    }
    public static func ListSiteDiagnosticCategoriesSlot(resourceGroupName: String, siteName: String, slot: String, subscriptionId: String) -> DiagnosticsListSiteDiagnosticCategoriesSlot {
        return ListSiteDiagnosticCategoriesSlotCommand(resourceGroupName: resourceGroupName, siteName: siteName, slot: slot, subscriptionId: subscriptionId)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol DiagnosticsExecuteSiteAnalysis  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var siteName : String { get set }
    var diagnosticCategory : String { get set }
    var analysisName : String { get set }
    var subscriptionId : String { get set }
    var startTime : Date? { get set }
    var endTime : Date? { get set }
    var timeGrain : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DiagnosticAnalysisProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Diagnostics {
// ExecuteSiteAnalysis execute Analysis
    internal class ExecuteSiteAnalysisCommand : BaseCommand, DiagnosticsExecuteSiteAnalysis {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var analysisName : String
        public var subscriptionId : String
        public var startTime : Date?
        public var endTime : Date?
        public var timeGrain : String?
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.analysisName = analysisName
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{siteName}"] = String(describing: self.siteName)
            self.pathParameters["{diagnosticCategory}"] = String(describing: self.diagnosticCategory)
            self.pathParameters["{analysisName}"] = String(describing: self.analysisName)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            if self.startTime != nil { queryParameters["startTime"] = String(describing: self.startTime!) }
            if self.endTime != nil { queryParameters["endTime"] = String(describing: self.endTime!) }
            if self.timeGrain != nil { queryParameters["timeGrain"] = String(describing: self.timeGrain!) }
            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(DiagnosticAnalysisData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (DiagnosticAnalysisProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: DiagnosticAnalysisData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol DiagnosticsExecuteSiteAnalysisSlot  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var siteName : String { get set }
    var diagnosticCategory : String { get set }
    var analysisName : String { get set }
    var slot : String { get set }
    var subscriptionId : String { get set }
    var startTime : Date? { get set }
    var endTime : Date? { get set }
    var timeGrain : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DiagnosticAnalysisProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Diagnostics {
// ExecuteSiteAnalysisSlot execute Analysis
    internal class ExecuteSiteAnalysisSlotCommand : BaseCommand, DiagnosticsExecuteSiteAnalysisSlot {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var analysisName : String
        public var slot : String
        public var subscriptionId : String
        public var startTime : Date?
        public var endTime : Date?
        public var timeGrain : String?
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.analysisName = analysisName
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{siteName}"] = String(describing: self.siteName)
            self.pathParameters["{diagnosticCategory}"] = String(describing: self.diagnosticCategory)
            self.pathParameters["{analysisName}"] = String(describing: self.analysisName)
            self.pathParameters["{slot}"] = String(describing: self.slot)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            if self.startTime != nil { queryParameters["startTime"] = String(describing: self.startTime!) }
            if self.endTime != nil { queryParameters["endTime"] = String(describing: self.endTime!) }
            if self.timeGrain != nil { queryParameters["timeGrain"] = String(describing: self.timeGrain!) }
            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(DiagnosticAnalysisData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (DiagnosticAnalysisProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: DiagnosticAnalysisData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol DiagnosticsExecuteSiteDetector  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var siteName : String { get set }
    var detectorName : String { get set }
    var diagnosticCategory : String { get set }
    var subscriptionId : String { get set }
    var startTime : Date? { get set }
    var endTime : Date? { get set }
    var timeGrain : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DiagnosticDetectorResponseProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Diagnostics {
// ExecuteSiteDetector execute Detector
    internal class ExecuteSiteDetectorCommand : BaseCommand, DiagnosticsExecuteSiteDetector {
        public var resourceGroupName : String
        public var siteName : String
        public var detectorName : String
        public var diagnosticCategory : String
        public var subscriptionId : String
        public var startTime : Date?
        public var endTime : Date?
        public var timeGrain : String?
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, detectorName: String, diagnosticCategory: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.detectorName = detectorName
            self.diagnosticCategory = diagnosticCategory
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{siteName}"] = String(describing: self.siteName)
            self.pathParameters["{detectorName}"] = String(describing: self.detectorName)
            self.pathParameters["{diagnosticCategory}"] = String(describing: self.diagnosticCategory)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            if self.startTime != nil { queryParameters["startTime"] = String(describing: self.startTime!) }
            if self.endTime != nil { queryParameters["endTime"] = String(describing: self.endTime!) }
            if self.timeGrain != nil { queryParameters["timeGrain"] = String(describing: self.timeGrain!) }
            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(DiagnosticDetectorResponseData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (DiagnosticDetectorResponseProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorResponseData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol DiagnosticsExecuteSiteDetectorSlot  {
    var headerParameters: [String: String] { get set }
    var resourceGroupName : String { get set }
    var siteName : String { get set }
    var detectorName : String { get set }
    var diagnosticCategory : String { get set }
    var slot : String { get set }
    var subscriptionId : String { get set }
    var startTime : Date? { get set }
    var endTime : Date? { get set }
    var timeGrain : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (DiagnosticDetectorResponseProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Diagnostics {
// ExecuteSiteDetectorSlot execute Detector
    internal class ExecuteSiteDetectorSlotCommand : BaseCommand, DiagnosticsExecuteSiteDetectorSlot {
        public var resourceGroupName : String
        public var siteName : String
        public var detectorName : String
        public var diagnosticCategory : String
        public var slot : String
        public var subscriptionId : String
        public var startTime : Date?
        public var endTime : Date?
        public var timeGrain : String?
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, detectorName: String, diagnosticCategory: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.detectorName = detectorName
            self.diagnosticCategory = diagnosticCategory
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{siteName}"] = String(describing: self.siteName)
            self.pathParameters["{detectorName}"] = String(describing: self.detectorName)
            self.pathParameters["{diagnosticCategory}"] = String(describing: self.diagnosticCategory)
            self.pathParameters["{slot}"] = String(describing: self.slot)
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            if self.startTime != nil { queryParameters["startTime"] = String(describing: self.startTime!) }
            if self.endTime != nil { queryParameters["endTime"] = String(describing: self.endTime!) }
            if self.timeGrain != nil { queryParameters["timeGrain"] = String(describing: self.timeGrain!) }
            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(DiagnosticDetectorResponseData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (DiagnosticDetectorResponseProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorResponseData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// GetSiteAnalysis get Site Analysis
    internal class GetSiteAnalysisCommand : BaseCommand, DiagnosticsGetSiteAnalysis {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var analysisName : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

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


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

extension Commands.Diagnostics {
// GetSiteAnalysisSlot get Site Analysis
    internal class GetSiteAnalysisSlotCommand : BaseCommand, DiagnosticsGetSiteAnalysisSlot {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var analysisName : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, analysisName: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.analysisName = analysisName
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

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


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

extension Commands.Diagnostics {
// GetSiteDetector get Detector
    internal class GetSiteDetectorCommand : BaseCommand, DiagnosticsGetSiteDetector {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var detectorName : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticDetectorCollectionData?.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 (DiagnosticDetectorCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// GetSiteDetectorSlot get Detector
    internal class GetSiteDetectorSlotCommand : BaseCommand, DiagnosticsGetSiteDetectorSlot {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var detectorName : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, detectorName: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.detectorName = detectorName
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticDetectorCollectionData?.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 (DiagnosticDetectorCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// GetSiteDiagnosticCategory get Diagnostics Category
    internal class GetSiteDiagnosticCategoryCommand : BaseCommand, DiagnosticsGetSiteDiagnosticCategory {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

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


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

extension Commands.Diagnostics {
// GetSiteDiagnosticCategorySlot get Diagnostics Category
    internal class GetSiteDiagnosticCategorySlotCommand : BaseCommand, DiagnosticsGetSiteDiagnosticCategorySlot {
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

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


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

extension Commands.Diagnostics {
// ListSiteAnalyses get Site Analyses
    internal class ListSiteAnalysesCommand : BaseCommand, DiagnosticsListSiteAnalyses {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticAnalysisCollectionData?.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 (DiagnosticAnalysisCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticAnalysisCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// ListSiteAnalysesSlot get Site Analyses
    internal class ListSiteAnalysesSlotCommand : BaseCommand, DiagnosticsListSiteAnalysesSlot {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticAnalysisCollectionData?.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 (DiagnosticAnalysisCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticAnalysisCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// ListSiteDetectors get Detectors
    internal class ListSiteDetectorsCommand : BaseCommand, DiagnosticsListSiteDetectors {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticDetectorCollectionData?.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 (DiagnosticDetectorCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// ListSiteDetectorsSlot get Detectors
    internal class ListSiteDetectorsSlotCommand : BaseCommand, DiagnosticsListSiteDetectorsSlot {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var diagnosticCategory : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

        public init(resourceGroupName: String, siteName: String, diagnosticCategory: String, slot: String, subscriptionId: String) {
            self.resourceGroupName = resourceGroupName
            self.siteName = siteName
            self.diagnosticCategory = diagnosticCategory
            self.slot = slot
            self.subscriptionId = subscriptionId
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticDetectorCollectionData?.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 (DiagnosticDetectorCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticDetectorCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// ListSiteDiagnosticCategories get Diagnostics Categories
    internal class ListSiteDiagnosticCategoriesCommand : BaseCommand, DiagnosticsListSiteDiagnosticCategories {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticCategoryCollectionData?.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 (DiagnosticCategoryCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticCategoryCollectionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Diagnostics {
// ListSiteDiagnosticCategoriesSlot get Diagnostics Categories
    internal class ListSiteDiagnosticCategoriesSlotCommand : BaseCommand, DiagnosticsListSiteDiagnosticCategoriesSlot {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var resourceGroupName : String
        public var siteName : String
        public var slot : String
        public var subscriptionId : String
        public var apiVersion = "2016-03-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(DiagnosticCategoryCollectionData?.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 (DiagnosticCategoryCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: DiagnosticCategoryCollectionData?, 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.

// DomainRegistrationProvider is the webSite Management Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct DomainRegistrationProvider {
    public static func ListOperations() -> DomainRegistrationProviderListOperations {
        return ListOperationsCommand()
    }
}
}


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

extension Commands.DomainRegistrationProvider {
// ListOperations implements Csm operations Api to exposes the list of available Csm Apis under the resource provider
    internal class ListOperationsCommand : BaseCommand, DomainRegistrationProviderListOperations {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var apiVersion = "2015-04-01"

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

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

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(CsmOperationCollectionData?.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 (CsmOperationCollectionProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: CsmOperationCollectionData?, 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.

// Domains is the webSite Management Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Domains {
    public static func CheckAvailability(subscriptionId: String, identifier: NameIdentifierProtocol) -> DomainsCheckAvailability {
        return CheckAvailabilityCommand(subscriptionId: subscriptionId, identifier: identifier)
    }
    public static func CreateOrUpdate(resourceGroupName: String, domainName: String, subscriptionId: String, domain: DomainProtocol) -> DomainsCreateOrUpdate {
        return CreateOrUpdateCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId, domain: domain)
    }
    public static func CreateOrUpdateOwnershipIdentifier(resourceGroupName: String, domainName: String, name: String, subscriptionId: String, domainOwnershipIdentifier: DomainOwnershipIdentifierProtocol) -> DomainsCreateOrUpdateOwnershipIdentifier {
        return CreateOrUpdateOwnershipIdentifierCommand(resourceGroupName: resourceGroupName, domainName: domainName, name: name, subscriptionId: subscriptionId, domainOwnershipIdentifier: domainOwnershipIdentifier)
    }
    public static func Delete(resourceGroupName: String, domainName: String, subscriptionId: String) -> DomainsDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId)
    }
    public static func DeleteOwnershipIdentifier(resourceGroupName: String, domainName: String, name: String, subscriptionId: String) -> DomainsDeleteOwnershipIdentifier {
        return DeleteOwnershipIdentifierCommand(resourceGroupName: resourceGroupName, domainName: domainName, name: name, subscriptionId: subscriptionId)
    }
    public static func Get(resourceGroupName: String, domainName: String, subscriptionId: String) -> DomainsGet {
        return GetCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId)
    }
    public static func GetControlCenterSsoRequest(subscriptionId: String) -> DomainsGetControlCenterSsoRequest {
        return GetControlCenterSsoRequestCommand(subscriptionId: subscriptionId)
    }
    public static func GetOwnershipIdentifier(resourceGroupName: String, domainName: String, name: String, subscriptionId: String) -> DomainsGetOwnershipIdentifier {
        return GetOwnershipIdentifierCommand(resourceGroupName: resourceGroupName, domainName: domainName, name: name, subscriptionId: subscriptionId)
    }
    public static func List(subscriptionId: String) -> DomainsList {
        return ListCommand(subscriptionId: subscriptionId)
    }
    public static func ListByResourceGroup(resourceGroupName: String, subscriptionId: String) -> DomainsListByResourceGroup {
        return ListByResourceGroupCommand(resourceGroupName: resourceGroupName, subscriptionId: subscriptionId)
    }
    public static func ListOwnershipIdentifiers(resourceGroupName: String, domainName: String, subscriptionId: String) -> DomainsListOwnershipIdentifiers {
        return ListOwnershipIdentifiersCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId)
    }
    public static func ListRecommendations(subscriptionId: String, parameters: DomainRecommendationSearchParametersProtocol) -> DomainsListRecommendations {
        return ListRecommendationsCommand(subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Renew(resourceGroupName: String, domainName: String, subscriptionId: String) -> DomainsRenew {
        return RenewCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId)
    }
    public static func Update(resourceGroupName: String, domainName: String, subscriptionId: String, domain: DomainPatchResourceProtocol) -> DomainsUpdate {
        return UpdateCommand(resourceGroupName: resourceGroupName, domainName: domainName, subscriptionId: subscriptionId, domain: domain)
    }
    public static func UpdateOwnershipIdentifier(resourceGroupName: String, domainName: String, name: String, subscriptionId: String, domainOwnershipIdentifier: DomainOwnershipIdentifierProtocol) -> DomainsUpdateOwnershipIdentifier {
        return UpdateOwnershipIdentifierCommand(resourceGroupName: resourceGroupName, domainName: domainName, name: name, subscriptionId: subscriptionId, domainOwnershipIdentifier: domainOwnershipIdentifier)
    }
}
}


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

extension Commands.Domains {
// CheckAvailability check if a domain is available for registration.
    internal class CheckAvailabilityCommand : BaseCommand, DomainsCheckAvailability {
        public var subscriptionId : String
        public var apiVersion = "2015-04-01"
    public var identifier :  NameIdentifierProtocol?

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

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

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


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

extension Commands.Domains {
// CreateOrUpdate creates or updates a domain. This method may poll for completion. Polling can be canceled by passing
// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
    internal class CreateOrUpdateCommand : BaseCommand, DomainsCreateOrUpdate {
        public var resourceGroupName : String
        public var domainName : String
        public var subscriptionId : String
        public var apiVersion = "2015-04-01"
    public var domain :  DomainProtocol?

        public init(resourceGroupName: String, domainName: String, subscriptionId: String, domain: DomainProtocol) {
            self.resourceGroupName = resourceGroupName
            self.domainName = domainName
            self.subscriptionId = subscriptionId
            self.domain = domain
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.Domains {
// CreateOrUpdateOwnershipIdentifier creates an ownership identifier for a domain or updates identifier details for an
// existing identifer
    internal class CreateOrUpdateOwnershipIdentifierCommand : BaseCommand, DomainsCreateOrUpdateOwnershipIdentifier {
        public var resourceGroupName : String
        public var domainName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2015-04-01"
    public var domainOwnershipIdentifier :  DomainOwnershipIdentifierProtocol?

        public init(resourceGroupName: String, domainName: String, name: String, subscriptionId: String, domainOwnershipIdentifier: DomainOwnershipIdentifierProtocol) {
            self.resourceGroupName = resourceGroupName
            self.domainName = domainName
            self.name = name
            self.subscriptionId = subscriptionId
            self.domainOwnershipIdentifier = domainOwnershipIdentifier
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.Domains {
// Delete delete a domain.
    internal class DeleteCommand : BaseCommand, DomainsDelete {
        public var resourceGroupName : String
        public var domainName : String
        public var subscriptionId : String
        public var forceHardDeleteDomain : Bool?
        public var apiVersion = "2015-04-01"

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

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

extension Commands.Domains {
// DeleteOwnershipIdentifier delete ownership identifier for domain
    internal class DeleteOwnershipIdentifierCommand : BaseCommand, DomainsDeleteOwnershipIdentifier {
        public var resourceGroupName : String
        public var domainName : String
        public var name : String
        public var subscriptionId : String
        public var apiVersion = "2015-04-01"

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

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

        }

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