Replacing a1-python with a1-go implementation
[ric-plt/a1.git] / pkg / restapi / operations / a1_mediator / a1_controller_get_healthcheck_urlbuilder.go
1 /*
2 ==================================================================================
3   Copyright (c) 2021 Samsung
4
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
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
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.
16
17    This source code is part of the near-RT RIC (RAN Intelligent Controller)
18    platform project (RICP).
19 ==================================================================================
20 */
21 // Code generated by go-swagger; DO NOT EDIT.
22
23 package a1_mediator
24
25 // This file was generated by the swagger tool.
26 // Editing this file might prove futile when you re-run the generate command
27
28 import (
29         "errors"
30         "net/url"
31         golangswaggerpaths "path"
32 )
33
34 // A1ControllerGetHealthcheckURL generates an URL for the a1 controller get healthcheck operation
35 type A1ControllerGetHealthcheckURL struct {
36         _basePath string
37 }
38
39 // WithBasePath sets the base path for this url builder, only required when it's different from the
40 // base path specified in the swagger spec.
41 // When the value of the base path is an empty string
42 func (o *A1ControllerGetHealthcheckURL) WithBasePath(bp string) *A1ControllerGetHealthcheckURL {
43         o.SetBasePath(bp)
44         return o
45 }
46
47 // SetBasePath sets the base path for this url builder, only required when it's different from the
48 // base path specified in the swagger spec.
49 // When the value of the base path is an empty string
50 func (o *A1ControllerGetHealthcheckURL) SetBasePath(bp string) {
51         o._basePath = bp
52 }
53
54 // Build a url path and query string
55 func (o *A1ControllerGetHealthcheckURL) Build() (*url.URL, error) {
56         var _result url.URL
57
58         var _path = "/a1-p/healthcheck"
59
60         _basePath := o._basePath
61         _result.Path = golangswaggerpaths.Join(_basePath, _path)
62
63         return &_result, nil
64 }
65
66 // Must is a helper function to panic when the url builder returns an error
67 func (o *A1ControllerGetHealthcheckURL) Must(u *url.URL, err error) *url.URL {
68         if err != nil {
69                 panic(err)
70         }
71         if u == nil {
72                 panic("url can't be nil")
73         }
74         return u
75 }
76
77 // String returns the string representation of the path with query string
78 func (o *A1ControllerGetHealthcheckURL) String() string {
79         return o.Must(o.Build()).String()
80 }
81
82 // BuildFull builds a full url with scheme, host, path and query string
83 func (o *A1ControllerGetHealthcheckURL) BuildFull(scheme, host string) (*url.URL, error) {
84         if scheme == "" {
85                 return nil, errors.New("scheme is required for a full url on A1ControllerGetHealthcheckURL")
86         }
87         if host == "" {
88                 return nil, errors.New("host is required for a full url on A1ControllerGetHealthcheckURL")
89         }
90
91         base, err := o.Build()
92         if err != nil {
93                 return nil, err
94         }
95
96         base.Scheme = scheme
97         base.Host = host
98         return base, nil
99 }
100
101 // StringFull returns the string representation of a complete url
102 func (o *A1ControllerGetHealthcheckURL) StringFull(scheme, host string) string {
103         return o.Must(o.BuildFull(scheme, host)).String()
104 }