// 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 UsageData : UsageProtocol {
    public var unit: UsageUnitEnum?
    public var currentValue: Int32?
    public var limit: Int32?
    public var name: UsageNameProtocol?

        enum CodingKeys: String, CodingKey {case unit = "unit"
        case currentValue = "currentValue"
        case limit = "limit"
        case name = "name"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.unit) {
        self.unit = try container.decode(UsageUnitEnum?.self, forKey: .unit)
    }
    if container.contains(.currentValue) {
        self.currentValue = try container.decode(Int32?.self, forKey: .currentValue)
    }
    if container.contains(.limit) {
        self.limit = try container.decode(Int32?.self, forKey: .limit)
    }
    if container.contains(.name) {
        self.name = try container.decode(UsageNameData?.self, forKey: .name)
    }
    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.unit != nil {try container.encode(self.unit, forKey: .unit)}
    if self.currentValue != nil {try container.encode(self.currentValue, forKey: .currentValue)}
    if self.limit != nil {try container.encode(self.limit, forKey: .limit)}
    if self.name != nil {try container.encode(self.name as! UsageNameData?, forKey: .name)}
  }
}

extension DataFactory {
  public static func createUsageProtocol() -> UsageProtocol {
    return UsageData()
  }
}


// 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 UsageListResultData : UsageListResultProtocol {
    public var value: [UsageProtocol?]?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createUsageListResultProtocol() -> UsageListResultProtocol {
    return UsageListResultData()
  }
}


// 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 UsageNameData : UsageNameProtocol {
    public var value: String?
    public var localizedValue: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createUsageNameProtocol() -> UsageNameProtocol {
    return UsageNameData()
  }
}


// UsageUnit enumerates the values for usage unit.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum UsageUnitEnum: String, Codable
{
// Bytes specifies the bytes state for usage unit.
    case Bytes = "Bytes"
// BytesPerSecond specifies the bytes per second state for usage unit.
    case BytesPerSecond = "BytesPerSecond"
// Count specifies the count state for usage unit.
    case Count = "Count"
// CountsPerSecond specifies the counts per second state for usage unit.
    case CountsPerSecond = "CountsPerSecond"
// Percent specifies the percent state for usage unit.
    case Percent = "Percent"
// Seconds specifies the seconds state for usage unit.
    case Seconds = "Seconds"
}


// 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 VirtualNetworkRuleData : VirtualNetworkRuleProtocol {
    public var virtualNetworkResourceId: String
    public var action: ActionEnum?
    public var state: StateEnum?

        enum CodingKeys: String, CodingKey {case virtualNetworkResourceId = "id"
        case action = "action"
        case state = "state"
        }

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

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

extension DataFactory {
  public static func createVirtualNetworkRuleProtocol(virtualNetworkResourceId: String) -> VirtualNetworkRuleProtocol {
    return VirtualNetworkRuleData(virtualNetworkResourceId: virtualNetworkResourceId)
  }
}


