1 /*
2  * hunt-proton: AMQP Protocol library for D programming language.
3  *
4  * Copyright (C) 2018-2019 HuntLabs
5  *
6  * Website: https://www.huntlabs.net/
7  *
8  * Licensed under the Apache-2.0 License.
9  *
10  */
11 
12 module hunt.proton.amqp.messaging.Modified;
13 
14 import hunt.collection.Map;
15 import hunt.Object;
16 import hunt.proton.amqp.Symbol;
17 import hunt.proton.amqp.transport.DeliveryState;
18 import hunt.proton.amqp.messaging.Outcome;
19 
20 import std.concurrency: initOnce;
21 import hunt.Boolean;
22 
23 class Modified : DeliveryState, Outcome
24 {
25   //  public static Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:modified:list");
26 
27 
28     static Symbol DESCRIPTOR_SYMBOL()
29     {
30         __gshared Symbol inst;
31         return initOnce!inst(Symbol.valueOf("amqp:modified:list"));
32     }
33 
34 
35     private Boolean _deliveryFailed;
36     private Boolean _undeliverableHere;
37     private Map!(Symbol, Object) _messageAnnotations;
38 
39     public Boolean getDeliveryFailed()
40     {
41         return _deliveryFailed;
42     }
43 
44     public void setDeliveryFailed(Boolean deliveryFailed)
45     {
46         _deliveryFailed =   deliveryFailed;
47     }
48 
49     public Boolean getUndeliverableHere()
50     {
51         return _undeliverableHere;
52     }
53 
54     public void setUndeliverableHere(Boolean undeliverableHere)
55     {
56         _undeliverableHere =  undeliverableHere;
57     }
58 
59     public Map!(Symbol, Object) getMessageAnnotations()
60     {
61         return _messageAnnotations;
62     }
63 
64     public void setMessageAnnotations(Map!(Symbol, Object) messageAnnotations)
65     {
66         _messageAnnotations = messageAnnotations;
67     }
68 
69     override
70     public DeliveryStateType getType() {
71         return DeliveryStateType.Modified;
72     }
73 }