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

// Number is the test Infrastructure for AutoRest
import Foundation
import azureSwiftRuntime
struct NumberNamespace {
    // GetBigDecimal get big decimal value 2.5976931e+101
    public class GetBigDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/2.5976931e+101"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Decimal?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Decimal? {
            return try client.execute(command: self) as! Decimal?
        }
    }

    // GetBigDecimalNegativeDecimal get big decimal value -99999999.99
    public class GetBigDecimalNegativeDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/-99999999.99"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Decimal?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Decimal? {
            return try client.execute(command: self) as! Decimal?
        }
    }

    // GetBigDecimalPositiveDecimal get big decimal value 99999999.99
    public class GetBigDecimalPositiveDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/99999999.99"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try AzureJSONDecoder().decode(Decimal?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Decimal? {
            return try client.execute(command: self) as! Decimal?
        }
    }

    // GetBigDouble get big double value 2.5976931e+101
    public class GetBigDoubleCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/2.5976931e+101"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetBigDoubleNegativeDecimal get big double value -99999999.99
    public class GetBigDoubleNegativeDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/-99999999.99"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }
        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetBigDoublePositiveDecimal get big double value 99999999.99
    public class GetBigDoublePositiveDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/99999999.99"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetBigFloat get big float value 3.402823e+20
    public class GetBigFloatCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/big/float/3.402823e+20"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetInvalidDouble get invalid double Number value
    public class GetInvalidDoubleCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/invaliddouble"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetInvalidFloat get invalid float Number value
    public class GetInvalidFloatCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/invalidfloat"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetNull get null Number value
    public class GetNullCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/null"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }
        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetSmallDecimal get small decimal value 2.5976931e-101
    public class GetSmallDecimalCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/small/decimal/2.5976931e-101"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(Decimal?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Decimal? {
            return try client.execute(command: self) as! Decimal?
        }
    }

    // GetSmallDouble get big double value 2.5976931e-101
    public class GetSmallDoubleCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/small/double/2.5976931e-101"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Double?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Double? {
            return try client.execute(command: self) as! Double?
        }
    }

    // GetSmallFloat get big double value 3.402823e-20
    public class GetSmallFloatCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/number/small/float/3.402823e-20"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try  CoderFactory.decoder(for: .json).decode(Float?.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> Float? {
            return try client.execute(command: self) as! Float?
        }
    }

    // PutBigDecimal put big decimal value 2.5976931e+101
    public class PutBigDecimalCommand : BaseCommand {
        public var numberBody :  Decimal?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/2.5976931e+101"
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigDecimalNegativeDecimal put big decimal value -99999999.99
    public class PutBigDecimalNegativeDecimalCommand : BaseCommand {
        public var numberBody :  Decimal?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/-99999999.99"
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigDecimalPositiveDecimal put big decimal value 99999999.99
    public class PutBigDecimalPositiveDecimalCommand : BaseCommand {
        public var numberBody :  Decimal?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/decimal/99999999.99"
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigDouble put big double value 2.5976931e+101
    public class PutBigDoubleCommand : BaseCommand {
        public var numberBody :  Double?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/2.5976931e+101"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigDoubleNegativeDecimal put big double value -99999999.99
    public class PutBigDoubleNegativeDecimalCommand : BaseCommand {
        public var numberBody :  Double?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/-99999999.99"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigDoublePositiveDecimal put big double value 99999999.99
    public class PutBigDoublePositiveDecimalCommand : BaseCommand {
        public var numberBody :  Double?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/double/99999999.99"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutBigFloat put big float value 3.402823e+20
    public class PutBigFloatCommand : BaseCommand {
        public var numberBody :  Double?

         public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/big/float/3.402823e+20"
            self.headerParameters = ["Content-Type":"application/json"]
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutSmallDecimal put small decimal value 2.5976931e-101
    public class PutSmallDecimalCommand : BaseCommand {
        public var numberBody :  Decimal?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/small/decimal/2.5976931e-101"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutSmallDouble put small double value 2.5976931e-101
    public class PutSmallDoubleCommand : BaseCommand {
        public var numberBody :  Double?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/small/double/2.5976931e-101"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutSmallFloat put small float value 3.402823e-20
    public class PutSmallFloatCommand : BaseCommand {
        public var numberBody :  Double?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/number/small/float/3.402823e-20"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = numberBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(numberBody)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }
}


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

// Enum is the test Infrastructure for AutoRest Swagger BAT
import Foundation
import azureSwiftRuntime

struct EnumNamespace {
    // GetNotExpandable get enum value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'.
    public class GetNotExpandableCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/string/enum/notExpandable"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            let val = try CoderFactory.decoder(for: .json).decode(String.self, from: data)
            return Colors(rawValue: val)
        }

        public func execute(client: RuntimeClient) throws -> Colors? {
            return try client.execute(command: self) as! Colors?
        }
    }

    // GetReferenced get enum value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'.
    public class GetReferencedCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/string/enum/Referenced"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            let val = try CoderFactory.decoder(for: .json).decode(String.self, from: data)
            return  Colors(rawValue: val)
        }

        public func execute(client: RuntimeClient) throws -> Colors? {
            return try client.execute(command: self) as! Colors?
        }
    }

    // GetReferencedConstant get value 'green-color' from the constant.
    public class GetReferencedConstantCommand : BaseCommand {

        public override init() {
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/string/enum/ReferencedConstant"
        }

        public override func preCall()  {
        }

        override func returnFunc(data: Data) throws -> Decodable? {
            return try CoderFactory.decoder(for: .json).decode(RefColorConstantData.self, from: data)
        }

        public func execute(client: RuntimeClient) throws -> RefColorConstantProtocol? {
            return try client.execute(command: self) as! RefColorConstantProtocol?
        }
    }

    // PutNotExpandable sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'
    public class PutNotExpandableCommand : BaseCommand {
        public var stringBody :  Colors?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/string/enum/notExpandable"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = stringBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(stringBody?.rawValue)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutReferenced sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'
    public class PutReferencedCommand : BaseCommand {
        public var enumStringBody :  Colors?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/string/enum/Referenced"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = enumStringBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(enumStringBody?.rawValue)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }

    // PutReferencedConstant sends value 'green-color' from a constant
    public class PutReferencedConstantCommand : BaseCommand {
        public var enumStringBody :  RefColorConstantProtocol?

        public override init() {
            super.init()
            self.method = "Put"
            self.isLongRunningOperation = false
            self.path = "/string/enum/ReferencedConstant"
            self.headerParameters = ["Content-Type":"application/json"]
        }

        public override func preCall()  {
            self.body = enumStringBody
        }

        public override func encodeBody() throws -> Data? {
            return try CoderFactory.encoder(for: .json).encode(enumStringBody as? RefColorConstantData)
        }

        public func execute(client: RuntimeClient) throws -> Decodable? {
            return try client.execute(command: self)
        }
    }
}


// Colors enumerates the values for colors.

public enum Colors: String, Codable
{
// BlueColor specifies the blue color state for colors.
    case BlueColor = "blue_color"
// GreenColor specifies the green color state for colors.
    case GreenColor = "green-color"
// Redcolor specifies the redcolor state for colors.
    case Redcolor = "red color"
}


import Foundation
public struct RefColorConstantData : RefColorConstantProtocol {
    public var colorConstant: String?
    public var field1: String?

    enum CodingKeys: String, CodingKey {
        case colorConstant = "ColorConstant"
        case field1 = "field1"
    }

  public init() {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
    if container.contains(.colorConstant) {
        colorConstant = try container.decode(String?.self, forKey: .colorConstant)
    }
    if container.contains(.field1) {
        field1 = try container.decode(String?.self, forKey: .field1)
    }
  }

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


import Foundation
// RefColorConstantProtocol is
public protocol RefColorConstantProtocol : Codable {
     var colorConstant: String? { get set }
     var field1: String? { get set }
}


import Foundation
import azureSwiftRuntime
// Delete202Retry200 long running delete request, service returns a 500, then a 202 to the initial request. Polls
// return this value until the last poll returns a â€˜200â€™ with ProvisioningState=â€™Succeededâ€™ This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LRORetrysDelete202Retry200Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/delete/202/retry/200"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRelativeRetrySucceeded long running delete request, service returns a 500, then a 202 to the initial
// request. Poll the endpoint indicated in the azureAsyncOperation header for operation status This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LRORetrysDeleteAsyncRelativeRetrySucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/deleteasync/retry/succeeded"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteProvisioning202Accepted200Succeeded long running delete request, service returns a 500, then a  202 to the
// initial request, with an entity that contains ProvisioningState=â€™Acceptedâ€™.  Polls return this value until the last
// poll returns a â€˜200â€™ with ProvisioningState=â€™Succeededâ€™ This method may poll for completion. Polling can be canceled
// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
class LRORetrysDeleteProvisioning202Accepted200SucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/delete/provisioning/202/accepted/200/succeeded"
    }

    override func preCall()  {
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// Post202Retry200 long running post request, service returns a 500, then a 202 to the initial request, with 'Location'
// and 'retryAfter' headers, Polls return a 200 with a response body after success This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LRORetrysPost202Retry200Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/post/202/retry/200"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRelativeRetrySucceeded long running post request, service returns a 500, then a 202 to the initial request,
// with an entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation
// header for operation status This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LRORetrysPostAsyncRelativeRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/postasync/retry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// Put201CreatingSucceeded200 long running put request, service returns a 500, then a 201 to the initial request, with
// an entity that contains ProvisioningState=â€™Creatingâ€™.  Polls return this value until the last poll returns a â€˜200â€™
// with ProvisioningState=â€™Succeededâ€™ This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LRORetrysPut201CreatingSucceeded200Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/put/201/creating/succeeded/200"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetrySucceeded long running put request, service returns a 500, then a 200 to the initial request,
// with an entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation
// header for operation status This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LRORetrysPutAsyncRelativeRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/retryerror/putasync/retry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// Delete202NonRetry400 long running delete request, service returns a 202 with a location header This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsDelete202NonRetry400Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/delete/202/retry/400"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Delete202RetryInvalidHeader long running delete request, service returns a 202 to the initial request receing a
// reponse with an invalid 'Location' and 'retryAfter' headers This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
class LROSADsDelete202RetryInvalidHeaderCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/error/delete/202/retry/invalidheader"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Delete204Succeeded long running delete request, service returns a 204 to the initial request, indicating success.
// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
class LROSADsDelete204SucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/error/delete/204/nolocation"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRelativeRetry400 long running delete request, service returns a 202 to the initial request. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROSADsDeleteAsyncRelativeRetry400Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/deleteasync/retry/400"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRelativeRetryInvalidHeader long running delete request, service returns a 202 to the initial request. The
// endpoint indicated in the azureAsyncOperation header is invalid This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
class LROSADsDeleteAsyncRelativeRetryInvalidHeaderCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/error/deleteasync/retry/invalidheader"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRelativeRetryInvalidJsonPolling long running delete request, service returns a 202 to the initial
// request. Poll the endpoint indicated in the azureAsyncOperation header for operation status This method may poll
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsDeleteAsyncRelativeRetryInvalidJsonPollingCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/error/deleteasync/retry/invalidjsonpolling"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRelativeRetryNoStatus long running delete request, service returns a 202 to the initial request. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROSADsDeleteAsyncRelativeRetryNoStatusCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/error/deleteasync/retry/nostatus"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteNonRetry400 long running delete request, service returns a 400 with an error body This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsDeleteNonRetry400Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/delete/400"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Post202NoLocation long running post request, service returns a 202 to the initial request, without a location
// header. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPost202NoLocationCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/error/post/202/nolocation"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Post202NonRetry400 long running post request, service returns a 202 with a location header This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsPost202NonRetry400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/post/202/retry/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Post202RetryInvalidHeader long running post request, service returns a 202 to the initial request, with invalid
// 'Location' and 'retryAfter' headers. This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPost202RetryInvalidHeaderCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/error/post/202/retry/invalidheader"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRelativeRetry400 long running post request, service returns a 202 to the initial request Poll the endpoint
// indicated in the azureAsyncOperation header for operation status This method may poll for completion. Polling can
// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding
// HTTP requests.
class LROSADsPostAsyncRelativeRetry400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/postasync/retry/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRelativeRetryInvalidHeader long running post request, service returns a 202 to the initial request, with an
// entity that contains ProvisioningState=â€™Creatingâ€™. The endpoint indicated in the azureAsyncOperation header is
// invalid. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPostAsyncRelativeRetryInvalidHeaderCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/error/postasync/retry/invalidheader"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?);
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRelativeRetryInvalidJsonPolling long running post request, service returns a 202 to the initial request,
// with an entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation
// header for operation status This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPostAsyncRelativeRetryInvalidJsonPollingCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/error/postasync/retry/invalidjsonpolling"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?);
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRelativeRetryNoPayload long running post request, service returns a 202 to the initial request, with an
// entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header
// for operation status This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPostAsyncRelativeRetryNoPayloadCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/error/postasync/retry/nopayload"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostNonRetry400 long running post request, service returns a 400 with no error body This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsPostNonRetry400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/post/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// Put200InvalidJson long running put request, service returns a 200 to the initial request, with an entity that is not
// a valid json This method may poll for completion. Polling can be canceled by passing the cancel channel argument.
// The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPut200InvalidJsonCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/put/200/invalidjson"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetry400 long running put request, service returns a 200 with ProvisioningState=â€™Creatingâ€™. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROSADsPutAsyncRelativeRetry400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/putasync/retry/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetryInvalidHeader long running put request, service returns a 200 to the initial request, with an
// entity that contains ProvisioningState=â€™Creatingâ€™. The endpoint indicated in the azureAsyncOperation header is
// invalid. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutAsyncRelativeRetryInvalidHeaderCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/putasync/retry/invalidheader"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetryInvalidJsonPolling long running put request, service returns a 200 to the initial request, with
// an entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header
// for operation status This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutAsyncRelativeRetryInvalidJsonPollingCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/putasync/retry/invalidjsonpolling"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetryNoStatus long running put request, service returns a 200 to the initial request, with an entity
// that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for
// operation status This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutAsyncRelativeRetryNoStatusCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/putasync/retry/nostatus"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRelativeRetryNoStatusPayload long running put request, service returns a 200 to the initial request, with an
// entity that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header
// for operation status This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutAsyncRelativeRetryNoStatusPayloadCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/putasync/retry/nostatuspayload"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutError201NoProvisioningStatePayload long running put request, service returns a 201 to the initial request with no
// payload This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutError201NoProvisioningStatePayloadCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/error/put/201/noprovisioningstatepayload"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }
    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutNonRetry201Creating400 long running put request, service returns a Product with 'ProvisioningState' = 'Creating'
// and 201 response code This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutNonRetry201Creating400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/put/201/creating/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutNonRetry201Creating400InvalidJson long running put request, service returns a Product with 'ProvisioningState' =
// 'Creating' and 201 response code This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROSADsPutNonRetry201Creating400InvalidJsonCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/put/201/creating/400/invalidjson"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutNonRetry400 long running put request, service returns a 400 to the initial request This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
class LROSADsPutNonRetry400Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/nonretryerror/put/400"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }
    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// Post202Retry200 x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all
// requests. Long running post request, service returns a 202 to the initial request, with 'Location' and 'retryAfter'
// headers, Polls return a 200 with a response body after success This method may poll for completion. Polling can be
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
class LROsCustomHeaderPost202Retry200Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/customheader/post/202/retry/200"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRetrySucceeded x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for
// all requests. Long running post request, service returns a 202 to the initial request, with an entity that contains
// ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for operation status
// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
class LROsCustomHeaderPostAsyncRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/customheader/postasync/retry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try AzureJSONDecoder().decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// Put201CreatingSucceeded200 x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header
// for all requests. Long running put request, service returns a 201 to the initial request, with an entity that
// contains ProvisioningState=â€™Creatingâ€™.  Polls return this value until the last poll returns a â€˜200â€™ with
// ProvisioningState=â€™Succeededâ€™ This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsCustomHeaderPut201CreatingSucceeded200Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/customheader/put/201/creating/succeeded/200"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PutAsyncRetrySucceeded x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for
// all requests. Long running put request, service returns a 200 to the initial request, with an entity that contains
// ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for operation status
// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel
// will be used to cancel polling and any outstanding HTTP requests.
class LROsCustomHeaderPutAsyncRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Put"
        self.isLongRunningOperation = true
        self.path = "/lro/customheader/putasync/retry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// Delete202NoRetry204 long running delete request, service returns a 202 to the initial request. Polls return this
// value until the last poll returns a â€˜200â€™ with ProvisioningState=â€™Succeededâ€™ This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDelete202NoRetry204Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/202/noretry/204"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// Delete202Retry200 long running delete request, service returns a 202 to the initial request. Polls return this value
// until the last poll returns a â€˜200â€™ with ProvisioningState=â€™Succeededâ€™ This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDelete202Retry200Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/202/retry/200"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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


import Foundation
import azureSwiftRuntime
// Delete204Succeeded long running delete succeeds and returns right away This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDelete204SucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/204/succeeded"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncNoHeaderInRetry long running delete request, service returns an azureAsyncOperation header in the
// initial request. Subsequent calls to operation status do not contain azureAsyncOperation header. This method may
// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
// cancel polling and any outstanding HTTP requests.
class LROsDeleteAsyncNoHeaderInRetryCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/deleteasync/noheader/202/204"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncNoRetrySucceeded long running delete request, service returns a 202 to the initial request. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDeleteAsyncNoRetrySucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/deleteasync/noretry/succeeded"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRetrycanceled long running delete request, service returns a 202 to the initial request. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDeleteAsyncRetrycanceledCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/deleteasync/retry/canceled"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRetryFailed long running delete request, service returns a 202 to the initial request. Poll the endpoint
// indicated in the azureAsyncOperation header for operation status This method may poll for completion. Polling can
// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding
// HTTP requests.
class LROsDeleteAsyncRetryFailedCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/deleteasync/retry/failed"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteAsyncRetrySucceeded long running delete request, service returns a 202 to the initial request. Poll the
// endpoint indicated in the azureAsyncOperation header for operation status This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDeleteAsyncRetrySucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/deleteasync/retry/succeeded"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteNoHeaderInRetry long running delete request, service returns a location header in the initial request.
// Subsequent calls to operation status do not contain location header. This method may poll for completion. Polling
// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsDeleteNoHeaderInRetryCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/noheader"
    }

    override func preCall()  {
}

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteProvisioning202Accepted200Succeeded long running delete request, service returns a 202 to the initial request,
// with an entity that contains ProvisioningState=â€™Acceptedâ€™.  Polls return this value until the last poll returns a
// â€˜200â€™ with ProvisioningState=â€™Succeededâ€™ This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsDeleteProvisioning202Accepted200SucceededCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/provisioning/202/accepted/200/succeeded"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteProvisioning202Deletingcanceled200 long running delete request, service returns a 202 to the initial request,
// with an entity that contains ProvisioningState=â€™Creatingâ€™.  Polls return this value until the last poll returns a
// â€˜200â€™ with ProvisioningState=â€™Canceledâ€™ This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsDeleteProvisioning202Deletingcanceled200Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/provisioning/202/deleting/200/canceled"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// DeleteProvisioning202DeletingFailed200 long running delete request, service returns a 202 to the initial request,
// with an entity that contains ProvisioningState=â€™Creatingâ€™.  Polls return this value until the last poll returns a
// â€˜200â€™ with ProvisioningState=â€™Failedâ€™ This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsDeleteProvisioning202DeletingFailed200Command : BaseCommand {

    override init() {
        super.init()
        self.method = "Delete"
        self.isLongRunningOperation = true
        self.path = "/lro/delete/provisioning/202/deleting/200/failed"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// Post200WithPayload long running post request, service returns a 202 to the initial request, with 'Location' header.
// Poll returns a 200 with a response body after success. This method may poll for completion. Polling can be canceled
// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
// requests.
class LROsPost200WithPayloadCommand : BaseCommand {

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/post/payload/200"
    }

    override func preCall()  {
    }

    public func execute(client: RuntimeClient) throws -> SkuTypeProtocol? {
        return try client.execute(command: self) as! SkuTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(SkuType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// Post202NoRetry204 long running post request, service returns a 202 to the initial request, with 'Location' header,
// 204 with noresponse body after success This method may poll for completion. Polling can be canceled by passing the
// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsPost202NoRetry204Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/post/202/noretry/204"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try  AzureJSONEncoder().encode(product as! ProductType?)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

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

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


import Foundation
import azureSwiftRuntime
// Post202Retry200 long running post request, service returns a 202 to the initial request, with 'Location' and
// 'retryAfter' headers, Polls return a 200 with a response body after success This method may poll for completion.
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
// outstanding HTTP requests.
class LROsPost202Retry200Command : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/post/202/retry/200"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try  AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncNoRetrySucceeded long running post request, service returns a 202 to the initial request, with an entity
// that contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for
// operation status This method may poll for completion. Polling can be canceled by passing the cancel channel
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
class LROsPostAsyncNoRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/postasync/noretry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try  AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRetrycanceled long running post request, service returns a 202 to the initial request, with an entity that
// contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for operation
// status This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROsPostAsyncRetrycanceledCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/postasync/retry/canceled"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try CoderFactory.encoder(for: .json).encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRetryFailed long running post request, service returns a 202 to the initial request, with an entity that
// contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for operation
// status This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROsPostAsyncRetryFailedCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/postasync/retry/failed"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> Decodable? {
        return try client.execute(command: self)
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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


import Foundation
import azureSwiftRuntime
// PostAsyncRetrySucceeded long running post request, service returns a 202 to the initial request, with an entity that
// contains ProvisioningState=â€™Creatingâ€™. Poll the endpoint indicated in the azureAsyncOperation header for operation
// status This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
// channel will be used to cancel polling and any outstanding HTTP requests.
class LROsPostAsyncRetrySucceededCommand : BaseCommand {
    var product :  ProductTypeProtocol?

    override init() {
        super.init()
        self.method = "Post"
        self.isLongRunningOperation = true
        self.path = "/lro/postasync/retry/succeeded"
    }

    override func preCall()  {
        self.body = product
    }

    override func encodeBody() throws -> Data? {
        return try AzureJSONEncoder().encode(product as! ProductType?)
    }

    public func execute(client: RuntimeClient) throws -> ProductTypeProtocol? {
        return try client.execute(command: self) as! ProductTypeProtocol?
    }

    override func returnFunc(data: Data) throws -> Decodable? {
        return try CoderFactory.decoder(for: .json).decode(ProductType?.self, from: data)
    }

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