Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.opencord.sadis; |
| 17 | |
| 18 | import com.fasterxml.jackson.annotation.JsonProperty; |
| 19 | import org.onlab.packet.VlanId; |
| 20 | |
Andrea Campanella | 092df20 | 2021-11-29 10:38:45 -0800 | [diff] [blame] | 21 | import java.util.Objects; |
| 22 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 23 | /** |
| 24 | * Represents a unit of information about a service. |
| 25 | */ |
| 26 | public final class UniTagInformation { |
| 27 | |
| 28 | @JsonProperty(value = "uniTagMatch") |
Matteo Scandolo | c1e7272 | 2020-03-20 12:53:14 -0700 | [diff] [blame] | 29 | private VlanId uniTagMatch = VlanId.vlanId(VlanId.NO_VID); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 30 | |
| 31 | @JsonProperty(value = "ponCTag") |
| 32 | private VlanId ponCTag; |
| 33 | |
| 34 | @JsonProperty(value = "ponSTag") |
| 35 | private VlanId ponSTag; |
| 36 | |
| 37 | @JsonProperty(value = "usPonCTagPriority") |
| 38 | private int usPonCTagPriority = -1; |
| 39 | |
| 40 | @JsonProperty(value = "usPonSTagPriority") |
| 41 | private int usPonSTagPriority = -1; |
| 42 | |
| 43 | @JsonProperty(value = "dsPonCTagPriority") |
| 44 | private int dsPonCTagPriority = -1; |
| 45 | |
| 46 | @JsonProperty(value = "dsPonSTagPriority") |
| 47 | private int dsPonSTagPriority = -1; |
| 48 | |
| 49 | @JsonProperty(value = "technologyProfileId") |
| 50 | private int technologyProfileId = -1; |
| 51 | |
| 52 | @JsonProperty(value = "upstreamBandwidthProfile") |
| 53 | private String upstreamBandwidthProfile; |
| 54 | |
| 55 | @JsonProperty(value = "downstreamBandwidthProfile") |
| 56 | private String downstreamBandwidthProfile; |
| 57 | |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 58 | @JsonProperty(value = "upstreamOltBandwidthProfile") |
| 59 | private String upstreamOltBandwidthProfile; |
| 60 | |
| 61 | @JsonProperty(value = "downstreamOltBandwidthProfile") |
| 62 | private String downstreamOltBandwidthProfile; |
| 63 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 64 | @JsonProperty(value = "serviceName") |
| 65 | private String serviceName; |
| 66 | |
| 67 | @JsonProperty(value = "enableMacLearning") |
| 68 | private boolean enableMacLearning = false; |
| 69 | |
| 70 | @JsonProperty(value = "configuredMacAddress") |
| 71 | private String configuredMacAddress; |
| 72 | |
| 73 | @JsonProperty(value = "isDhcpRequired") |
| 74 | private boolean isDhcpRequired; |
| 75 | |
| 76 | @JsonProperty(value = "isIgmpRequired") |
| 77 | private boolean isIgmpRequired; |
| 78 | |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 79 | @JsonProperty(value = "isPppoeRequired") |
| 80 | private boolean isPppoeRequired; |
| 81 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 82 | public UniTagInformation() { |
| 83 | |
| 84 | } |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 85 | //CHECKSTYLE:OFF |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 86 | private UniTagInformation(final VlanId uniTagMatch, final VlanId ponCTag, final VlanId ponSTag, |
| 87 | final int usPonCTagPriority, final int usPonSTagPriority, |
| 88 | final int dsPonCTagPriority, final int dsPonSTagPriority, |
| 89 | final int technologyProfileId, |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 90 | final String upstreamBandwidthProfile, |
| 91 | final String downstreamBandwidthProfile, |
| 92 | final String upstreamOltBandwidthProfile, |
| 93 | final String downstreamOltBandwidthProfile, |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 94 | final String serviceName, final boolean enableMacLearning, |
| 95 | final String configuredMacAddress, final boolean isDhcpRequired, |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 96 | final boolean isIgmpRequired, final boolean isPppoeRequired) { |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 97 | this.uniTagMatch = uniTagMatch; |
| 98 | this.ponCTag = ponCTag; |
| 99 | this.ponSTag = ponSTag; |
| 100 | this.usPonCTagPriority = usPonCTagPriority; |
| 101 | this.usPonSTagPriority = usPonSTagPriority; |
| 102 | this.dsPonCTagPriority = dsPonCTagPriority; |
| 103 | this.dsPonSTagPriority = dsPonSTagPriority; |
| 104 | this.technologyProfileId = technologyProfileId; |
| 105 | this.upstreamBandwidthProfile = upstreamBandwidthProfile; |
| 106 | this.downstreamBandwidthProfile = downstreamBandwidthProfile; |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 107 | this.upstreamOltBandwidthProfile = upstreamOltBandwidthProfile; |
| 108 | this.downstreamOltBandwidthProfile = downstreamOltBandwidthProfile; |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 109 | this.serviceName = serviceName; |
| 110 | this.enableMacLearning = enableMacLearning; |
| 111 | this.configuredMacAddress = configuredMacAddress; |
| 112 | this.isDhcpRequired = isDhcpRequired; |
| 113 | this.isIgmpRequired = isIgmpRequired; |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 114 | this.isPppoeRequired = isPppoeRequired; |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 115 | } |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 116 | //CHECKSTYLE:ON |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 117 | |
| 118 | public final VlanId getUniTagMatch() { |
| 119 | return uniTagMatch; |
| 120 | } |
| 121 | |
| 122 | public final VlanId getPonCTag() { |
| 123 | return ponCTag; |
| 124 | } |
| 125 | |
| 126 | public final VlanId getPonSTag() { |
| 127 | return ponSTag; |
| 128 | } |
| 129 | |
| 130 | public final int getUsPonCTagPriority() { |
| 131 | return usPonCTagPriority; |
| 132 | } |
| 133 | |
| 134 | public final int getUsPonSTagPriority() { |
| 135 | return usPonSTagPriority; |
| 136 | } |
| 137 | |
| 138 | public final int getDsPonCTagPriority() { |
| 139 | return dsPonCTagPriority; |
| 140 | } |
| 141 | |
| 142 | public final int getDsPonSTagPriority() { |
| 143 | return dsPonSTagPriority; |
| 144 | } |
| 145 | |
| 146 | public final int getTechnologyProfileId() { |
| 147 | return technologyProfileId; |
| 148 | } |
| 149 | |
| 150 | public final String getUpstreamBandwidthProfile() { |
| 151 | return upstreamBandwidthProfile; |
| 152 | } |
| 153 | |
| 154 | public final String getDownstreamBandwidthProfile() { |
| 155 | return downstreamBandwidthProfile; |
| 156 | } |
| 157 | |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 158 | public final String getUpstreamOltBandwidthProfile() { |
| 159 | return upstreamOltBandwidthProfile; |
| 160 | } |
| 161 | |
| 162 | public final String getDownstreamOltBandwidthProfile() { |
| 163 | return downstreamOltBandwidthProfile; |
| 164 | } |
| 165 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 166 | public final String getServiceName() { |
| 167 | return serviceName; |
| 168 | } |
| 169 | |
| 170 | public final boolean getEnableMacLearning() { |
| 171 | return enableMacLearning; |
| 172 | } |
| 173 | |
| 174 | public final String getConfiguredMacAddress() { |
| 175 | return configuredMacAddress; |
| 176 | } |
| 177 | |
| 178 | public final boolean getIsDhcpRequired() { |
| 179 | return isDhcpRequired; |
| 180 | } |
| 181 | |
| 182 | public final boolean getIsIgmpRequired() { |
| 183 | return isIgmpRequired; |
| 184 | } |
| 185 | |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 186 | public final boolean getIsPppoeRequired() { |
| 187 | return isPppoeRequired; |
| 188 | } |
| 189 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 190 | @Override |
| 191 | public boolean equals(Object o) { |
| 192 | if (this == o) { |
| 193 | return true; |
| 194 | } |
| 195 | if (o == null || getClass() != o.getClass()) { |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | UniTagInformation that = (UniTagInformation) o; |
| 200 | |
Andrea Campanella | 092df20 | 2021-11-29 10:38:45 -0800 | [diff] [blame] | 201 | if (!Objects.equals(uniTagMatch, that.uniTagMatch)) { |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 202 | return false; |
| 203 | } |
| 204 | if (technologyProfileId != that.technologyProfileId) { |
| 205 | return false; |
| 206 | } |
Andrea Campanella | 092df20 | 2021-11-29 10:38:45 -0800 | [diff] [blame] | 207 | if (!Objects.equals(ponCTag, that.ponCTag)) { |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 208 | return false; |
| 209 | } |
Andrea Campanella | 092df20 | 2021-11-29 10:38:45 -0800 | [diff] [blame] | 210 | if (!Objects.equals(ponSTag, that.ponSTag)) { |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 211 | return false; |
| 212 | } |
| 213 | if (usPonCTagPriority != that.usPonCTagPriority) { |
| 214 | return false; |
| 215 | } |
| 216 | if (usPonSTagPriority != that.usPonSTagPriority) { |
| 217 | return false; |
| 218 | } |
| 219 | if (dsPonCTagPriority != that.dsPonCTagPriority) { |
| 220 | return false; |
| 221 | } |
| 222 | if (dsPonSTagPriority != that.dsPonSTagPriority) { |
| 223 | return false; |
| 224 | } |
| 225 | if (enableMacLearning != that.enableMacLearning) { |
| 226 | return false; |
| 227 | } |
Andrea Campanella | 092df20 | 2021-11-29 10:38:45 -0800 | [diff] [blame] | 228 | if (!Objects.equals(configuredMacAddress, that.configuredMacAddress)) { |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 229 | return false; |
| 230 | } |
| 231 | if (isDhcpRequired != that.isDhcpRequired) { |
| 232 | return false; |
| 233 | } |
| 234 | if (isIgmpRequired != that.isIgmpRequired) { |
| 235 | return false; |
| 236 | } |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 237 | if (isPppoeRequired != that.isPppoeRequired) { |
| 238 | return false; |
| 239 | } |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 240 | if (upstreamBandwidthProfile != null ? !upstreamBandwidthProfile.equals(that.upstreamBandwidthProfile) : |
| 241 | that.upstreamBandwidthProfile != null) { |
| 242 | return false; |
| 243 | } |
| 244 | if (downstreamBandwidthProfile != null ? !downstreamBandwidthProfile.equals(that.downstreamBandwidthProfile) : |
| 245 | that.downstreamBandwidthProfile != null) { |
| 246 | return false; |
| 247 | } |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 248 | if (upstreamOltBandwidthProfile != null ? |
| 249 | !upstreamOltBandwidthProfile.equals(that.upstreamOltBandwidthProfile) : |
| 250 | that.upstreamOltBandwidthProfile != null) { |
| 251 | return false; |
| 252 | } |
| 253 | if (downstreamOltBandwidthProfile != null ? |
| 254 | !downstreamOltBandwidthProfile.equals(that.downstreamOltBandwidthProfile) : |
| 255 | that.downstreamOltBandwidthProfile != null) { |
| 256 | return false; |
| 257 | } |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 258 | return serviceName != null ? serviceName.equals(that.serviceName) : that.serviceName == null; |
| 259 | } |
| 260 | |
| 261 | @Override |
| 262 | public int hashCode() { |
| 263 | int result = uniTagMatch != null ? uniTagMatch.hashCode() : 0; |
| 264 | result = 31 * result + (ponCTag != null ? ponCTag.hashCode() : 0); |
| 265 | result = 31 * result + (ponSTag != null ? ponSTag.hashCode() : 0); |
| 266 | result = 31 * result + usPonCTagPriority; |
| 267 | result = 31 * result + usPonSTagPriority; |
| 268 | result = 31 * result + dsPonCTagPriority; |
| 269 | result = 31 * result + dsPonSTagPriority; |
| 270 | result = 31 * result + technologyProfileId; |
| 271 | result = 31 * result + (upstreamBandwidthProfile != null ? upstreamBandwidthProfile.hashCode() : 0); |
| 272 | result = 31 * result + (downstreamBandwidthProfile != null ? downstreamBandwidthProfile.hashCode() : 0); |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 273 | result = 31 * result + (upstreamOltBandwidthProfile != null ? upstreamOltBandwidthProfile.hashCode() : 0); |
| 274 | result = 31 * result + (downstreamOltBandwidthProfile != null ? downstreamOltBandwidthProfile.hashCode() : 0); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 275 | result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0); |
| 276 | result = 31 * result + (enableMacLearning ? 1 : 0); |
| 277 | result = 31 * result + (configuredMacAddress != null ? configuredMacAddress.hashCode() : 0); |
| 278 | result = 31 * result + (isDhcpRequired ? 1 : 0); |
| 279 | result = 31 * result + (isIgmpRequired ? 1 : 0); |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 280 | result = 31 * result + (isPppoeRequired ? 1 : 0); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 281 | return result; |
| 282 | } |
| 283 | |
| 284 | @Override |
| 285 | public String toString() { |
| 286 | final StringBuilder sb = new StringBuilder("UniTagInformation{"); |
| 287 | sb.append("uniTagMatch=").append(uniTagMatch); |
| 288 | sb.append(", ponCTag=").append(ponCTag); |
| 289 | sb.append(", ponSTag=").append(ponSTag); |
| 290 | sb.append(", usPonCTagPriority=").append(usPonCTagPriority); |
| 291 | sb.append(", usPonSTagPriority=").append(usPonSTagPriority); |
| 292 | sb.append(", dsPonCTagPriority=").append(dsPonCTagPriority); |
| 293 | sb.append(", dsPonSTagPriority=").append(dsPonSTagPriority); |
| 294 | sb.append(", technologyProfileId=").append(technologyProfileId); |
| 295 | sb.append(", enableMacLearning=").append(enableMacLearning); |
| 296 | sb.append(", upstreamBandwidthProfile='").append(upstreamBandwidthProfile).append('\''); |
| 297 | sb.append(", downstreamBandwidthProfile='").append(downstreamBandwidthProfile).append('\''); |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 298 | sb.append(", upstreamOltBandwidthProfile='").append(upstreamOltBandwidthProfile).append('\''); |
| 299 | sb.append(", downstreamOltBandwidthProfile='").append(downstreamOltBandwidthProfile).append('\''); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 300 | sb.append(", serviceName='").append(serviceName).append('\''); |
| 301 | sb.append(", configuredMacAddress='").append(configuredMacAddress).append('\''); |
| 302 | sb.append(", isDhcpRequired=").append(isDhcpRequired); |
| 303 | sb.append(", isIgmpRequired=").append(isIgmpRequired); |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 304 | sb.append(", isPppoeRequired=").append(isPppoeRequired); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 305 | sb.append('}'); |
| 306 | return sb.toString(); |
| 307 | } |
| 308 | |
| 309 | public static final class Builder { |
| 310 | |
| 311 | private VlanId uniTagMatch; |
| 312 | private VlanId ponCTag; |
| 313 | private VlanId ponSTag; |
Gamze Abaka | 7f987c0 | 2020-02-03 08:19:32 +0000 | [diff] [blame] | 314 | private int usPonCTagPriority = -1; |
| 315 | private int usPonSTagPriority = -1; |
| 316 | private int dsPonCTagPriority = -1; |
| 317 | private int dsPonSTagPriority = -1; |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 318 | private int technologyProfileId; |
| 319 | private String upstreamBandwidthProfile; |
| 320 | private String downstreamBandwidthProfile; |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 321 | private String upstreamOltBandwidthProfile; |
| 322 | private String downstreamOltBandwidthProfile; |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 323 | private String serviceName; |
| 324 | private boolean enableMacLearning; |
| 325 | private String configuredMacAddress; |
| 326 | private boolean isDhcpRequired; |
| 327 | private boolean isIgmpRequired; |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 328 | private boolean isPppoeRequired; |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 329 | |
| 330 | public final Builder setUniTagMatch(final VlanId uniTagMatch) { |
| 331 | this.uniTagMatch = uniTagMatch; |
| 332 | return this; |
| 333 | } |
| 334 | |
| 335 | public final Builder setPonCTag(final VlanId ponCTag) { |
| 336 | this.ponCTag = ponCTag; |
| 337 | return this; |
| 338 | } |
| 339 | |
| 340 | public final Builder setPonSTag(final VlanId ponSTag) { |
| 341 | this.ponSTag = ponSTag; |
| 342 | return this; |
| 343 | } |
| 344 | |
| 345 | public final Builder setUsPonCTagPriority(final int usPonCTagPriority) { |
| 346 | this.usPonCTagPriority = usPonCTagPriority; |
| 347 | return this; |
| 348 | } |
| 349 | |
| 350 | public final Builder setUsPonSTagPriority(final int usPonSTagPriority) { |
| 351 | this.usPonSTagPriority = usPonSTagPriority; |
| 352 | return this; |
| 353 | } |
| 354 | |
| 355 | public final Builder setDsPonCTagPriority(final int dsPonCTagPriority) { |
| 356 | this.dsPonCTagPriority = dsPonCTagPriority; |
| 357 | return this; |
| 358 | } |
| 359 | |
| 360 | public final Builder setDsPonSTagPriority(final int dsPonSTagPriority) { |
| 361 | this.dsPonSTagPriority = dsPonSTagPriority; |
| 362 | return this; |
| 363 | } |
| 364 | |
| 365 | public final Builder setTechnologyProfileId(final int technologyProfileId) { |
| 366 | this.technologyProfileId = technologyProfileId; |
| 367 | return this; |
| 368 | } |
| 369 | |
| 370 | public final Builder setUpstreamBandwidthProfile(final String upstreamBandwidthProfile) { |
| 371 | this.upstreamBandwidthProfile = upstreamBandwidthProfile; |
| 372 | return this; |
| 373 | } |
| 374 | |
| 375 | public final Builder setDownstreamBandwidthProfile(final String downstreamBandwidthProfile) { |
| 376 | this.downstreamBandwidthProfile = downstreamBandwidthProfile; |
| 377 | return this; |
| 378 | } |
| 379 | |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 380 | public final Builder setUpstreamOltBandwidthProfile(final String upstreamOltBandwidthProfile) { |
| 381 | this.upstreamOltBandwidthProfile = upstreamOltBandwidthProfile; |
| 382 | return this; |
| 383 | } |
| 384 | |
| 385 | public final Builder setDownstreamOltBandwidthProfile(final String downstreamOltBandwidthProfile) { |
| 386 | this.downstreamOltBandwidthProfile = downstreamOltBandwidthProfile; |
| 387 | return this; |
| 388 | } |
| 389 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 390 | public final Builder setServiceName(final String serviceName) { |
| 391 | this.serviceName = serviceName; |
| 392 | return this; |
| 393 | } |
| 394 | |
| 395 | public final Builder setEnableMacLearning(final boolean enableMacLearning) { |
| 396 | this.enableMacLearning = enableMacLearning; |
| 397 | return this; |
| 398 | } |
| 399 | |
| 400 | public final Builder setConfiguredMacAddress(final String configuredMacAddress) { |
| 401 | this.configuredMacAddress = configuredMacAddress; |
| 402 | return this; |
| 403 | } |
| 404 | |
| 405 | public final Builder setIsDhcpRequired(final boolean isDhcpRequired) { |
| 406 | this.isDhcpRequired = isDhcpRequired; |
| 407 | return this; |
| 408 | } |
| 409 | |
| 410 | public final Builder setIsIgmpRequired(final boolean isIgmpRequired) { |
| 411 | this.isIgmpRequired = isIgmpRequired; |
| 412 | return this; |
| 413 | } |
| 414 | |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 415 | public final Builder setIsPppoeRequired(final boolean isPppoeRequired) { |
| 416 | this.isPppoeRequired = isPppoeRequired; |
| 417 | return this; |
| 418 | } |
| 419 | |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 420 | public final UniTagInformation build() { |
| 421 | return new UniTagInformation(this.uniTagMatch, this.ponCTag, |
| 422 | this.ponSTag, this.usPonCTagPriority, this.usPonSTagPriority, |
| 423 | this.dsPonCTagPriority, this.dsPonSTagPriority, this.technologyProfileId, |
yasin sapli | 2c93ddb | 2021-06-11 17:46:26 +0300 | [diff] [blame] | 424 | this.upstreamBandwidthProfile, this.downstreamBandwidthProfile, |
| 425 | this.upstreamOltBandwidthProfile, this.downstreamOltBandwidthProfile, |
yasin sapli | 9e3ebed | 2021-07-09 14:06:35 +0000 | [diff] [blame^] | 426 | this.serviceName, this.enableMacLearning, this.configuredMacAddress, |
| 427 | this.isDhcpRequired, this.isIgmpRequired, this.isPppoeRequired); |
Matteo Scandolo | 198aef9 | 2020-01-08 00:43:17 +0000 | [diff] [blame] | 428 | } |
| 429 | } |
| 430 | } |