014ff648d553374c8b75fb4823ffbea866f4d519
[ccsdk/features.git] /
1 /*
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt mountpoint-registrar
4  * =================================================================================================
5  * Copyright (C) 2021 Samsung Electronics Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl;
19
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.CmOperation;
21
22 public class CMNotification {
23     private CMBasicHeaderFieldsNotification basicHeaderFields;
24     private String cmNotificationId;
25     private String cmSourceIndicator;
26     private String cmPath;
27     private String cmOperation;
28     private String cmValue;
29
30     public static CMNotificationBuilder builder() {
31         return new CMNotificationBuilder();
32     }
33
34     private CMNotification(CMNotificationBuilder builder) {
35         this.basicHeaderFields = builder.basicHeaderFields;
36         this.cmNotificationId = builder.cmNotificationId;
37         this.cmSourceIndicator = builder.cmSourceIndicator;
38         this.cmPath = builder.cmPath;
39         this.cmOperation = builder.cmOperation;
40         this.cmValue = builder.cmValue;
41     }
42
43     public static class CMNotificationBuilder {
44         private CMBasicHeaderFieldsNotification basicHeaderFields;
45         private String cmNotificationId;
46         private String cmSourceIndicator;
47         private String cmValue;
48         private String cmPath;
49
50         private String cmOperation = CmOperation.NULL.getName();
51
52
53         public CMNotification build() {
54             return new CMNotification(this);
55         }
56
57         public CMNotificationBuilder withCMBasicHeaderFieldsNotification(
58             CMBasicHeaderFieldsNotification basicHeaderFields) {
59             this.basicHeaderFields = basicHeaderFields;
60             return this;
61         }
62
63         public CMNotificationBuilder withCMNotificationId(
64             String cmNotificationId) {
65             this.cmNotificationId = cmNotificationId;
66             return this;
67         }
68
69         public CMNotificationBuilder withCMSourceIndicator(String cmSourceIndicator) {
70             this.cmSourceIndicator = cmSourceIndicator;
71             return this;
72         }
73
74         public CMNotificationBuilder withCMValue(String cmValue) {
75             this.cmValue = cmValue;
76             return this;
77         }
78
79         public CMNotificationBuilder withCMOperation(String cmOperation) {
80             this.cmOperation = cmOperation;
81             return this;
82         }
83
84         public CMNotificationBuilder withCMPath(String cmPath) {
85             this.cmPath = cmPath;
86             return this;
87         }
88     }
89
90     public CMBasicHeaderFieldsNotification getBasicHeaderFields() {
91         return basicHeaderFields;
92     }
93
94     public String getCmSourceIndicator() {
95         return cmSourceIndicator;
96     }
97
98     public String getCmPath() {
99         return cmPath;
100     }
101
102     public String getCmNotificationId() {
103         return cmNotificationId;
104     }
105
106     public String getCmOperation() {
107         return cmOperation;
108     }
109
110     public String getCmValue() {
111         return cmValue;
112     }
113 }