2 ==================================================================================
3 Copyright (c) 2021 Samsung
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
9 http://www.apache.org/licenses/LICENSE-2.0
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.
17 This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 platform project (RICP).
19 ==================================================================================
21 // Code generated by go-swagger; DO NOT EDIT.
25 // This file was generated by the swagger tool.
26 // Editing this file might prove futile when you re-run the generate command
31 "github.com/go-openapi/runtime/middleware"
34 // A1ControllerGetAllPolicyTypesHandlerFunc turns a function with the right signature into a a1 controller get all policy types handler
35 type A1ControllerGetAllPolicyTypesHandlerFunc func(A1ControllerGetAllPolicyTypesParams) middleware.Responder
37 // Handle executing the request and returning a response
38 func (fn A1ControllerGetAllPolicyTypesHandlerFunc) Handle(params A1ControllerGetAllPolicyTypesParams) middleware.Responder {
42 // A1ControllerGetAllPolicyTypesHandler interface for that can handle valid a1 controller get all policy types params
43 type A1ControllerGetAllPolicyTypesHandler interface {
44 Handle(A1ControllerGetAllPolicyTypesParams) middleware.Responder
47 // NewA1ControllerGetAllPolicyTypes creates a new http.Handler for the a1 controller get all policy types operation
48 func NewA1ControllerGetAllPolicyTypes(ctx *middleware.Context, handler A1ControllerGetAllPolicyTypesHandler) *A1ControllerGetAllPolicyTypes {
49 return &A1ControllerGetAllPolicyTypes{Context: ctx, Handler: handler}
52 /*A1ControllerGetAllPolicyTypes swagger:route GET /a1-p/policytypes A1 Mediator a1ControllerGetAllPolicyTypes
54 Get a list of all registered policy type ids
57 type A1ControllerGetAllPolicyTypes struct {
58 Context *middleware.Context
59 Handler A1ControllerGetAllPolicyTypesHandler
62 func (o *A1ControllerGetAllPolicyTypes) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
63 route, rCtx, _ := o.Context.RouteInfo(r)
67 var Params = NewA1ControllerGetAllPolicyTypesParams()
69 if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
70 o.Context.Respond(rw, r, route.Produces, route, err)
74 res := o.Handler.Handle(Params) // actually handle the request
76 o.Context.Respond(rw, r, route.Produces, route, res)