import Foundation
import azureSwiftRuntime
public protocol BlobsGet  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var snapshot : Date? { get set }
    var timeout : Int32? { get set }
    var range : String?  { get set }
    var leaseId : String?  { get set }
    var xMsRangeGetContentMd5 : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Data?, Error?) -> Void) -> Void ;
}

extension Commands.Blobs {
// Get the Get Blob operation reads or downloads a blob from the system, including its metadata and properties. You can
// also call Get Blob to read a snapshot.
internal class GetCommand : BaseCommand, BlobsGet {
    public var accountName : String
    public var container : String
    public var blob : String
    public var snapshot : Date?
    public var timeout : Int32?

    public var range : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-range"] = newValue!
            }else {
                headerParameters["x-ms-range"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-range" }) {
                return headerParameters["x-ms-range"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var xMsRangeGetContentMd5 : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-range-get-content-md5"] = newValue!
            }else {
                headerParameters["x-ms-range-get-content-md5"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-range-get-content-md5" }) {
                return headerParameters["x-ms-range-get-content-md5"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, blob: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.blob = blob
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Get"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.snapshot != nil { queryParameters["snapshot"] = String(describing: self.snapshot!) }
        if self.timeout != nil { queryParameters["timeout"] = String(describing: self.timeout!) }
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

    public override func returnFunc(data: Data) throws -> Decodable? {
        return DataWrapper(data: data);
    }

    public func execute(client: RuntimeClient,
        completionHandler: @escaping (Data?, Error?) -> Void) -> Void {
        client.executeAsync(command: self) {
            (result: DataWrapper?, error: Error?) in
            let data = result?.data as Data?
            completionHandler(data, error)
        }
    }
}}


import Foundation
import azureSwiftRuntime
public protocol BlobsGetMetadata  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var snapshot : Date? { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var leaseId : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// GetMetadata the Get Blob Metadata operation returns all user-defined metadata for the specified blob or snapshot
internal class GetMetadataCommand : BaseCommand, BlobsGetMetadata {
    public var accountName : String
    public var container : String
    public var blob : String
    public var snapshot : Date?
    public var timeout : Int32?
    public var comp : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Get"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.snapshot != nil { queryParameters["{snapshot}"] = String(describing: self.snapshot!) }
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


import Foundation
import azureSwiftRuntime

public struct BlobProperties {
    public let contentLength : Int
    public let xMsServerEncrypted : Bool
    public let eTag : String
    public let lastModified : Date
    public let contentType : String
    public let date : Date
}

extension BlobProperties: Decodable {
    enum CodingKeys: String, CodingKey {
        case contentLength = "Content-Length"
        case xMsServerEncrypted = "x-ms-server-encrypted"
        case eTag = "Etag"
        case lastModified = "Last-Modified"
        case contentType = "Content-Type"
        case date = "Date"
    }

    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        contentLength = try container.decode(Int.self, forKey: .contentLength)
        xMsServerEncrypted = try container.decode(Bool.self, forKey: .xMsServerEncrypted)
        eTag = try container.decode(String.self, forKey: .eTag)
        lastModified = try container.decode(Date.self, forKey: .lastModified)
        contentType = try container.decode(String.self, forKey: .contentType)
        date = try container.decode(Date.self, forKey: .date)
    }
}
public protocol BlobsGetProperties  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var snapshot : Date? { get set }
    var timeout : Int32? { get set }
    var leaseId : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute (client: StorageRuntimeClient, completionHandler: @escaping (BlobProperties?, Error?)->Void)
    func execute (client: StorageRuntimeClient) throws -> BlobProperties
}

extension Commands.Blobs {
// GetProperties the Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, and
// system properties for the blob. It does not return the content of the blob.
    internal class GetPropertiesCommand : BaseCommand, BlobsGetProperties {

    public var accountName : String
    public var container : String
    public var blob : String
    public var snapshot : Date?
    public var timeout : Int32?

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, blob: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.blob = blob
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Head"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.snapshot != nil { queryParameters["snapshot"] = String(describing: self.snapshot!) }
        if self.timeout != nil { queryParameters["timeout"] = String(describing: self.timeout!) }
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

    public func execute(client: StorageRuntimeClient, completionHandler: @escaping (BlobProperties?, Error?) -> Void) {
        client.executeAsyncHead(command: self) {
            (res, error) in
            completionHandler(res, error)
        }
    }

    public func execute(client: StorageRuntimeClient) throws -> BlobProperties {
        return try client.executeHead(command: self)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol BlobsLease  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var leaseId : String?  { get set }
    var action : String?  { get set }
    var breakPeriod : String?  { get set }
    var duration : String?  { get set }
    var proposedLeaseId : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// Lease the Lease Blob operation establishes and manages a lock on a blob for write and delete operations
internal class LeaseCommand : BaseCommand, BlobsLease {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?
    public var comp : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var action : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-action"] = newValue!
            }else {
                headerParameters["x-ms-lease-action"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-action" }) {
                return headerParameters["x-ms-lease-action"]
            }else {
                return nil
            }
        }
    }

    public var breakPeriod : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-break-period"] = newValue!
            }else {
                headerParameters["x-ms-lease-break-period"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-break-period" }) {
                return headerParameters["x-ms-lease-break-period"]
            }else {
                return nil
            }
        }
    }

    public var duration : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-duration"] = newValue!
            }else {
                headerParameters["x-ms-lease-duration"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-duration" }) {
                return headerParameters["x-ms-lease-duration"]
            }else {
                return nil
            }
        }
    }

    public var proposedLeaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-proposed-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-proposed-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-proposed-lease-id" }) {
                return headerParameters["x-ms-proposed-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


import Foundation
import azureSwiftRuntime

public protocol BlobsPut  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var cacheControl : String?  { get set }
    var xMsBlobContentType : String?  { get set }
    var xMsBlobContentEncoding : String?  { get set }
    var xMsBlobContentLanguage : String?  { get set }
    var xMsBlobContentMd5 : String?  { get set }
    var xMsBlobCacheControl : String?  { get set }
    var blobType : String?  { get set }
    var xMsMeta : String?  { get set }
    var leaseId : String?  { get set }
    var xMsBlobContentDisposition : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var xMsBlobContentLength : String?  { get set }
    var blobSequenceNumber : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    var optionalbody :  Data?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// Put the Put Blob operation creates a new block, page, or append blob, or updates the content of an existing block
// blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not
// supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To
// perform a partial update of the content of a block blob, use the Put Block List operation.
internal class PutCommand : BaseCommand, BlobsPut {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?

    public var cacheControl : String? {
        set {
            if newValue != nil {
                headerParameters["Cache-Control"] = newValue!
            }else {
                headerParameters["Cache-Control"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "Cache-Control" }) {
                return headerParameters["Cache-Control"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentType : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-type"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-type"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-type" }) {
                return headerParameters["x-ms-blob-content-type"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentEncoding : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-encoding"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-encoding"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-encoding" }) {
                return headerParameters["x-ms-blob-content-encoding"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentLanguage : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-language"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-language"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-language" }) {
                return headerParameters["x-ms-blob-content-language"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentMd5 : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-md5"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-md5"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-md5" }) {
                return headerParameters["x-ms-blob-content-md5"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobCacheControl : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-cache-control"] = newValue!
            }else {
                headerParameters["x-ms-blob-cache-control"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-cache-control" }) {
                return headerParameters["x-ms-blob-cache-control"]
            }else {
                return nil
            }
        }
    }

    public var blobType : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-type"] = newValue!
            }else {
                headerParameters["x-ms-blob-type"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-type" }) {
                return headerParameters["x-ms-blob-type"]
            }else {
                return nil
            }
        }
    }

    public var xMsMeta : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-meta"] = newValue!
            }else {
                headerParameters["x-ms-meta"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-meta" }) {
                return headerParameters["x-ms-meta"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentDisposition : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-disposition"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-disposition"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-disposition" }) {
                return headerParameters["x-ms-blob-content-disposition"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentLength : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-length"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-length"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-length" }) {
                return headerParameters["x-ms-blob-content-length"]
            }else {
                return nil
            }
        }
    }

    public var blobSequenceNumber : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-sequence-number"] = newValue!
            }else {
                headerParameters["x-ms-sequence-number"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-sequence-number" }) {
                return headerParameters["x-ms-sequence-number"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            } else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            } else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            } else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            } else {
                return nil
            }
        }
    }

    public var optionalbody :  Data?

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, blob: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.blob = blob
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["timeout"] = String(describing: self.timeout!) }
        self.body = optionalbody
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

    public override func encodeBody() throws -> Data? {
        return self.optionalbody
    }

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


import Foundation
import azureSwiftRuntime
public protocol BlobsSetMetadata  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var xMsMeta : String?  { get set }
    var leaseId : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// SetMetadata the Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more
// name-value pairs
internal class SetMetadataCommand : BaseCommand, BlobsSetMetadata {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?
    public var comp : String

    public var xMsMeta : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-meta"] = newValue!
            }else {
                headerParameters["x-ms-meta"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-meta" }) {
                return headerParameters["x-ms-meta"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


import Foundation
import azureSwiftRuntime
public protocol BlobsSetProperties  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var xMsBlobCacheControl : String?  { get set }
    var xMsBlobContentType : String?  { get set }
    var xMsBlobContentMd5 : String?  { get set }
    var xMsBlobContentEncoding : String?  { get set }
    var xMsBlobContentLanguage : String?  { get set }
    var leaseId : String?  { get set }
    var xMsBlobContentDisposition : String?  { get set }
    var xMsBlobContentLength : String?  { get set }
    var sequenceNumberAction : String?  { get set }
    var blobSequenceNumber : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// SetProperties the Set Blob Properties operation sets system properties on the blob
internal class SetPropertiesCommand : BaseCommand, BlobsSetProperties {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?
    public var comp : String

    public var xMsBlobCacheControl : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-cache-control"] = newValue!
            }else {
                headerParameters["x-ms-blob-cache-control"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-cache-control" }) {
                return headerParameters["x-ms-blob-cache-control"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentType : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-type"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-type"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-type" }) {
                return headerParameters["x-ms-blob-content-type"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentMd5 : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-md5"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-md5"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-md5" }) {
                return headerParameters["x-ms-blob-content-md5"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentEncoding : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-encoding"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-encoding"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-encoding" }) {
                return headerParameters["x-ms-blob-content-encoding"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentLanguage : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-language"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-language"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-language" }) {
                return headerParameters["x-ms-blob-content-language"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentDisposition : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-disposition"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-disposition"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-disposition" }) {
                return headerParameters["x-ms-blob-content-disposition"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentLength : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-length"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-length"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-length" }) {
                return headerParameters["x-ms-blob-content-length"]
            }else {
                return nil
            }
        }
    }

    public var sequenceNumberAction : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-sequence-number-action"] = newValue!
            }else {
                headerParameters["x-ms-sequence-number-action"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-sequence-number-action" }) {
                return headerParameters["x-ms-sequence-number-action"]
            }else {
                return nil
            }
        }
    }

    public var blobSequenceNumber : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-sequence-number"] = newValue!
            }else {
                headerParameters["x-ms-sequence-number"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-sequence-number" }) {
                return headerParameters["x-ms-sequence-number"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


import Foundation
import azureSwiftRuntime
public protocol BlobsTakeSnapshot  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var xMsMeta : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var leaseId : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Blobs {
// TakeSnapshot the Snapshot Blob operation creates a read-only snapshot of a blob
internal class TakeSnapshotCommand : BaseCommand, BlobsTakeSnapshot {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?
    public var comp : String

    public var xMsMeta : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-meta"] = newValue!
            }else {
                headerParameters["x-ms-meta"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-meta" }) {
                return headerParameters["x-ms-meta"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// BlockBlobs is the client for the BlockBlobs methods of the AzureBlobStorage service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct BlockBlobs {
    public static func GetBlockList(accountName: String, container: String, blob: String, comp: String) -> BlockBlobsGetBlockList {
        return GetBlockListCommand(accountName: accountName, container: container, blob: blob, comp: comp)
    }
    public static func PutBlock(accountName: String, container: String, blob: String, blockId: String, comp: String, _body: Data) -> BlockBlobsPutBlock {
        return PutBlockCommand(accountName: accountName, container: container, blob: blob, blockId: blockId, comp: comp, _body: _body)
    }
    public static func PutBlockList(accountName: String, container: String, blob: String, comp: String, blocks: [String]) -> BlockBlobsPutBlockList {
        return PutBlockListCommand(accountName: accountName, container: container, blob: blob, comp: comp, blocks: blocks)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol BlockBlobsGetBlockList  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var snapshot : Date? { get set }
    var listType : BlockListType? { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var leaseId : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (BlockListProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.BlockBlobs {
// GetBlockList the Get Block List operation retrieves the list of blocks that have been uploaded as part of a block
// blob
internal class GetBlockListCommand : BaseCommand, BlockBlobsGetBlockList {
    public var accountName : String
    public var container : String
    public var blob : String
    public var snapshot : Date?
    public var listType : BlockListType?
    public var timeout : Int32?
    public var comp : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    public init(accountName: String, container: String, blob: String, comp: String) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Get"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.snapshot != nil { queryParameters["{snapshot}"] = String(describing: self.snapshot!) }
        if self.listType != nil { queryParameters["{blocklisttype}"] = String(describing: self.listType!) }
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
}

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


import Foundation
import azureSwiftRuntime
public protocol BlockBlobsPutBlock  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var blockId : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var leaseId : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    var _body :  Data?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.BlockBlobs {
// PutBlock the Put Block operation creates a new block to be committed as part of a blob
internal class PutBlockCommand : BaseCommand, BlockBlobsPutBlock {
    public var accountName : String
    public var container : String
    public var blob : String
    public var blockId : String
    public var timeout : Int32?
    public var comp : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }
    public var _body :  Data?

    public init(accountName: String, container: String, blob: String, blockId: String, comp: String, _body: Data) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.blockId = blockId
        self.comp = comp
        self._body = _body
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        self.queryParameters["{blockid}"] = String(describing: self.blockId)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
    self.body = _body
}

    public override func encodeBody() throws -> Data? {
        return self._body
    }

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


import Foundation
import azureSwiftRuntime
public protocol BlockBlobsPutBlockList  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var blob : String { get set }
    var timeout : Int32? { get set }
    var comp : String { get set }
    var xMsBlobCacheControl : String?  { get set }
    var xMsBlobContentType : String?  { get set }
    var xMsBlobContentEncoding : String?  { get set }
    var xMsBlobContentLanguage : String?  { get set }
    var xMsBlobContentMd5 : String?  { get set }
    var xMsMeta : String?  { get set }
    var leaseId : String?  { get set }
    var xMsBlobContentDisposition : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    var blocks :  [String]?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.BlockBlobs {
// PutBlockList the Put Block List operation writes a blob by specifying the list of block IDs that make up the blob.
// In order to be written as part of a blob, a block must have been successfully written to the server in a prior Put
// Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then
// committing the new and existing blocks together. You can do this by specifying whether to commit a block from the
// committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the
// block, whichever list it may belong to.
internal class PutBlockListCommand : BaseCommand, BlockBlobsPutBlockList {
    public var accountName : String
    public var container : String
    public var blob : String
    public var timeout : Int32?
    public var comp : String

    public var xMsBlobCacheControl : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-cache-control"] = newValue!
            }else {
                headerParameters["x-ms-blob-cache-control"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-cache-control" }) {
                return headerParameters["x-ms-blob-cache-control"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentType : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-type"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-type"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-type" }) {
                return headerParameters["x-ms-blob-content-type"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentEncoding : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-encoding"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-encoding"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-encoding" }) {
                return headerParameters["x-ms-blob-content-encoding"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentLanguage : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-language"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-language"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-language" }) {
                return headerParameters["x-ms-blob-content-language"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentMd5 : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-md5"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-md5"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-md5" }) {
                return headerParameters["x-ms-blob-content-md5"]
            }else {
                return nil
            }
        }
    }

    public var xMsMeta : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-meta"] = newValue!
            }else {
                headerParameters["x-ms-meta"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-meta" }) {
                return headerParameters["x-ms-meta"]
            }else {
                return nil
            }
        }
    }

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var xMsBlobContentDisposition : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-content-disposition"] = newValue!
            }else {
                headerParameters["x-ms-blob-content-disposition"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-content-disposition" }) {
                return headerParameters["x-ms-blob-content-disposition"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }
    public var blocks :  [String]?

    public init(accountName: String, container: String, blob: String, comp: String, blocks: [String]) {
        self.accountName = accountName
        self.container = container
        self.blob = blob
        self.comp = comp
        self.blocks = blocks
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}/{blob}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        self.pathParameters["{blob}"] = String(describing: self.blob)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["{comp}"] = String(describing: self.comp)
    self.body = blocks
}

    public override func encodeBody() throws -> Data? {
        let contentType = "application/xml"
        if let mimeType = MimeType.getType(forStr: contentType) {
            let encoder = try CoderFactory.encoder(for: mimeType)
            let encodedValue = try encoder.encode(blocks)
            return encodedValue
        }
        throw DecodeError.unknownMimeType
    }

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


// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// Container is the client for the Container methods of the AzureBlobStorage service.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct Container {
    public static func Create(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container") -> ContainerCreate {
        return CreateCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype)
    }
    public static func Delete(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container") -> ContainerDelete {
        return DeleteCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype)
    }
    public static func GetAcl(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container", comp: String = "acl") -> ContainerGetAcl {
        return GetAclCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype, comp: comp)
    }
    public static func GetMetadata(accountName: String, containerName: String, restype: String = "container", comp: String = "metadata") -> ContainerGetMetadata {
        return GetMetadataCommand(accountName: accountName, container: containerName, restype: restype, comp: comp)
    }
    public static func GetProperties(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container") -> ContainerGetProperties {
        return GetPropertiesCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype)
    }
    public static func Lease(accountName: String, containerName: String, comp: String = "lease", restype: String = "container") -> ContainerLease {
        return LeaseCommand(accountName: accountName, container: containerName, comp: comp, restype: restype)
    }
    public static func ListBlobs(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container", comp: String = "list") -> ContainerListBlobs {
        return ListBlobsCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype, comp: comp)
    }
    public static func SetAcl(azureStorageKey: String, accountName: String, containerName: String, restype: String = "container", comp: String = "acl") -> ContainerSetAcl {
        return SetAclCommand(azureStorageKey: azureStorageKey, accountName: accountName, container: containerName, restype: restype, comp: comp)
    }
    public static func SetMetadata(accountName: String, containerName: String, restype: String = "container", comp: String = "metadata") -> ContainerSetMetadata {
        return SetMetadataCommand(accountName: accountName, container: containerName, restype: restype, comp: comp)
    }
}
}


import Foundation
import azureSwiftRuntime
public protocol ContainerCreate  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var timeout : Int32? { get set }
    var restype : String { get set }
    var xMsMeta : String?  { get set }
    var access : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Container {
// Create creates a new container under the specified account. If the container with the same name already exists, the
// operation fails
internal class CreateCommand : BaseCommand, ContainerCreate {
    public var accountName : String
    public var container : String
    public var timeout : Int32?
    public var restype : String

    public var xMsMeta : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-meta"] = newValue!
            }else {
                headerParameters["x-ms-meta"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-meta" }) {
                return headerParameters["x-ms-meta"]
            }else {
                return nil
            }
        }
    }

    public var access : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-blob-public-access"] = newValue!
            }else {
                headerParameters["x-ms-blob-public-access"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-blob-public-access" }) {
                return headerParameters["x-ms-blob-public-access"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, restype: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.restype = restype
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Put"
        self.isLongRunningOperation = false
        self.path = "/{container}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["restype"] = String(describing: self.restype)
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

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


import Foundation
import azureSwiftRuntime
public protocol ContainerDelete  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var timeout : Int32? { get set }
    var restype : String { get set }
    var leaseId : String?  { get set }
    var ifModifiedSince : String?  { get set }
    var ifUnmodifiedSince : String?  { get set }
    var ifMatches : String?  { get set }
    var ifNoneMatch : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping (Error?) -> Void) -> Void;
}

extension Commands.Container {
// Delete operation marks the specified container for deletion. The container and any blobs contained within it are
// later deleted during garbage collection
internal class DeleteCommand : BaseCommand, ContainerDelete {
    public var accountName : String
    public var container : String
    public var timeout : Int32?
    public var restype : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var ifModifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Modified-Since"] = newValue!
            }else {
                headerParameters["If-Modified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Modified-Since" }) {
                return headerParameters["If-Modified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifUnmodifiedSince : String? {
        set {
            if newValue != nil {
                headerParameters["If-Unmodified-Since"] = newValue!
            }else {
                headerParameters["If-Unmodified-Since"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Unmodified-Since" }) {
                return headerParameters["If-Unmodified-Since"]
            }else {
                return nil
            }
        }
    }

    public var ifMatches : String? {
        set {
            if newValue != nil {
                headerParameters["If-Match"] = newValue!
            }else {
                headerParameters["If-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-Match" }) {
                return headerParameters["If-Match"]
            }else {
                return nil
            }
        }
    }

    public var ifNoneMatch : String? {
        set {
            if newValue != nil {
                headerParameters["If-None-Match"] = newValue!
            }else {
                headerParameters["If-None-Match"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "If-None-Match" }) {
                return headerParameters["If-None-Match"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, restype: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.restype = restype
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Delete"
        self.isLongRunningOperation = false
        self.path = "/{container}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall()  {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["restype"] = String(describing: self.restype)
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

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


import Foundation
import azureSwiftRuntime

public protocol ContainerGetAcl  {
    var headerParameters: [String: String] { get set }
    var accountName : String { get set }
    var container : String { get set }
    var timeout : Int32? { get set }
    var restype : String { get set }
    var comp : String { get set }
    var leaseId : String?  { get set }
    var version : String?  { get set }
    var requestId : String?  { get set }
    func execute(client: RuntimeClient,
        completionHandler: @escaping ([SignedIdentifierProtocol?]?, Error?) -> Void) -> Void ;
}

extension Commands.Container {
// GetAcl sends the get acl request.
internal class GetAclCommand : BaseCommand, ContainerGetAcl {
    public var accountName : String
    public var container : String
    public var timeout : Int32?
    public var restype : String
    public var comp : String

    public var leaseId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-lease-id"] = newValue!
            }else {
                headerParameters["x-ms-lease-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-lease-id" }) {
                return headerParameters["x-ms-lease-id"]
            }else {
                return nil
            }
        }
    }

    public var version : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-version"] = newValue!
            }else {
                headerParameters["x-ms-version"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-version" }) {
                return headerParameters["x-ms-version"]
            }else {
                return nil
            }
        }
    }

    public var requestId : String? {
        set {
            if newValue != nil {
                headerParameters["x-ms-client-request-id"] = newValue!
            }else {
                headerParameters["x-ms-client-request-id"] = nil
            }
        }
        get {
            if headerParameters.contains(where: { $0.key == "x-ms-client-request-id" }) {
                return headerParameters["x-ms-client-request-id"]
            }else {
                return nil
            }
        }
    }

    let azureStorageKey: String

    public init(azureStorageKey: String, accountName: String, container: String, restype: String, comp: String) {
        self.azureStorageKey = azureStorageKey
        self.accountName = accountName
        self.container = container
        self.restype = restype
        self.comp = comp
        super.init()
        self.baseUrl = "https://{accountName}.blob.core.windows.net"
        self.method = "Get"
        self.isLongRunningOperation = false
        self.path = "/{container}"
        self.headerParameters = ["Content-Type":"application/xml; charset=utf-8"]
    }

    public override func preCall() {
        self.pathParameters["{accountName}"] = String(describing: self.accountName)
        self.pathParameters["{container}"] = String(describing: self.container)
        if self.timeout != nil { queryParameters["{timeout}"] = String(describing: self.timeout!) }
        self.queryParameters["restype"] = String(describing: self.restype)
        self.queryParameters["comp"] = String(describing: self.comp)
        self.signRequest(azureStorageKey: self.azureStorageKey, storageAccountName: self.accountName)
    }

    public override func returnFunc(data: Data) throws -> Decodable? {
        let decoder = XMLDecoder().withDateFormatString(DateFormat.iso8601DateTimeMs.rawValue)
        do {
            let res = try decoder.decode([SignedIdentifierData?]?.self, from: data)
            return res

        } catch {
            print("=== returnFunc error:", error)
        }

        return nil
    }

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