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 swagger generate command
31 "github.com/go-openapi/runtime"
33 "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/models"
36 // A1ControllerGetAllPolicyTypesOKCode is the HTTP code returned for type A1ControllerGetAllPolicyTypesOK
37 const A1ControllerGetAllPolicyTypesOKCode int = 200
39 /*A1ControllerGetAllPolicyTypesOK list of all registered policy type ids
41 swagger:response a1ControllerGetAllPolicyTypesOK
43 type A1ControllerGetAllPolicyTypesOK struct {
48 Payload []models.PolicyTypeID `json:"body,omitempty"`
51 // NewA1ControllerGetAllPolicyTypesOK creates A1ControllerGetAllPolicyTypesOK with default headers values
52 func NewA1ControllerGetAllPolicyTypesOK() *A1ControllerGetAllPolicyTypesOK {
54 return &A1ControllerGetAllPolicyTypesOK{}
57 // WithPayload adds the payload to the a1 controller get all policy types o k response
58 func (o *A1ControllerGetAllPolicyTypesOK) WithPayload(payload []models.PolicyTypeID) *A1ControllerGetAllPolicyTypesOK {
63 // SetPayload sets the payload to the a1 controller get all policy types o k response
64 func (o *A1ControllerGetAllPolicyTypesOK) SetPayload(payload []models.PolicyTypeID) {
68 // WriteResponse to the client
69 func (o *A1ControllerGetAllPolicyTypesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
75 payload = make([]models.PolicyTypeID, 0, 50)
78 if err := producer.Produce(rw, payload); err != nil {
79 panic(err) // let the recovery middleware deal with this
83 // A1ControllerGetAllPolicyTypesServiceUnavailableCode is the HTTP code returned for type A1ControllerGetAllPolicyTypesServiceUnavailable
84 const A1ControllerGetAllPolicyTypesServiceUnavailableCode int = 503
86 /*A1ControllerGetAllPolicyTypesServiceUnavailable Potentially transient backend database error. Client should attempt to retry later.
88 swagger:response a1ControllerGetAllPolicyTypesServiceUnavailable
90 type A1ControllerGetAllPolicyTypesServiceUnavailable struct {
93 // NewA1ControllerGetAllPolicyTypesServiceUnavailable creates A1ControllerGetAllPolicyTypesServiceUnavailable with default headers values
94 func NewA1ControllerGetAllPolicyTypesServiceUnavailable() *A1ControllerGetAllPolicyTypesServiceUnavailable {
96 return &A1ControllerGetAllPolicyTypesServiceUnavailable{}
99 // WriteResponse to the client
100 func (o *A1ControllerGetAllPolicyTypesServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
102 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses