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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createUpdateTrustedIdProviderParametersProtocol() -> UpdateTrustedIdProviderParametersProtocol {
    return UpdateTrustedIdProviderParametersData()
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createUpdateTrustedIdProviderPropertiesProtocol() -> UpdateTrustedIdProviderPropertiesProtocol {
    return UpdateTrustedIdProviderPropertiesData()
  }
}


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

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

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

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

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

extension DataFactory {
  public static func createUpdateTrustedIdProviderWithAccountParametersProtocol(name: String) -> UpdateTrustedIdProviderWithAccountParametersProtocol {
    return UpdateTrustedIdProviderWithAccountParametersData(name: name)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CapabilityInformationProtocol is subscription-level properties and limits for Data Lake Store.
public protocol CapabilityInformationProtocol : Codable {
     var subscriptionId: String? { get set }
     var state: SubscriptionStateEnum? { get set }
     var maxAccountCount: Int32? { get set }
     var accountCount: Int32? { get set }
     var migrationState: Bool? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CheckNameAvailabilityParametersProtocol is data Lake Store account name availability check parameters.
public protocol CheckNameAvailabilityParametersProtocol : Codable {
     var name: String { get set }
     var type: String { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateDataLakeStoreAccountParametersProtocol is
public protocol CreateDataLakeStoreAccountParametersProtocol : Codable {
     var location: String { get set }
     var tags: [String:String]? { get set }
     var identity: EncryptionIdentityProtocol? { get set }
     var properties: CreateDataLakeStoreAccountPropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateDataLakeStoreAccountPropertiesProtocol is
public protocol CreateDataLakeStoreAccountPropertiesProtocol : Codable {
     var defaultGroup: String? { get set }
     var encryptionConfig: EncryptionConfigProtocol? { get set }
     var encryptionState: EncryptionStateEnum? { get set }
     var firewallRules: [CreateFirewallRuleWithAccountParametersProtocol?]? { get set }
     var firewallState: FirewallStateEnum? { get set }
     var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum? { get set }
     var trustedIdProviders: [CreateTrustedIdProviderWithAccountParametersProtocol?]? { get set }
     var trustedIdProviderState: TrustedIdProviderStateEnum? { get set }
     var newTier: TierTypeEnum? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateFirewallRuleWithAccountParametersProtocol is the parameters used to create a new firewall rule while creating
// a new Data Lake Store account.
public protocol CreateFirewallRuleWithAccountParametersProtocol : Codable {
     var name: String { get set }
     var properties: CreateOrUpdateFirewallRulePropertiesProtocol { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateOrUpdateFirewallRuleParametersProtocol is the parameters used to create a new firewall rule.
public protocol CreateOrUpdateFirewallRuleParametersProtocol : Codable {
     var properties: CreateOrUpdateFirewallRulePropertiesProtocol { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateOrUpdateFirewallRulePropertiesProtocol is the firewall rule properties to use when creating a new firewall
// rule.
public protocol CreateOrUpdateFirewallRulePropertiesProtocol : Codable {
     var startIpAddress: String { get set }
     var endIpAddress: String { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateOrUpdateTrustedIdProviderParametersProtocol is the parameters used to create a new trusted identity provider.
public protocol CreateOrUpdateTrustedIdProviderParametersProtocol : Codable {
     var properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateOrUpdateTrustedIdProviderPropertiesProtocol is the trusted identity provider properties to use when creating a
// new trusted identity provider.
public protocol CreateOrUpdateTrustedIdProviderPropertiesProtocol : Codable {
     var idProvider: String { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// CreateTrustedIdProviderWithAccountParametersProtocol is the parameters used to create a new trusted identity
// provider while creating a new Data Lake Store account.
public protocol CreateTrustedIdProviderWithAccountParametersProtocol : Codable {
     var name: String { get set }
     var properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// DataLakeStoreAccountBasicProtocol is basic Data Lake Store account information, returned on list calls.
public protocol DataLakeStoreAccountBasicProtocol : ResourceProtocol {
     var properties: DataLakeStoreAccountPropertiesBasicProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// DataLakeStoreAccountListResultProtocol is data Lake Store account list information response.
public protocol DataLakeStoreAccountListResultProtocol : Codable {
     var value: [DataLakeStoreAccountBasicProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// DataLakeStoreAccountPropertiesBasicProtocol is the basic account specific properties that are associated with an
// underlying Data Lake Store account.
public protocol DataLakeStoreAccountPropertiesBasicProtocol : Codable {
     var accountId: String? { get set }
     var provisioningState: DataLakeStoreAccountStatusEnum? { get set }
     var state: DataLakeStoreAccountStateEnum? { get set }
     var creationTime: Date? { get set }
     var lastModifiedTime: Date? { get set }
     var endpoint: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// DataLakeStoreAccountPropertiesProtocol is data Lake Store account properties information.
public protocol DataLakeStoreAccountPropertiesProtocol : DataLakeStoreAccountPropertiesBasicProtocol {
     var defaultGroup: String? { get set }
     var encryptionConfig: EncryptionConfigProtocol? { get set }
     var encryptionState: EncryptionStateEnum? { get set }
     var encryptionProvisioningState: EncryptionProvisioningStateEnum? { get set }
     var firewallRules: [FirewallRuleProtocol?]? { get set }
     var firewallState: FirewallStateEnum? { get set }
     var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum? { get set }
     var trustedIdProviders: [TrustedIdProviderProtocol?]? { get set }
     var trustedIdProviderState: TrustedIdProviderStateEnum? { get set }
     var newTier: TierTypeEnum? { get set }
     var currentTier: TierTypeEnum? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// DataLakeStoreAccountProtocol is data Lake Store account information.
public protocol DataLakeStoreAccountProtocol : ResourceProtocol {
     var identity: EncryptionIdentityProtocol? { get set }
     var properties: DataLakeStoreAccountPropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// EncryptionConfigProtocol is the encryption configuration for the account.
public protocol EncryptionConfigProtocol : Codable {
     var type: EncryptionConfigTypeEnum { get set }
     var keyVaultMetaInfo: KeyVaultMetaInfoProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// EncryptionIdentityProtocol is the encryption identity properties.
public protocol EncryptionIdentityProtocol : Codable {
     var type: String { get set }
     var principalId: String? { get set }
     var tenantId: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// FirewallRuleListResultProtocol is data Lake Store firewall rule list information.
public protocol FirewallRuleListResultProtocol : Codable {
     var value: [FirewallRuleProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// FirewallRulePropertiesProtocol is the firewall rule properties.
public protocol FirewallRulePropertiesProtocol : Codable {
     var startIpAddress: String? { get set }
     var endIpAddress: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// FirewallRuleProtocol is data Lake Store firewall rule information.
public protocol FirewallRuleProtocol : SubResourceProtocol {
     var properties: FirewallRulePropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// KeyVaultMetaInfoProtocol is metadata information used by account encryption.
public protocol KeyVaultMetaInfoProtocol : Codable {
     var keyVaultResourceId: String { get set }
     var encryptionKeyName: String { get set }
     var encryptionKeyVersion: String { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// NameAvailabilityInformationProtocol is data Lake Store account name availability result information.
public protocol NameAvailabilityInformationProtocol : Codable {
     var nameAvailable: Bool? { get set }
     var reason: String? { get set }
     var message: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// OperationDisplayProtocol is the display information for a particular operation.
public protocol OperationDisplayProtocol : Codable {
     var provider: String? { get set }
     var resource: String? { get set }
     var operation: String? { get set }
     var description: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// OperationListResultProtocol is the list of available operations for Data Lake Store.
public protocol OperationListResultProtocol : Codable {
     var value: [OperationProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// OperationProtocol is an available operation for Data Lake Store.
public protocol OperationProtocol : Codable {
     var name: String? { get set }
     var display: OperationDisplayProtocol? { get set }
     var origin: OperationOriginEnum? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// ResourceProtocol is the resource model definition.
public protocol ResourceProtocol : Codable {
     var id: String? { get set }
     var name: String? { get set }
     var type: String? { get set }
     var location: String? { get set }
     var tags: [String:String]? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// SubResourceProtocol is the resource model definition for a nested resource.
public protocol SubResourceProtocol : Codable {
     var id: String? { get set }
     var name: String? { get set }
     var type: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// TrustedIdProviderListResultProtocol is data Lake Store trusted identity provider list information.
public protocol TrustedIdProviderListResultProtocol : Codable {
     var value: [TrustedIdProviderProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// TrustedIdProviderPropertiesProtocol is the trusted identity provider properties.
public protocol TrustedIdProviderPropertiesProtocol : Codable {
     var idProvider: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// TrustedIdProviderProtocol is data Lake Store trusted identity provider information.
public protocol TrustedIdProviderProtocol : SubResourceProtocol {
     var properties: TrustedIdProviderPropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateDataLakeStoreAccountParametersProtocol is data Lake Store account information to update.
public protocol UpdateDataLakeStoreAccountParametersProtocol : Codable {
     var tags: [String:String]? { get set }
     var properties: UpdateDataLakeStoreAccountPropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateDataLakeStoreAccountPropertiesProtocol is data Lake Store account properties information to be updated.
public protocol UpdateDataLakeStoreAccountPropertiesProtocol : Codable {
     var defaultGroup: String? { get set }
     var encryptionConfig: UpdateEncryptionConfigProtocol? { get set }
     var firewallRules: [UpdateFirewallRuleWithAccountParametersProtocol?]? { get set }
     var firewallState: FirewallStateEnum? { get set }
     var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum? { get set }
     var trustedIdProviders: [UpdateTrustedIdProviderWithAccountParametersProtocol?]? { get set }
     var trustedIdProviderState: TrustedIdProviderStateEnum? { get set }
     var newTier: TierTypeEnum? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateEncryptionConfigProtocol is the encryption configuration used to update a user managed Key Vault key.
public protocol UpdateEncryptionConfigProtocol : Codable {
     var keyVaultMetaInfo: UpdateKeyVaultMetaInfoProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateFirewallRuleParametersProtocol is the parameters used to update a firewall rule.
public protocol UpdateFirewallRuleParametersProtocol : Codable {
     var properties: UpdateFirewallRulePropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateFirewallRulePropertiesProtocol is the firewall rule properties to use when updating a firewall rule.
public protocol UpdateFirewallRulePropertiesProtocol : Codable {
     var startIpAddress: String? { get set }
     var endIpAddress: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateFirewallRuleWithAccountParametersProtocol is the parameters used to update a firewall rule while updating a
// Data Lake Store account.
public protocol UpdateFirewallRuleWithAccountParametersProtocol : Codable {
     var name: String { get set }
     var properties: UpdateFirewallRulePropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateKeyVaultMetaInfoProtocol is the Key Vault update information used for user managed key rotation.
public protocol UpdateKeyVaultMetaInfoProtocol : Codable {
     var encryptionKeyVersion: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateTrustedIdProviderParametersProtocol is the parameters used to update a trusted identity provider.
public protocol UpdateTrustedIdProviderParametersProtocol : Codable {
     var properties: UpdateTrustedIdProviderPropertiesProtocol? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateTrustedIdProviderPropertiesProtocol is the trusted identity provider properties to use when updating a trusted
// identity provider.
public protocol UpdateTrustedIdProviderPropertiesProtocol : Codable {
     var idProvider: String? { get set }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
// UpdateTrustedIdProviderWithAccountParametersProtocol is the parameters used to update a trusted identity provider
// while updating a Data Lake Store account.
public protocol UpdateTrustedIdProviderWithAccountParametersProtocol : Codable {
     var name: String { get set }
     var properties: UpdateTrustedIdProviderPropertiesProtocol? { get set }
}


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


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

// ArmTemplates is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct ArmTemplates {
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String, name: String) -> ArmTemplatesGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, artifactSourceName: artifactSourceName, name: name)
    }
    public static func List(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String) -> ArmTemplatesList {
        return ListCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, artifactSourceName: artifactSourceName)
    }
}
}


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

extension Commands.ArmTemplates {
// Get get azure resource manager template.
    internal class GetCommand : BaseCommand, ArmTemplatesGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var artifactSourceName : String
        public var name : String
        public var expand : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            self.pathParameters["{artifactSourceName}"] = String(describing: self.artifactSourceName)
            self.pathParameters["{name}"] = String(describing: self.name)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            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(ArmTemplateData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (ArmTemplateProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: ArmTemplateData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ArmTemplatesList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var labName : String { get set }
    var artifactSourceName : String { get set }
    var expand : String? { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var orderby : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (ResponseWithContinuationArmTemplateProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ArmTemplates {
// List list azure resource manager templates in a given artifact source.
    internal class ListCommand : BaseCommand, ArmTemplatesList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var artifactSourceName : String
        public var expand : String?
        public var filter : String?
        public var top : Int32?
        public var orderby : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            self.pathParameters["{artifactSourceName}"] = String(describing: self.artifactSourceName)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            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(ResponseWithContinuationArmTemplateData?.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 (ResponseWithContinuationArmTemplateProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: ResponseWithContinuationArmTemplateData?, 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.

// Artifacts is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Artifacts {
    public static func GenerateArmTemplate(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String, name: String, generateArmTemplateRequest: GenerateArmTemplateRequestProtocol) -> ArtifactsGenerateArmTemplate {
        return GenerateArmTemplateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, artifactSourceName: artifactSourceName, name: name, generateArmTemplateRequest: generateArmTemplateRequest)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String, name: String) -> ArtifactsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, artifactSourceName: artifactSourceName, name: name)
    }
    public static func List(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String) -> ArtifactsList {
        return ListCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, artifactSourceName: artifactSourceName)
    }
}
}


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

extension Commands.Artifacts {
// GenerateArmTemplate generates an ARM template for the given artifact, uploads the required files to a storage
// account, and validates the generated artifact.
    internal class GenerateArmTemplateCommand : BaseCommand, ArtifactsGenerateArmTemplate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var artifactSourceName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var generateArmTemplateRequest :  GenerateArmTemplateRequestProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, artifactSourceName: String, name: String, generateArmTemplateRequest: GenerateArmTemplateRequestProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.artifactSourceName = artifactSourceName
            self.name = name
            self.generateArmTemplateRequest = generateArmTemplateRequest
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{artifactSourceName}/artifacts/{name}/generateArmTemplate"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.Artifacts {
// Get get artifact.
    internal class GetCommand : BaseCommand, ArtifactsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var artifactSourceName : String
        public var name : String
        public var expand : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            self.pathParameters["{artifactSourceName}"] = String(describing: self.artifactSourceName)
            self.pathParameters["{name}"] = String(describing: self.name)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            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(ArtifactData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (ArtifactProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: ArtifactData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol ArtifactsList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var labName : String { get set }
    var artifactSourceName : String { get set }
    var expand : String? { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var orderby : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (ResponseWithContinuationArtifactProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Artifacts {
// List list artifacts in a given artifact source.
    internal class ListCommand : BaseCommand, ArtifactsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var artifactSourceName : String
        public var expand : String?
        public var filter : String?
        public var top : Int32?
        public var orderby : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            self.pathParameters["{artifactSourceName}"] = String(describing: self.artifactSourceName)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            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(ResponseWithContinuationArtifactData?.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 (ResponseWithContinuationArtifactProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: ResponseWithContinuationArtifactData?, 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.

// ArtifactSources is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct ArtifactSources {
    public static func CreateOrUpdate(subscriptionId: String, resourceGroupName: String, labName: String, name: String, artifactSource: ArtifactSourceProtocol) -> ArtifactSourcesCreateOrUpdate {
        return CreateOrUpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name, artifactSource: artifactSource)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, labName: String, name: String) -> ArtifactSourcesDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, name: String) -> ArtifactSourcesGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name)
    }
    public static func List(subscriptionId: String, resourceGroupName: String, labName: String) -> ArtifactSourcesList {
        return ListCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, labName: String, name: String, artifactSource: ArtifactSourceFragmentProtocol) -> ArtifactSourcesUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name, artifactSource: artifactSource)
    }
}
}


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

extension Commands.ArtifactSources {
// CreateOrUpdate create or replace an existing artifact source.
    internal class CreateOrUpdateCommand : BaseCommand, ArtifactSourcesCreateOrUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var artifactSource :  ArtifactSourceProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, name: String, artifactSource: ArtifactSourceProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.name = name
            self.artifactSource = artifactSource
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.ArtifactSources {
// Delete delete artifact source.
    internal class DeleteCommand : BaseCommand, ArtifactSourcesDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"

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

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

extension Commands.ArtifactSources {
// Get get artifact source.
    internal class GetCommand : BaseCommand, ArtifactSourcesGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var expand : String?
        public var apiVersion = "2016-05-15"

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

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


import Foundation
import azureSwiftRuntime
public protocol ArtifactSourcesList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var labName : String { get set }
    var expand : String? { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var orderby : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (ResponseWithContinuationArtifactSourceProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.ArtifactSources {
// List list artifact sources in a given lab.
    internal class ListCommand : BaseCommand, ArtifactSourcesList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var expand : String?
        public var filter : String?
        public var top : Int32?
        public var orderby : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            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(ResponseWithContinuationArtifactSourceData?.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 (ResponseWithContinuationArtifactSourceProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: ResponseWithContinuationArtifactSourceData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.ArtifactSources {
// Update modify properties of artifact sources.
    internal class UpdateCommand : BaseCommand, ArtifactSourcesUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var artifactSource :  ArtifactSourceFragmentProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, name: String, artifactSource: ArtifactSourceFragmentProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.name = name
            self.artifactSource = artifactSource
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/artifactsources/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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

// Costs is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Costs {
    public static func CreateOrUpdate(subscriptionId: String, resourceGroupName: String, labName: String, name: String, labCost: LabCostProtocol) -> CostsCreateOrUpdate {
        return CreateOrUpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name, labCost: labCost)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, name: String) -> CostsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name)
    }
}
}


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

extension Commands.Costs {
// CreateOrUpdate create or replace an existing cost.
    internal class CreateOrUpdateCommand : BaseCommand, CostsCreateOrUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var labCost :  LabCostProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, name: String, labCost: LabCostProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.name = name
            self.labCost = labCost
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.Costs {
// Get get cost.
    internal class GetCommand : BaseCommand, CostsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var expand : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            self.pathParameters["{name}"] = String(describing: self.name)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            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(LabCostData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (LabCostProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: LabCostData?, 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.

// CustomImages is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct CustomImages {
    public static func CreateOrUpdate(subscriptionId: String, resourceGroupName: String, labName: String, name: String, customImage: CustomImageProtocol) -> CustomImagesCreateOrUpdate {
        return CreateOrUpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name, customImage: customImage)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, labName: String, name: String) -> CustomImagesDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, name: String) -> CustomImagesGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, name: name)
    }
    public static func List(subscriptionId: String, resourceGroupName: String, labName: String) -> CustomImagesList {
        return ListCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName)
    }
}
}


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

extension Commands.CustomImages {
// CreateOrUpdate create or replace an existing custom image. This operation can take a while to complete. 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, CustomImagesCreateOrUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var customImage :  CustomImageProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, name: String, customImage: CustomImageProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.name = name
            self.customImage = customImage
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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


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

extension Commands.CustomImages {
// Delete delete custom image. This operation can take a while to complete. This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
    internal class DeleteCommand : BaseCommand, CustomImagesDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var apiVersion = "2016-05-15"

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

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

        }

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


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

extension Commands.CustomImages {
// Get get custom image.
    internal class GetCommand : BaseCommand, CustomImagesGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var name : String
        public var expand : String?
        public var apiVersion = "2016-05-15"

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

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


import Foundation
import azureSwiftRuntime
public protocol CustomImagesList  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var labName : String { get set }
    var expand : String? { get set }
    var filter : String? { get set }
    var top : Int32? { get set }
    var orderby : String? { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (ResponseWithContinuationCustomImageProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.CustomImages {
// List list custom images in a given lab.
    internal class ListCommand : BaseCommand, CustomImagesList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var expand : String?
        public var filter : String?
        public var top : Int32?
        public var orderby : String?
        public var apiVersion = "2016-05-15"

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

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{labName}"] = String(describing: self.labName)
            if self.expand != nil { queryParameters["$expand"] = String(describing: self.expand!) }
            if self.filter != nil { queryParameters["$filter"] = String(describing: self.filter!) }
            if self.top != nil { queryParameters["$top"] = String(describing: self.top!) }
            if self.orderby != nil { queryParameters["$orderby"] = String(describing: self.orderby!) }
            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(ResponseWithContinuationCustomImageData?.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 (ResponseWithContinuationCustomImageProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: ResponseWithContinuationCustomImageData?, 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.

// Disks is the the DevTest Labs Client.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Disks {
    public static func Attach(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String, attachDiskProperties: AttachDiskPropertiesProtocol) -> DisksAttach {
        return AttachCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName, name: name, attachDiskProperties: attachDiskProperties)
    }
    public static func CreateOrUpdate(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String, disk: DiskProtocol) -> DisksCreateOrUpdate {
        return CreateOrUpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName, name: name, disk: disk)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String) -> DisksDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName, name: name)
    }
    public static func Detach(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String, detachDiskProperties: DetachDiskPropertiesProtocol) -> DisksDetach {
        return DetachCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName, name: name, detachDiskProperties: detachDiskProperties)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String) -> DisksGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName, name: name)
    }
    public static func List(subscriptionId: String, resourceGroupName: String, labName: String, userName: String) -> DisksList {
        return ListCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, labName: labName, userName: userName)
    }
}
}


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

extension Commands.Disks {
// Attach attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.
// 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 AttachCommand : BaseCommand, DisksAttach {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var userName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var attachDiskProperties :  AttachDiskPropertiesProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String, attachDiskProperties: AttachDiskPropertiesProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.userName = userName
            self.name = name
            self.attachDiskProperties = attachDiskProperties
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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

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


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

extension Commands.Disks {
// CreateOrUpdate create or replace an existing disk. This operation can take a while to complete. 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, DisksCreateOrUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var labName : String
        public var userName : String
        public var name : String
        public var apiVersion = "2016-05-15"
    public var disk :  DiskProtocol?

        public init(subscriptionId: String, resourceGroupName: String, labName: String, userName: String, name: String, disk: DiskProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.labName = labName
            self.userName = userName
            self.name = name
            self.disk = disk
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

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

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