POST | /v1/UpdateAgencyMulesoftQueueState | Update agency mulesoft queue state |
---|
import Foundation
import ServiceStack
public class UpdateAgencyMulesoftQueueState : UpdateAgencyMulesoftQueue, IGet
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class UpdateAgencyMulesoftQueue : Codable
{
public var statusChanged:QueueStateChanged
public var disabledReason:String
public var gasId:String
required public init(){}
}
public enum QueueStateChanged : Int, Codable
{
case Enabled = 1
case Disabled = 2
}
public class UpdateAgencyMulesoftQueueStateResponse : AgencyMulesoftStatusResponse
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class AgencyMulesoftStatusResponse : Codable
{
public var status:Bool
public var messageCount:Int?
public var lastModified:String
required public init(){}
}
Swift UpdateAgencyMulesoftQueueState DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/UpdateAgencyMulesoftQueueState HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateAgencyMulesoftQueueState xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.ServiceModel.MulesoftLambdaQueue">
<DisabledReason xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO.AgencyMulesoftQueue">String</DisabledReason>
<GasId xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO.AgencyMulesoftQueue">String</GasId>
<StatusChanged xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO.AgencyMulesoftQueue">Enabled</StatusChanged>
</UpdateAgencyMulesoftQueueState>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <UpdateAgencyMulesoftQueueStateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO.AgencyMulesoftQueue"> <LastModified>String</LastModified> <MessageCount>0</MessageCount> <Status>false</Status> </UpdateAgencyMulesoftQueueStateResponse>