Commit 892230c8 authored by Ikram Haq's avatar Ikram Haq
Browse files

Remove unnecessary OAS and Update Data model w.r.t to Standard

parent 2d3ec809
Loading
Loading
Loading
Loading
+153 −1560

File changed.

Preview size limit exceeded, changes collapsed.

+25 −25
Original line number Diff line number Diff line
@@ -1195,6 +1195,7 @@ func checkNotificationAreaCircle(addressToCheck string) {
				// terminalLocation.LocationRetrievalStatus = &retrievalStatus
				// terminalLocationList = append(terminalLocationList, terminalLocation)
				areaCircleNotif.LocationInfo = &locationInfo
				areaCircleNotif.NotificationType = "UserAreaNotification"

				// areaCircleNotif.TerminalLocation = terminalLocationList
				areaCircleNotif.CallbackData = areaCircleCheck.Subscription.CallbackReference.CallbackData
@@ -1233,7 +1234,7 @@ func checkNotificationPeriodicTrigger1() {
	for subsId, periodicCheck := range periodicSubscriptionMap1 {
		if periodicCheck != nil && periodicCheck.Subscription != nil {
			var periodicNotif UserLocationPeriodicNotification
			for _, addr := range periodicCheck.Subscription.Address {
			addr := periodicCheck.Subscription.Address

			if !addressConnectedMap[addr] {
				continue
@@ -1255,9 +1256,8 @@ func checkNotificationPeriodicTrigger1() {
			timestamp.Seconds = int32(seconds)
			locationInfo.Timestamp = &timestamp
			periodicNotif.LocationInfo = &locationInfo
			}
			periodicNotif.IsFinalNotification = false
			// periodicNotif.Link = periodicCheck.Subscription.Link
			periodicNotif.Links = periodicCheck.Subscription.Links
			subsIdStr := strconv.Itoa(subsId)
			periodicNotif.CallbackData = periodicCheck.Subscription.CallbackReference.CallbackData
			var inlinePeriodicSubscriptionNotification InlineUserLocationPeriodicNotification
@@ -3723,7 +3723,7 @@ func handleUserLocationPeriodicSubscription(w http.ResponseWriter, requestBody [
				errHandlerProblemDetails(w, "Mandatory CallbackReference parameter not present", http.StatusBadRequest)
				return
			}
			if periodicSub.Address == nil {
			if periodicSub.Address == "" {
				log.Error("Mandatory Address parameter not present")
				errHandlerProblemDetails(w, "Mandatory Address parameter not present", http.StatusBadRequest)
				return
@@ -4149,13 +4149,13 @@ func handleUserLocationPeriodicSubscriptionPut(w http.ResponseWriter, requestBod
				errHandlerProblemDetails(w, "Mandatory CallbackReference parameter not present", http.StatusBadRequest)
				return
			}
			if periodicSub.Address == nil {
			if periodicSub.Address == "" {
				log.Error("Mandatory Address parameter not present")
				errHandlerProblemDetails(w, "Mandatory Address parameter not present", http.StatusBadRequest)
				return
			}
			subsIdParamStr := subscriptionID
			selfUrl := strings.Split(periodicSub.ResourceURL, "/")
			selfUrl := strings.Split(periodicSub.Links.Self.Href, "/")
			subsIdStr := selfUrl[len(selfUrl)-1]
			// //Body content not matching parameters
			if subsIdStr != subsIdParamStr {
+1 −1
Original line number Diff line number Diff line
@@ -10,5 +10,5 @@
package server

type InlineZoneLocationEventNotification struct {
	ZoneLocationEventNotification *ZoneLocationEventNotification `json:"userLocationPeriodicNotification,omitempty"`
	ZoneLocationEventNotification *ZoneLocationEventNotification `json:"zoneLocationEventNotification,omitempty"`
}
+13 −28
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022  The AdvantEDGE Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * AdvantEDGE Location API
 *
 * Location Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC013 Location API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.02.01_60/gs_mec013v020201p.pdf) <p>The API is based on the Open Mobile Alliance's specification RESTful Network API for Zonal Presence <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-loc-serv](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-loc-serv) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about Users (UE) and Zone locations <p>**Note**<br>AdvantEDGE supports all of Location API endpoints (see below).
 * Location Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC013 Location API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/03.01.01_60/gs_mec013v030101p.pdf) <p>The API is based on the Open Mobile Alliance's specification RESTful Network API for Zonal Presence <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-loc-serv](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-loc-serv) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about Users (UE) and Zone locations <p>**Note**<br>AdvantEDGE supports all of Location API endpoints (see below).
 *
 * API version: 2.2.1
 * API version: 3.1.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
package server

// This type represents the information related to a user attached to an access point associated to the MEC host, such access point is in scope of the Location Service instance.
type UserInfo struct {
	// The identity of the access point the user is currently on, see note 1.
	AccessPointId string `json:"accessPointId"`
	// Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.
	Address string `json:"address"`
	// Reserved for future use.
	AncillaryInfo string `json:"ancillaryInfo,omitempty"`
	// Contextual information of a user location (e.g. aisle, floor, room number, etc.).
	ContextLocationInfo string `json:"contextLocationInfo,omitempty"`
	// The identity of the access point the user is currently on, see note 1.
	AccessPointId string `json:"AccessPointId,omitempty"`
	// The identity of the zone the user is currently within, see note 1.
	ZoneId string `json:"zoneId"`
	// Self-referring URL, see note 1.
	ResourceURL string `json:"resourceURL"`

	Timestamp *TimeStamp `json:"timestamp"`

	LocationInfo *LocationInfo `json:"locationInfo,omitempty"`

	CivicInfo *CivicAddress `json:"civicInfo,omitempty"`
	// Reserved for future use.
	AncillaryInfo string `json:"ancillaryInfo,omitempty"`

	RelativeLocationInfo *RelativeLocationInfo `json:"relativeLocationInfo,omitempty"`
	// Self-referring URL, see note 1.
	ResourceURL string `json:"resourceURL"`

	Timestamp *TimeStamp `json:"timestamp"`
	// The identity of the zone the user is currently within, see note 1.
	ZoneId string `json:"zoneId"`
}
+2 −16
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022  The AdvantEDGE Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * AdvantEDGE Location API
 *
 * Location Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC013 Location API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.02.01_60/gs_mec013v020201p.pdf) <p>The API is based on the Open Mobile Alliance's specification RESTful Network API for Zonal Presence <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-loc-serv](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-loc-serv) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about Users (UE) and Zone locations <p>**Note**<br>AdvantEDGE supports all of Location API endpoints (see below).
 * Location Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC013 Location API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/03.01.01_60/gs_mec013v030101p.pdf) <p>The API is based on the Open Mobile Alliance's specification RESTful Network API for Zonal Presence <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-loc-serv](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-loc-serv) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about Users (UE) and Zone locations <p>**Note**<br>AdvantEDGE supports all of Location API endpoints (see below).
 *
 * API version: 2.2.1
 * API version: 3.1.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
Loading