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 
13 module hunt.proton.amqp.messaging.Header;
14 
15 import hunt.proton.amqp.UnsignedByte;
16 import hunt.proton.amqp.UnsignedInteger;
17 import hunt.proton.amqp.messaging.Section;
18 import hunt.Boolean;
19 class Header : Section
20 {
21     private Boolean _durable;
22     private UnsignedByte _priority;
23     private UnsignedInteger _ttl;
24     private Boolean _firstAcquirer;
25     private UnsignedInteger _deliveryCount;
26 
27     this ()
28     {
29 
30     }
31 
32     this(Header other)
33     {
34         this._durable = other._durable;
35         this._priority = other._priority;
36         this._ttl = other._ttl;
37         this._firstAcquirer = other._firstAcquirer;
38         this._deliveryCount = other._deliveryCount;
39     }
40 
41     public Boolean getDurable()
42     {
43         return _durable;
44     }
45 
46     public void setDurable(Boolean durable)
47     {
48         _durable = durable; 
49     }
50 
51     public UnsignedByte getPriority()
52     {
53         return _priority;
54     }
55 
56     public void setPriority(UnsignedByte priority)
57     {
58         _priority = priority;
59     }
60 
61     public UnsignedInteger getTtl()
62     {
63         return _ttl;
64     }
65 
66     public void setTtl(UnsignedInteger ttl)
67     {
68         _ttl = ttl;
69     }
70 
71     public Boolean getFirstAcquirer()
72     {
73         return _firstAcquirer;
74     }
75 
76     public void setFirstAcquirer(Boolean firstAcquirer)
77     {
78         _firstAcquirer = firstAcquirer; 
79     }
80 
81     public UnsignedInteger getDeliveryCount()
82     {
83         return _deliveryCount;
84     }
85 
86     public void setDeliveryCount(UnsignedInteger deliveryCount)
87     {
88         _deliveryCount = deliveryCount;
89     }
90 
91     override
92     public SectionType getType() {
93         return SectionType.Header;
94     }
95 }