5e58de006d95548658d09ccd43812a3ffb5eaab0
[ric-plt/e2mgr.git] / E2Manager / models / e2_setup_success_response_message.go
1 //
2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
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 //  This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 //  platform project (RICP).
19
20 package models
21 import (
22         "encoding/xml"
23 )
24
25 type E2SetupSuccessResponseMessage struct {
26         XMLName xml.Name `xml:"E2SetupSuccessResponseMessage"`
27         Text    string   `xml:",chardata"`
28         E2APPDU struct {
29                 Text              string `xml:",chardata"`
30                 SuccessfulOutcome struct {
31                         Text          string `xml:",chardata"`
32                         ProcedureCode string `xml:"procedureCode"`
33                         Criticality   struct {
34                                 Text   string `xml:",chardata"`
35                                 Reject string `xml:"reject"`
36                         } `xml:"criticality"`
37                         Value struct {
38                                 Text            string `xml:",chardata"`
39                                 E2setupResponse struct {
40                                         Text        string `xml:",chardata"`
41                                         ProtocolIEs struct {
42                                                 Text               string `xml:",chardata"`
43                                                 E2setupResponseIEs struct {
44                                                         Text        string `xml:",chardata"`
45                                                         ID          string `xml:"id"`
46                                                         Criticality struct {
47                                                                 Text   string `xml:",chardata"`
48                                                                 Reject string `xml:"reject"`
49                                                         } `xml:"criticality"`
50                                                         Value struct {
51                                                                 Text        string `xml:",chardata"`
52                                                                 GlobalRICID struct {
53                                                                         Text         string `xml:",chardata"`
54                                                                         PLMNIdentity string `xml:"pLMN-Identity"`
55                                                                         RicID        string `xml:"ric-ID"`
56                                                                 } `xml:"GlobalRIC-ID"`
57                                                         } `xml:"value"`
58                                                 } `xml:"E2setupResponseIEs"`
59                                         } `xml:"protocolIEs"`
60                                 } `xml:"E2setupResponse"`
61                         } `xml:"value"`
62                 } `xml:"successfulOutcome"`
63         } `xml:"E2AP-PDU"`
64 }
65
66
67 func (m *E2SetupSuccessResponseMessage) SetPlmnId(plmnId string){
68         m.E2APPDU.SuccessfulOutcome.Value.E2setupResponse.ProtocolIEs.E2setupResponseIEs.Value.GlobalRICID.PLMNIdentity = plmnId
69 }
70
71 func (m *E2SetupSuccessResponseMessage) SetNbId(ricID string){
72         m.E2APPDU.SuccessfulOutcome.Value.E2setupResponse.ProtocolIEs.E2setupResponseIEs.Value.GlobalRICID.RicID = ricID
73 }