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 golangswaggerpaths "path"
34 "github.com/go-openapi/swag"
37 // A1ControllerGetPolicyTypeURL generates an URL for the a1 controller get policy type operation
38 type A1ControllerGetPolicyTypeURL struct {
42 // avoid unkeyed usage
46 // WithBasePath sets the base path for this url builder, only required when it's different from the
47 // base path specified in the swagger spec.
48 // When the value of the base path is an empty string
49 func (o *A1ControllerGetPolicyTypeURL) WithBasePath(bp string) *A1ControllerGetPolicyTypeURL {
54 // SetBasePath sets the base path for this url builder, only required when it's different from the
55 // base path specified in the swagger spec.
56 // When the value of the base path is an empty string
57 func (o *A1ControllerGetPolicyTypeURL) SetBasePath(bp string) {
61 // Build a url path and query string
62 func (o *A1ControllerGetPolicyTypeURL) Build() (*url.URL, error) {
65 var _path = "/A1-P/v2/policytypes/{policy_type_id}"
67 policyTypeID := swag.FormatInt64(o.PolicyTypeID)
68 if policyTypeID != "" {
69 _path = strings.Replace(_path, "{policy_type_id}", policyTypeID, -1)
71 return nil, errors.New("policyTypeId is required on A1ControllerGetPolicyTypeURL")
74 _basePath := o._basePath
75 _result.Path = golangswaggerpaths.Join(_basePath, _path)
80 // Must is a helper function to panic when the url builder returns an error
81 func (o *A1ControllerGetPolicyTypeURL) Must(u *url.URL, err error) *url.URL {
86 panic("url can't be nil")
91 // String returns the string representation of the path with query string
92 func (o *A1ControllerGetPolicyTypeURL) String() string {
93 return o.Must(o.Build()).String()
96 // BuildFull builds a full url with scheme, host, path and query string
97 func (o *A1ControllerGetPolicyTypeURL) BuildFull(scheme, host string) (*url.URL, error) {
99 return nil, errors.New("scheme is required for a full url on A1ControllerGetPolicyTypeURL")
102 return nil, errors.New("host is required for a full url on A1ControllerGetPolicyTypeURL")
105 base, err := o.Build()
115 // StringFull returns the string representation of a complete url
116 func (o *A1ControllerGetPolicyTypeURL) StringFull(scheme, host string) string {
117 return o.Must(o.BuildFull(scheme, host)).String()