Enhancements of REST-based E2 subscription interface
[ric-plt/xapp-frame.git] / pkg / restapi / operations / policy / subscribe_policy.go
diff --git a/pkg/restapi/operations/policy/subscribe_policy.go b/pkg/restapi/operations/policy/subscribe_policy.go
deleted file mode 100644 (file)
index f812cec..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package policy
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the generate command
-
-import (
-       "net/http"
-
-       middleware "github.com/go-openapi/runtime/middleware"
-)
-
-// SubscribePolicyHandlerFunc turns a function with the right signature into a subscribe policy handler
-type SubscribePolicyHandlerFunc func(SubscribePolicyParams) middleware.Responder
-
-// Handle executing the request and returning a response
-func (fn SubscribePolicyHandlerFunc) Handle(params SubscribePolicyParams) middleware.Responder {
-       return fn(params)
-}
-
-// SubscribePolicyHandler interface for that can handle valid subscribe policy params
-type SubscribePolicyHandler interface {
-       Handle(SubscribePolicyParams) middleware.Responder
-}
-
-// NewSubscribePolicy creates a new http.Handler for the subscribe policy operation
-func NewSubscribePolicy(ctx *middleware.Context, handler SubscribePolicyHandler) *SubscribePolicy {
-       return &SubscribePolicy{Context: ctx, Handler: handler}
-}
-
-/*SubscribePolicy swagger:route POST /subscriptions/policy policy subscribePolicy
-
-Subscribe and send "POLICY" message to RAN to execute a specific POLICY during call processing in RAN after each occurrence of a defined SUBSCRIPTION
-
-*/
-type SubscribePolicy struct {
-       Context *middleware.Context
-       Handler SubscribePolicyHandler
-}
-
-func (o *SubscribePolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
-       route, rCtx, _ := o.Context.RouteInfo(r)
-       if rCtx != nil {
-               r = rCtx
-       }
-       var Params = NewSubscribePolicyParams()
-
-       if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
-               o.Context.Respond(rw, r, route.Produces, route, err)
-               return
-       }
-
-       res := o.Handler.Handle(Params) // actually handle the request
-
-       o.Context.Respond(rw, r, route.Produces, route, res)
-
-}