// 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
// AccountSasParametersProtocol is the parameters to list SAS credentials of a storage account.
public protocol AccountSasParametersProtocol : Codable {
     var services: ServicesEnum { get set }
     var resourceTypes: SignedResourceTypesEnum { get set }
     var permissions: PermissionsEnum { get set }
     var iPAddressOrRange: String? { get set }
     var protocols: HttpProtocolEnum? { get set }
     var sharedAccessStartTime: Date? { get set }
     var sharedAccessExpiryTime: Date { get set }
     var keyToSign: 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
// CheckNameAvailabilityResultProtocol is the CheckNameAvailability operation response.
public protocol CheckNameAvailabilityResultProtocol : Codable {
     var nameAvailable: Bool? { get set }
     var reason: ReasonEnum? { 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
// CustomDomainProtocol is the custom domain assigned to this storage account. This can be set via Update.
public protocol CustomDomainProtocol : Codable {
     var name: String { get set }
     var useSubDomain: 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
// DimensionProtocol is dimension of blobs, possiblly be blob type or access tier.
public protocol DimensionProtocol : Codable {
     var name: String? { get set }
     var displayName: 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
// EncryptionProtocol is the encryption settings on the storage account.
public protocol EncryptionProtocol : Codable {
     var services: EncryptionServicesProtocol? { get set }
     var keySource: KeySourceEnum { get set }
     var keyVaultProperties: KeyVaultPropertiesProtocol? { 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
// EncryptionServiceProtocol is a service that allows server-side encryption to be used.
public protocol EncryptionServiceProtocol : Codable {
     var enabled: Bool? { get set }
     var lastEnabledTime: Date? { 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
// EncryptionServicesProtocol is a list of services that support encryption.
public protocol EncryptionServicesProtocol : Codable {
     var blob: EncryptionServiceProtocol? { get set }
     var file: EncryptionServiceProtocol? { get set }
     var table: EncryptionServiceProtocol? { get set }
     var queue: EncryptionServiceProtocol? { 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
// EndpointsProtocol is the URIs that are used to perform a retrieval of a public blob, queue, or table object.
public protocol EndpointsProtocol : Codable {
     var blob: String? { get set }
     var queue: String? { get set }
     var table: String? { get set }
     var file: 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
// IdentityProtocol is identity for the resource.
public protocol IdentityProtocol : Codable {
     var principalId: String? { get set }
     var tenantId: 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
// IPRuleProtocol is IP rule with specific IP or IP range in CIDR format.
public protocol IPRuleProtocol : Codable {
     var iPAddressOrRange: String { get set }
     var action: ActionEnum? { 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
// KeyVaultPropertiesProtocol is properties of key vault.
public protocol KeyVaultPropertiesProtocol : Codable {
     var keyName: String? { get set }
     var keyVersion: String? { get set }
     var keyVaultUri: 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
// ListAccountSasResponseProtocol is the List SAS credentials operation response.
public protocol ListAccountSasResponseProtocol : Codable {
     var accountSasToken: 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
// ListServiceSasResponseProtocol is the List service SAS credentials operation response.
public protocol ListServiceSasResponseProtocol : Codable {
     var serviceSasToken: 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
// MetricSpecificationProtocol is metric specification of operation.
public protocol MetricSpecificationProtocol : Codable {
     var name: String? { get set }
     var displayName: String? { get set }
     var displayDescription: String? { get set }
     var unit: String? { get set }
     var dimensions: [DimensionProtocol?]? { get set }
     var aggregationType: String? { get set }
     var fillGapWithZero: Bool? { get set }
     var category: String? { get set }
     var resourceIdDimensionNameOverride: 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
// NetworkRuleSetProtocol is network rule set
public protocol NetworkRuleSetProtocol : Codable {
     var bypass: BypassEnum? { get set }
     var virtualNetworkRules: [VirtualNetworkRuleProtocol?]? { get set }
     var ipRules: [IPRuleProtocol?]? { get set }
     var defaultAction: DefaultActionEnum { 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 display metadata associated with the operation.
public protocol OperationDisplayProtocol : Codable {
     var provider: String? { get set }
     var resource: String? { get set }
     var operation: 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 result of the request to list Storage operations. It contains a list of operations
// and a URL link to get the next set of results.
public protocol OperationListResultProtocol : Codable {
     var value: [OperationProtocol?]? { 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
// OperationPropertiesProtocol is properties of operation, include metric specifications.
public protocol OperationPropertiesProtocol : Codable {
     var serviceSpecification: ServiceSpecificationProtocol? { 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 storage REST API operation definition.
public protocol OperationProtocol : Codable {
     var name: String? { get set }
     var display: OperationDisplayProtocol? { get set }
     var origin: String? { get set }
     var operationProperties: OperationPropertiesProtocol? { 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 describes a storage resource.
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
// RestrictionProtocol is the restriction because of which SKU cannot be used.
public protocol RestrictionProtocol : Codable {
     var type: String? { get set }
     var values: [String]? { get set }
     var reasonCode: ReasonCodeEnum? { 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
// ServiceSasParametersProtocol is the parameters to list service SAS credentials of a speicific resource.
public protocol ServiceSasParametersProtocol : Codable {
     var canonicalizedResource: String { get set }
     var resource: SignedResourceEnum { get set }
     var permissions: PermissionsEnum? { get set }
     var iPAddressOrRange: String? { get set }
     var protocols: HttpProtocolEnum? { get set }
     var sharedAccessStartTime: Date? { get set }
     var sharedAccessExpiryTime: Date? { get set }
     var identifier: String? { get set }
     var partitionKeyStart: String? { get set }
     var partitionKeyEnd: String? { get set }
     var rowKeyStart: String? { get set }
     var rowKeyEnd: String? { get set }
     var keyToSign: String? { get set }
     var cacheControl: String? { get set }
     var contentDisposition: String? { get set }
     var contentEncoding: String? { get set }
     var contentLanguage: String? { get set }
     var contentType: 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
// ServiceSpecificationProtocol is one property of operation, include metric specifications.
public protocol ServiceSpecificationProtocol : Codable {
     var metricSpecifications: [MetricSpecificationProtocol?]? { 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
// SKUCapabilityProtocol is the capability information in the specified sku, including file encryption, network acls,
// change notification, etc.
public protocol SKUCapabilityProtocol : Codable {
     var name: String? { get set }
     var value: 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
// SkuProtocol is the SKU of the storage account.
public protocol SkuProtocol : Codable {
     var name: SkuNameEnum { get set }
     var tier: SkuTierEnum? { get set }
     var resourceType: String? { get set }
     var kind: KindEnum? { get set }
     var locations: [String]? { get set }
     var capabilities: [SKUCapabilityProtocol?]? { get set }
     var restrictions: [RestrictionProtocol?]? { 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
// StorageAccountCheckNameAvailabilityParametersProtocol is the parameters used to check the availabity of the storage
// account name.
public protocol StorageAccountCheckNameAvailabilityParametersProtocol : 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
// StorageAccountCreateParametersProtocol is the parameters used when creating a storage account.
public protocol StorageAccountCreateParametersProtocol : Codable {
     var sku: SkuProtocol { get set }
     var kind: KindEnum { get set }
     var location: String { get set }
     var tags: [String:String]? { get set }
     var identity: IdentityProtocol? { get set }
     var properties: StorageAccountPropertiesCreateParametersProtocol? { 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
// StorageAccountKeyProtocol is an access key for the storage account.
public protocol StorageAccountKeyProtocol : Codable {
     var keyName: String? { get set }
     var value: String? { get set }
     var permissions: KeyPermissionEnum? { 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
// StorageAccountListKeysResultProtocol is the response from the ListKeys operation.
public protocol StorageAccountListKeysResultProtocol : Codable {
     var keys: [StorageAccountKeyProtocol?]? { 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
// StorageAccountListResultProtocol is the response from the List Storage Accounts operation.
public protocol StorageAccountListResultProtocol : Codable {
     var value: [StorageAccountProtocol?]? { 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
// StorageAccountPropertiesCreateParametersProtocol is the parameters used to create the storage account.
public protocol StorageAccountPropertiesCreateParametersProtocol : Codable {
     var customDomain: CustomDomainProtocol? { get set }
     var encryption: EncryptionProtocol? { get set }
     var networkRuleSet: NetworkRuleSetProtocol? { get set }
     var accessTier: AccessTierEnum? { get set }
     var enableHttpsTrafficOnly: 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
// StorageAccountPropertiesProtocol is properties of the storage account.
public protocol StorageAccountPropertiesProtocol : Codable {
     var provisioningState: ProvisioningStateEnum? { get set }
     var primaryEndpoints: EndpointsProtocol? { get set }
     var primaryLocation: String? { get set }
     var statusOfPrimary: AccountStatusEnum? { get set }
     var lastGeoFailoverTime: Date? { get set }
     var secondaryLocation: String? { get set }
     var statusOfSecondary: AccountStatusEnum? { get set }
     var creationTime: Date? { get set }
     var customDomain: CustomDomainProtocol? { get set }
     var secondaryEndpoints: EndpointsProtocol? { get set }
     var encryption: EncryptionProtocol? { get set }
     var accessTier: AccessTierEnum? { get set }
     var enableHttpsTrafficOnly: Bool? { get set }
     var networkRuleSet: NetworkRuleSetProtocol? { 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
// StorageAccountPropertiesUpdateParametersProtocol is the parameters used when updating a storage account.
public protocol StorageAccountPropertiesUpdateParametersProtocol : Codable {
     var customDomain: CustomDomainProtocol? { get set }
     var encryption: EncryptionProtocol? { get set }
     var accessTier: AccessTierEnum? { get set }
     var enableHttpsTrafficOnly: Bool? { get set }
     var networkRuleSet: NetworkRuleSetProtocol? { 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
// StorageAccountProtocol is the storage account.
public protocol StorageAccountProtocol : ResourceProtocol {
     var sku: SkuProtocol? { get set }
     var kind: KindEnum? { get set }
     var identity: IdentityProtocol? { get set }
     var properties: StorageAccountPropertiesProtocol? { 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
// StorageAccountRegenerateKeyParametersProtocol is the parameters used to regenerate the storage account key.
public protocol StorageAccountRegenerateKeyParametersProtocol : Codable {
     var keyName: 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
// StorageAccountUpdateParametersProtocol is the parameters that can be provided when updating the storage account
// properties.
public protocol StorageAccountUpdateParametersProtocol : Codable {
     var sku: SkuProtocol? { get set }
     var tags: [String:String]? { get set }
     var identity: IdentityProtocol? { get set }
     var properties: StorageAccountPropertiesUpdateParametersProtocol? { get set }
     var kind: KindEnum? { 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
// StorageSkuListResultProtocol is the response from the List Storage SKUs operation.
public protocol StorageSkuListResultProtocol : Codable {
     var value: [SkuProtocol?]? { 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
// UsageListResultProtocol is the response from the List Usages operation.
public protocol UsageListResultProtocol : Codable {
     var value: [UsageProtocol?]? { 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
// UsageNameProtocol is the usage names that can be used; currently limited to StorageAccount.
public protocol UsageNameProtocol : Codable {
     var value: String? { get set }
     var localizedValue: 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
// UsageProtocol is describes Storage Resource Usage.
public protocol UsageProtocol : Codable {
     var unit: UsageUnitEnum? { get set }
     var currentValue: Int32? { get set }
     var limit: Int32? { get set }
     var name: UsageNameProtocol? { 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
// VirtualNetworkRuleProtocol is virtual Network rule.
public protocol VirtualNetworkRuleProtocol : Codable {
     var virtualNetworkResourceId: String { get set }
     var action: ActionEnum? { get set }
     var state: StateEnum? { 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: "streamanalytics",
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "streamanalytics",
            targets: ["streamanalytics"]),
    ],
    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: "streamanalytics",
            dependencies: ["Alamofire", "RxSwift", "SwiftyJSON", "azureSwiftRuntime"])
    ]
)


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


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

// Functions is the stream Analytics Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Functions {
    public static func CreateOrReplace(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String, function: FunctionProtocol) -> FunctionsCreateOrReplace {
        return CreateOrReplaceCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName, function: function)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) -> FunctionsDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) -> FunctionsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName)
    }
    public static func ListByStreamingJob(subscriptionId: String, resourceGroupName: String, jobName: String) -> FunctionsListByStreamingJob {
        return ListByStreamingJobCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName)
    }
    public static func RetrieveDefaultDefinition(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) -> FunctionsRetrieveDefaultDefinition {
        return RetrieveDefaultDefinitionCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName)
    }
    public static func Test(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) -> FunctionsTest {
        return TestCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String, function: FunctionProtocol) -> FunctionsUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, functionName: functionName, function: function)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol FunctionsCreateOrReplace  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var functionName : String { get set }
    var apiVersion : String { get set }
    var ifMatch : String? { get set }
    var ifNoneMatch : String? { get set }
    var function :  FunctionProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (FunctionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Functions {
// CreateOrReplace creates a function or replaces an already existing function under an existing streaming job.
    internal class CreateOrReplaceCommand : BaseCommand, FunctionsCreateOrReplace {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"
        public var ifMatch : String?
        public var ifNoneMatch : String?
    public var function :  FunctionProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String, function: FunctionProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            self.function = function
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            if self.ifMatch != nil { headerParameters["If-Match"] = String(describing: self.ifMatch!) }
            if self.ifNoneMatch != nil { headerParameters["If-None-Match"] = String(describing: self.ifNoneMatch!) }
            self.body = function

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


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

extension Commands.Functions {
// Delete deletes a function from the streaming job.
    internal class DeleteCommand : BaseCommand, FunctionsDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            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 FunctionsGet  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var functionName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (FunctionProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Functions {
// Get gets details about the specified function.
    internal class GetCommand : BaseCommand, FunctionsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            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(FunctionData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (FunctionProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: FunctionData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Functions {
// ListByStreamingJob lists all of the functions under the specified streaming job.
    internal class ListByStreamingJobCommand : BaseCommand, FunctionsListByStreamingJob {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var select : String?
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions"
            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["{jobName}"] = String(describing: self.jobName)
            if self.select != nil { queryParameters["$select"] = String(describing: self.select!) }
            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(FunctionListResultData?.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 (FunctionListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: FunctionListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Functions {
// RetrieveDefaultDefinition retrieves the default definition of a function based on the parameters specified.
    internal class RetrieveDefaultDefinitionCommand : BaseCommand, FunctionsRetrieveDefaultDefinition {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"
    public var functionRetrieveDefaultDefinitionParameters :  FunctionRetrieveDefaultDefinitionParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = functionRetrieveDefaultDefinitionParameters

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


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

extension Commands.Functions {
// Test tests if the information provided for a function is valid. This can range from testing the connection to the
// underlying web service behind the function or making sure the function code provided is syntactically correct. 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 TestCommand : BaseCommand, FunctionsTest {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"
    public var function :  FunctionProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = function

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


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

extension Commands.Functions {
// Update updates an existing function under an existing streaming job. This can be used to partially update (ie.
// update one or two properties) a function without affecting the rest the job or function definition.
    internal class UpdateCommand : BaseCommand, FunctionsUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var functionName : String
        public var apiVersion = "2016-03-01"
        public var ifMatch : String?
    public var function :  FunctionProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, functionName: String, function: FunctionProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.functionName = functionName
            self.function = function
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{functionName}"] = String(describing: self.functionName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            if self.ifMatch != nil { headerParameters["If-Match"] = String(describing: self.ifMatch!) }
            self.body = function

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

// Inputs is the stream Analytics Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Inputs {
    public static func CreateOrReplace(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String, input: InputProtocol) -> InputsCreateOrReplace {
        return CreateOrReplaceCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, inputName: inputName, input: input)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) -> InputsDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, inputName: inputName)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) -> InputsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, inputName: inputName)
    }
    public static func ListByStreamingJob(subscriptionId: String, resourceGroupName: String, jobName: String) -> InputsListByStreamingJob {
        return ListByStreamingJobCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName)
    }
    public static func Test(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) -> InputsTest {
        return TestCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, inputName: inputName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String, input: InputProtocol) -> InputsUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, inputName: inputName, input: input)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol InputsCreateOrReplace  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var inputName : String { get set }
    var apiVersion : String { get set }
    var ifMatch : String? { get set }
    var ifNoneMatch : String? { get set }
    var input :  InputProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (InputProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Inputs {
// CreateOrReplace creates an input or replaces an already existing input under an existing streaming job.
    internal class CreateOrReplaceCommand : BaseCommand, InputsCreateOrReplace {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var inputName : String
        public var apiVersion = "2016-03-01"
        public var ifMatch : String?
        public var ifNoneMatch : String?
    public var input :  InputProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String, input: InputProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.inputName = inputName
            self.input = input
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{inputName}"] = String(describing: self.inputName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            if self.ifMatch != nil { headerParameters["If-Match"] = String(describing: self.ifMatch!) }
            if self.ifNoneMatch != nil { headerParameters["If-None-Match"] = String(describing: self.ifNoneMatch!) }
            self.body = input

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


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

extension Commands.Inputs {
// Delete deletes an input from the streaming job.
    internal class DeleteCommand : BaseCommand, InputsDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var inputName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.inputName = inputName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{inputName}"] = String(describing: self.inputName)
            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 InputsGet  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var inputName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (InputProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Inputs {
// Get gets details about the specified input.
    internal class GetCommand : BaseCommand, InputsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var inputName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.inputName = inputName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{inputName}"] = String(describing: self.inputName)
            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(InputData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (InputProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: InputData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Inputs {
// ListByStreamingJob lists all of the inputs under the specified streaming job.
    internal class ListByStreamingJobCommand : BaseCommand, InputsListByStreamingJob {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var select : String?
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs"
            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["{jobName}"] = String(describing: self.jobName)
            if self.select != nil { queryParameters["$select"] = String(describing: self.select!) }
            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(InputListResultData?.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 (InputListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: InputListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Inputs {
// Test tests whether an inputâ€™s datasource is reachable and usable by the Azure Stream Analytics service. 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 TestCommand : BaseCommand, InputsTest {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var inputName : String
        public var apiVersion = "2016-03-01"
    public var input :  InputProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.inputName = inputName
            super.init()
            self.method = "Post"
            self.isLongRunningOperation = true
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{inputName}"] = String(describing: self.inputName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = input

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


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

extension Commands.Inputs {
// Update updates an existing input under an existing streaming job. This can be used to partially update (ie. update
// one or two properties) an input without affecting the rest the job or input definition.
    internal class UpdateCommand : BaseCommand, InputsUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var inputName : String
        public var apiVersion = "2016-03-01"
        public var ifMatch : String?
    public var input :  InputProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, inputName: String, input: InputProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.inputName = inputName
            self.input = input
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{inputName}"] = String(describing: self.inputName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            if self.ifMatch != nil { headerParameters["If-Match"] = String(describing: self.ifMatch!) }
            self.body = input

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


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

// Operations is the stream Analytics Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Operations {
    public static func List() -> OperationsList {
        return ListCommand()
    }
}
}


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

extension Commands.Operations {
// List lists all of the available Stream Analytics related operations.
    internal class ListCommand : BaseCommand, OperationsList {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var apiVersion = "2016-03-01"

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

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

        }

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


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

// Outputs is the stream Analytics Client
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Outputs {
    public static func CreateOrReplace(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String, output: OutputProtocol) -> OutputsCreateOrReplace {
        return CreateOrReplaceCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, outputName: outputName, output: output)
    }
    public static func Delete(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String) -> OutputsDelete {
        return DeleteCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, outputName: outputName)
    }
    public static func Get(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String) -> OutputsGet {
        return GetCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, outputName: outputName)
    }
    public static func ListByStreamingJob(subscriptionId: String, resourceGroupName: String, jobName: String) -> OutputsListByStreamingJob {
        return ListByStreamingJobCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName)
    }
    public static func Test(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String) -> OutputsTest {
        return TestCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, outputName: outputName)
    }
    public static func Update(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String, output: OutputProtocol) -> OutputsUpdate {
        return UpdateCommand(subscriptionId: subscriptionId, resourceGroupName: resourceGroupName, jobName: jobName, outputName: outputName, output: output)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol OutputsCreateOrReplace  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var outputName : String { get set }
    var apiVersion : String { get set }
    var ifMatch : String? { get set }
    var ifNoneMatch : String? { get set }
    var output :  OutputProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (OutputProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Outputs {
// CreateOrReplace creates an output or replaces an already existing output under an existing streaming job.
    internal class CreateOrReplaceCommand : BaseCommand, OutputsCreateOrReplace {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var outputName : String
        public var apiVersion = "2016-03-01"
        public var ifMatch : String?
        public var ifNoneMatch : String?
    public var output :  OutputProtocol?

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String, output: OutputProtocol) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.outputName = outputName
            self.output = output
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{outputName}"] = String(describing: self.outputName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            if self.ifMatch != nil { headerParameters["If-Match"] = String(describing: self.ifMatch!) }
            if self.ifNoneMatch != nil { headerParameters["If-None-Match"] = String(describing: self.ifNoneMatch!) }
            self.body = output

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


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

extension Commands.Outputs {
// Delete deletes an output from the streaming job.
    internal class DeleteCommand : BaseCommand, OutputsDelete {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var outputName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.outputName = outputName
            super.init()
            self.method = "Delete"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{outputName}"] = String(describing: self.outputName)
            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 OutputsGet  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var jobName : String { get set }
    var outputName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (OutputProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.Outputs {
// Get gets details about the specified output.
    internal class GetCommand : BaseCommand, OutputsGet {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var outputName : String
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String, outputName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            self.outputName = outputName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}"
            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["{jobName}"] = String(describing: self.jobName)
            self.pathParameters["{outputName}"] = String(describing: self.outputName)
            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(OutputData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (OutputProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: OutputData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


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

extension Commands.Outputs {
// ListByStreamingJob lists all of the outputs under the specified streaming job.
    internal class ListByStreamingJobCommand : BaseCommand, OutputsListByStreamingJob {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var jobName : String
        public var select : String?
        public var apiVersion = "2016-03-01"

        public init(subscriptionId: String, resourceGroupName: String, jobName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.jobName = jobName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs"
            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["{jobName}"] = String(describing: self.jobName)
            if self.select != nil { queryParameters["$select"] = String(describing: self.select!) }
            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(OutputListResultData?.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 (OutputListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: OutputListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}