Remove major and minor code smells in dr-node
[dmaap/datarouter.git] / datarouter-node / src / main / java / org / onap / dmaap / datarouter / node / DestInfoBuilder.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.dmaap.datarouter.node;
22
23 public class DestInfoBuilder {
24
25     private String destInfoName;
26     private String destInfoSpool;
27     private String destInfoSubId;
28     private String destInfoLogData;
29     private String destInfoUrl;
30     private String destInfoAuthUser;
31     private String destInfoAuthentication;
32     private boolean destInfoMetaOnly;
33     private boolean destInfoUse100;
34     private boolean destInfoPrivilegedSubscriber;
35     private boolean destInfoFollowRedirects;
36     private boolean destInfoDecompress;
37
38     public String getName() {
39         return destInfoName;
40     }
41
42     public DestInfoBuilder setName(String name) {
43         this.destInfoName = name;
44         return this;
45     }
46
47     public String getSpool() {
48         return destInfoSpool;
49     }
50
51     public DestInfoBuilder setSpool(String spool) {
52         this.destInfoSpool = spool;
53         return this;
54     }
55
56     public String getSubid() {
57         return destInfoSubId;
58     }
59
60     public DestInfoBuilder setSubid(String subid) {
61         this.destInfoSubId = subid;
62         return this;
63     }
64
65     String getLogdata() {
66         return destInfoLogData;
67     }
68
69     DestInfoBuilder setLogdata(String logdata) {
70         this.destInfoLogData = logdata;
71         return this;
72     }
73
74     public String getUrl() {
75         return destInfoUrl;
76     }
77
78     public DestInfoBuilder setUrl(String url) {
79         this.destInfoUrl = url;
80         return this;
81     }
82
83     String getAuthuser() {
84         return destInfoAuthUser;
85     }
86
87     DestInfoBuilder setAuthuser(String authuser) {
88         this.destInfoAuthUser = authuser;
89         return this;
90     }
91
92     String getAuthentication() {
93         return destInfoAuthentication;
94     }
95
96     DestInfoBuilder setAuthentication(String authentication) {
97         this.destInfoAuthentication = authentication;
98         return this;
99     }
100
101     boolean isMetaonly() {
102         return destInfoMetaOnly;
103     }
104
105     DestInfoBuilder setMetaonly(boolean metaonly) {
106         this.destInfoMetaOnly = metaonly;
107         return this;
108     }
109
110     boolean isUse100() {
111         return destInfoUse100;
112     }
113
114     DestInfoBuilder setUse100(boolean use100) {
115         this.destInfoUse100 = use100;
116         return this;
117     }
118
119     boolean isPrivilegedSubscriber() {
120         return destInfoPrivilegedSubscriber;
121     }
122
123     DestInfoBuilder setPrivilegedSubscriber(boolean privilegedSubscriber) {
124         this.destInfoPrivilegedSubscriber = privilegedSubscriber;
125         return this;
126     }
127
128     boolean isFollowRedirects() {
129         return destInfoFollowRedirects;
130     }
131
132     DestInfoBuilder setFollowRedirects(boolean followRedirects) {
133         this.destInfoFollowRedirects = followRedirects;
134         return this;
135     }
136
137     boolean isDecompress() {
138         return destInfoDecompress;
139     }
140
141     DestInfoBuilder setDecompress(boolean decompress) {
142         this.destInfoDecompress = decompress;
143         return this;
144     }
145
146     DestInfo createDestInfo() {
147         return new DestInfo(this);
148     }
149 }