-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_lwapp2scg.go
73 lines (67 loc) · 2.17 KB
/
api_lwapp2scg.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package api
import (
"context"
"errors"
"net/http"
)
// This file is auto-generated
// Generation Date: 2018-04-27T15:10:38-0500
// API Version: v5
type LWAPP2SCGAPI struct {
client *Client
}
type (
LwappToScgModifyBasicPatchRequest struct {
NatIPTranslation *bool `json:"natIpTranslation,omitempty"`
PasvMaxPort *float64 `json:"pasvMaxPort,omitempty"`
PasvMinPort *float64 `json:"pasvMinPort,omitempty"`
Policy *string `json:"policy,omitempty"`
}
)
// LwappToScgModifyBasicPatch: Use this API command to modify the basic information of the Lwapp Config.
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - requestBody: *LwappToScgModifyBasicPatchRequest
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (l *LWAPP2SCGAPI) LwappToScgModifyBasicPatch(ctx context.Context, requestBody *LwappToScgModifyBasicPatchRequest) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
request := NewRequest("PATCH", "/v5_0/lwapp2scg", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
return l.client.Ensure(ctx, request, 204, nil)
}
type (
LwappToScgModifyAplistPatchRequest []string
)
// LwappToScgModifyAplistPatch: Use this API command to modify the apList of the Lwapp Config.
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - requestBody: *LwappToScgModifyAplistPatchRequest
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (l *LWAPP2SCGAPI) LwappToScgModifyAplistPatch(ctx context.Context, requestBody LwappToScgModifyAplistPatchRequest) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
request := NewRequest("PATCH", "/v5_0/lwapp2scg/apList", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
return l.client.Ensure(ctx, request, 204, nil)
}