/
soft_layer_vm_pool_client.go
50 lines (36 loc) · 1.27 KB
/
soft_layer_vm_pool_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package client
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
strfmt "github.com/go-openapi/strfmt"
"bosh-softlayer-cpi/softlayer/vps_service/client/vm"
)
// Default soft layer VM pool HTTP client.
var Default = NewHTTPClient(nil)
// NewHTTPClient creates a new soft layer VM pool HTTP client.
func NewHTTPClient(formats strfmt.Registry) *SoftLayerVMPool {
if formats == nil {
formats = strfmt.Default
}
transport := httptransport.New("vps.swagger.io", "/v2", []string{"http"})
return New(transport, formats)
}
// New creates a new soft layer VM pool client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *SoftLayerVMPool {
cli := new(SoftLayerVMPool)
cli.Transport = transport
cli.VM = vm.New(transport, formats)
return cli
}
// SoftLayerVMPool is a client for soft layer VM pool
type SoftLayerVMPool struct {
VM *vm.Client
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *SoftLayerVMPool) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.VM.SetTransport(transport)
}